shineout 3.4.3-beta.3 → 3.4.3-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 +221 -186
- 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.3-beta.
|
|
495
|
+
version: '3.4.3-beta.5'
|
|
496
496
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -4431,13 +4431,6 @@ const figma = [
|
|
|
4431
4431
|
token: 'Radius-1000',
|
|
4432
4432
|
locked: true,
|
|
4433
4433
|
},
|
|
4434
|
-
{
|
|
4435
|
-
name: '50%/radius',
|
|
4436
|
-
value: '50%',
|
|
4437
|
-
describe: '50% 全圆角',
|
|
4438
|
-
token: 'Radius-50%',
|
|
4439
|
-
locked: true,
|
|
4440
|
-
},
|
|
4441
4434
|
{
|
|
4442
4435
|
name: '基础阴影',
|
|
4443
4436
|
value: '0px 2px 5px rgba(2, 11, 24, 0.1)',
|
|
@@ -11991,7 +11984,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11991
11984
|
};
|
|
11992
11985
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11993
11986
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11994
|
-
/* harmony default export */ var version = ('3.4.3-beta.
|
|
11987
|
+
/* harmony default export */ var version = ('3.4.3-beta.5');
|
|
11995
11988
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11996
11989
|
|
|
11997
11990
|
|
|
@@ -12357,7 +12350,6 @@ var Token = {
|
|
|
12357
12350
|
'Radius-8': '8px',
|
|
12358
12351
|
'Radius-12': '12px',
|
|
12359
12352
|
'Radius-1000': '1000px',
|
|
12360
|
-
'Radius-50%': '50%',
|
|
12361
12353
|
'Shadow-1': '0px 2px 5px rgba(2, 11, 24, 0.1)',
|
|
12362
12354
|
'Shadow-2': '0px 4px 10px rgba(2, 11, 24, 0.1)',
|
|
12363
12355
|
'Shadow-3': '0px 8px 20px rgba(2, 11, 24, 0.1)',
|
|
@@ -22445,9 +22437,6 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22445
22437
|
marginBottom: src.selectPlaceholderMarginY
|
|
22446
22438
|
},
|
|
22447
22439
|
multiple: {
|
|
22448
|
-
'& $optionInner': {
|
|
22449
|
-
paddingRight: src.selectOptionInnerPaddingRight
|
|
22450
|
-
},
|
|
22451
22440
|
'& $compressedWrapper': {
|
|
22452
22441
|
flexWrap: 'nowrap'
|
|
22453
22442
|
},
|
|
@@ -22459,6 +22448,11 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22459
22448
|
multipleCompressedWrapper: {
|
|
22460
22449
|
flexWrap: 'nowrap'
|
|
22461
22450
|
},
|
|
22451
|
+
multipleList: {
|
|
22452
|
+
'& $optionInner': {
|
|
22453
|
+
paddingRight: src.selectOptionInnerPaddingRight
|
|
22454
|
+
}
|
|
22455
|
+
},
|
|
22462
22456
|
loading: {
|
|
22463
22457
|
padding: 10,
|
|
22464
22458
|
display: 'flex',
|
|
@@ -28766,6 +28760,201 @@ function isInDocument(element) {
|
|
|
28766
28760
|
}
|
|
28767
28761
|
return is_isBrowser() && document.documentElement.contains(element);
|
|
28768
28762
|
}
|
|
28763
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/func.ts
|
|
28764
|
+
// 节流函数
|
|
28765
|
+
var throttle = function throttle(func, wait) {
|
|
28766
|
+
var that = {
|
|
28767
|
+
lock: false
|
|
28768
|
+
};
|
|
28769
|
+
if (!wait) return function () {
|
|
28770
|
+
if (that.lock) return;
|
|
28771
|
+
that.lock = true;
|
|
28772
|
+
func.apply(void 0, arguments);
|
|
28773
|
+
setTimeout(function () {
|
|
28774
|
+
that.lock = false;
|
|
28775
|
+
}, wait);
|
|
28776
|
+
};
|
|
28777
|
+
};
|
|
28778
|
+
|
|
28779
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
28780
|
+
var debounce = function debounce(func, delay) {
|
|
28781
|
+
var that = {};
|
|
28782
|
+
var cleanTimer = function cleanTimer() {
|
|
28783
|
+
if (that.timer) {
|
|
28784
|
+
clearTimeout(that.timer);
|
|
28785
|
+
that.timer = null;
|
|
28786
|
+
}
|
|
28787
|
+
};
|
|
28788
|
+
if (!delay) return [func, cleanTimer];
|
|
28789
|
+
return [function () {
|
|
28790
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28791
|
+
args[_key] = arguments[_key];
|
|
28792
|
+
}
|
|
28793
|
+
cleanTimer();
|
|
28794
|
+
that.timer = setTimeout(function () {
|
|
28795
|
+
func.apply(void 0, args);
|
|
28796
|
+
}, delay);
|
|
28797
|
+
}, cleanTimer];
|
|
28798
|
+
};
|
|
28799
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/dom/element.tsx
|
|
28800
|
+
|
|
28801
|
+
var _this = undefined;
|
|
28802
|
+
|
|
28803
|
+
|
|
28804
|
+
|
|
28805
|
+
|
|
28806
|
+
/**
|
|
28807
|
+
* 判断是否是两个中文字符
|
|
28808
|
+
*
|
|
28809
|
+
* @param str 文本内容
|
|
28810
|
+
* @returns boolean
|
|
28811
|
+
*/
|
|
28812
|
+
|
|
28813
|
+
var isTwoCNChar = function isTwoCNChar(str) {
|
|
28814
|
+
return /^[\u4e00-\u9fa5]{2}$/.test(str);
|
|
28815
|
+
};
|
|
28816
|
+
var SPACE = ' ';
|
|
28817
|
+
|
|
28818
|
+
/**
|
|
28819
|
+
* 处理文本内容,如果是两个中文字符,插入空格
|
|
28820
|
+
*
|
|
28821
|
+
* @param children ReactNode
|
|
28822
|
+
* @param insertSpace 是否需要插入空格
|
|
28823
|
+
* @returns 处理后的 ReactNode
|
|
28824
|
+
*/
|
|
28825
|
+
function wrapSpan(children) {
|
|
28826
|
+
var insertSpace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
28827
|
+
var className = arguments.length > 2 ? arguments[2] : undefined;
|
|
28828
|
+
if (!children) return children;
|
|
28829
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, function (item) {
|
|
28830
|
+
if (typeof item === 'string') {
|
|
28831
|
+
if (insertSpace && isTwoCNChar(item)) return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
28832
|
+
children: item.split('').join(SPACE)
|
|
28833
|
+
});
|
|
28834
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
28835
|
+
className: className,
|
|
28836
|
+
children: item
|
|
28837
|
+
});
|
|
28838
|
+
}
|
|
28839
|
+
return item;
|
|
28840
|
+
});
|
|
28841
|
+
}
|
|
28842
|
+
var addResizeObserver = function addResizeObserver(el, handler) {
|
|
28843
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
28844
|
+
var direction = options.direction,
|
|
28845
|
+
timer = options.timer;
|
|
28846
|
+
var _debounce = debounce(handler, timer),
|
|
28847
|
+
_debounce2 = slicedToArray_default()(_debounce, 2),
|
|
28848
|
+
debounceHandler = _debounce2[0],
|
|
28849
|
+
cleanTimer = _debounce2[1];
|
|
28850
|
+
var h = debounceHandler;
|
|
28851
|
+
var lastWidth;
|
|
28852
|
+
var lastHeight;
|
|
28853
|
+
if (window.ResizeObserver) {
|
|
28854
|
+
if (direction) {
|
|
28855
|
+
lastWidth = el.clientWidth;
|
|
28856
|
+
lastHeight = el.clientHeight;
|
|
28857
|
+
h = function h(entry) {
|
|
28858
|
+
var _entry$0$contentRect = entry[0].contentRect,
|
|
28859
|
+
width = _entry$0$contentRect.width,
|
|
28860
|
+
height = _entry$0$contentRect.height;
|
|
28861
|
+
if (width && direction === 'x') {
|
|
28862
|
+
if (lastWidth !== width) {
|
|
28863
|
+
debounceHandler(entry);
|
|
28864
|
+
}
|
|
28865
|
+
} else if (direction === 'y') {
|
|
28866
|
+
if (height && lastHeight !== height) {
|
|
28867
|
+
debounceHandler(entry);
|
|
28868
|
+
}
|
|
28869
|
+
} else if (lastWidth !== width || lastHeight !== height) {
|
|
28870
|
+
debounceHandler(entry, {
|
|
28871
|
+
x: lastWidth !== width,
|
|
28872
|
+
y: lastHeight !== height
|
|
28873
|
+
});
|
|
28874
|
+
}
|
|
28875
|
+
lastWidth = width;
|
|
28876
|
+
lastHeight = height;
|
|
28877
|
+
};
|
|
28878
|
+
}
|
|
28879
|
+
var observer = new ResizeObserver(h);
|
|
28880
|
+
observer.observe(el);
|
|
28881
|
+
return function () {
|
|
28882
|
+
if (observer) {
|
|
28883
|
+
observer.disconnect();
|
|
28884
|
+
}
|
|
28885
|
+
cleanTimer(_this);
|
|
28886
|
+
observer = null;
|
|
28887
|
+
};
|
|
28888
|
+
}
|
|
28889
|
+
window.addEventListener('resize', debounceHandler);
|
|
28890
|
+
return function () {
|
|
28891
|
+
window.removeEventListener('resize', handler);
|
|
28892
|
+
cleanTimer();
|
|
28893
|
+
};
|
|
28894
|
+
};
|
|
28895
|
+
function getParent(el, target) {
|
|
28896
|
+
if (!target) {
|
|
28897
|
+
return null;
|
|
28898
|
+
}
|
|
28899
|
+
var temp = el;
|
|
28900
|
+
while (temp) {
|
|
28901
|
+
if (typeof target === 'string') {
|
|
28902
|
+
if (temp.matches && temp.matches(target)) {
|
|
28903
|
+
return temp;
|
|
28904
|
+
}
|
|
28905
|
+
} else if (temp === target) {
|
|
28906
|
+
return temp;
|
|
28907
|
+
}
|
|
28908
|
+
temp = temp.parentElement;
|
|
28909
|
+
}
|
|
28910
|
+
return null;
|
|
28911
|
+
}
|
|
28912
|
+
function getClosestScrollContainer(element) {
|
|
28913
|
+
if (!element) {
|
|
28914
|
+
return null;
|
|
28915
|
+
}
|
|
28916
|
+
|
|
28917
|
+
// 检查元素是否可滚动
|
|
28918
|
+
var isScrollable = function isScrollable(el) {
|
|
28919
|
+
var style = window.getComputedStyle(el);
|
|
28920
|
+
var overflowX = style.overflowX;
|
|
28921
|
+
var overflowY = style.overflowY;
|
|
28922
|
+
return (overflowX === 'auto' || overflowX === 'scroll' || overflowY === 'auto' || overflowY === 'scroll') && (el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth);
|
|
28923
|
+
};
|
|
28924
|
+
|
|
28925
|
+
// 如果元素本身是可滚动的,直接返回
|
|
28926
|
+
if (isScrollable(element)) {
|
|
28927
|
+
return element;
|
|
28928
|
+
}
|
|
28929
|
+
|
|
28930
|
+
// 遍历父元素
|
|
28931
|
+
var parent = element.parentElement;
|
|
28932
|
+
while (parent) {
|
|
28933
|
+
if (isScrollable(parent)) {
|
|
28934
|
+
return parent;
|
|
28935
|
+
}
|
|
28936
|
+
parent = parent.parentElement;
|
|
28937
|
+
}
|
|
28938
|
+
|
|
28939
|
+
// 如果没有找到可滚动的祖先,返回 body 或 documentElement
|
|
28940
|
+
return document.scrollingElement || document.documentElement;
|
|
28941
|
+
}
|
|
28942
|
+
function cssSupport(attr, value) {
|
|
28943
|
+
if (is_isBrowser()) {
|
|
28944
|
+
var element = document.createElement('div');
|
|
28945
|
+
if (attr in element.style) {
|
|
28946
|
+
if (attr !== 'length' && attr !== 'parentRule') {
|
|
28947
|
+
var attrs = element.style[attr];
|
|
28948
|
+
element.style[attr] = value;
|
|
28949
|
+
}
|
|
28950
|
+
return element.style[attr] === value;
|
|
28951
|
+
}
|
|
28952
|
+
}
|
|
28953
|
+
return false;
|
|
28954
|
+
}
|
|
28955
|
+
var parsePxToNumber = function parsePxToNumber(str) {
|
|
28956
|
+
return Number(str.replace(/\s+|px/gi, ''));
|
|
28957
|
+
};
|
|
28769
28958
|
;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/index.ts
|
|
28770
28959
|
|
|
28771
28960
|
|
|
@@ -28773,6 +28962,7 @@ function isInDocument(element) {
|
|
|
28773
28962
|
|
|
28774
28963
|
|
|
28775
28964
|
|
|
28965
|
+
|
|
28776
28966
|
var horizontalPosition = ['left-bottom', 'left-top', 'right-bottom', 'right-top', 'left', 'right'];
|
|
28777
28967
|
var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right', 'bottom', 'top'];
|
|
28778
28968
|
var hideStyle = {
|
|
@@ -28891,6 +29081,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28891
29081
|
}
|
|
28892
29082
|
var targetPosition = position;
|
|
28893
29083
|
var rootContainer = getContainer() || document.body;
|
|
29084
|
+
var closestScrollContainer = getClosestScrollContainer(parentElRef.current);
|
|
28894
29085
|
var containerRect = rootContainer.getBoundingClientRect();
|
|
28895
29086
|
var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
|
|
28896
29087
|
var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
|
|
@@ -28909,7 +29100,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28909
29100
|
var overRight = 0;
|
|
28910
29101
|
var overLeft = 0;
|
|
28911
29102
|
if (h === 'left') {
|
|
28912
|
-
style.left = rect.left - containerRect.left + containerScroll.left;
|
|
29103
|
+
style.left = rect.left - containerRect.left + containerScroll.left + ((closestScrollContainer === null || closestScrollContainer === void 0 ? void 0 : closestScrollContainer.scrollLeft) || 0);
|
|
28913
29104
|
style.transform = '';
|
|
28914
29105
|
arrayStyle.left = "8px";
|
|
28915
29106
|
if (adjust) {
|
|
@@ -29094,6 +29285,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
29094
29285
|
newStyle = _getStyle.newStyle,
|
|
29095
29286
|
newArrayStyle = _getStyle.newArrayStyle;
|
|
29096
29287
|
if (newStyle && !shallow_equal(style, newStyle)) {
|
|
29288
|
+
console.log('show, position, absolute, updateKey, fixedWidth: >>', show, position, absolute, updateKey, fixedWidth);
|
|
29097
29289
|
setStyle(newStyle);
|
|
29098
29290
|
setArrayStyle(newArrayStyle || {});
|
|
29099
29291
|
}
|
|
@@ -30030,10 +30222,8 @@ var usePopup = function usePopup(props) {
|
|
|
30030
30222
|
var updatePosition = use_persist_fn(function () {
|
|
30031
30223
|
// if (isPositionControl) return;
|
|
30032
30224
|
// if (props.position === 'auto' || !props.position) {
|
|
30033
|
-
|
|
30034
|
-
|
|
30035
|
-
if (newPosition !== position) setPositionState(newPosition);
|
|
30036
|
-
}, 10);
|
|
30225
|
+
var newPosition = getPosition(targetRef.current, props.priorityDirection, autoMode, popupRef.current || undefined);
|
|
30226
|
+
if (newPosition !== position) setPositionState(newPosition);
|
|
30037
30227
|
});
|
|
30038
30228
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
30039
30229
|
if (props.open) {
|
|
@@ -30373,171 +30563,6 @@ function extractEventHandlers(object) {
|
|
|
30373
30563
|
});
|
|
30374
30564
|
return result;
|
|
30375
30565
|
}
|
|
30376
|
-
;// CONCATENATED MODULE: ../hooks/src/utils/func.ts
|
|
30377
|
-
// 节流函数
|
|
30378
|
-
var throttle = function throttle(func, wait) {
|
|
30379
|
-
var that = {
|
|
30380
|
-
lock: false
|
|
30381
|
-
};
|
|
30382
|
-
if (!wait) return function () {
|
|
30383
|
-
if (that.lock) return;
|
|
30384
|
-
that.lock = true;
|
|
30385
|
-
func.apply(void 0, arguments);
|
|
30386
|
-
setTimeout(function () {
|
|
30387
|
-
that.lock = false;
|
|
30388
|
-
}, wait);
|
|
30389
|
-
};
|
|
30390
|
-
};
|
|
30391
|
-
|
|
30392
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
30393
|
-
var debounce = function debounce(func, delay) {
|
|
30394
|
-
var that = {};
|
|
30395
|
-
var cleanTimer = function cleanTimer() {
|
|
30396
|
-
if (that.timer) {
|
|
30397
|
-
clearTimeout(that.timer);
|
|
30398
|
-
that.timer = null;
|
|
30399
|
-
}
|
|
30400
|
-
};
|
|
30401
|
-
if (!delay) return [func, cleanTimer];
|
|
30402
|
-
return [function () {
|
|
30403
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30404
|
-
args[_key] = arguments[_key];
|
|
30405
|
-
}
|
|
30406
|
-
cleanTimer();
|
|
30407
|
-
that.timer = setTimeout(function () {
|
|
30408
|
-
func.apply(void 0, args);
|
|
30409
|
-
}, delay);
|
|
30410
|
-
}, cleanTimer];
|
|
30411
|
-
};
|
|
30412
|
-
;// CONCATENATED MODULE: ../hooks/src/utils/dom/element.tsx
|
|
30413
|
-
|
|
30414
|
-
var _this = undefined;
|
|
30415
|
-
|
|
30416
|
-
|
|
30417
|
-
|
|
30418
|
-
|
|
30419
|
-
/**
|
|
30420
|
-
* 判断是否是两个中文字符
|
|
30421
|
-
*
|
|
30422
|
-
* @param str 文本内容
|
|
30423
|
-
* @returns boolean
|
|
30424
|
-
*/
|
|
30425
|
-
|
|
30426
|
-
var isTwoCNChar = function isTwoCNChar(str) {
|
|
30427
|
-
return /^[\u4e00-\u9fa5]{2}$/.test(str);
|
|
30428
|
-
};
|
|
30429
|
-
var SPACE = ' ';
|
|
30430
|
-
|
|
30431
|
-
/**
|
|
30432
|
-
* 处理文本内容,如果是两个中文字符,插入空格
|
|
30433
|
-
*
|
|
30434
|
-
* @param children ReactNode
|
|
30435
|
-
* @param insertSpace 是否需要插入空格
|
|
30436
|
-
* @returns 处理后的 ReactNode
|
|
30437
|
-
*/
|
|
30438
|
-
function wrapSpan(children) {
|
|
30439
|
-
var insertSpace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
30440
|
-
var className = arguments.length > 2 ? arguments[2] : undefined;
|
|
30441
|
-
if (!children) return children;
|
|
30442
|
-
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, function (item) {
|
|
30443
|
-
if (typeof item === 'string') {
|
|
30444
|
-
if (insertSpace && isTwoCNChar(item)) return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
30445
|
-
children: item.split('').join(SPACE)
|
|
30446
|
-
});
|
|
30447
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
30448
|
-
className: className,
|
|
30449
|
-
children: item
|
|
30450
|
-
});
|
|
30451
|
-
}
|
|
30452
|
-
return item;
|
|
30453
|
-
});
|
|
30454
|
-
}
|
|
30455
|
-
var addResizeObserver = function addResizeObserver(el, handler) {
|
|
30456
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
30457
|
-
var direction = options.direction,
|
|
30458
|
-
timer = options.timer;
|
|
30459
|
-
var _debounce = debounce(handler, timer),
|
|
30460
|
-
_debounce2 = slicedToArray_default()(_debounce, 2),
|
|
30461
|
-
debounceHandler = _debounce2[0],
|
|
30462
|
-
cleanTimer = _debounce2[1];
|
|
30463
|
-
var h = debounceHandler;
|
|
30464
|
-
var lastWidth;
|
|
30465
|
-
var lastHeight;
|
|
30466
|
-
if (window.ResizeObserver) {
|
|
30467
|
-
if (direction) {
|
|
30468
|
-
lastWidth = el.clientWidth;
|
|
30469
|
-
lastHeight = el.clientHeight;
|
|
30470
|
-
h = function h(entry) {
|
|
30471
|
-
var _entry$0$contentRect = entry[0].contentRect,
|
|
30472
|
-
width = _entry$0$contentRect.width,
|
|
30473
|
-
height = _entry$0$contentRect.height;
|
|
30474
|
-
if (width && direction === 'x') {
|
|
30475
|
-
if (lastWidth !== width) {
|
|
30476
|
-
debounceHandler(entry);
|
|
30477
|
-
}
|
|
30478
|
-
} else if (direction === 'y') {
|
|
30479
|
-
if (height && lastHeight !== height) {
|
|
30480
|
-
debounceHandler(entry);
|
|
30481
|
-
}
|
|
30482
|
-
} else if (lastWidth !== width || lastHeight !== height) {
|
|
30483
|
-
debounceHandler(entry, {
|
|
30484
|
-
x: lastWidth !== width,
|
|
30485
|
-
y: lastHeight !== height
|
|
30486
|
-
});
|
|
30487
|
-
}
|
|
30488
|
-
lastWidth = width;
|
|
30489
|
-
lastHeight = height;
|
|
30490
|
-
};
|
|
30491
|
-
}
|
|
30492
|
-
var observer = new ResizeObserver(h);
|
|
30493
|
-
observer.observe(el);
|
|
30494
|
-
return function () {
|
|
30495
|
-
if (observer) {
|
|
30496
|
-
observer.disconnect();
|
|
30497
|
-
}
|
|
30498
|
-
cleanTimer(_this);
|
|
30499
|
-
observer = null;
|
|
30500
|
-
};
|
|
30501
|
-
}
|
|
30502
|
-
window.addEventListener('resize', debounceHandler);
|
|
30503
|
-
return function () {
|
|
30504
|
-
window.removeEventListener('resize', handler);
|
|
30505
|
-
cleanTimer();
|
|
30506
|
-
};
|
|
30507
|
-
};
|
|
30508
|
-
function getParent(el, target) {
|
|
30509
|
-
if (!target) {
|
|
30510
|
-
return null;
|
|
30511
|
-
}
|
|
30512
|
-
var temp = el;
|
|
30513
|
-
while (temp) {
|
|
30514
|
-
if (typeof target === 'string') {
|
|
30515
|
-
if (temp.matches && temp.matches(target)) {
|
|
30516
|
-
return temp;
|
|
30517
|
-
}
|
|
30518
|
-
} else if (temp === target) {
|
|
30519
|
-
return temp;
|
|
30520
|
-
}
|
|
30521
|
-
temp = temp.parentElement;
|
|
30522
|
-
}
|
|
30523
|
-
return null;
|
|
30524
|
-
}
|
|
30525
|
-
function cssSupport(attr, value) {
|
|
30526
|
-
if (is_isBrowser()) {
|
|
30527
|
-
var element = document.createElement('div');
|
|
30528
|
-
if (attr in element.style) {
|
|
30529
|
-
if (attr !== 'length' && attr !== 'parentRule') {
|
|
30530
|
-
var attrs = element.style[attr];
|
|
30531
|
-
element.style[attr] = value;
|
|
30532
|
-
}
|
|
30533
|
-
return element.style[attr] === value;
|
|
30534
|
-
}
|
|
30535
|
-
}
|
|
30536
|
-
return false;
|
|
30537
|
-
}
|
|
30538
|
-
var parsePxToNumber = function parsePxToNumber(str) {
|
|
30539
|
-
return Number(str.replace(/\s+|px/gi, ''));
|
|
30540
|
-
};
|
|
30541
30566
|
;// CONCATENATED MODULE: ../hooks/src/components/use-button/use-button.ts
|
|
30542
30567
|
|
|
30543
30568
|
|
|
@@ -48330,11 +48355,19 @@ var input_input_Input = function Input(props) {
|
|
|
48330
48355
|
size = _useWithFormConfig.size,
|
|
48331
48356
|
disabled = _useWithFormConfig.disabled,
|
|
48332
48357
|
status = _useWithFormConfig.status,
|
|
48333
|
-
error = _useWithFormConfig.error
|
|
48358
|
+
error = _useWithFormConfig.error,
|
|
48359
|
+
onBlur = _useWithFormConfig.onBlur;
|
|
48334
48360
|
var getProps = function getProps(child) {
|
|
48361
|
+
var onChildBlur = function onChildBlur(e) {
|
|
48362
|
+
var childBlurEvent = child.props.onBlur;
|
|
48363
|
+
if (childBlurEvent) {
|
|
48364
|
+
childBlurEvent(e);
|
|
48365
|
+
}
|
|
48366
|
+
onBlur === null || onBlur === void 0 || onBlur(e);
|
|
48367
|
+
};
|
|
48335
48368
|
ref.current.propsMap.set(child, {
|
|
48336
48369
|
onFocus: child.props.onFocus,
|
|
48337
|
-
onBlur:
|
|
48370
|
+
onBlur: onChildBlur
|
|
48338
48371
|
});
|
|
48339
48372
|
if (!ref.current.eventMap.get(child)) {
|
|
48340
48373
|
ref.current.eventMap.set(child, {
|
|
@@ -49403,6 +49436,7 @@ var useSelect = function useSelect(props) {
|
|
|
49403
49436
|
value: value,
|
|
49404
49437
|
multiple: multiple,
|
|
49405
49438
|
disabled: disabled,
|
|
49439
|
+
// TODO: 类型定义需要修改
|
|
49406
49440
|
onChange: onChange,
|
|
49407
49441
|
prediction: prediction,
|
|
49408
49442
|
keepCache: !noCache
|
|
@@ -49577,7 +49611,7 @@ var list_List = function List(props) {
|
|
|
49577
49611
|
onOptionClick = props.onOptionClick;
|
|
49578
49612
|
var dynamicVirtual = lineHeightProp === 'auto';
|
|
49579
49613
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
49580
|
-
var rootClass = classnames_default()(styles.list, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.controlMouse, controlType === 'mouse'), styles.controlKeyboard, controlType === 'keyboard'), styles.dynamicList, dynamicVirtual));
|
|
49614
|
+
var rootClass = classnames_default()(styles.list, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.controlMouse, controlType === 'mouse'), styles.controlKeyboard, controlType === 'keyboard'), styles.dynamicList, dynamicVirtual), styles.multipleList, multiple));
|
|
49581
49615
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(hideCreateOption ? -1 : 0),
|
|
49582
49616
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
49583
49617
|
hoverIndex = _useState2[0],
|
|
@@ -52570,6 +52604,7 @@ var list_list_List = function List(props) {
|
|
|
52570
52604
|
format: props.format,
|
|
52571
52605
|
prediction: props.prediction,
|
|
52572
52606
|
disabled: props.disabled,
|
|
52607
|
+
// TODO: 类型定义需要修改
|
|
52573
52608
|
onChange: inputAble.onChange
|
|
52574
52609
|
});
|
|
52575
52610
|
var columnData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
@@ -65150,7 +65185,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
65150
65185
|
|
|
65151
65186
|
|
|
65152
65187
|
/* harmony default export */ var src_0 = ({
|
|
65153
|
-
version: '3.4.3-beta.
|
|
65188
|
+
version: '3.4.3-beta.5'
|
|
65154
65189
|
});
|
|
65155
65190
|
}();
|
|
65156
65191
|
/******/ return __webpack_exports__;
|