shineout 3.9.6 → 3.9.7-beta.10
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 +226 -48
- 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.9.
|
|
525
|
+
version: '3.9.7-beta.10'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12401,7 +12401,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12401
12401
|
};
|
|
12402
12402
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12403
12403
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12404
|
-
/* harmony default export */ var version = ('3.9.
|
|
12404
|
+
/* harmony default export */ var version = ('3.9.7-beta.10');
|
|
12405
12405
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12406
12406
|
|
|
12407
12407
|
|
|
@@ -20253,7 +20253,10 @@ var ImageStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
20253
20253
|
},
|
|
20254
20254
|
rounded: {
|
|
20255
20255
|
borderRadius: src.imageBorderRadius,
|
|
20256
|
-
outline: "1px solid ".concat(src.imageBorderColor)
|
|
20256
|
+
outline: "1px solid ".concat(src.imageBorderColor),
|
|
20257
|
+
'a&:hover': {
|
|
20258
|
+
outline: "1px solid ".concat(src.imageBorderColor)
|
|
20259
|
+
}
|
|
20257
20260
|
},
|
|
20258
20261
|
thumbnail: {
|
|
20259
20262
|
borderRadius: src.imageBorderRadius,
|
|
@@ -20302,7 +20305,10 @@ var ImageStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
20302
20305
|
width: '100%',
|
|
20303
20306
|
height: '100%',
|
|
20304
20307
|
margin: 'auto',
|
|
20305
|
-
backgroundColor: src.imageErrorBackgroundColor
|
|
20308
|
+
backgroundColor: src.imageErrorBackgroundColor,
|
|
20309
|
+
display: 'flex',
|
|
20310
|
+
alignItems: 'center',
|
|
20311
|
+
justifyContent: 'center'
|
|
20306
20312
|
},
|
|
20307
20313
|
overlay: {
|
|
20308
20314
|
position: 'absolute',
|
|
@@ -21738,7 +21744,11 @@ var menuStyle = {
|
|
|
21738
21744
|
transform: 'rotate(90deg)'
|
|
21739
21745
|
}
|
|
21740
21746
|
},
|
|
21741
|
-
icon: {
|
|
21747
|
+
icon: {
|
|
21748
|
+
'& > svg': {
|
|
21749
|
+
width: '100%'
|
|
21750
|
+
}
|
|
21751
|
+
},
|
|
21742
21752
|
expandHover: {
|
|
21743
21753
|
'&:hover': {
|
|
21744
21754
|
backgroundColor: src.menuExpandHoverBackgroundColor
|
|
@@ -22353,7 +22363,8 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22353
22363
|
zIndex: 0,
|
|
22354
22364
|
'& svg': {
|
|
22355
22365
|
zIndex: 1,
|
|
22356
|
-
position: 'relative'
|
|
22366
|
+
position: 'relative',
|
|
22367
|
+
display: 'block'
|
|
22357
22368
|
},
|
|
22358
22369
|
'&:hover': {
|
|
22359
22370
|
'&:after': objectSpread2_default()(objectSpread2_default()({}, hoverAfterStyles), {}, {
|
|
@@ -22610,12 +22621,14 @@ var jssInsertionPointId = 'shineout-next-jss-insertion-point__' + version;
|
|
|
22610
22621
|
function appendNormalizeStyle(styleString, id) {
|
|
22611
22622
|
var style = document.createElement('style');
|
|
22612
22623
|
style.setAttribute('name', id);
|
|
22624
|
+
style.setAttribute('data-alita-ignore', 'true');
|
|
22613
22625
|
style.innerHTML = styleString;
|
|
22614
22626
|
document.head.insertBefore(style, document.head.firstChild);
|
|
22615
22627
|
}
|
|
22616
22628
|
function appendJssInsertionPoint() {
|
|
22617
22629
|
var insertionPoint = document.createElement('style');
|
|
22618
22630
|
insertionPoint.setAttribute('name', jssInsertionPointId);
|
|
22631
|
+
insertionPoint.setAttribute('data-alita-ignore', 'true');
|
|
22619
22632
|
document.head.insertBefore(insertionPoint, document.head.firstChild);
|
|
22620
22633
|
react_jss_esm_defaultJss.setup({
|
|
22621
22634
|
insertionPoint: insertionPoint
|
|
@@ -23406,6 +23419,9 @@ var progressStyle = {
|
|
|
23406
23419
|
flex: 1,
|
|
23407
23420
|
minWidth: 0,
|
|
23408
23421
|
overflow: 'hidden',
|
|
23422
|
+
'&:has($lineSuccess)': {
|
|
23423
|
+
position: 'relative'
|
|
23424
|
+
},
|
|
23409
23425
|
'$lineDefault &': {
|
|
23410
23426
|
height: src.progressLineHeight,
|
|
23411
23427
|
borderRadius: src.progressLineHeight
|
|
@@ -23416,6 +23432,20 @@ var progressStyle = {
|
|
|
23416
23432
|
},
|
|
23417
23433
|
background: src.progressBackground
|
|
23418
23434
|
},
|
|
23435
|
+
lineSuccess: {
|
|
23436
|
+
position: 'absolute',
|
|
23437
|
+
transition: 'width 0.32s linear',
|
|
23438
|
+
left: 0,
|
|
23439
|
+
top: 0,
|
|
23440
|
+
height: '100%',
|
|
23441
|
+
boxSizing: 'border-box',
|
|
23442
|
+
borderRadius: 'inherit',
|
|
23443
|
+
zIndex: 2,
|
|
23444
|
+
backgroundColor: src.progressSuccessFrontBackgroundColor,
|
|
23445
|
+
'& + $lineFront': {
|
|
23446
|
+
zIndex: 1
|
|
23447
|
+
}
|
|
23448
|
+
},
|
|
23419
23449
|
lineFront: {
|
|
23420
23450
|
position: 'relative',
|
|
23421
23451
|
transition: 'width 0.32s linear',
|
|
@@ -23564,6 +23594,12 @@ var progressStyle = {
|
|
|
23564
23594
|
'$wrapperDanger &': {
|
|
23565
23595
|
stroke: src.progressDangerFrontBackgroundColor
|
|
23566
23596
|
}
|
|
23597
|
+
},
|
|
23598
|
+
circleSuccess: {
|
|
23599
|
+
transform: 'rotate(-90deg)',
|
|
23600
|
+
transformOrigin: '50% 50%',
|
|
23601
|
+
transition: 'stroke-dashoffset .32s ease 0s,stroke-dasharray .32s ease 0s,stroke .32s,stroke-width .06s ease .32s',
|
|
23602
|
+
stroke: src.progressSuccessFrontBackgroundColor
|
|
23567
23603
|
}
|
|
23568
23604
|
};
|
|
23569
23605
|
/* harmony default export */ var progress_progress = (progressStyle);
|
|
@@ -28598,12 +28634,16 @@ var TransferStyle = {
|
|
|
28598
28634
|
simple: {
|
|
28599
28635
|
'& $source': {
|
|
28600
28636
|
borderRadius: "".concat(src.transferBorderRadius, " 0 0 ").concat(src.transferBorderRadius),
|
|
28601
|
-
borderRight: 0
|
|
28637
|
+
borderRight: 0,
|
|
28638
|
+
'& $header': {
|
|
28639
|
+
borderRadius: "".concat(src.transferBorderRadius, " 0 0 0")
|
|
28640
|
+
}
|
|
28602
28641
|
},
|
|
28603
28642
|
'& $target': {
|
|
28604
28643
|
borderRadius: "0 ".concat(src.transferBorderRadius, " ").concat(src.transferBorderRadius, " 0"),
|
|
28605
28644
|
'& $header': {
|
|
28606
|
-
paddingRight: 6
|
|
28645
|
+
paddingRight: 6,
|
|
28646
|
+
borderRadius: "0 ".concat(src.transferBorderRadius, " 0 0")
|
|
28607
28647
|
}
|
|
28608
28648
|
}
|
|
28609
28649
|
},
|
|
@@ -30601,17 +30641,12 @@ var is_isEmpty = function isEmpty(val) {
|
|
|
30601
30641
|
};
|
|
30602
30642
|
var isLink = function isLink(el) {
|
|
30603
30643
|
if (typeof_default()(el) === 'object') {
|
|
30644
|
+
var _type;
|
|
30604
30645
|
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(el)) return false;
|
|
30605
30646
|
if (!el.type) return false;
|
|
30606
30647
|
if (el.type === 'a') return true;
|
|
30607
|
-
//
|
|
30608
|
-
if (el.props && el.props.to)
|
|
30609
|
-
var typeName = typeof el.type === 'function' ? el.type.name : '';
|
|
30610
|
-
var displayName = typeof_default()(el.type) === 'object' && el.type !== null ? el.type.displayName : '';
|
|
30611
|
-
// 检查是否为常见的路由链接组件
|
|
30612
|
-
var isRouterComponent = typeName === 'Link' || typeName === 'NavLink' || displayName === 'Link' || displayName === 'NavLink';
|
|
30613
|
-
return isRouterComponent;
|
|
30614
|
-
}
|
|
30648
|
+
// 有 to 属性 和 render 函数 就认为是链接组件(react-router Link NavLink 的特征)
|
|
30649
|
+
if (el.props && el.props.to && (_type = el.type) !== null && _type !== void 0 && _type.render) return true;
|
|
30615
30650
|
}
|
|
30616
30651
|
return false;
|
|
30617
30652
|
};
|
|
@@ -35549,7 +35584,7 @@ var useDragMock = function useDragMock(props) {
|
|
|
35549
35584
|
var deltaY = event.clientY - dragInfo.lastY;
|
|
35550
35585
|
dragInfo.lastX = event.clientX;
|
|
35551
35586
|
dragInfo.lastY = event.clientY;
|
|
35552
|
-
(_props$onDragMove = props.onDragMove) === null || _props$onDragMove === void 0 || _props$onDragMove.call(props, deltaX, deltaY);
|
|
35587
|
+
(_props$onDragMove = props.onDragMove) === null || _props$onDragMove === void 0 || _props$onDragMove.call(props, deltaX, deltaY, event);
|
|
35553
35588
|
});
|
|
35554
35589
|
var handleMouseUp = usePersistFn(function (event) {
|
|
35555
35590
|
var _props$onDragEnd;
|
|
@@ -37609,9 +37644,15 @@ var useInputFormat = function useInputFormat(props) {
|
|
|
37609
37644
|
value = value
|
|
37610
37645
|
// -.0 => -0.0 .123 => 0.123
|
|
37611
37646
|
.replace(/^(-)?(\.\d+)(?!=\.).*/g, '$10$2')
|
|
37612
|
-
//0001.123 => 1.123
|
|
37647
|
+
//0001.123 => 1.123, 保留 -0. 的情况
|
|
37613
37648
|
// eslint-disable-next-line no-useless-escape
|
|
37614
|
-
.replace(/(-|^)0+(?=0\.?|[^0\.])/g,
|
|
37649
|
+
.replace(/(-|^)0+(?=0\.?|[^0\.])/g, function (match, p1) {
|
|
37650
|
+
// 如果是负号开头且后面跟着0和小数点,保留-0
|
|
37651
|
+
if (p1 === '-' && value.startsWith('-0.')) {
|
|
37652
|
+
return '-0';
|
|
37653
|
+
}
|
|
37654
|
+
return p1;
|
|
37655
|
+
})
|
|
37615
37656
|
// 1. => 1
|
|
37616
37657
|
.replace(/\.$/, '');
|
|
37617
37658
|
|
|
@@ -40823,7 +40864,7 @@ var useTree = function useTree(props) {
|
|
|
40823
40864
|
var indexPath = [].concat(toConsumableArray_default()(index), [i]);
|
|
40824
40865
|
ids.push(id);
|
|
40825
40866
|
var children = [];
|
|
40826
|
-
if (Array.isArray(item[childrenKey])) {
|
|
40867
|
+
if (item && Array.isArray(item[childrenKey])) {
|
|
40827
40868
|
var _children = initData(item[childrenKey], [].concat(toConsumableArray_default()(path), [id]), mode === MODE.MODE_4 ? disabled : _isDisabled, indexPath, level + 1, id);
|
|
40828
40869
|
if (_children) children = _children;
|
|
40829
40870
|
}
|
|
@@ -40859,7 +40900,7 @@ var useTree = function useTree(props) {
|
|
|
40859
40900
|
result.push(node);
|
|
40860
40901
|
}
|
|
40861
40902
|
}
|
|
40862
|
-
if (Array.isArray(item[childrenKey])) {
|
|
40903
|
+
if (item && Array.isArray(item[childrenKey])) {
|
|
40863
40904
|
initFlatData(item[childrenKey], [].concat(toConsumableArray_default()(path), [id]), level + 1, id, result);
|
|
40864
40905
|
}
|
|
40865
40906
|
}
|
|
@@ -57988,16 +58029,23 @@ var Tree = function Tree(props) {
|
|
|
57988
58029
|
return props.height || styleHeight;
|
|
57989
58030
|
};
|
|
57990
58031
|
var handleUpdateActive = function handleUpdateActive(active, item) {
|
|
57991
|
-
|
|
57992
|
-
if (
|
|
57993
|
-
|
|
58032
|
+
var fromUser = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
58033
|
+
if (isActiveControlled && fromUser) {
|
|
58034
|
+
// 受控模式下,用户点击时只调用外部回调,不更新内部状态
|
|
58035
|
+
if (active !== props.active) {
|
|
58036
|
+
propSetActive === null || propSetActive === void 0 || propSetActive(active, item);
|
|
58037
|
+
}
|
|
58038
|
+
return;
|
|
57994
58039
|
}
|
|
58040
|
+
|
|
58041
|
+
// 其他情况(非受控模式,或受控模式下由 props.active 变化触发),更新内部状态和节点
|
|
58042
|
+
setActive(active);
|
|
57995
58043
|
datum.updateMap.forEach(function (update, id) {
|
|
57996
58044
|
update('active', id === active);
|
|
57997
58045
|
});
|
|
57998
58046
|
};
|
|
57999
58047
|
var handleNodeClick = function handleNodeClick(node, id) {
|
|
58000
|
-
handleUpdateActive(id, node);
|
|
58048
|
+
handleUpdateActive(id, node, true);
|
|
58001
58049
|
if (onClick) {
|
|
58002
58050
|
onClick(node, id, datum.getPath(id));
|
|
58003
58051
|
}
|
|
@@ -61972,6 +62020,8 @@ var LinePopUp = function LinePopUp(props) {
|
|
|
61972
62020
|
|
|
61973
62021
|
|
|
61974
62022
|
|
|
62023
|
+
|
|
62024
|
+
|
|
61975
62025
|
var Line = function Line(props) {
|
|
61976
62026
|
var _props$jssStyle;
|
|
61977
62027
|
var _props$shape = props.shape,
|
|
@@ -61981,7 +62031,8 @@ var Line = function Line(props) {
|
|
|
61981
62031
|
_props$type = props.type,
|
|
61982
62032
|
type = _props$type === void 0 ? 'info' : _props$type,
|
|
61983
62033
|
iconSize = props.iconSize,
|
|
61984
|
-
popup = props.popup
|
|
62034
|
+
popup = props.popup,
|
|
62035
|
+
success = props.success;
|
|
61985
62036
|
var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
|
|
61986
62037
|
var isInner = shape === 'line-inner';
|
|
61987
62038
|
var isInnerRight = isInner && value < 10;
|
|
@@ -62010,21 +62061,41 @@ var Line = function Line(props) {
|
|
|
62010
62061
|
return p ? "".concat(p, ",").concat(col) : col;
|
|
62011
62062
|
}, ''), ")");
|
|
62012
62063
|
}
|
|
62064
|
+
|
|
62065
|
+
// Success progress bar style
|
|
62066
|
+
var successStyle = success ? {
|
|
62067
|
+
width: "".concat(success.value / 100 * 100, "%"),
|
|
62068
|
+
borderRadius: props.strokeWidth && props.strokeWidth / 2
|
|
62069
|
+
} : undefined;
|
|
62070
|
+
if (successStyle && success) {
|
|
62071
|
+
if (typeof success.color === 'string') {
|
|
62072
|
+
successStyle.background = success.color;
|
|
62073
|
+
successStyle.backgroundSize = '1em 1em';
|
|
62074
|
+
} else if (typeof_default()(success.color) === 'object') {
|
|
62075
|
+
successStyle.background = "linear-gradient(to right, ".concat(analyzeColor(success.color).reduce(function (p, v) {
|
|
62076
|
+
var col = "".concat(v.color, " ").concat(v.pos);
|
|
62077
|
+
return p ? "".concat(p, ",").concat(col) : col;
|
|
62078
|
+
}, ''), ")");
|
|
62079
|
+
}
|
|
62080
|
+
}
|
|
62013
62081
|
var children = props.children ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62014
62082
|
className: classnames_default()(progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content),
|
|
62015
62083
|
children: props.children
|
|
62016
62084
|
}) : null;
|
|
62017
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62085
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
|
|
62018
62086
|
className: mc,
|
|
62019
62087
|
style: props.style,
|
|
62020
|
-
children: [/*#__PURE__*/(0,jsx_runtime.
|
|
62088
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62021
62089
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineBg,
|
|
62022
62090
|
style: bgStyle,
|
|
62023
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62091
|
+
children: [success && successStyle && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62092
|
+
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineSuccess,
|
|
62093
|
+
style: successStyle
|
|
62094
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62024
62095
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineFront,
|
|
62025
62096
|
style: frontStyle,
|
|
62026
62097
|
children: isInner && children
|
|
62027
|
-
})
|
|
62098
|
+
})]
|
|
62028
62099
|
}), isDefaultPop ? /*#__PURE__*/(0,jsx_runtime.jsx)(line_popup, {
|
|
62029
62100
|
value: value,
|
|
62030
62101
|
jssStyle: props.jssStyle,
|
|
@@ -62034,7 +62105,7 @@ var Line = function Line(props) {
|
|
|
62034
62105
|
style: iconStyle,
|
|
62035
62106
|
children: [type === 'info' && icons_config.progress.InfoLine, type === 'warning' && icons_config.progress.WarningLine, type === 'success' && icons_config.progress.SuccessLine, type === 'danger' && icons_config.progress.DangerLine]
|
|
62036
62107
|
})]
|
|
62037
|
-
});
|
|
62108
|
+
}));
|
|
62038
62109
|
};
|
|
62039
62110
|
/* harmony default export */ var line = (Line);
|
|
62040
62111
|
;// CONCATENATED MODULE: ../base/src/progress/circle.tsx
|
|
@@ -62045,6 +62116,8 @@ var Line = function Line(props) {
|
|
|
62045
62116
|
|
|
62046
62117
|
|
|
62047
62118
|
|
|
62119
|
+
|
|
62120
|
+
|
|
62048
62121
|
var Circle = function Circle(props) {
|
|
62049
62122
|
var _props$jssStyle;
|
|
62050
62123
|
var _props$value = props.value,
|
|
@@ -62058,7 +62131,8 @@ var Circle = function Circle(props) {
|
|
|
62058
62131
|
size = _props$size === void 0 ? 64 : _props$size,
|
|
62059
62132
|
_props$strokeLinecap = props.strokeLinecap,
|
|
62060
62133
|
strokeLinecap = _props$strokeLinecap === void 0 ? 'round' : _props$strokeLinecap,
|
|
62061
|
-
iconSize = props.iconSize
|
|
62134
|
+
iconSize = props.iconSize,
|
|
62135
|
+
success = props.success;
|
|
62062
62136
|
var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
|
|
62063
62137
|
var iconStyle = {
|
|
62064
62138
|
width: iconSize,
|
|
@@ -62076,8 +62150,13 @@ var Circle = function Circle(props) {
|
|
|
62076
62150
|
}, props.style);
|
|
62077
62151
|
var width = value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
|
|
62078
62152
|
var objColor = color && typeof_default()(color) === 'object';
|
|
62153
|
+
|
|
62154
|
+
// Success circle calculation
|
|
62155
|
+
var successDasharray = success ? [p * (success.value / 100), p * (1 - success.value / 100)] : null;
|
|
62156
|
+
var successWidth = success && success.value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
|
|
62157
|
+
var objSuccessColor = (success === null || success === void 0 ? void 0 : success.color) && typeof_default()(success.color) === 'object';
|
|
62079
62158
|
var mc = classnames_default()(props.className, progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.rootClass, progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circle, progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapper, type === 'success' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperSuccess), type === 'info' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperInfo), type === 'warning' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperWarning), type === 'danger' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperDanger));
|
|
62080
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62159
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
|
|
62081
62160
|
className: mc,
|
|
62082
62161
|
style: style,
|
|
62083
62162
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("svg", {
|
|
@@ -62096,6 +62175,20 @@ var Circle = function Circle(props) {
|
|
|
62096
62175
|
}, c.pos);
|
|
62097
62176
|
})
|
|
62098
62177
|
})
|
|
62178
|
+
}) : null, objSuccessColor && success !== null && success !== void 0 && success.color && typeof_default()(success.color) === 'object' ? /*#__PURE__*/(0,jsx_runtime.jsx)("defs", {
|
|
62179
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("linearGradient", {
|
|
62180
|
+
id: "progress-success-linear",
|
|
62181
|
+
x1: "50%",
|
|
62182
|
+
x2: "50%",
|
|
62183
|
+
y1: "0%",
|
|
62184
|
+
y2: "100%",
|
|
62185
|
+
children: analyzeColor(success.color).map(function (c) {
|
|
62186
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("stop", {
|
|
62187
|
+
offset: c.pos,
|
|
62188
|
+
stopColor: c.color
|
|
62189
|
+
}, c.pos);
|
|
62190
|
+
})
|
|
62191
|
+
})
|
|
62099
62192
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
|
|
62100
62193
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleBg,
|
|
62101
62194
|
cx: cx,
|
|
@@ -62118,6 +62211,18 @@ var Circle = function Circle(props) {
|
|
|
62118
62211
|
strokeDasharray: dasharray,
|
|
62119
62212
|
strokeLinecap: strokeLinecap,
|
|
62120
62213
|
strokeWidth: width
|
|
62214
|
+
}), success && successDasharray && /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
|
|
62215
|
+
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleSuccess,
|
|
62216
|
+
cx: cx,
|
|
62217
|
+
cy: cy,
|
|
62218
|
+
r: r,
|
|
62219
|
+
fill: "transparent",
|
|
62220
|
+
style: {
|
|
62221
|
+
stroke: objSuccessColor ? "url('#progress-success-linear')" : typeof success.color === 'string' ? success.color : undefined
|
|
62222
|
+
},
|
|
62223
|
+
strokeDasharray: successDasharray,
|
|
62224
|
+
strokeLinecap: strokeLinecap,
|
|
62225
|
+
strokeWidth: successWidth
|
|
62121
62226
|
})]
|
|
62122
62227
|
}), !showIcon && props.children && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62123
62228
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content,
|
|
@@ -62127,7 +62232,7 @@ var Circle = function Circle(props) {
|
|
|
62127
62232
|
style: iconStyle,
|
|
62128
62233
|
children: [type === 'info' && icons_config.progress.InfoCircle, type === 'warning' && icons_config.progress.WarningCircle, type === 'success' && icons_config.progress.SuccessCircle, type === 'danger' && icons_config.progress.DangerCircle]
|
|
62129
62234
|
})]
|
|
62130
|
-
});
|
|
62235
|
+
}));
|
|
62131
62236
|
};
|
|
62132
62237
|
/* harmony default export */ var circle = (Circle);
|
|
62133
62238
|
;// CONCATENATED MODULE: ../base/src/progress/progress.tsx
|
|
@@ -63080,6 +63185,12 @@ var useSlider = function useSlider(props) {
|
|
|
63080
63185
|
context.clickLock = false;
|
|
63081
63186
|
}, 100);
|
|
63082
63187
|
});
|
|
63188
|
+
var isDisabled = use_persist_fn(function (value) {
|
|
63189
|
+
if (typeof props.disabled === 'function') {
|
|
63190
|
+
return props.disabled(value);
|
|
63191
|
+
}
|
|
63192
|
+
return !!props.disabled;
|
|
63193
|
+
});
|
|
63083
63194
|
var handleDragEnd = use_persist_fn(function () {
|
|
63084
63195
|
lockClick();
|
|
63085
63196
|
var start = getValueFromRate(rate[0], scale, step);
|
|
@@ -63091,20 +63202,56 @@ var useSlider = function useSlider(props) {
|
|
|
63091
63202
|
props.onChange(end);
|
|
63092
63203
|
}
|
|
63093
63204
|
});
|
|
63094
|
-
var handleDragMove = use_persist_fn(function (deltaX, deltaY) {
|
|
63205
|
+
var handleDragMove = use_persist_fn(function (deltaX, deltaY, mouseEvent) {
|
|
63095
63206
|
setRate(function (r) {
|
|
63096
63207
|
var target = trackRef.current;
|
|
63097
63208
|
if (!target) return r;
|
|
63098
63209
|
var newRate = toConsumableArray_default()(r);
|
|
63099
63210
|
var v = context.dragIndex === 0 ? r[0] : r[1];
|
|
63100
|
-
var
|
|
63101
|
-
|
|
63102
|
-
|
|
63211
|
+
var rate;
|
|
63212
|
+
|
|
63213
|
+
// If disabled function is used and we have mouse event, use absolute position
|
|
63214
|
+
if (typeof props.disabled === 'function' && mouseEvent) {
|
|
63215
|
+
var rect = target.getBoundingClientRect();
|
|
63216
|
+
var currentIndicatorRate = v;
|
|
63217
|
+
|
|
63218
|
+
// Calculate mouse position rate
|
|
63219
|
+
var mouseRate;
|
|
63220
|
+
if (props.vertical) {
|
|
63221
|
+
mouseRate = (rect.bottom - mouseEvent.clientY) / rect.height;
|
|
63222
|
+
} else {
|
|
63223
|
+
mouseRate = isReserve ? (rect.right - mouseEvent.clientX) / rect.width : (mouseEvent.clientX - rect.left) / rect.width;
|
|
63224
|
+
}
|
|
63225
|
+
|
|
63226
|
+
// Only allow movement if mouse crossed the indicator position
|
|
63227
|
+
if (mouseRate > currentIndicatorRate) {
|
|
63228
|
+
// Mouse is to the right/top, allow moving right/up
|
|
63229
|
+
rate = Math.max(Math.min(mouseRate, 1), 0);
|
|
63230
|
+
} else if (mouseRate < currentIndicatorRate) {
|
|
63231
|
+
// Mouse is to the left/bottom, allow moving left/down
|
|
63232
|
+
rate = Math.max(Math.min(mouseRate, 1), 0);
|
|
63233
|
+
} else {
|
|
63234
|
+
// Mouse is at same position, no change
|
|
63235
|
+
return r;
|
|
63236
|
+
}
|
|
63237
|
+
} else {
|
|
63238
|
+
// Normal delta-based movement
|
|
63239
|
+
var max = props.vertical ? target.clientHeight : target.clientWidth;
|
|
63240
|
+
var delta = props.vertical ? deltaY * -1 : deltaX * (isReserve ? -1 : 1);
|
|
63241
|
+
rate = Math.max(v + delta / max, 0);
|
|
63242
|
+
}
|
|
63103
63243
|
if (rate > 1) {
|
|
63104
63244
|
rate = 1;
|
|
63105
63245
|
if (typeof props.onIncrease === 'function') props.onIncrease();
|
|
63106
63246
|
}
|
|
63107
63247
|
newRate[context.dragIndex] = rate;
|
|
63248
|
+
|
|
63249
|
+
// Check if the new value would be disabled
|
|
63250
|
+
var newValue = getValueFromRate(newRate[context.dragIndex], scale, step);
|
|
63251
|
+
if (isDisabled(newValue)) {
|
|
63252
|
+
// Stay at current position to prevent flickering
|
|
63253
|
+
return r;
|
|
63254
|
+
}
|
|
63108
63255
|
if (newRate[0] > newRate[1]) {
|
|
63109
63256
|
context.dragIndex = context.dragIndex === 0 ? 1 : 0;
|
|
63110
63257
|
var temp = newRate[0];
|
|
@@ -63133,6 +63280,9 @@ var useSlider = function useSlider(props) {
|
|
|
63133
63280
|
var rect = target.getBoundingClientRect();
|
|
63134
63281
|
var rate = !props.vertical ? (isReserve ? rect.right - e.clientX : e.clientX - rect.left) / rect.width : (rect.bottom - e.clientY) / rect.height;
|
|
63135
63282
|
var value = getValueFromRate(rate, scale, step);
|
|
63283
|
+
|
|
63284
|
+
// Check if the clicked value would be disabled
|
|
63285
|
+
if (isDisabled(value)) return;
|
|
63136
63286
|
if (props.range) {
|
|
63137
63287
|
var _start = startValue;
|
|
63138
63288
|
var _end = endValue;
|
|
@@ -63169,8 +63319,10 @@ var useSlider = function useSlider(props) {
|
|
|
63169
63319
|
handleEndMouseDown: handleEndMouseDown,
|
|
63170
63320
|
handleTrackClick: handleTrackClick
|
|
63171
63321
|
});
|
|
63172
|
-
|
|
63173
|
-
|
|
63322
|
+
|
|
63323
|
+
// During dragging, optionally snap to quantized values in discrete mode
|
|
63324
|
+
var start = dragInfo.isDragging ? props.discrete ? getRateFromValue(getValueFromRate(rate[0], scale, step), scale) : rate[0] : getRateFromValue(startValue, scale);
|
|
63325
|
+
var end = dragInfo.isDragging ? props.discrete ? getRateFromValue(getValueFromRate(rate[1], scale, step), scale) : rate[1] : getRateFromValue(endValue, scale);
|
|
63174
63326
|
var innerStyle = getTrackInnerStyle(start, end);
|
|
63175
63327
|
return {
|
|
63176
63328
|
func: func,
|
|
@@ -63226,7 +63378,9 @@ var Slider = function Slider(props0) {
|
|
|
63226
63378
|
step: step,
|
|
63227
63379
|
vertical: !!props.vertical,
|
|
63228
63380
|
onIncrease: props.onIncrease,
|
|
63229
|
-
direction: config.direction
|
|
63381
|
+
direction: config.direction,
|
|
63382
|
+
disabled: props.disabled,
|
|
63383
|
+
discrete: props.discrete
|
|
63230
63384
|
}),
|
|
63231
63385
|
func = _useSlider.func,
|
|
63232
63386
|
trackRef = _useSlider.trackRef,
|
|
@@ -63248,12 +63402,20 @@ var Slider = function Slider(props0) {
|
|
|
63248
63402
|
children: formated
|
|
63249
63403
|
});
|
|
63250
63404
|
};
|
|
63405
|
+
var isDisabled = function isDisabled(value) {
|
|
63406
|
+
if (typeof props.disabled === 'function') {
|
|
63407
|
+
return props.disabled(value);
|
|
63408
|
+
}
|
|
63409
|
+
return !!props.disabled;
|
|
63410
|
+
};
|
|
63251
63411
|
var renderIndicator = function renderIndicator(position) {
|
|
63252
63412
|
if (!props.range && position === 0) return null;
|
|
63253
63413
|
var handleEndMouseDown = position === 0 ? func.handleStartMouseDown : func.handleEndMouseDown;
|
|
63414
|
+
var value = position === 0 ? startValue : endValue;
|
|
63415
|
+
var disabled = isDisabled(value);
|
|
63254
63416
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
63255
63417
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63256
|
-
onMouseDown:
|
|
63418
|
+
onMouseDown: disabled ? undefined : handleEndMouseDown,
|
|
63257
63419
|
className: classnames_default()(sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.indicator, position === 0 ? sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.indicatorStart : sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.indicatorEnd, dragIndex === position && (sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.indicatorActive), tipType === 'hover' && (sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.indicatorHover)),
|
|
63258
63420
|
dir: config.direction
|
|
63259
63421
|
}), renderIndicatorValue(position)]
|
|
@@ -63269,14 +63431,30 @@ var Slider = function Slider(props0) {
|
|
|
63269
63431
|
var verticalStyle = props.vertical ? {
|
|
63270
63432
|
height: height
|
|
63271
63433
|
} : {};
|
|
63434
|
+
|
|
63435
|
+
// For boolean disabled, use it directly; for function disabled, check all values
|
|
63436
|
+
var isWholeDisabled = function isWholeDisabled() {
|
|
63437
|
+
if (typeof props.disabled === 'boolean' || props.disabled === undefined) {
|
|
63438
|
+
return !!props.disabled;
|
|
63439
|
+
}
|
|
63440
|
+
// For function disabled, the component is not fully disabled (individual indicators are)
|
|
63441
|
+
return false;
|
|
63442
|
+
};
|
|
63443
|
+
var shouldDisableTrackClick = function shouldDisableTrackClick() {
|
|
63444
|
+
if (typeof props.disabled === 'boolean' || props.disabled === undefined) {
|
|
63445
|
+
return !!props.disabled;
|
|
63446
|
+
}
|
|
63447
|
+
// For function disabled, allow track clicks
|
|
63448
|
+
return false;
|
|
63449
|
+
};
|
|
63272
63450
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63273
63451
|
id: fieldId,
|
|
63274
|
-
className: classnames_default()(sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.rootClass, sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.wrapper, props.autoHide && (sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.autoHide),
|
|
63452
|
+
className: classnames_default()(sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.rootClass, sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.wrapper, props.autoHide && (sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.autoHide), isWholeDisabled() && (sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.disabled), props.vertical && (sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.vertical), props.className),
|
|
63275
63453
|
style: objectSpread2_default()(objectSpread2_default()({}, verticalStyle), props.style),
|
|
63276
63454
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63277
63455
|
className: sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.track,
|
|
63278
63456
|
ref: trackRef,
|
|
63279
|
-
onClick:
|
|
63457
|
+
onClick: shouldDisableTrackClick() ? undefined : func.handleTrackClick,
|
|
63280
63458
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63281
63459
|
className: sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.trackInner,
|
|
63282
63460
|
style: innerStyle,
|
|
@@ -68467,14 +68645,14 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
68467
68645
|
var isActive = active === id;
|
|
68468
68646
|
var keekAlive = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
68469
68647
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
68470
|
-
var tabData = {
|
|
68648
|
+
var tabData = objectSpread2_default()({
|
|
68471
68649
|
id: id,
|
|
68472
68650
|
tab: tab,
|
|
68473
68651
|
disabled: props.disabled,
|
|
68474
68652
|
jssStyle: jssStyle,
|
|
68475
68653
|
background: shape !== 'button' && shape !== 'fill' ? background : undefined,
|
|
68476
68654
|
color: props.color || (active === id ? color : undefined)
|
|
68477
|
-
};
|
|
68655
|
+
}, extractProps(props, 'data-attr'));
|
|
68478
68656
|
setTabs(function (prev) {
|
|
68479
68657
|
var oldTab = prev.find(function (item) {
|
|
68480
68658
|
return item.id === id;
|
|
@@ -68763,9 +68941,9 @@ var Tab = function Tab(props, _ref) {
|
|
|
68763
68941
|
if (shape === 'card') {
|
|
68764
68942
|
style.color = color;
|
|
68765
68943
|
}
|
|
68766
|
-
var containerProps = objectSpread2_default()(objectSpread2_default()({
|
|
68944
|
+
var containerProps = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
68767
68945
|
className: tabClass
|
|
68768
|
-
}, getStateProps()), {}, {
|
|
68946
|
+
}, getStateProps()), extractProps(props, "data-attr")), {}, {
|
|
68769
68947
|
style: style,
|
|
68770
68948
|
onClick: handleClick,
|
|
68771
68949
|
ref: _ref,
|
|
@@ -74878,7 +75056,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
74878
75056
|
|
|
74879
75057
|
|
|
74880
75058
|
/* harmony default export */ var src_0 = ({
|
|
74881
|
-
version: '3.9.
|
|
75059
|
+
version: '3.9.7-beta.10'
|
|
74882
75060
|
});
|
|
74883
75061
|
}();
|
|
74884
75062
|
/******/ return __webpack_exports__;
|