shineout 3.9.7-beta.1 → 3.9.7-beta.11
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 +220 -44
- 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.7-beta.
|
|
525
|
+
version: '3.9.7-beta.11'
|
|
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.7-beta.
|
|
12404
|
+
/* harmony default export */ var version = ('3.9.7-beta.11');
|
|
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
|
},
|
|
@@ -30604,14 +30644,7 @@ var isLink = function isLink(el) {
|
|
|
30604
30644
|
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(el)) return false;
|
|
30605
30645
|
if (!el.type) return false;
|
|
30606
30646
|
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
|
-
}
|
|
30647
|
+
if (el.props && el.props.to) return true;
|
|
30615
30648
|
}
|
|
30616
30649
|
return false;
|
|
30617
30650
|
};
|
|
@@ -35549,7 +35582,7 @@ var useDragMock = function useDragMock(props) {
|
|
|
35549
35582
|
var deltaY = event.clientY - dragInfo.lastY;
|
|
35550
35583
|
dragInfo.lastX = event.clientX;
|
|
35551
35584
|
dragInfo.lastY = event.clientY;
|
|
35552
|
-
(_props$onDragMove = props.onDragMove) === null || _props$onDragMove === void 0 || _props$onDragMove.call(props, deltaX, deltaY);
|
|
35585
|
+
(_props$onDragMove = props.onDragMove) === null || _props$onDragMove === void 0 || _props$onDragMove.call(props, deltaX, deltaY, event);
|
|
35553
35586
|
});
|
|
35554
35587
|
var handleMouseUp = usePersistFn(function (event) {
|
|
35555
35588
|
var _props$onDragEnd;
|
|
@@ -37609,9 +37642,15 @@ var useInputFormat = function useInputFormat(props) {
|
|
|
37609
37642
|
value = value
|
|
37610
37643
|
// -.0 => -0.0 .123 => 0.123
|
|
37611
37644
|
.replace(/^(-)?(\.\d+)(?!=\.).*/g, '$10$2')
|
|
37612
|
-
//0001.123 => 1.123
|
|
37645
|
+
//0001.123 => 1.123, 保留 -0. 的情况
|
|
37613
37646
|
// eslint-disable-next-line no-useless-escape
|
|
37614
|
-
.replace(/(-|^)0+(?=0\.?|[^0\.])/g,
|
|
37647
|
+
.replace(/(-|^)0+(?=0\.?|[^0\.])/g, function (match, p1) {
|
|
37648
|
+
// 如果是负号开头且后面跟着0和小数点,保留-0
|
|
37649
|
+
if (p1 === '-' && value.startsWith('-0.')) {
|
|
37650
|
+
return '-0';
|
|
37651
|
+
}
|
|
37652
|
+
return p1;
|
|
37653
|
+
})
|
|
37615
37654
|
// 1. => 1
|
|
37616
37655
|
.replace(/\.$/, '');
|
|
37617
37656
|
|
|
@@ -40823,7 +40862,7 @@ var useTree = function useTree(props) {
|
|
|
40823
40862
|
var indexPath = [].concat(toConsumableArray_default()(index), [i]);
|
|
40824
40863
|
ids.push(id);
|
|
40825
40864
|
var children = [];
|
|
40826
|
-
if (Array.isArray(item[childrenKey])) {
|
|
40865
|
+
if (item && Array.isArray(item[childrenKey])) {
|
|
40827
40866
|
var _children = initData(item[childrenKey], [].concat(toConsumableArray_default()(path), [id]), mode === MODE.MODE_4 ? disabled : _isDisabled, indexPath, level + 1, id);
|
|
40828
40867
|
if (_children) children = _children;
|
|
40829
40868
|
}
|
|
@@ -40859,7 +40898,7 @@ var useTree = function useTree(props) {
|
|
|
40859
40898
|
result.push(node);
|
|
40860
40899
|
}
|
|
40861
40900
|
}
|
|
40862
|
-
if (Array.isArray(item[childrenKey])) {
|
|
40901
|
+
if (item && Array.isArray(item[childrenKey])) {
|
|
40863
40902
|
initFlatData(item[childrenKey], [].concat(toConsumableArray_default()(path), [id]), level + 1, id, result);
|
|
40864
40903
|
}
|
|
40865
40904
|
}
|
|
@@ -57988,16 +58027,23 @@ var Tree = function Tree(props) {
|
|
|
57988
58027
|
return props.height || styleHeight;
|
|
57989
58028
|
};
|
|
57990
58029
|
var handleUpdateActive = function handleUpdateActive(active, item) {
|
|
57991
|
-
|
|
57992
|
-
if (
|
|
57993
|
-
|
|
58030
|
+
var fromUser = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
58031
|
+
if (isActiveControlled && fromUser) {
|
|
58032
|
+
// 受控模式下,用户点击时只调用外部回调,不更新内部状态
|
|
58033
|
+
if (active !== props.active) {
|
|
58034
|
+
propSetActive === null || propSetActive === void 0 || propSetActive(active, item);
|
|
58035
|
+
}
|
|
58036
|
+
return;
|
|
57994
58037
|
}
|
|
58038
|
+
|
|
58039
|
+
// 其他情况(非受控模式,或受控模式下由 props.active 变化触发),更新内部状态和节点
|
|
58040
|
+
setActive(active);
|
|
57995
58041
|
datum.updateMap.forEach(function (update, id) {
|
|
57996
58042
|
update('active', id === active);
|
|
57997
58043
|
});
|
|
57998
58044
|
};
|
|
57999
58045
|
var handleNodeClick = function handleNodeClick(node, id) {
|
|
58000
|
-
handleUpdateActive(id, node);
|
|
58046
|
+
handleUpdateActive(id, node, true);
|
|
58001
58047
|
if (onClick) {
|
|
58002
58048
|
onClick(node, id, datum.getPath(id));
|
|
58003
58049
|
}
|
|
@@ -61972,6 +62018,8 @@ var LinePopUp = function LinePopUp(props) {
|
|
|
61972
62018
|
|
|
61973
62019
|
|
|
61974
62020
|
|
|
62021
|
+
|
|
62022
|
+
|
|
61975
62023
|
var Line = function Line(props) {
|
|
61976
62024
|
var _props$jssStyle;
|
|
61977
62025
|
var _props$shape = props.shape,
|
|
@@ -61981,7 +62029,8 @@ var Line = function Line(props) {
|
|
|
61981
62029
|
_props$type = props.type,
|
|
61982
62030
|
type = _props$type === void 0 ? 'info' : _props$type,
|
|
61983
62031
|
iconSize = props.iconSize,
|
|
61984
|
-
popup = props.popup
|
|
62032
|
+
popup = props.popup,
|
|
62033
|
+
success = props.success;
|
|
61985
62034
|
var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
|
|
61986
62035
|
var isInner = shape === 'line-inner';
|
|
61987
62036
|
var isInnerRight = isInner && value < 10;
|
|
@@ -62010,21 +62059,41 @@ var Line = function Line(props) {
|
|
|
62010
62059
|
return p ? "".concat(p, ",").concat(col) : col;
|
|
62011
62060
|
}, ''), ")");
|
|
62012
62061
|
}
|
|
62062
|
+
|
|
62063
|
+
// Success progress bar style
|
|
62064
|
+
var successStyle = success ? {
|
|
62065
|
+
width: "".concat(success.value / 100 * 100, "%"),
|
|
62066
|
+
borderRadius: props.strokeWidth && props.strokeWidth / 2
|
|
62067
|
+
} : undefined;
|
|
62068
|
+
if (successStyle && success) {
|
|
62069
|
+
if (typeof success.color === 'string') {
|
|
62070
|
+
successStyle.background = success.color;
|
|
62071
|
+
successStyle.backgroundSize = '1em 1em';
|
|
62072
|
+
} else if (typeof_default()(success.color) === 'object') {
|
|
62073
|
+
successStyle.background = "linear-gradient(to right, ".concat(analyzeColor(success.color).reduce(function (p, v) {
|
|
62074
|
+
var col = "".concat(v.color, " ").concat(v.pos);
|
|
62075
|
+
return p ? "".concat(p, ",").concat(col) : col;
|
|
62076
|
+
}, ''), ")");
|
|
62077
|
+
}
|
|
62078
|
+
}
|
|
62013
62079
|
var children = props.children ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62014
62080
|
className: classnames_default()(progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content),
|
|
62015
62081
|
children: props.children
|
|
62016
62082
|
}) : null;
|
|
62017
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62083
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
|
|
62018
62084
|
className: mc,
|
|
62019
62085
|
style: props.style,
|
|
62020
|
-
children: [/*#__PURE__*/(0,jsx_runtime.
|
|
62086
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62021
62087
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineBg,
|
|
62022
62088
|
style: bgStyle,
|
|
62023
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62089
|
+
children: [success && successStyle && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62090
|
+
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineSuccess,
|
|
62091
|
+
style: successStyle
|
|
62092
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62024
62093
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineFront,
|
|
62025
62094
|
style: frontStyle,
|
|
62026
62095
|
children: isInner && children
|
|
62027
|
-
})
|
|
62096
|
+
})]
|
|
62028
62097
|
}), isDefaultPop ? /*#__PURE__*/(0,jsx_runtime.jsx)(line_popup, {
|
|
62029
62098
|
value: value,
|
|
62030
62099
|
jssStyle: props.jssStyle,
|
|
@@ -62034,7 +62103,7 @@ var Line = function Line(props) {
|
|
|
62034
62103
|
style: iconStyle,
|
|
62035
62104
|
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
62105
|
})]
|
|
62037
|
-
});
|
|
62106
|
+
}));
|
|
62038
62107
|
};
|
|
62039
62108
|
/* harmony default export */ var line = (Line);
|
|
62040
62109
|
;// CONCATENATED MODULE: ../base/src/progress/circle.tsx
|
|
@@ -62045,6 +62114,8 @@ var Line = function Line(props) {
|
|
|
62045
62114
|
|
|
62046
62115
|
|
|
62047
62116
|
|
|
62117
|
+
|
|
62118
|
+
|
|
62048
62119
|
var Circle = function Circle(props) {
|
|
62049
62120
|
var _props$jssStyle;
|
|
62050
62121
|
var _props$value = props.value,
|
|
@@ -62058,7 +62129,8 @@ var Circle = function Circle(props) {
|
|
|
62058
62129
|
size = _props$size === void 0 ? 64 : _props$size,
|
|
62059
62130
|
_props$strokeLinecap = props.strokeLinecap,
|
|
62060
62131
|
strokeLinecap = _props$strokeLinecap === void 0 ? 'round' : _props$strokeLinecap,
|
|
62061
|
-
iconSize = props.iconSize
|
|
62132
|
+
iconSize = props.iconSize,
|
|
62133
|
+
success = props.success;
|
|
62062
62134
|
var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
|
|
62063
62135
|
var iconStyle = {
|
|
62064
62136
|
width: iconSize,
|
|
@@ -62076,8 +62148,13 @@ var Circle = function Circle(props) {
|
|
|
62076
62148
|
}, props.style);
|
|
62077
62149
|
var width = value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
|
|
62078
62150
|
var objColor = color && typeof_default()(color) === 'object';
|
|
62151
|
+
|
|
62152
|
+
// Success circle calculation
|
|
62153
|
+
var successDasharray = success ? [p * (success.value / 100), p * (1 - success.value / 100)] : null;
|
|
62154
|
+
var successWidth = success && success.value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
|
|
62155
|
+
var objSuccessColor = (success === null || success === void 0 ? void 0 : success.color) && typeof_default()(success.color) === 'object';
|
|
62079
62156
|
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", {
|
|
62157
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
|
|
62081
62158
|
className: mc,
|
|
62082
62159
|
style: style,
|
|
62083
62160
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("svg", {
|
|
@@ -62096,6 +62173,20 @@ var Circle = function Circle(props) {
|
|
|
62096
62173
|
}, c.pos);
|
|
62097
62174
|
})
|
|
62098
62175
|
})
|
|
62176
|
+
}) : null, objSuccessColor && success !== null && success !== void 0 && success.color && typeof_default()(success.color) === 'object' ? /*#__PURE__*/(0,jsx_runtime.jsx)("defs", {
|
|
62177
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("linearGradient", {
|
|
62178
|
+
id: "progress-success-linear",
|
|
62179
|
+
x1: "50%",
|
|
62180
|
+
x2: "50%",
|
|
62181
|
+
y1: "0%",
|
|
62182
|
+
y2: "100%",
|
|
62183
|
+
children: analyzeColor(success.color).map(function (c) {
|
|
62184
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("stop", {
|
|
62185
|
+
offset: c.pos,
|
|
62186
|
+
stopColor: c.color
|
|
62187
|
+
}, c.pos);
|
|
62188
|
+
})
|
|
62189
|
+
})
|
|
62099
62190
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
|
|
62100
62191
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleBg,
|
|
62101
62192
|
cx: cx,
|
|
@@ -62118,6 +62209,18 @@ var Circle = function Circle(props) {
|
|
|
62118
62209
|
strokeDasharray: dasharray,
|
|
62119
62210
|
strokeLinecap: strokeLinecap,
|
|
62120
62211
|
strokeWidth: width
|
|
62212
|
+
}), success && successDasharray && /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
|
|
62213
|
+
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleSuccess,
|
|
62214
|
+
cx: cx,
|
|
62215
|
+
cy: cy,
|
|
62216
|
+
r: r,
|
|
62217
|
+
fill: "transparent",
|
|
62218
|
+
style: {
|
|
62219
|
+
stroke: objSuccessColor ? "url('#progress-success-linear')" : typeof success.color === 'string' ? success.color : undefined
|
|
62220
|
+
},
|
|
62221
|
+
strokeDasharray: successDasharray,
|
|
62222
|
+
strokeLinecap: strokeLinecap,
|
|
62223
|
+
strokeWidth: successWidth
|
|
62121
62224
|
})]
|
|
62122
62225
|
}), !showIcon && props.children && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62123
62226
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content,
|
|
@@ -62127,7 +62230,7 @@ var Circle = function Circle(props) {
|
|
|
62127
62230
|
style: iconStyle,
|
|
62128
62231
|
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
62232
|
})]
|
|
62130
|
-
});
|
|
62233
|
+
}));
|
|
62131
62234
|
};
|
|
62132
62235
|
/* harmony default export */ var circle = (Circle);
|
|
62133
62236
|
;// CONCATENATED MODULE: ../base/src/progress/progress.tsx
|
|
@@ -63080,6 +63183,12 @@ var useSlider = function useSlider(props) {
|
|
|
63080
63183
|
context.clickLock = false;
|
|
63081
63184
|
}, 100);
|
|
63082
63185
|
});
|
|
63186
|
+
var isDisabled = use_persist_fn(function (value) {
|
|
63187
|
+
if (typeof props.disabled === 'function') {
|
|
63188
|
+
return props.disabled(value);
|
|
63189
|
+
}
|
|
63190
|
+
return !!props.disabled;
|
|
63191
|
+
});
|
|
63083
63192
|
var handleDragEnd = use_persist_fn(function () {
|
|
63084
63193
|
lockClick();
|
|
63085
63194
|
var start = getValueFromRate(rate[0], scale, step);
|
|
@@ -63091,20 +63200,56 @@ var useSlider = function useSlider(props) {
|
|
|
63091
63200
|
props.onChange(end);
|
|
63092
63201
|
}
|
|
63093
63202
|
});
|
|
63094
|
-
var handleDragMove = use_persist_fn(function (deltaX, deltaY) {
|
|
63203
|
+
var handleDragMove = use_persist_fn(function (deltaX, deltaY, mouseEvent) {
|
|
63095
63204
|
setRate(function (r) {
|
|
63096
63205
|
var target = trackRef.current;
|
|
63097
63206
|
if (!target) return r;
|
|
63098
63207
|
var newRate = toConsumableArray_default()(r);
|
|
63099
63208
|
var v = context.dragIndex === 0 ? r[0] : r[1];
|
|
63100
|
-
var
|
|
63101
|
-
|
|
63102
|
-
|
|
63209
|
+
var rate;
|
|
63210
|
+
|
|
63211
|
+
// If disabled function is used and we have mouse event, use absolute position
|
|
63212
|
+
if (typeof props.disabled === 'function' && mouseEvent) {
|
|
63213
|
+
var rect = target.getBoundingClientRect();
|
|
63214
|
+
var currentIndicatorRate = v;
|
|
63215
|
+
|
|
63216
|
+
// Calculate mouse position rate
|
|
63217
|
+
var mouseRate;
|
|
63218
|
+
if (props.vertical) {
|
|
63219
|
+
mouseRate = (rect.bottom - mouseEvent.clientY) / rect.height;
|
|
63220
|
+
} else {
|
|
63221
|
+
mouseRate = isReserve ? (rect.right - mouseEvent.clientX) / rect.width : (mouseEvent.clientX - rect.left) / rect.width;
|
|
63222
|
+
}
|
|
63223
|
+
|
|
63224
|
+
// Only allow movement if mouse crossed the indicator position
|
|
63225
|
+
if (mouseRate > currentIndicatorRate) {
|
|
63226
|
+
// Mouse is to the right/top, allow moving right/up
|
|
63227
|
+
rate = Math.max(Math.min(mouseRate, 1), 0);
|
|
63228
|
+
} else if (mouseRate < currentIndicatorRate) {
|
|
63229
|
+
// Mouse is to the left/bottom, allow moving left/down
|
|
63230
|
+
rate = Math.max(Math.min(mouseRate, 1), 0);
|
|
63231
|
+
} else {
|
|
63232
|
+
// Mouse is at same position, no change
|
|
63233
|
+
return r;
|
|
63234
|
+
}
|
|
63235
|
+
} else {
|
|
63236
|
+
// Normal delta-based movement
|
|
63237
|
+
var max = props.vertical ? target.clientHeight : target.clientWidth;
|
|
63238
|
+
var delta = props.vertical ? deltaY * -1 : deltaX * (isReserve ? -1 : 1);
|
|
63239
|
+
rate = Math.max(v + delta / max, 0);
|
|
63240
|
+
}
|
|
63103
63241
|
if (rate > 1) {
|
|
63104
63242
|
rate = 1;
|
|
63105
63243
|
if (typeof props.onIncrease === 'function') props.onIncrease();
|
|
63106
63244
|
}
|
|
63107
63245
|
newRate[context.dragIndex] = rate;
|
|
63246
|
+
|
|
63247
|
+
// Check if the new value would be disabled
|
|
63248
|
+
var newValue = getValueFromRate(newRate[context.dragIndex], scale, step);
|
|
63249
|
+
if (isDisabled(newValue)) {
|
|
63250
|
+
// Stay at current position to prevent flickering
|
|
63251
|
+
return r;
|
|
63252
|
+
}
|
|
63108
63253
|
if (newRate[0] > newRate[1]) {
|
|
63109
63254
|
context.dragIndex = context.dragIndex === 0 ? 1 : 0;
|
|
63110
63255
|
var temp = newRate[0];
|
|
@@ -63133,6 +63278,9 @@ var useSlider = function useSlider(props) {
|
|
|
63133
63278
|
var rect = target.getBoundingClientRect();
|
|
63134
63279
|
var rate = !props.vertical ? (isReserve ? rect.right - e.clientX : e.clientX - rect.left) / rect.width : (rect.bottom - e.clientY) / rect.height;
|
|
63135
63280
|
var value = getValueFromRate(rate, scale, step);
|
|
63281
|
+
|
|
63282
|
+
// Check if the clicked value would be disabled
|
|
63283
|
+
if (isDisabled(value)) return;
|
|
63136
63284
|
if (props.range) {
|
|
63137
63285
|
var _start = startValue;
|
|
63138
63286
|
var _end = endValue;
|
|
@@ -63169,8 +63317,10 @@ var useSlider = function useSlider(props) {
|
|
|
63169
63317
|
handleEndMouseDown: handleEndMouseDown,
|
|
63170
63318
|
handleTrackClick: handleTrackClick
|
|
63171
63319
|
});
|
|
63172
|
-
|
|
63173
|
-
|
|
63320
|
+
|
|
63321
|
+
// During dragging, optionally snap to quantized values in discrete mode
|
|
63322
|
+
var start = dragInfo.isDragging ? props.discrete ? getRateFromValue(getValueFromRate(rate[0], scale, step), scale) : rate[0] : getRateFromValue(startValue, scale);
|
|
63323
|
+
var end = dragInfo.isDragging ? props.discrete ? getRateFromValue(getValueFromRate(rate[1], scale, step), scale) : rate[1] : getRateFromValue(endValue, scale);
|
|
63174
63324
|
var innerStyle = getTrackInnerStyle(start, end);
|
|
63175
63325
|
return {
|
|
63176
63326
|
func: func,
|
|
@@ -63226,7 +63376,9 @@ var Slider = function Slider(props0) {
|
|
|
63226
63376
|
step: step,
|
|
63227
63377
|
vertical: !!props.vertical,
|
|
63228
63378
|
onIncrease: props.onIncrease,
|
|
63229
|
-
direction: config.direction
|
|
63379
|
+
direction: config.direction,
|
|
63380
|
+
disabled: props.disabled,
|
|
63381
|
+
discrete: props.discrete
|
|
63230
63382
|
}),
|
|
63231
63383
|
func = _useSlider.func,
|
|
63232
63384
|
trackRef = _useSlider.trackRef,
|
|
@@ -63248,12 +63400,20 @@ var Slider = function Slider(props0) {
|
|
|
63248
63400
|
children: formated
|
|
63249
63401
|
});
|
|
63250
63402
|
};
|
|
63403
|
+
var isDisabled = function isDisabled(value) {
|
|
63404
|
+
if (typeof props.disabled === 'function') {
|
|
63405
|
+
return props.disabled(value);
|
|
63406
|
+
}
|
|
63407
|
+
return !!props.disabled;
|
|
63408
|
+
};
|
|
63251
63409
|
var renderIndicator = function renderIndicator(position) {
|
|
63252
63410
|
if (!props.range && position === 0) return null;
|
|
63253
63411
|
var handleEndMouseDown = position === 0 ? func.handleStartMouseDown : func.handleEndMouseDown;
|
|
63412
|
+
var value = position === 0 ? startValue : endValue;
|
|
63413
|
+
var disabled = isDisabled(value);
|
|
63254
63414
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
63255
63415
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63256
|
-
onMouseDown:
|
|
63416
|
+
onMouseDown: disabled ? undefined : handleEndMouseDown,
|
|
63257
63417
|
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
63418
|
dir: config.direction
|
|
63259
63419
|
}), renderIndicatorValue(position)]
|
|
@@ -63269,14 +63429,30 @@ var Slider = function Slider(props0) {
|
|
|
63269
63429
|
var verticalStyle = props.vertical ? {
|
|
63270
63430
|
height: height
|
|
63271
63431
|
} : {};
|
|
63432
|
+
|
|
63433
|
+
// For boolean disabled, use it directly; for function disabled, check all values
|
|
63434
|
+
var isWholeDisabled = function isWholeDisabled() {
|
|
63435
|
+
if (typeof props.disabled === 'boolean' || props.disabled === undefined) {
|
|
63436
|
+
return !!props.disabled;
|
|
63437
|
+
}
|
|
63438
|
+
// For function disabled, the component is not fully disabled (individual indicators are)
|
|
63439
|
+
return false;
|
|
63440
|
+
};
|
|
63441
|
+
var shouldDisableTrackClick = function shouldDisableTrackClick() {
|
|
63442
|
+
if (typeof props.disabled === 'boolean' || props.disabled === undefined) {
|
|
63443
|
+
return !!props.disabled;
|
|
63444
|
+
}
|
|
63445
|
+
// For function disabled, allow track clicks
|
|
63446
|
+
return false;
|
|
63447
|
+
};
|
|
63272
63448
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63273
63449
|
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),
|
|
63450
|
+
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
63451
|
style: objectSpread2_default()(objectSpread2_default()({}, verticalStyle), props.style),
|
|
63276
63452
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63277
63453
|
className: sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.track,
|
|
63278
63454
|
ref: trackRef,
|
|
63279
|
-
onClick:
|
|
63455
|
+
onClick: shouldDisableTrackClick() ? undefined : func.handleTrackClick,
|
|
63280
63456
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63281
63457
|
className: sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.trackInner,
|
|
63282
63458
|
style: innerStyle,
|
|
@@ -74878,7 +75054,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
74878
75054
|
|
|
74879
75055
|
|
|
74880
75056
|
/* harmony default export */ var src_0 = ({
|
|
74881
|
-
version: '3.9.7-beta.
|
|
75057
|
+
version: '3.9.7-beta.11'
|
|
74882
75058
|
});
|
|
74883
75059
|
}();
|
|
74884
75060
|
/******/ return __webpack_exports__;
|