shineout 3.6.1-beta.5 → 3.6.1-beta.7
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 +127 -109
- 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
|
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
514
514
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
515
515
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
516
516
|
var _default = exports.default = {
|
|
517
|
-
version: '3.6.1-beta.
|
|
517
|
+
version: '3.6.1-beta.7'
|
|
518
518
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12139,7 +12139,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12139
12139
|
};
|
|
12140
12140
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12141
12141
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12142
|
-
/* harmony default export */ var version = ('3.6.1-beta.
|
|
12142
|
+
/* harmony default export */ var version = ('3.6.1-beta.7');
|
|
12143
12143
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12144
12144
|
|
|
12145
12145
|
|
|
@@ -27320,10 +27320,10 @@ var arrowHeight = 8;
|
|
|
27320
27320
|
var tooltip_animation = {
|
|
27321
27321
|
'@keyframes fadeIn': {
|
|
27322
27322
|
'0%': {
|
|
27323
|
-
opacity:
|
|
27323
|
+
opacity: 0
|
|
27324
27324
|
},
|
|
27325
27325
|
'100%': {
|
|
27326
|
-
opacity:
|
|
27326
|
+
opacity: 1
|
|
27327
27327
|
}
|
|
27328
27328
|
},
|
|
27329
27329
|
'@keyframes moveRight': {
|
|
@@ -27336,26 +27336,32 @@ var tooltip_animation = {
|
|
|
27336
27336
|
},
|
|
27337
27337
|
'@keyframes moveLeft': {
|
|
27338
27338
|
'0%': {
|
|
27339
|
-
|
|
27339
|
+
opacity: 0,
|
|
27340
|
+
marginRight: '0'
|
|
27340
27341
|
},
|
|
27341
27342
|
'100%': {
|
|
27342
|
-
|
|
27343
|
+
opacity: 1,
|
|
27344
|
+
marginRight: '10px'
|
|
27343
27345
|
}
|
|
27344
27346
|
},
|
|
27345
27347
|
'@keyframes moveTop': {
|
|
27346
27348
|
'0%': {
|
|
27349
|
+
opacity: 0,
|
|
27347
27350
|
marginTop: '0'
|
|
27348
27351
|
},
|
|
27349
27352
|
'100%': {
|
|
27350
|
-
|
|
27353
|
+
opacity: 1,
|
|
27354
|
+
marginTop: -10
|
|
27351
27355
|
}
|
|
27352
27356
|
},
|
|
27353
27357
|
'@keyframes moveBottom': {
|
|
27354
27358
|
'0%': {
|
|
27359
|
+
opacity: 0,
|
|
27355
27360
|
marginTop: '0'
|
|
27356
27361
|
},
|
|
27357
27362
|
'100%': {
|
|
27358
|
-
|
|
27363
|
+
opacity: 1,
|
|
27364
|
+
marginTop: 10
|
|
27359
27365
|
}
|
|
27360
27366
|
}
|
|
27361
27367
|
};
|
|
@@ -27380,10 +27386,10 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
27380
27386
|
boxSizing: 'border-box',
|
|
27381
27387
|
'--tooltip-background-color': src.tooltipLightBackgroundColor,
|
|
27382
27388
|
'&[data-soui-position^="top"] $arrow': {
|
|
27383
|
-
transform: '
|
|
27389
|
+
transform: 'translate(0, -1px) rotate(-180deg)'
|
|
27384
27390
|
},
|
|
27385
27391
|
'&[data-soui-position^="bottom"] $arrow': {
|
|
27386
|
-
transform: '
|
|
27392
|
+
transform: 'translate(0, calc(-100% + 1px)) rotate(0deg)'
|
|
27387
27393
|
}
|
|
27388
27394
|
},
|
|
27389
27395
|
'&[data-soui-type^="primary"]': {
|
|
@@ -27407,45 +27413,109 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
27407
27413
|
'--tooltip-background-color': src.tooltipDangerBackgroundColor
|
|
27408
27414
|
},
|
|
27409
27415
|
'&[data-soui-position^="bottom"]': {
|
|
27410
|
-
marginTop: arrowGap - 2
|
|
27416
|
+
marginTop: arrowGap - 2
|
|
27417
|
+
},
|
|
27418
|
+
'&[data-soui-position="bottom"]': {
|
|
27411
27419
|
'& $arrow': {
|
|
27412
|
-
|
|
27420
|
+
left: '50%',
|
|
27421
|
+
transform: 'translate(-50%, calc(-100% + 1px)) rotate(0deg)'
|
|
27422
|
+
}
|
|
27423
|
+
},
|
|
27424
|
+
'&[data-soui-position="bottom-left"]': {
|
|
27425
|
+
'& $arrow': {
|
|
27426
|
+
left: 8,
|
|
27427
|
+
transform: 'translate(0, calc(-100% + 1px)) rotate(0deg)'
|
|
27428
|
+
}
|
|
27429
|
+
},
|
|
27430
|
+
'&[data-soui-position="bottom-right"]': {
|
|
27431
|
+
'& $arrow': {
|
|
27432
|
+
right: 8,
|
|
27433
|
+
transform: 'translate(0, calc(-100% + 1px)) rotate(0deg)'
|
|
27413
27434
|
}
|
|
27414
27435
|
},
|
|
27415
27436
|
'&[data-soui-position^="top"]': {
|
|
27416
27437
|
marginTop: (arrowGap - 2) * -1,
|
|
27417
27438
|
'& $arrow': {
|
|
27418
|
-
|
|
27439
|
+
top: '100%'
|
|
27440
|
+
}
|
|
27441
|
+
},
|
|
27442
|
+
'&[data-soui-position="top"]': {
|
|
27443
|
+
'& $arrow': {
|
|
27444
|
+
left: '50%',
|
|
27445
|
+
transform: 'translate(-50%, -1px) rotate(-180deg)'
|
|
27446
|
+
}
|
|
27447
|
+
},
|
|
27448
|
+
'&[data-soui-position="top-left"]': {
|
|
27449
|
+
'& $arrow': {
|
|
27450
|
+
left: 8,
|
|
27451
|
+
transform: 'translate(0, -1px) rotate(-180deg)'
|
|
27452
|
+
}
|
|
27453
|
+
},
|
|
27454
|
+
'&[data-soui-position="top-right"]': {
|
|
27455
|
+
'& $arrow': {
|
|
27456
|
+
right: 8,
|
|
27457
|
+
transform: 'translate(0, -1px) rotate(-180deg)'
|
|
27419
27458
|
}
|
|
27420
27459
|
},
|
|
27421
27460
|
'&[data-soui-position^="left"]': {
|
|
27422
27461
|
'&[dir=ltr]': {
|
|
27423
|
-
marginRight: arrowGap - 2
|
|
27424
|
-
'& $arrow': {
|
|
27425
|
-
transform: 'translateX(11px) rotate(90deg)'
|
|
27426
|
-
}
|
|
27462
|
+
marginRight: arrowGap - 2
|
|
27427
27463
|
},
|
|
27428
27464
|
'&[dir=rtl]': {
|
|
27429
|
-
'margin-right': arrowGap - 2
|
|
27430
|
-
|
|
27431
|
-
|
|
27432
|
-
|
|
27433
|
-
|
|
27465
|
+
'margin-right': arrowGap - 2
|
|
27466
|
+
}
|
|
27467
|
+
},
|
|
27468
|
+
'&[data-soui-position="left"]': {
|
|
27469
|
+
'& $arrow': {
|
|
27470
|
+
right: 0,
|
|
27471
|
+
top: '50%',
|
|
27472
|
+
transform: 'translate(11px, -50%) rotate(90deg)',
|
|
27473
|
+
transformOrigin: 'center center'
|
|
27474
|
+
}
|
|
27475
|
+
},
|
|
27476
|
+
'&[data-soui-position="left-top"]': {
|
|
27477
|
+
'& $arrow': {
|
|
27478
|
+
right: 0,
|
|
27479
|
+
top: 8,
|
|
27480
|
+
transform: 'translate(11px, 0) rotate(90deg)',
|
|
27481
|
+
transformOrigin: 'center center'
|
|
27482
|
+
}
|
|
27483
|
+
},
|
|
27484
|
+
'&[data-soui-position="left-bottom"]': {
|
|
27485
|
+
'& $arrow': {
|
|
27486
|
+
right: 0,
|
|
27487
|
+
bottom: 8,
|
|
27488
|
+
transform: 'translate(11px, 0) rotate(90deg)',
|
|
27489
|
+
transformOrigin: 'center center'
|
|
27434
27490
|
}
|
|
27435
27491
|
},
|
|
27436
27492
|
'&[data-soui-position^="right"]': {
|
|
27437
27493
|
'&[dir=ltr]': {
|
|
27438
|
-
marginLeft: arrowGap - 2
|
|
27439
|
-
'& $arrow': {
|
|
27440
|
-
transform: 'translateX(-11px) rotate(-90deg)'
|
|
27441
|
-
}
|
|
27494
|
+
marginLeft: arrowGap - 2
|
|
27442
27495
|
},
|
|
27443
27496
|
'&[dir=rtl]': {
|
|
27444
|
-
marginRight: arrowGap - 2
|
|
27445
|
-
|
|
27446
|
-
|
|
27447
|
-
|
|
27448
|
-
|
|
27497
|
+
marginRight: arrowGap - 2
|
|
27498
|
+
}
|
|
27499
|
+
},
|
|
27500
|
+
'&[data-soui-position="right"]': {
|
|
27501
|
+
'& $arrow': {
|
|
27502
|
+
top: '50%',
|
|
27503
|
+
left: 0,
|
|
27504
|
+
transform: 'translate(-11px, -50%) rotate(-90deg)'
|
|
27505
|
+
}
|
|
27506
|
+
},
|
|
27507
|
+
'&[data-soui-position="right-top"]': {
|
|
27508
|
+
'& $arrow': {
|
|
27509
|
+
top: 8,
|
|
27510
|
+
left: 0,
|
|
27511
|
+
transform: 'translate(-11px, 0) rotate(-90deg)'
|
|
27512
|
+
}
|
|
27513
|
+
},
|
|
27514
|
+
'&[data-soui-position="right-bottom"]': {
|
|
27515
|
+
'& $arrow': {
|
|
27516
|
+
bottom: 8,
|
|
27517
|
+
left: 0,
|
|
27518
|
+
transform: 'translate(-11px, 0) rotate(-90deg)'
|
|
27449
27519
|
}
|
|
27450
27520
|
}
|
|
27451
27521
|
},
|
|
@@ -29605,7 +29675,6 @@ var usePopup = function usePopup(props) {
|
|
|
29605
29675
|
removeChild = _useContext.removeChild;
|
|
29606
29676
|
var targetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29607
29677
|
var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29608
|
-
var arrowRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29609
29678
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
29610
29679
|
bindChild(popupRef);
|
|
29611
29680
|
return function () {
|
|
@@ -29774,7 +29843,6 @@ var usePopup = function usePopup(props) {
|
|
|
29774
29843
|
position: position,
|
|
29775
29844
|
targetRef: targetRef,
|
|
29776
29845
|
popupRef: popupRef,
|
|
29777
|
-
arrowRef: arrowRef,
|
|
29778
29846
|
getTargetProps: getTargetProps,
|
|
29779
29847
|
openPop: openPop,
|
|
29780
29848
|
closePop: closePop,
|
|
@@ -29945,19 +30013,17 @@ function getParent(el, target) {
|
|
|
29945
30013
|
}
|
|
29946
30014
|
return null;
|
|
29947
30015
|
}
|
|
30016
|
+
function isScrollable(el) {
|
|
30017
|
+
var style = window.getComputedStyle(el);
|
|
30018
|
+
var overflowX = style.overflowX;
|
|
30019
|
+
var overflowY = style.overflowY;
|
|
30020
|
+
return (overflowX === 'auto' || overflowX === 'scroll' || overflowY === 'auto' || overflowY === 'scroll') && (el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth);
|
|
30021
|
+
}
|
|
29948
30022
|
function getClosestScrollContainer(element) {
|
|
29949
30023
|
if (!element) {
|
|
29950
30024
|
return null;
|
|
29951
30025
|
}
|
|
29952
30026
|
|
|
29953
|
-
// 检查元素是否可滚动
|
|
29954
|
-
var isScrollable = function isScrollable(el) {
|
|
29955
|
-
var style = window.getComputedStyle(el);
|
|
29956
|
-
var overflowX = style.overflowX;
|
|
29957
|
-
var overflowY = style.overflowY;
|
|
29958
|
-
return (overflowX === 'auto' || overflowX === 'scroll' || overflowY === 'auto' || overflowY === 'scroll') && (el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth);
|
|
29959
|
-
};
|
|
29960
|
-
|
|
29961
30027
|
// 如果元素本身是可滚动的,直接返回
|
|
29962
30028
|
if (isScrollable(element)) {
|
|
29963
30029
|
return element;
|
|
@@ -30099,15 +30165,19 @@ var useCheckElementPosition = function useCheckElementPosition(elementRef) {
|
|
|
30099
30165
|
if (scrollContainerRect) {
|
|
30100
30166
|
newPosition = {
|
|
30101
30167
|
top: rect.top - scrollContainerRect.top,
|
|
30102
|
-
left: rect.left - scrollContainerRect.left
|
|
30168
|
+
left: rect.left - scrollContainerRect.left,
|
|
30169
|
+
width: rect.width,
|
|
30170
|
+
height: rect.height
|
|
30103
30171
|
};
|
|
30104
30172
|
} else {
|
|
30105
30173
|
newPosition = {
|
|
30106
30174
|
top: rect.top,
|
|
30107
|
-
left: rect.left
|
|
30175
|
+
left: rect.left,
|
|
30176
|
+
width: rect.width,
|
|
30177
|
+
height: rect.height
|
|
30108
30178
|
};
|
|
30109
30179
|
}
|
|
30110
|
-
if (newPosition.top !== lastPosition.current.top || newPosition.left !== lastPosition.current.left) {
|
|
30180
|
+
if (newPosition.top !== lastPosition.current.top || newPosition.left !== lastPosition.current.left || newPosition.width !== lastPosition.current.width || newPosition.height !== lastPosition.current.height) {
|
|
30111
30181
|
setPosition(newPosition);
|
|
30112
30182
|
lastPosition.current = newPosition;
|
|
30113
30183
|
}
|
|
@@ -30333,10 +30403,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30333
30403
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
30334
30404
|
style = _useState2[0],
|
|
30335
30405
|
setStyle = _useState2[1];
|
|
30336
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
|
30337
|
-
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
30338
|
-
arrayStyle = _useState4[0],
|
|
30339
|
-
setArrayStyle = _useState4[1];
|
|
30340
30406
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
30341
30407
|
containerRect: {
|
|
30342
30408
|
left: 0,
|
|
@@ -30421,7 +30487,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30421
30487
|
position: 'absolute',
|
|
30422
30488
|
zIndex: zIndex
|
|
30423
30489
|
};
|
|
30424
|
-
var arrayStyle = {};
|
|
30425
30490
|
if (fixedWidth) {
|
|
30426
30491
|
var widthKey = fixedWidth === 'min' ? 'minWidth' : 'width';
|
|
30427
30492
|
style[widthKey] = rect.width;
|
|
@@ -30448,7 +30513,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30448
30513
|
if (h === 'left') {
|
|
30449
30514
|
style.left = rect.left - containerRect.left + containerScroll.left - (offset ? offset[0] : 0);
|
|
30450
30515
|
style.transform = '';
|
|
30451
|
-
arrayStyle.left = "8px";
|
|
30452
30516
|
if (adjust) {
|
|
30453
30517
|
overRight = rect.left + context.popUpWidth - bodyRect.right + containerScrollBarWidth;
|
|
30454
30518
|
if (style.left < 0 && targetRect) {
|
|
@@ -30459,7 +30523,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30459
30523
|
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
|
|
30460
30524
|
style.left = 'auto';
|
|
30461
30525
|
style.transform = '';
|
|
30462
|
-
arrayStyle.right = "8px";
|
|
30463
30526
|
if (adjust) {
|
|
30464
30527
|
overLeft = bodyRect.left - (rect.right - context.popUpWidth);
|
|
30465
30528
|
if (style.right < 0 && targetRect) {
|
|
@@ -30475,9 +30538,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30475
30538
|
overRight = rect.left + rect.width / 2 + context.popUpWidth / 2 - bodyRect.width + containerScrollBarWidth;
|
|
30476
30539
|
overLeft = bodyRect.left - (rect.left + rect.width / 2 - context.popUpWidth / 2);
|
|
30477
30540
|
}
|
|
30478
|
-
if (targetRect) {
|
|
30479
|
-
arrayStyle.left = "".concat(targetRect.width / 2 - 5.9, "px");
|
|
30480
|
-
}
|
|
30481
30541
|
}
|
|
30482
30542
|
if (adjust) {
|
|
30483
30543
|
// 调节左右溢出
|
|
@@ -30486,26 +30546,16 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30486
30546
|
style.left -= overRight;
|
|
30487
30547
|
// 扣除触发器距离页面右侧的距离,以保证从右侧弹出的窗口最右边对齐触发器最右边
|
|
30488
30548
|
style.left -= toRightDistance;
|
|
30489
|
-
if (targetRect) {
|
|
30490
|
-
arrayStyle.left = "".concat((targetRect === null || targetRect === void 0 ? void 0 : targetRect.width) - context.parentRect.width / 2 - 5.9, "px");
|
|
30491
|
-
}
|
|
30492
30549
|
}
|
|
30493
30550
|
if (overLeft > 0) {
|
|
30494
30551
|
style.left += overLeft;
|
|
30495
|
-
arrayStyle.left = "".concat(rect.width / 2 - 5.9, "px");
|
|
30496
30552
|
}
|
|
30497
30553
|
}
|
|
30498
30554
|
if (v === 'bottom') {
|
|
30499
30555
|
style.top = rect.bottom - containerRect.top + containerScroll.top + popupGap;
|
|
30500
|
-
if (targetRect) {
|
|
30501
|
-
arrayStyle.top = "".concat(0, "px");
|
|
30502
|
-
}
|
|
30503
30556
|
} else {
|
|
30504
30557
|
style.top = rect.top - containerRect.top + containerScroll.top - popupGap;
|
|
30505
30558
|
style.transform += 'translateY(-100%)';
|
|
30506
|
-
if (targetRect) {
|
|
30507
|
-
arrayStyle.top = "".concat(targetRect.height - 5.9 - 4, "px");
|
|
30508
|
-
}
|
|
30509
30559
|
}
|
|
30510
30560
|
} else if (horizontalPosition.includes(targetPosition)) {
|
|
30511
30561
|
var _targetPosition$split3 = targetPosition.split('-'),
|
|
@@ -30515,35 +30565,25 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30515
30565
|
if (_v === 'top') {
|
|
30516
30566
|
style.top = rect.top - containerRect.top + containerScroll.top - (offset ? offset[1] : 0);
|
|
30517
30567
|
style.transform = '';
|
|
30518
|
-
arrayStyle.top = "8px";
|
|
30519
30568
|
} else if (_v === 'bottom') {
|
|
30520
30569
|
style.top = rect.bottom - containerRect.top + containerScroll.top + (offset ? offset[1] : 0);
|
|
30521
|
-
arrayStyle.bottom = "8px";
|
|
30522
30570
|
style.transform = 'translateY(-100%)';
|
|
30523
30571
|
} else {
|
|
30524
30572
|
// 居中对齐
|
|
30525
30573
|
style.top = rect.top - containerRect.top + containerScroll.top + rect.height / 2;
|
|
30526
|
-
if (targetRect) {
|
|
30527
|
-
arrayStyle.top = "".concat(targetRect.height / 2 - 5.9 / 2, "px");
|
|
30528
|
-
}
|
|
30529
30574
|
style.transform = 'translateY(-50%)';
|
|
30530
30575
|
}
|
|
30531
30576
|
if (_h === 'right') {
|
|
30532
30577
|
style.left = rect.right - containerRect.left + containerScroll.left + popupGap;
|
|
30533
|
-
arrayStyle.left = '0px';
|
|
30534
|
-
arrayStyle.right = 'auto';
|
|
30535
30578
|
} else {
|
|
30536
30579
|
style.right = containerRect.right - rect.left;
|
|
30537
|
-
arrayStyle.right = '0px';
|
|
30538
|
-
arrayStyle.left = 'auto';
|
|
30539
30580
|
}
|
|
30540
30581
|
} else if (position === 'cover') {
|
|
30541
30582
|
style.top = rect.top - containerRect.top + containerScroll.top;
|
|
30542
30583
|
style.left = rect.left - containerRect.left + containerScroll.left;
|
|
30543
30584
|
}
|
|
30544
30585
|
return {
|
|
30545
|
-
style: style
|
|
30546
|
-
arrayStyle: arrayStyle
|
|
30586
|
+
style: style
|
|
30547
30587
|
};
|
|
30548
30588
|
};
|
|
30549
30589
|
var getAbsoluteStyle = function getAbsoluteStyle(position) {
|
|
@@ -30563,8 +30603,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30563
30603
|
}
|
|
30564
30604
|
}
|
|
30565
30605
|
var _getAbsolutePositionS = getAbsolutePositionStyle(rect, position),
|
|
30566
|
-
style = _getAbsolutePositionS.style
|
|
30567
|
-
arrayStyle = _getAbsolutePositionS.arrayStyle;
|
|
30606
|
+
style = _getAbsolutePositionS.style;
|
|
30568
30607
|
var currentCSSZoom = getCurrentCSSZoom();
|
|
30569
30608
|
if (currentCSSZoom && currentCSSZoom !== 1) {
|
|
30570
30609
|
if (style.left && typeof style.left === 'number') {
|
|
@@ -30581,13 +30620,11 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30581
30620
|
}
|
|
30582
30621
|
}
|
|
30583
30622
|
return {
|
|
30584
|
-
style: style
|
|
30585
|
-
arrayStyle: arrayStyle
|
|
30623
|
+
style: style
|
|
30586
30624
|
};
|
|
30587
30625
|
};
|
|
30588
30626
|
var getStyle = function getStyle() {
|
|
30589
30627
|
var newStyle = {};
|
|
30590
|
-
var newArrayStyle = {};
|
|
30591
30628
|
var _ref2 = config || {},
|
|
30592
30629
|
position = _ref2.position,
|
|
30593
30630
|
absolute = _ref2.absolute;
|
|
@@ -30611,10 +30648,8 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30611
30648
|
});
|
|
30612
30649
|
} else {
|
|
30613
30650
|
var _ref3 = getAbsoluteStyle(realPosition),
|
|
30614
|
-
nextStyle = _ref3.style
|
|
30615
|
-
nextArrayStyle = _ref3.arrayStyle;
|
|
30651
|
+
nextStyle = _ref3.style;
|
|
30616
30652
|
newStyle = nextStyle;
|
|
30617
|
-
newArrayStyle = nextArrayStyle;
|
|
30618
30653
|
}
|
|
30619
30654
|
// for animation
|
|
30620
30655
|
if (realPosition.indexOf('top') === 0) {
|
|
@@ -30623,17 +30658,14 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30623
30658
|
newStyle.transformOrigin = 'center top';
|
|
30624
30659
|
}
|
|
30625
30660
|
return {
|
|
30626
|
-
newStyle: newStyle
|
|
30627
|
-
newArrayStyle: newArrayStyle
|
|
30661
|
+
newStyle: newStyle
|
|
30628
30662
|
};
|
|
30629
30663
|
};
|
|
30630
30664
|
var updateStyle = use_persist_fn(function () {
|
|
30631
30665
|
var _getStyle = getStyle(),
|
|
30632
|
-
newStyle = _getStyle.newStyle
|
|
30633
|
-
newArrayStyle = _getStyle.newArrayStyle;
|
|
30666
|
+
newStyle = _getStyle.newStyle;
|
|
30634
30667
|
if (newStyle && !shallow_equal(style, newStyle)) {
|
|
30635
30668
|
setStyle(newStyle);
|
|
30636
|
-
setArrayStyle(newArrayStyle || {});
|
|
30637
30669
|
}
|
|
30638
30670
|
|
|
30639
30671
|
// 当父元素的滚动容器滚动时,判断是否需要更新弹出层位置,包括是否隐藏弹出层(通过hideStyle隐藏,不是show状态)
|
|
@@ -30641,8 +30673,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30641
30673
|
});
|
|
30642
30674
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition]);
|
|
30643
30675
|
return {
|
|
30644
|
-
style: style
|
|
30645
|
-
arrayStyle: arrayStyle
|
|
30676
|
+
style: style
|
|
30646
30677
|
};
|
|
30647
30678
|
};
|
|
30648
30679
|
/* harmony default export */ var use_position_style = ((/* unused pure expression or super */ null && (usePositionStyle)));
|
|
@@ -31292,7 +31323,6 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
31292
31323
|
_props$zIndex = props.zIndex,
|
|
31293
31324
|
zIndex = _props$zIndex === void 0 ? 1051 : _props$zIndex,
|
|
31294
31325
|
focus = props.focus,
|
|
31295
|
-
arrowRef = props.arrowRef,
|
|
31296
31326
|
popupElRef = props.popupElRef,
|
|
31297
31327
|
updateKey = props.updateKey,
|
|
31298
31328
|
popupGap = props.popupGap,
|
|
@@ -31342,19 +31372,10 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
31342
31372
|
adjust: adjust,
|
|
31343
31373
|
offset: offset
|
|
31344
31374
|
}),
|
|
31345
|
-
style = _usePositionStyle.style
|
|
31346
|
-
arrayStyle = _usePositionStyle.arrayStyle;
|
|
31375
|
+
style = _usePositionStyle.style;
|
|
31347
31376
|
var childStyle = children.props.style;
|
|
31348
31377
|
var newStyle = objectSpread2_default()(objectSpread2_default()({}, style), childStyle);
|
|
31349
31378
|
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children) === false) return null;
|
|
31350
|
-
if (arrowRef && arrayStyle && Object.keys(arrayStyle).length > 0) {
|
|
31351
|
-
Object.keys(arrayStyle).forEach(function (key) {
|
|
31352
|
-
if (arrowRef.current) {
|
|
31353
|
-
// @ts-ignore
|
|
31354
|
-
arrowRef.current.style[key] = arrayStyle[key];
|
|
31355
|
-
}
|
|
31356
|
-
});
|
|
31357
|
-
}
|
|
31358
31379
|
var styledChild = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
|
|
31359
31380
|
style: newStyle
|
|
31360
31381
|
});
|
|
@@ -33903,6 +33924,7 @@ var card_group_jssStyle = {
|
|
|
33903
33924
|
;// CONCATENATED MODULE: ../hooks/src/common/use-in-view/use-in-view.ts
|
|
33904
33925
|
|
|
33905
33926
|
|
|
33927
|
+
|
|
33906
33928
|
var useInView = function useInView() {
|
|
33907
33929
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33908
33930
|
var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -33935,7 +33957,7 @@ var useInView = function useInView() {
|
|
|
33935
33957
|
}
|
|
33936
33958
|
}
|
|
33937
33959
|
}, {
|
|
33938
|
-
root: options.root
|
|
33960
|
+
root: options.root && isScrollable(options.root) ? options.root : null,
|
|
33939
33961
|
rootMargin: options.rootMargin || '0px',
|
|
33940
33962
|
threshold: options.threshold || 0
|
|
33941
33963
|
});
|
|
@@ -35904,7 +35926,6 @@ var Item = function Item(props) {
|
|
|
35904
35926
|
});
|
|
35905
35927
|
var renderChildren = function renderChildren(content) {
|
|
35906
35928
|
if (!props.placeholder) return content;
|
|
35907
|
-
if (!container) return content;
|
|
35908
35929
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(lazyload, {
|
|
35909
35930
|
container: container,
|
|
35910
35931
|
placeholder: props.placeholder,
|
|
@@ -50003,7 +50024,7 @@ var UseFormItem = function UseFormItem() {
|
|
|
50003
50024
|
var tooltip_devUseWarning = devUseWarning;
|
|
50004
50025
|
var defaultDelay = 0;
|
|
50005
50026
|
var Tooltip = function Tooltip(props) {
|
|
50006
|
-
var _jssStyle$tooltip, _config$tooltip
|
|
50027
|
+
var _jssStyle$tooltip, _config$tooltip;
|
|
50007
50028
|
var _props$trigger = props.trigger,
|
|
50008
50029
|
trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
|
|
50009
50030
|
priorityDirection = props.priorityDirection,
|
|
@@ -50023,7 +50044,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
50023
50044
|
popsitionProps = _props$position === void 0 ? 'auto' : _props$position;
|
|
50024
50045
|
var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
|
|
50025
50046
|
var config = useConfig();
|
|
50026
|
-
var persistent =
|
|
50047
|
+
var persistent = persistentProp !== null && persistentProp !== void 0 ? persistentProp : (_config$tooltip = config.tooltip) === null || _config$tooltip === void 0 ? void 0 : _config$tooltip.persistent;
|
|
50027
50048
|
var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
|
|
50028
50049
|
var delay = props.delay || props.mouseEnterDelay || defaultDelay;
|
|
50029
50050
|
var _usePopup = use_popup({
|
|
@@ -50039,7 +50060,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50039
50060
|
getTargetProps = _usePopup.getTargetProps,
|
|
50040
50061
|
targetRef = _usePopup.targetRef,
|
|
50041
50062
|
popupRef = _usePopup.popupRef,
|
|
50042
|
-
arrowRef = _usePopup.arrowRef,
|
|
50043
50063
|
closePop = _usePopup.closePop;
|
|
50044
50064
|
var events = getTargetProps();
|
|
50045
50065
|
var bindEvents = function bindEvents() {
|
|
@@ -50100,7 +50120,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50100
50120
|
popupGap: 0,
|
|
50101
50121
|
zIndex: zIndex,
|
|
50102
50122
|
adjust: popsitionProps === 'auto',
|
|
50103
|
-
arrowRef: arrowRef,
|
|
50104
50123
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
50105
50124
|
className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
|
|
50106
50125
|
style: {
|
|
@@ -50114,7 +50133,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50114
50133
|
onMouseLeave: events.onMouseLeave,
|
|
50115
50134
|
dir: config.direction,
|
|
50116
50135
|
children: [showArrow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
|
|
50117
|
-
ref: arrowRef,
|
|
50118
50136
|
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
|
|
50119
50137
|
}, getDataAttribute({
|
|
50120
50138
|
role: 'arrow'
|
|
@@ -52309,7 +52327,7 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
52309
52327
|
var onInnerChange = use_persist_fn(function (val) {
|
|
52310
52328
|
setInternalInputValue(getStringValue(val));
|
|
52311
52329
|
if (typeof val === 'string') {
|
|
52312
|
-
if (val.endsWith('.')) return;
|
|
52330
|
+
if (val.endsWith('.') || val.includes('.') && val.endsWith('0')) return;
|
|
52313
52331
|
var num = parseFloat(val);
|
|
52314
52332
|
if (val === '') {
|
|
52315
52333
|
// 如果允许空值,则返回 null,否则返回 undefined
|
|
@@ -69678,7 +69696,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
69678
69696
|
|
|
69679
69697
|
|
|
69680
69698
|
/* harmony default export */ var src_0 = ({
|
|
69681
|
-
version: '3.6.1-beta.
|
|
69699
|
+
version: '3.6.1-beta.7'
|
|
69682
69700
|
});
|
|
69683
69701
|
}();
|
|
69684
69702
|
/******/ return __webpack_exports__;
|