shineout 3.9.7-beta.1 → 3.9.7-beta.3
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 +175 -22
- 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.3'
|
|
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.3');
|
|
12405
12405
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12406
12406
|
|
|
12407
12407
|
|
|
@@ -23406,6 +23406,9 @@ var progressStyle = {
|
|
|
23406
23406
|
flex: 1,
|
|
23407
23407
|
minWidth: 0,
|
|
23408
23408
|
overflow: 'hidden',
|
|
23409
|
+
'&:has($lineSuccess)': {
|
|
23410
|
+
position: 'relative'
|
|
23411
|
+
},
|
|
23409
23412
|
'$lineDefault &': {
|
|
23410
23413
|
height: src.progressLineHeight,
|
|
23411
23414
|
borderRadius: src.progressLineHeight
|
|
@@ -23416,6 +23419,20 @@ var progressStyle = {
|
|
|
23416
23419
|
},
|
|
23417
23420
|
background: src.progressBackground
|
|
23418
23421
|
},
|
|
23422
|
+
lineSuccess: {
|
|
23423
|
+
position: 'absolute',
|
|
23424
|
+
transition: 'width 0.32s linear',
|
|
23425
|
+
left: 0,
|
|
23426
|
+
top: 0,
|
|
23427
|
+
height: '100%',
|
|
23428
|
+
boxSizing: 'border-box',
|
|
23429
|
+
borderRadius: 'inherit',
|
|
23430
|
+
zIndex: 2,
|
|
23431
|
+
backgroundColor: src.progressSuccessFrontBackgroundColor,
|
|
23432
|
+
'& + $lineFront': {
|
|
23433
|
+
zIndex: 1
|
|
23434
|
+
}
|
|
23435
|
+
},
|
|
23419
23436
|
lineFront: {
|
|
23420
23437
|
position: 'relative',
|
|
23421
23438
|
transition: 'width 0.32s linear',
|
|
@@ -23564,6 +23581,12 @@ var progressStyle = {
|
|
|
23564
23581
|
'$wrapperDanger &': {
|
|
23565
23582
|
stroke: src.progressDangerFrontBackgroundColor
|
|
23566
23583
|
}
|
|
23584
|
+
},
|
|
23585
|
+
circleSuccess: {
|
|
23586
|
+
transform: 'rotate(-90deg)',
|
|
23587
|
+
transformOrigin: '50% 50%',
|
|
23588
|
+
transition: 'stroke-dashoffset .32s ease 0s,stroke-dasharray .32s ease 0s,stroke .32s,stroke-width .06s ease .32s',
|
|
23589
|
+
stroke: src.progressSuccessFrontBackgroundColor
|
|
23567
23590
|
}
|
|
23568
23591
|
};
|
|
23569
23592
|
/* harmony default export */ var progress_progress = (progressStyle);
|
|
@@ -35549,7 +35572,7 @@ var useDragMock = function useDragMock(props) {
|
|
|
35549
35572
|
var deltaY = event.clientY - dragInfo.lastY;
|
|
35550
35573
|
dragInfo.lastX = event.clientX;
|
|
35551
35574
|
dragInfo.lastY = event.clientY;
|
|
35552
|
-
(_props$onDragMove = props.onDragMove) === null || _props$onDragMove === void 0 || _props$onDragMove.call(props, deltaX, deltaY);
|
|
35575
|
+
(_props$onDragMove = props.onDragMove) === null || _props$onDragMove === void 0 || _props$onDragMove.call(props, deltaX, deltaY, event);
|
|
35553
35576
|
});
|
|
35554
35577
|
var handleMouseUp = usePersistFn(function (event) {
|
|
35555
35578
|
var _props$onDragEnd;
|
|
@@ -61972,6 +61995,8 @@ var LinePopUp = function LinePopUp(props) {
|
|
|
61972
61995
|
|
|
61973
61996
|
|
|
61974
61997
|
|
|
61998
|
+
|
|
61999
|
+
|
|
61975
62000
|
var Line = function Line(props) {
|
|
61976
62001
|
var _props$jssStyle;
|
|
61977
62002
|
var _props$shape = props.shape,
|
|
@@ -61981,7 +62006,8 @@ var Line = function Line(props) {
|
|
|
61981
62006
|
_props$type = props.type,
|
|
61982
62007
|
type = _props$type === void 0 ? 'info' : _props$type,
|
|
61983
62008
|
iconSize = props.iconSize,
|
|
61984
|
-
popup = props.popup
|
|
62009
|
+
popup = props.popup,
|
|
62010
|
+
success = props.success;
|
|
61985
62011
|
var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
|
|
61986
62012
|
var isInner = shape === 'line-inner';
|
|
61987
62013
|
var isInnerRight = isInner && value < 10;
|
|
@@ -62010,21 +62036,41 @@ var Line = function Line(props) {
|
|
|
62010
62036
|
return p ? "".concat(p, ",").concat(col) : col;
|
|
62011
62037
|
}, ''), ")");
|
|
62012
62038
|
}
|
|
62039
|
+
|
|
62040
|
+
// Success progress bar style
|
|
62041
|
+
var successStyle = success ? {
|
|
62042
|
+
width: "".concat(success.value / 100 * 100, "%"),
|
|
62043
|
+
borderRadius: props.strokeWidth && props.strokeWidth / 2
|
|
62044
|
+
} : undefined;
|
|
62045
|
+
if (successStyle && success) {
|
|
62046
|
+
if (typeof success.color === 'string') {
|
|
62047
|
+
successStyle.background = success.color;
|
|
62048
|
+
successStyle.backgroundSize = '1em 1em';
|
|
62049
|
+
} else if (typeof_default()(success.color) === 'object') {
|
|
62050
|
+
successStyle.background = "linear-gradient(to right, ".concat(analyzeColor(success.color).reduce(function (p, v) {
|
|
62051
|
+
var col = "".concat(v.color, " ").concat(v.pos);
|
|
62052
|
+
return p ? "".concat(p, ",").concat(col) : col;
|
|
62053
|
+
}, ''), ")");
|
|
62054
|
+
}
|
|
62055
|
+
}
|
|
62013
62056
|
var children = props.children ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62014
62057
|
className: classnames_default()(progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content),
|
|
62015
62058
|
children: props.children
|
|
62016
62059
|
}) : null;
|
|
62017
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62060
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
|
|
62018
62061
|
className: mc,
|
|
62019
62062
|
style: props.style,
|
|
62020
|
-
children: [/*#__PURE__*/(0,jsx_runtime.
|
|
62063
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
62021
62064
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineBg,
|
|
62022
62065
|
style: bgStyle,
|
|
62023
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62066
|
+
children: [success && successStyle && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62067
|
+
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineSuccess,
|
|
62068
|
+
style: successStyle
|
|
62069
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62024
62070
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineFront,
|
|
62025
62071
|
style: frontStyle,
|
|
62026
62072
|
children: isInner && children
|
|
62027
|
-
})
|
|
62073
|
+
})]
|
|
62028
62074
|
}), isDefaultPop ? /*#__PURE__*/(0,jsx_runtime.jsx)(line_popup, {
|
|
62029
62075
|
value: value,
|
|
62030
62076
|
jssStyle: props.jssStyle,
|
|
@@ -62034,7 +62080,7 @@ var Line = function Line(props) {
|
|
|
62034
62080
|
style: iconStyle,
|
|
62035
62081
|
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
62082
|
})]
|
|
62037
|
-
});
|
|
62083
|
+
}));
|
|
62038
62084
|
};
|
|
62039
62085
|
/* harmony default export */ var line = (Line);
|
|
62040
62086
|
;// CONCATENATED MODULE: ../base/src/progress/circle.tsx
|
|
@@ -62045,6 +62091,8 @@ var Line = function Line(props) {
|
|
|
62045
62091
|
|
|
62046
62092
|
|
|
62047
62093
|
|
|
62094
|
+
|
|
62095
|
+
|
|
62048
62096
|
var Circle = function Circle(props) {
|
|
62049
62097
|
var _props$jssStyle;
|
|
62050
62098
|
var _props$value = props.value,
|
|
@@ -62058,7 +62106,8 @@ var Circle = function Circle(props) {
|
|
|
62058
62106
|
size = _props$size === void 0 ? 64 : _props$size,
|
|
62059
62107
|
_props$strokeLinecap = props.strokeLinecap,
|
|
62060
62108
|
strokeLinecap = _props$strokeLinecap === void 0 ? 'round' : _props$strokeLinecap,
|
|
62061
|
-
iconSize = props.iconSize
|
|
62109
|
+
iconSize = props.iconSize,
|
|
62110
|
+
success = props.success;
|
|
62062
62111
|
var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
|
|
62063
62112
|
var iconStyle = {
|
|
62064
62113
|
width: iconSize,
|
|
@@ -62076,8 +62125,13 @@ var Circle = function Circle(props) {
|
|
|
62076
62125
|
}, props.style);
|
|
62077
62126
|
var width = value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
|
|
62078
62127
|
var objColor = color && typeof_default()(color) === 'object';
|
|
62128
|
+
|
|
62129
|
+
// Success circle calculation
|
|
62130
|
+
var successDasharray = success ? [p * (success.value / 100), p * (1 - success.value / 100)] : null;
|
|
62131
|
+
var successWidth = success && success.value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
|
|
62132
|
+
var objSuccessColor = (success === null || success === void 0 ? void 0 : success.color) && typeof_default()(success.color) === 'object';
|
|
62079
62133
|
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", {
|
|
62134
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
|
|
62081
62135
|
className: mc,
|
|
62082
62136
|
style: style,
|
|
62083
62137
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("svg", {
|
|
@@ -62096,6 +62150,20 @@ var Circle = function Circle(props) {
|
|
|
62096
62150
|
}, c.pos);
|
|
62097
62151
|
})
|
|
62098
62152
|
})
|
|
62153
|
+
}) : null, objSuccessColor && success !== null && success !== void 0 && success.color && typeof_default()(success.color) === 'object' ? /*#__PURE__*/(0,jsx_runtime.jsx)("defs", {
|
|
62154
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("linearGradient", {
|
|
62155
|
+
id: "progress-success-linear",
|
|
62156
|
+
x1: "50%",
|
|
62157
|
+
x2: "50%",
|
|
62158
|
+
y1: "0%",
|
|
62159
|
+
y2: "100%",
|
|
62160
|
+
children: analyzeColor(success.color).map(function (c) {
|
|
62161
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("stop", {
|
|
62162
|
+
offset: c.pos,
|
|
62163
|
+
stopColor: c.color
|
|
62164
|
+
}, c.pos);
|
|
62165
|
+
})
|
|
62166
|
+
})
|
|
62099
62167
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
|
|
62100
62168
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleBg,
|
|
62101
62169
|
cx: cx,
|
|
@@ -62118,6 +62186,18 @@ var Circle = function Circle(props) {
|
|
|
62118
62186
|
strokeDasharray: dasharray,
|
|
62119
62187
|
strokeLinecap: strokeLinecap,
|
|
62120
62188
|
strokeWidth: width
|
|
62189
|
+
}), success && successDasharray && /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
|
|
62190
|
+
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleSuccess,
|
|
62191
|
+
cx: cx,
|
|
62192
|
+
cy: cy,
|
|
62193
|
+
r: r,
|
|
62194
|
+
fill: "transparent",
|
|
62195
|
+
style: {
|
|
62196
|
+
stroke: objSuccessColor ? "url('#progress-success-linear')" : typeof success.color === 'string' ? success.color : undefined
|
|
62197
|
+
},
|
|
62198
|
+
strokeDasharray: successDasharray,
|
|
62199
|
+
strokeLinecap: strokeLinecap,
|
|
62200
|
+
strokeWidth: successWidth
|
|
62121
62201
|
})]
|
|
62122
62202
|
}), !showIcon && props.children && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
62123
62203
|
className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content,
|
|
@@ -62127,7 +62207,7 @@ var Circle = function Circle(props) {
|
|
|
62127
62207
|
style: iconStyle,
|
|
62128
62208
|
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
62209
|
})]
|
|
62130
|
-
});
|
|
62210
|
+
}));
|
|
62131
62211
|
};
|
|
62132
62212
|
/* harmony default export */ var circle = (Circle);
|
|
62133
62213
|
;// CONCATENATED MODULE: ../base/src/progress/progress.tsx
|
|
@@ -63080,6 +63160,12 @@ var useSlider = function useSlider(props) {
|
|
|
63080
63160
|
context.clickLock = false;
|
|
63081
63161
|
}, 100);
|
|
63082
63162
|
});
|
|
63163
|
+
var isDisabled = use_persist_fn(function (value) {
|
|
63164
|
+
if (typeof props.disabled === 'function') {
|
|
63165
|
+
return props.disabled(value);
|
|
63166
|
+
}
|
|
63167
|
+
return !!props.disabled;
|
|
63168
|
+
});
|
|
63083
63169
|
var handleDragEnd = use_persist_fn(function () {
|
|
63084
63170
|
lockClick();
|
|
63085
63171
|
var start = getValueFromRate(rate[0], scale, step);
|
|
@@ -63091,20 +63177,56 @@ var useSlider = function useSlider(props) {
|
|
|
63091
63177
|
props.onChange(end);
|
|
63092
63178
|
}
|
|
63093
63179
|
});
|
|
63094
|
-
var handleDragMove = use_persist_fn(function (deltaX, deltaY) {
|
|
63180
|
+
var handleDragMove = use_persist_fn(function (deltaX, deltaY, mouseEvent) {
|
|
63095
63181
|
setRate(function (r) {
|
|
63096
63182
|
var target = trackRef.current;
|
|
63097
63183
|
if (!target) return r;
|
|
63098
63184
|
var newRate = toConsumableArray_default()(r);
|
|
63099
63185
|
var v = context.dragIndex === 0 ? r[0] : r[1];
|
|
63100
|
-
var
|
|
63101
|
-
|
|
63102
|
-
|
|
63186
|
+
var rate;
|
|
63187
|
+
|
|
63188
|
+
// If disabled function is used and we have mouse event, use absolute position
|
|
63189
|
+
if (typeof props.disabled === 'function' && mouseEvent) {
|
|
63190
|
+
var rect = target.getBoundingClientRect();
|
|
63191
|
+
var currentIndicatorRate = v;
|
|
63192
|
+
|
|
63193
|
+
// Calculate mouse position rate
|
|
63194
|
+
var mouseRate;
|
|
63195
|
+
if (props.vertical) {
|
|
63196
|
+
mouseRate = (rect.bottom - mouseEvent.clientY) / rect.height;
|
|
63197
|
+
} else {
|
|
63198
|
+
mouseRate = isReserve ? (rect.right - mouseEvent.clientX) / rect.width : (mouseEvent.clientX - rect.left) / rect.width;
|
|
63199
|
+
}
|
|
63200
|
+
|
|
63201
|
+
// Only allow movement if mouse crossed the indicator position
|
|
63202
|
+
if (mouseRate > currentIndicatorRate) {
|
|
63203
|
+
// Mouse is to the right/top, allow moving right/up
|
|
63204
|
+
rate = Math.max(Math.min(mouseRate, 1), 0);
|
|
63205
|
+
} else if (mouseRate < currentIndicatorRate) {
|
|
63206
|
+
// Mouse is to the left/bottom, allow moving left/down
|
|
63207
|
+
rate = Math.max(Math.min(mouseRate, 1), 0);
|
|
63208
|
+
} else {
|
|
63209
|
+
// Mouse is at same position, no change
|
|
63210
|
+
return r;
|
|
63211
|
+
}
|
|
63212
|
+
} else {
|
|
63213
|
+
// Normal delta-based movement
|
|
63214
|
+
var max = props.vertical ? target.clientHeight : target.clientWidth;
|
|
63215
|
+
var delta = props.vertical ? deltaY * -1 : deltaX * (isReserve ? -1 : 1);
|
|
63216
|
+
rate = Math.max(v + delta / max, 0);
|
|
63217
|
+
}
|
|
63103
63218
|
if (rate > 1) {
|
|
63104
63219
|
rate = 1;
|
|
63105
63220
|
if (typeof props.onIncrease === 'function') props.onIncrease();
|
|
63106
63221
|
}
|
|
63107
63222
|
newRate[context.dragIndex] = rate;
|
|
63223
|
+
|
|
63224
|
+
// Check if the new value would be disabled
|
|
63225
|
+
var newValue = getValueFromRate(newRate[context.dragIndex], scale, step);
|
|
63226
|
+
if (isDisabled(newValue)) {
|
|
63227
|
+
// Stay at current position to prevent flickering
|
|
63228
|
+
return r;
|
|
63229
|
+
}
|
|
63108
63230
|
if (newRate[0] > newRate[1]) {
|
|
63109
63231
|
context.dragIndex = context.dragIndex === 0 ? 1 : 0;
|
|
63110
63232
|
var temp = newRate[0];
|
|
@@ -63133,6 +63255,9 @@ var useSlider = function useSlider(props) {
|
|
|
63133
63255
|
var rect = target.getBoundingClientRect();
|
|
63134
63256
|
var rate = !props.vertical ? (isReserve ? rect.right - e.clientX : e.clientX - rect.left) / rect.width : (rect.bottom - e.clientY) / rect.height;
|
|
63135
63257
|
var value = getValueFromRate(rate, scale, step);
|
|
63258
|
+
|
|
63259
|
+
// Check if the clicked value would be disabled
|
|
63260
|
+
if (isDisabled(value)) return;
|
|
63136
63261
|
if (props.range) {
|
|
63137
63262
|
var _start = startValue;
|
|
63138
63263
|
var _end = endValue;
|
|
@@ -63169,8 +63294,10 @@ var useSlider = function useSlider(props) {
|
|
|
63169
63294
|
handleEndMouseDown: handleEndMouseDown,
|
|
63170
63295
|
handleTrackClick: handleTrackClick
|
|
63171
63296
|
});
|
|
63172
|
-
|
|
63173
|
-
|
|
63297
|
+
|
|
63298
|
+
// During dragging, optionally snap to quantized values in discrete mode
|
|
63299
|
+
var start = dragInfo.isDragging ? props.discrete ? getRateFromValue(getValueFromRate(rate[0], scale, step), scale) : rate[0] : getRateFromValue(startValue, scale);
|
|
63300
|
+
var end = dragInfo.isDragging ? props.discrete ? getRateFromValue(getValueFromRate(rate[1], scale, step), scale) : rate[1] : getRateFromValue(endValue, scale);
|
|
63174
63301
|
var innerStyle = getTrackInnerStyle(start, end);
|
|
63175
63302
|
return {
|
|
63176
63303
|
func: func,
|
|
@@ -63226,7 +63353,9 @@ var Slider = function Slider(props0) {
|
|
|
63226
63353
|
step: step,
|
|
63227
63354
|
vertical: !!props.vertical,
|
|
63228
63355
|
onIncrease: props.onIncrease,
|
|
63229
|
-
direction: config.direction
|
|
63356
|
+
direction: config.direction,
|
|
63357
|
+
disabled: props.disabled,
|
|
63358
|
+
discrete: props.discrete
|
|
63230
63359
|
}),
|
|
63231
63360
|
func = _useSlider.func,
|
|
63232
63361
|
trackRef = _useSlider.trackRef,
|
|
@@ -63248,12 +63377,20 @@ var Slider = function Slider(props0) {
|
|
|
63248
63377
|
children: formated
|
|
63249
63378
|
});
|
|
63250
63379
|
};
|
|
63380
|
+
var isDisabled = function isDisabled(value) {
|
|
63381
|
+
if (typeof props.disabled === 'function') {
|
|
63382
|
+
return props.disabled(value);
|
|
63383
|
+
}
|
|
63384
|
+
return !!props.disabled;
|
|
63385
|
+
};
|
|
63251
63386
|
var renderIndicator = function renderIndicator(position) {
|
|
63252
63387
|
if (!props.range && position === 0) return null;
|
|
63253
63388
|
var handleEndMouseDown = position === 0 ? func.handleStartMouseDown : func.handleEndMouseDown;
|
|
63389
|
+
var value = position === 0 ? startValue : endValue;
|
|
63390
|
+
var disabled = isDisabled(value);
|
|
63254
63391
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
63255
63392
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63256
|
-
onMouseDown:
|
|
63393
|
+
onMouseDown: disabled ? undefined : handleEndMouseDown,
|
|
63257
63394
|
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
63395
|
dir: config.direction
|
|
63259
63396
|
}), renderIndicatorValue(position)]
|
|
@@ -63269,14 +63406,30 @@ var Slider = function Slider(props0) {
|
|
|
63269
63406
|
var verticalStyle = props.vertical ? {
|
|
63270
63407
|
height: height
|
|
63271
63408
|
} : {};
|
|
63409
|
+
|
|
63410
|
+
// For boolean disabled, use it directly; for function disabled, check all values
|
|
63411
|
+
var isWholeDisabled = function isWholeDisabled() {
|
|
63412
|
+
if (typeof props.disabled === 'boolean' || props.disabled === undefined) {
|
|
63413
|
+
return !!props.disabled;
|
|
63414
|
+
}
|
|
63415
|
+
// For function disabled, the component is not fully disabled (individual indicators are)
|
|
63416
|
+
return false;
|
|
63417
|
+
};
|
|
63418
|
+
var shouldDisableTrackClick = function shouldDisableTrackClick() {
|
|
63419
|
+
if (typeof props.disabled === 'boolean' || props.disabled === undefined) {
|
|
63420
|
+
return !!props.disabled;
|
|
63421
|
+
}
|
|
63422
|
+
// For function disabled, allow track clicks
|
|
63423
|
+
return false;
|
|
63424
|
+
};
|
|
63272
63425
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63273
63426
|
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),
|
|
63427
|
+
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
63428
|
style: objectSpread2_default()(objectSpread2_default()({}, verticalStyle), props.style),
|
|
63276
63429
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63277
63430
|
className: sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.track,
|
|
63278
63431
|
ref: trackRef,
|
|
63279
|
-
onClick:
|
|
63432
|
+
onClick: shouldDisableTrackClick() ? undefined : func.handleTrackClick,
|
|
63280
63433
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63281
63434
|
className: sliderClasses === null || sliderClasses === void 0 ? void 0 : sliderClasses.trackInner,
|
|
63282
63435
|
style: innerStyle,
|
|
@@ -74878,7 +75031,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
74878
75031
|
|
|
74879
75032
|
|
|
74880
75033
|
/* harmony default export */ var src_0 = ({
|
|
74881
|
-
version: '3.9.7-beta.
|
|
75034
|
+
version: '3.9.7-beta.3'
|
|
74882
75035
|
});
|
|
74883
75036
|
}();
|
|
74884
75037
|
/******/ return __webpack_exports__;
|