shineout 3.8.0-beta.12 → 3.8.0-beta.14
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 +171 -25
- 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.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.14'
|
|
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.8.0-beta.
|
|
12237
|
+
/* harmony default export */ var version = ('3.8.0-beta.14');
|
|
12238
12238
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12239
12239
|
|
|
12240
12240
|
|
|
@@ -22450,6 +22450,26 @@ var tooltipAnimation = {
|
|
|
22450
22450
|
transform: "var(--soui-popup-transform) scale(1)"
|
|
22451
22451
|
}
|
|
22452
22452
|
},
|
|
22453
|
+
'@keyframes moveRightTop': {
|
|
22454
|
+
'0%': {
|
|
22455
|
+
transformOrigin: 'left top',
|
|
22456
|
+
transform: "var(--soui-popup-transform) scale(0.5)"
|
|
22457
|
+
},
|
|
22458
|
+
'100%': {
|
|
22459
|
+
transformOrigin: 'left top',
|
|
22460
|
+
transform: "var(--soui-popup-transform) scale(1)"
|
|
22461
|
+
}
|
|
22462
|
+
},
|
|
22463
|
+
'@keyframes moveRightBottom': {
|
|
22464
|
+
'0%': {
|
|
22465
|
+
transformOrigin: 'left bottom',
|
|
22466
|
+
transform: "var(--soui-popup-transform) scale(0.5)"
|
|
22467
|
+
},
|
|
22468
|
+
'100%': {
|
|
22469
|
+
transformOrigin: 'left bottom',
|
|
22470
|
+
transform: "var(--soui-popup-transform) scale(1)"
|
|
22471
|
+
}
|
|
22472
|
+
},
|
|
22453
22473
|
'@keyframes moveLeft': {
|
|
22454
22474
|
'0%': {
|
|
22455
22475
|
transformOrigin: 'right center',
|
|
@@ -22460,6 +22480,26 @@ var tooltipAnimation = {
|
|
|
22460
22480
|
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22461
22481
|
}
|
|
22462
22482
|
},
|
|
22483
|
+
'@keyframes moveLeftTop': {
|
|
22484
|
+
'0%': {
|
|
22485
|
+
transformOrigin: 'right top',
|
|
22486
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22487
|
+
},
|
|
22488
|
+
'100%': {
|
|
22489
|
+
transformOrigin: 'right top',
|
|
22490
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22491
|
+
}
|
|
22492
|
+
},
|
|
22493
|
+
'@keyframes moveLeftBottom': {
|
|
22494
|
+
'0%': {
|
|
22495
|
+
transformOrigin: 'right bottom',
|
|
22496
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22497
|
+
},
|
|
22498
|
+
'100%': {
|
|
22499
|
+
transformOrigin: 'right bottom',
|
|
22500
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22501
|
+
}
|
|
22502
|
+
},
|
|
22463
22503
|
'@keyframes moveTop': {
|
|
22464
22504
|
'0%': {
|
|
22465
22505
|
transformOrigin: 'center bottom',
|
|
@@ -22470,6 +22510,26 @@ var tooltipAnimation = {
|
|
|
22470
22510
|
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22471
22511
|
}
|
|
22472
22512
|
},
|
|
22513
|
+
'@keyframes moveTopLeft': {
|
|
22514
|
+
'0%': {
|
|
22515
|
+
transformOrigin: 'left bottom',
|
|
22516
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22517
|
+
},
|
|
22518
|
+
'100%': {
|
|
22519
|
+
transformOrigin: 'left bottom',
|
|
22520
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22521
|
+
}
|
|
22522
|
+
},
|
|
22523
|
+
'@keyframes moveTopRight': {
|
|
22524
|
+
'0%': {
|
|
22525
|
+
transformOrigin: 'right bottom',
|
|
22526
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22527
|
+
},
|
|
22528
|
+
'100%': {
|
|
22529
|
+
transformOrigin: 'right bottom',
|
|
22530
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22531
|
+
}
|
|
22532
|
+
},
|
|
22473
22533
|
'@keyframes moveBottom': {
|
|
22474
22534
|
'0%': {
|
|
22475
22535
|
transformOrigin: 'center top',
|
|
@@ -22479,6 +22539,26 @@ var tooltipAnimation = {
|
|
|
22479
22539
|
transformOrigin: 'center top',
|
|
22480
22540
|
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22481
22541
|
}
|
|
22542
|
+
},
|
|
22543
|
+
'@keyframes moveBottomLeft': {
|
|
22544
|
+
'0%': {
|
|
22545
|
+
transformOrigin: 'left top',
|
|
22546
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22547
|
+
},
|
|
22548
|
+
'100%': {
|
|
22549
|
+
transformOrigin: 'left top',
|
|
22550
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22551
|
+
}
|
|
22552
|
+
},
|
|
22553
|
+
'@keyframes moveBottomRight': {
|
|
22554
|
+
'0%': {
|
|
22555
|
+
transformOrigin: 'right top',
|
|
22556
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22557
|
+
},
|
|
22558
|
+
'100%': {
|
|
22559
|
+
transformOrigin: 'right top',
|
|
22560
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22561
|
+
}
|
|
22482
22562
|
}
|
|
22483
22563
|
};
|
|
22484
22564
|
var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
@@ -22895,14 +22975,38 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22895
22975
|
'&[data-soui-position^="bottom"]': {
|
|
22896
22976
|
animation: '$fadeIn 200ms ease, $moveBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22897
22977
|
},
|
|
22978
|
+
'&[data-soui-position^="bottom-left"]': {
|
|
22979
|
+
animation: '$fadeIn 200ms ease, $moveBottomLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22980
|
+
},
|
|
22981
|
+
'&[data-soui-position^="bottom-right"]': {
|
|
22982
|
+
animation: '$fadeIn 200ms ease, $moveBottomRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22983
|
+
},
|
|
22898
22984
|
'&[data-soui-position^="top"]': {
|
|
22899
22985
|
animation: '$fadeIn 200ms ease, $moveTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22900
22986
|
},
|
|
22987
|
+
'&[data-soui-position^="top-left"]': {
|
|
22988
|
+
animation: '$fadeIn 200ms ease, $moveTopLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22989
|
+
},
|
|
22990
|
+
'&[data-soui-position^="top-right"]': {
|
|
22991
|
+
animation: '$fadeIn 200ms ease, $moveTopRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22992
|
+
},
|
|
22901
22993
|
'&[data-soui-position^="left"]': {
|
|
22902
22994
|
animation: '$fadeIn 200ms ease, $moveLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22903
22995
|
},
|
|
22996
|
+
'&[data-soui-position^="left-top"]': {
|
|
22997
|
+
animation: '$fadeIn 200ms ease, $moveLeftTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22998
|
+
},
|
|
22999
|
+
'&[data-soui-position^="left-bottom"]': {
|
|
23000
|
+
animation: '$fadeIn 200ms ease, $moveLeftBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
23001
|
+
},
|
|
22904
23002
|
'&[data-soui-position^="right"]': {
|
|
22905
23003
|
animation: '$fadeIn 200ms ease, $moveRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
23004
|
+
},
|
|
23005
|
+
'&[data-soui-position^="right-top"]': {
|
|
23006
|
+
animation: '$fadeIn 200ms ease, $moveRightTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
23007
|
+
},
|
|
23008
|
+
'&[data-soui-position^="right-bottom"]': {
|
|
23009
|
+
animation: '$fadeIn 200ms ease, $moveRightBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22906
23010
|
}
|
|
22907
23011
|
},
|
|
22908
23012
|
arrow: {},
|
|
@@ -43141,7 +43245,8 @@ function useFormControl(props) {
|
|
|
43141
43245
|
defaultValue = props.defaultValue,
|
|
43142
43246
|
rules = props.rules,
|
|
43143
43247
|
onError = props.onError,
|
|
43144
|
-
getValidateProps = props.getValidateProps
|
|
43248
|
+
getValidateProps = props.getValidateProps,
|
|
43249
|
+
clearToUndefined = props.clearToUndefined;
|
|
43145
43250
|
var _useFieldSetConsumer = useFieldSetConsumer({
|
|
43146
43251
|
name: props.name,
|
|
43147
43252
|
bind: props.bind
|
|
@@ -43199,7 +43304,11 @@ function useFormControl(props) {
|
|
|
43199
43304
|
var nextValue = [];
|
|
43200
43305
|
name.forEach(function (n, index) {
|
|
43201
43306
|
if (_value[index] === undefined && dv[index] !== undefined) {
|
|
43202
|
-
|
|
43307
|
+
if (clearToUndefined) {
|
|
43308
|
+
nextValue[index] = undefined;
|
|
43309
|
+
} else {
|
|
43310
|
+
nextValue[index] = dv[index];
|
|
43311
|
+
}
|
|
43203
43312
|
} else {
|
|
43204
43313
|
nextValue[index] = _value[index];
|
|
43205
43314
|
}
|
|
@@ -43213,7 +43322,11 @@ function useFormControl(props) {
|
|
|
43213
43322
|
}
|
|
43214
43323
|
if (!shallowEqual(_value2, latestInfo.valueState)) {
|
|
43215
43324
|
if (_value2 === undefined && defaultValue !== undefined) {
|
|
43216
|
-
|
|
43325
|
+
if (clearToUndefined) {
|
|
43326
|
+
setValueState(undefined);
|
|
43327
|
+
} else {
|
|
43328
|
+
setValueState(defaultValue);
|
|
43329
|
+
}
|
|
43217
43330
|
} else {
|
|
43218
43331
|
setValueState(_value2);
|
|
43219
43332
|
}
|
|
@@ -43372,7 +43485,8 @@ var FormField = function FormField(props) {
|
|
|
43372
43485
|
rules: props.rules,
|
|
43373
43486
|
onError: props.onError,
|
|
43374
43487
|
bind: props.bind,
|
|
43375
|
-
getValidateProps: getValidateProps
|
|
43488
|
+
getValidateProps: getValidateProps,
|
|
43489
|
+
clearToUndefined: props.clearToUndefined
|
|
43376
43490
|
});
|
|
43377
43491
|
var handleChange = usePersistFn(function (value) {
|
|
43378
43492
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -50978,6 +51092,10 @@ var useForm = function useForm(props) {
|
|
|
50978
51092
|
Object.keys(context.defaultValues).forEach(function (df) {
|
|
50979
51093
|
var latestDefaultValue = getValue(df);
|
|
50980
51094
|
if (latestDefaultValue === undefined) {
|
|
51095
|
+
// todo: Form组件传了clearToUndefined时,加入这部分判断?
|
|
51096
|
+
// if(context.value.hasOwnProperty(df) && clearToUndefined){
|
|
51097
|
+
// return;
|
|
51098
|
+
// }
|
|
50981
51099
|
setValue(defineProperty_default()({}, df, context.defaultValues[df]), {
|
|
50982
51100
|
validate: false
|
|
50983
51101
|
});
|
|
@@ -61285,23 +61403,6 @@ var sticky_cssSupport = cssSupport,
|
|
|
61285
61403
|
var supportSticky = sticky_cssSupport('position', 'sticky');
|
|
61286
61404
|
var defaultZIndex = 900;
|
|
61287
61405
|
var events = ['scroll', 'pageshow', 'load', 'resize'];
|
|
61288
|
-
|
|
61289
|
-
// const getFirstScrollParent = (el: HTMLElement) => {
|
|
61290
|
-
// let parent = el.parentNode as HTMLElement;
|
|
61291
|
-
// while (parent) {
|
|
61292
|
-
// if (parent === document.body || parent === document.documentElement) {
|
|
61293
|
-
// parent = document.body;
|
|
61294
|
-
// break;
|
|
61295
|
-
// }
|
|
61296
|
-
// const { overflowY } = window.getComputedStyle(parent);
|
|
61297
|
-
// if (overflowY === 'scroll' || overflowY === 'auto') {
|
|
61298
|
-
// break;
|
|
61299
|
-
// }
|
|
61300
|
-
// parent = parent.parentNode as HTMLElement;
|
|
61301
|
-
// }
|
|
61302
|
-
// return parent;
|
|
61303
|
-
// };
|
|
61304
|
-
|
|
61305
61406
|
var Sticky = function Sticky(props) {
|
|
61306
61407
|
if (props.target) {
|
|
61307
61408
|
sticky_devUseWarning.deprecated('target', 'scrollContainer', 'Sticky');
|
|
@@ -61312,13 +61413,52 @@ var Sticky = function Sticky(props) {
|
|
|
61312
61413
|
// 是否使用css sticky
|
|
61313
61414
|
var css = (props.css || props.target) && supportSticky;
|
|
61314
61415
|
var forceUpdate = useRender();
|
|
61416
|
+
var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61315
61417
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
61316
61418
|
target: null,
|
|
61317
61419
|
div: null,
|
|
61318
61420
|
position: '',
|
|
61319
61421
|
targetObserver: null,
|
|
61320
61422
|
parentObserver: null,
|
|
61321
|
-
fixedObserver: null
|
|
61423
|
+
fixedObserver: null,
|
|
61424
|
+
stoped: false,
|
|
61425
|
+
stopStickyFn: function stopStickyFn(e) {
|
|
61426
|
+
var target = e.target;
|
|
61427
|
+
if (!target || typeof target.scrollTop !== 'number') return;
|
|
61428
|
+
var stopStickyPoint = -1;
|
|
61429
|
+
if (typeof props.stickyBoundary === 'number') {
|
|
61430
|
+
stopStickyPoint = props.stickyBoundary;
|
|
61431
|
+
} else if (typeof props.stickyBoundary === 'function') {
|
|
61432
|
+
var stopStickyElement = props.stickyBoundary();
|
|
61433
|
+
if (!stopStickyElement) return;
|
|
61434
|
+
var stopStickyRect = stopStickyElement.getBoundingClientRect();
|
|
61435
|
+
var targetRect = elementRef.current.getBoundingClientRect();
|
|
61436
|
+
stopStickyPoint = stopStickyRect.bottom - targetRect.bottom;
|
|
61437
|
+
}
|
|
61438
|
+
if (stopStickyPoint < 0) return;
|
|
61439
|
+
if (target.scrollTop > stopStickyPoint) {
|
|
61440
|
+
if (context.stoped) return;
|
|
61441
|
+
context.stoped = true;
|
|
61442
|
+
|
|
61443
|
+
// 把 div 移动到 target 内部,使用 absolute 定位跟随滚动
|
|
61444
|
+
if (context.div && context.target) {
|
|
61445
|
+
context.target.insertBefore(context.div, context.target.firstChild);
|
|
61446
|
+
var paddingLeft = Number(window.getComputedStyle(context.target).paddingLeft.replace('px', '')) || 0;
|
|
61447
|
+
var borderLeftWidth = Number(window.getComputedStyle(context.target).borderLeftWidth.replace('px', '')) || 0;
|
|
61448
|
+
var left = paddingLeft + borderLeftWidth;
|
|
61449
|
+
context.div.style.transform = "translate(-".concat(left, "px, ").concat(stopStickyPoint, "px)");
|
|
61450
|
+
}
|
|
61451
|
+
} else {
|
|
61452
|
+
if (!context.stoped) return;
|
|
61453
|
+
context.stoped = false;
|
|
61454
|
+
|
|
61455
|
+
// 恢复正常吸附模式:把 div 移动到 target 外部
|
|
61456
|
+
if (context.div && context.target && context.target.parentNode) {
|
|
61457
|
+
context.target.parentNode.insertBefore(context.div, context.target);
|
|
61458
|
+
}
|
|
61459
|
+
context.div.style.transform = 'none';
|
|
61460
|
+
}
|
|
61461
|
+
}
|
|
61322
61462
|
}),
|
|
61323
61463
|
context = _useRef.current;
|
|
61324
61464
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
|
@@ -61333,7 +61473,6 @@ var Sticky = function Sticky(props) {
|
|
|
61333
61473
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
61334
61474
|
parentVisible = _useState6[0],
|
|
61335
61475
|
setParentVisible = _useState6[1];
|
|
61336
|
-
var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61337
61476
|
var getTarget = function getTarget() {
|
|
61338
61477
|
var scrollContainer = props.scrollContainer;
|
|
61339
61478
|
if (typeof scrollContainer === 'string') {
|
|
@@ -61512,6 +61651,10 @@ var Sticky = function Sticky(props) {
|
|
|
61512
61651
|
context.targetObserver.disconnect();
|
|
61513
61652
|
context.targetObserver = null;
|
|
61514
61653
|
}
|
|
61654
|
+
if (props.stickyBoundary) {
|
|
61655
|
+
var _context$target;
|
|
61656
|
+
(_context$target = context.target) === null || _context$target === void 0 || _context$target.removeEventListener('scroll', context.stopStickyFn);
|
|
61657
|
+
}
|
|
61515
61658
|
};
|
|
61516
61659
|
var createObserver = function createObserver() {
|
|
61517
61660
|
if (!context.div) {
|
|
@@ -61536,6 +61679,9 @@ var Sticky = function Sticky(props) {
|
|
|
61536
61679
|
}
|
|
61537
61680
|
}
|
|
61538
61681
|
cancelFixedObserver();
|
|
61682
|
+
if (props.stickyBoundary) {
|
|
61683
|
+
context.target.addEventListener('scroll', context.stopStickyFn);
|
|
61684
|
+
}
|
|
61539
61685
|
if (window.IntersectionObserver) {
|
|
61540
61686
|
var observer = new IntersectionObserver(handleTargetPosition, {
|
|
61541
61687
|
root: context.target,
|
|
@@ -71890,7 +72036,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
71890
72036
|
|
|
71891
72037
|
|
|
71892
72038
|
/* harmony default export */ var src_0 = ({
|
|
71893
|
-
version: '3.8.0-beta.
|
|
72039
|
+
version: '3.8.0-beta.14'
|
|
71894
72040
|
});
|
|
71895
72041
|
}();
|
|
71896
72042
|
/******/ return __webpack_exports__;
|