shineout 3.7.1-beta.3 → 3.7.1-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 +1 -1
- package/dist/shineout.js +43 -28
- 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
|
@@ -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.1-beta.
|
|
525
|
+
version: '3.7.1-beta.5'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12227,7 +12227,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12227
12227
|
};
|
|
12228
12228
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12229
12229
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12230
|
-
/* harmony default export */ var version = ('3.7.1-beta.
|
|
12230
|
+
/* harmony default export */ var version = ('3.7.1-beta.5');
|
|
12231
12231
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12232
12232
|
|
|
12233
12233
|
|
|
@@ -16212,7 +16212,7 @@ var ButtonStyle = {
|
|
|
16212
16212
|
borderBottomRightRadius: "calc(".concat(src.buttonBorderRadius, " - 1px)")
|
|
16213
16213
|
}
|
|
16214
16214
|
},
|
|
16215
|
-
'[data-soui-role="input-group-
|
|
16215
|
+
'[data-soui-role="input-group-separate"] > &': {
|
|
16216
16216
|
borderRadius: 0,
|
|
16217
16217
|
marginLeft: -1,
|
|
16218
16218
|
'&:first-child': {
|
|
@@ -17121,13 +17121,13 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
17121
17121
|
'[data-soui-role="input-group"] [data-soui-input-border] + &&&': {
|
|
17122
17122
|
borderLeftWidth: '1px'
|
|
17123
17123
|
},
|
|
17124
|
-
'[data-soui-role="input-group-
|
|
17124
|
+
'[data-soui-role="input-group-separate"] &&&, [data-soui-role="input-group-separate"] &&&:hover': {
|
|
17125
17125
|
borderRadius: 0,
|
|
17126
17126
|
flexShrink: 0,
|
|
17127
17127
|
width: 'auto',
|
|
17128
17128
|
'margin-left': "-1px",
|
|
17129
17129
|
'&:hover': {
|
|
17130
|
-
zIndex:
|
|
17130
|
+
zIndex: 7
|
|
17131
17131
|
},
|
|
17132
17132
|
'&:first-child': {
|
|
17133
17133
|
marginLeft: 0,
|
|
@@ -17139,7 +17139,7 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
17139
17139
|
borderBottomRightRadius: token.borderRadius
|
|
17140
17140
|
}
|
|
17141
17141
|
},
|
|
17142
|
-
'[dir=rtl][data-soui-role="input-group-
|
|
17142
|
+
'[dir=rtl][data-soui-role="input-group-separate"] &&&, [dir=rtl][data-soui-role="input-group-separate"] &&&:hover': {
|
|
17143
17143
|
'&:first-child': {
|
|
17144
17144
|
borderRadius: "0 ".concat(token.borderRadius, " ").concat(token.borderRadius, " 0")
|
|
17145
17145
|
},
|
|
@@ -17187,10 +17187,10 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
17187
17187
|
borderColor: token.focusBorderColor,
|
|
17188
17188
|
boxShadow: "0 0 0 2px ".concat(token.focusShadow),
|
|
17189
17189
|
background: token.focusBackgroundColor,
|
|
17190
|
-
'&[data-soui-role="input-group-
|
|
17190
|
+
'&[data-soui-role="input-group-separate"]': {
|
|
17191
17191
|
boxShadow: 'none'
|
|
17192
17192
|
},
|
|
17193
|
-
'[data-soui-role="input-group-
|
|
17193
|
+
'[data-soui-role="input-group-separate"] &': {
|
|
17194
17194
|
zIndex: 1
|
|
17195
17195
|
},
|
|
17196
17196
|
'&:hover': {
|
|
@@ -17207,7 +17207,7 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
17207
17207
|
boxShadow: "0 0 0 2px ".concat(token.errorFocusShadow),
|
|
17208
17208
|
borderColor: token.errorFocusBorderColor,
|
|
17209
17209
|
background: token.errorFocusBackgroundColor
|
|
17210
|
-
// '[data-soui-role="input-group-
|
|
17210
|
+
// '[data-soui-role="input-group-separate"]&': {
|
|
17211
17211
|
// boxShadow: 'none',
|
|
17212
17212
|
// }
|
|
17213
17213
|
})), "".concat(name, "Disabled"), {
|
|
@@ -20418,7 +20418,7 @@ var groupSpace = function groupSpace(gap) {
|
|
|
20418
20418
|
'& > i:last-child, & > span:last-child': {
|
|
20419
20419
|
paddingRight: gap
|
|
20420
20420
|
},
|
|
20421
|
-
'[data-soui-role="input-group-seperate"]&': {
|
|
20421
|
+
'[data-soui-role="input-group-separate"]&, [data-soui-role="input-group-seperate"]&': {
|
|
20422
20422
|
'& > b:first-child': {
|
|
20423
20423
|
marginLeft: 0,
|
|
20424
20424
|
borderLeft: "1px solid ".concat(src.inputBorderColor)
|
|
@@ -20475,7 +20475,7 @@ var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_
|
|
|
20475
20475
|
alignItems: 'center',
|
|
20476
20476
|
position: 'relative'
|
|
20477
20477
|
}, input_wrapper), {}, {
|
|
20478
|
-
'[data-soui-role="input-group-seperate"] &': {
|
|
20478
|
+
'[data-soui-role="input-group-separate"] &, [data-soui-role="input-group-seperate"] &': {
|
|
20479
20479
|
flex: 1,
|
|
20480
20480
|
minWidth: 0
|
|
20481
20481
|
}
|
|
@@ -20566,7 +20566,7 @@ var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_
|
|
|
20566
20566
|
background: 'transparent'
|
|
20567
20567
|
}
|
|
20568
20568
|
}, groupSpace(src.inputPaddingX)),
|
|
20569
|
-
|
|
20569
|
+
groupSeparate: {
|
|
20570
20570
|
border: 'none',
|
|
20571
20571
|
'& > b': {
|
|
20572
20572
|
border: "1px solid ".concat(src.inputBorderColor),
|
|
@@ -30802,7 +30802,7 @@ var useCheckElementSize = function useCheckElementSize(targetElementRef) {
|
|
|
30802
30802
|
width: rect.width,
|
|
30803
30803
|
height: rect.height
|
|
30804
30804
|
};
|
|
30805
|
-
if (newSize.width !== lastSize.current.width || newSize.height !== lastSize.current.height) {
|
|
30805
|
+
if (newSize.width !== lastSize.current.width || newSize.height !== lastSize.current.height && newSize.height !== 0) {
|
|
30806
30806
|
setSize(newSize);
|
|
30807
30807
|
lastSize.current = newSize;
|
|
30808
30808
|
}
|
|
@@ -31017,6 +31017,20 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31017
31017
|
var popupElSize = useCheckElementSize(popupElRef, {
|
|
31018
31018
|
enable: show
|
|
31019
31019
|
});
|
|
31020
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
31021
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
31022
|
+
popupElWidth = _useState4[0],
|
|
31023
|
+
setPopupElWidth = _useState4[1];
|
|
31024
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
31025
|
+
if (!show || !popupElRef.current) return;
|
|
31026
|
+
if (popupElRef.current) {
|
|
31027
|
+
// 二次打开弹出层时,元素被之前的动画设置了display: none,重新获取元素尺寸时,需要立即设置display: block
|
|
31028
|
+
if (popupElRef.current.style.display === 'none') {
|
|
31029
|
+
popupElRef.current.style.display = 'block';
|
|
31030
|
+
}
|
|
31031
|
+
setPopupElWidth(popupElRef.current.getBoundingClientRect().width);
|
|
31032
|
+
}
|
|
31033
|
+
}, [show, popupElRef.current]);
|
|
31020
31034
|
var adjustPosition = function adjustPosition(position) {
|
|
31021
31035
|
var winHeight = docSize.height;
|
|
31022
31036
|
if (!verticalPosition.includes(position)) return position;
|
|
@@ -31043,6 +31057,14 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31043
31057
|
newPosition = newPosition.replace('left', 'right');
|
|
31044
31058
|
}
|
|
31045
31059
|
}
|
|
31060
|
+
} else {
|
|
31061
|
+
// absolute 场景下,右侧溢出判断需要考虑弹出层元素的尺寸
|
|
31062
|
+
var _position$split = position.split('-'),
|
|
31063
|
+
_position$split2 = slicedToArray_default()(_position$split, 2),
|
|
31064
|
+
_horizontalPosition = _position$split2[1];
|
|
31065
|
+
if (_horizontalPosition === 'left' && context.parentRect.left + (popupElWidth || context.popUpWidth) > docSize.width) {
|
|
31066
|
+
newPosition = newPosition.replace('left', 'right');
|
|
31067
|
+
}
|
|
31046
31068
|
}
|
|
31047
31069
|
return newPosition;
|
|
31048
31070
|
};
|
|
@@ -31253,7 +31275,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31253
31275
|
// 当父元素的滚动容器滚动时,判断是否需要更新弹出层位置,包括是否隐藏弹出层(通过hideStyle隐藏,不是show状态)
|
|
31254
31276
|
context.prevParentPosition = parentElNewPosition;
|
|
31255
31277
|
});
|
|
31256
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition, popupElSize
|
|
31278
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition, popupElSize]);
|
|
31257
31279
|
return {
|
|
31258
31280
|
style: style
|
|
31259
31281
|
};
|
|
@@ -39355,9 +39377,7 @@ var Scroll = function Scroll(props) {
|
|
|
39355
39377
|
_props$scrollWidth = props.scrollWidth,
|
|
39356
39378
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
39357
39379
|
_props$defaultHeight = props.defaultHeight,
|
|
39358
|
-
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight
|
|
39359
|
-
_props$keepScrollTop = props.keepScrollTop,
|
|
39360
|
-
keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
|
|
39380
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
|
|
39361
39381
|
var _useResize = useResize({
|
|
39362
39382
|
targetRef: containerRef,
|
|
39363
39383
|
timer: 100
|
|
@@ -39382,7 +39402,6 @@ var Scroll = function Scroll(props) {
|
|
|
39382
39402
|
|
|
39383
39403
|
// 当滚动容器的高度为 0 时,paddingTop 为 0,避免滚动条抖动现象
|
|
39384
39404
|
var paddingTop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
39385
|
-
if (keepScrollTop) return Math.max(0, Math.floor(scrollHeight - height));
|
|
39386
39405
|
return height === 0 ? 0 : Math.max(0, Math.floor(scrollHeight - height));
|
|
39387
39406
|
}, [scrollHeight, height]);
|
|
39388
39407
|
var placeStyle = {
|
|
@@ -39496,7 +39515,6 @@ var VirtualList = function VirtualList(props) {
|
|
|
39496
39515
|
className = props.className,
|
|
39497
39516
|
lineHeight = props.lineHeight,
|
|
39498
39517
|
height = props.height,
|
|
39499
|
-
keepScrollTop = props.keepScrollTop,
|
|
39500
39518
|
keepScrollHeight = props.keepScrollHeight,
|
|
39501
39519
|
renderItem = props.renderItem,
|
|
39502
39520
|
customRenderItem = props.customRenderItem,
|
|
@@ -39663,7 +39681,6 @@ var VirtualList = function VirtualList(props) {
|
|
|
39663
39681
|
style: nextStyle,
|
|
39664
39682
|
height: height,
|
|
39665
39683
|
scrollWidth: 0,
|
|
39666
|
-
keepScrollTop: keepScrollTop,
|
|
39667
39684
|
scrollerStyle: scrollerStyle,
|
|
39668
39685
|
scrollHeight: scrollHeight,
|
|
39669
39686
|
childrenStyle: {
|
|
@@ -39693,9 +39710,8 @@ var VirtualList = function VirtualList(props) {
|
|
|
39693
39710
|
context.preIndex = startIndex;
|
|
39694
39711
|
}, [startIndex]);
|
|
39695
39712
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
39696
|
-
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
39697
|
-
if (keepScrollTop) return;
|
|
39698
39713
|
if (keepScrollHeight) return;
|
|
39714
|
+
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
39699
39715
|
setTop(0);
|
|
39700
39716
|
setStartIndex(0);
|
|
39701
39717
|
return function () {
|
|
@@ -53027,10 +53043,12 @@ var input_input_Input = function Input(props) {
|
|
|
53027
53043
|
className = props.className,
|
|
53028
53044
|
width = props.width,
|
|
53029
53045
|
style = props.style,
|
|
53030
|
-
seperate = props.seperate
|
|
53031
|
-
|
|
53046
|
+
seperate = props.seperate,
|
|
53047
|
+
separate = props.separate;
|
|
53048
|
+
var shouldSeparate = separate !== null && separate !== void 0 ? separate : seperate;
|
|
53049
|
+
var rootClass = classnames_default()(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, shouldSeparate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeparate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
|
|
53032
53050
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
53033
|
-
role:
|
|
53051
|
+
role: shouldSeparate ? 'input-group-separate' : 'input-group'
|
|
53034
53052
|
})), {}, {
|
|
53035
53053
|
className: rootClass,
|
|
53036
53054
|
style: objectSpread2_default()({
|
|
@@ -53873,7 +53891,6 @@ var list_List = function List(props) {
|
|
|
53873
53891
|
controlType = props.controlType,
|
|
53874
53892
|
hideCreateOption = props.hideCreateOption,
|
|
53875
53893
|
optionListRef = props.optionListRef,
|
|
53876
|
-
keepScrollTop = props.keepScrollTop,
|
|
53877
53894
|
isAnimationFinish = props.isAnimationFinish,
|
|
53878
53895
|
_props$renderItem = props.renderItem,
|
|
53879
53896
|
renderItemProp = _props$renderItem === void 0 ? function (d) {
|
|
@@ -54041,7 +54058,6 @@ var list_List = function List(props) {
|
|
|
54041
54058
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
54042
54059
|
virtualRef: virtualRef,
|
|
54043
54060
|
data: data,
|
|
54044
|
-
keepScrollTop: keepScrollTop,
|
|
54045
54061
|
keygen: keygen,
|
|
54046
54062
|
tag: 'ul',
|
|
54047
54063
|
groupKey: groupKey,
|
|
@@ -56451,7 +56467,6 @@ function Select(props0) {
|
|
|
56451
56467
|
renderItem: renderItem,
|
|
56452
56468
|
controlType: controlType,
|
|
56453
56469
|
onLoadMore: onLoadMore,
|
|
56454
|
-
keepScrollTop: !!filterText ? false : true,
|
|
56455
56470
|
isAnimationFinish: isAnimationFinish,
|
|
56456
56471
|
threshold: threshold,
|
|
56457
56472
|
onControlTypeChange: setControlType,
|
|
@@ -71317,7 +71332,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
71317
71332
|
|
|
71318
71333
|
|
|
71319
71334
|
/* harmony default export */ var src_0 = ({
|
|
71320
|
-
version: '3.7.1-beta.
|
|
71335
|
+
version: '3.7.1-beta.5'
|
|
71321
71336
|
});
|
|
71322
71337
|
}();
|
|
71323
71338
|
/******/ return __webpack_exports__;
|