@rc-component/progress
Advanced tools
@@ -21,6 +21,6 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| strokeWidth, | ||
| trailWidth, | ||
| railWidth, | ||
| gapDegree = 0, | ||
| gapPosition, | ||
| trailColor, | ||
| railColor, | ||
| strokeLinecap, | ||
@@ -63,3 +63,3 @@ style, | ||
| }); | ||
| const circleStyle = getCircleStyle(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, trailColor, mergedStrokeLinecap, strokeWidth); | ||
| const circleStyle = getCircleStyle(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, railColor, mergedStrokeLinecap, strokeWidth); | ||
| const paths = useTransitionDuration(); | ||
@@ -106,3 +106,3 @@ const getStokeList = () => { | ||
| return new Array(stepCount).fill(null).map((_, index) => { | ||
| const color = index <= current - 1 ? strokeColorList[0] : trailColor; | ||
| const color = index <= current - 1 ? strokeColorList[0] : railColor; | ||
| const stroke = color && typeof color === 'object' ? `url(#${gradientId})` : undefined; | ||
@@ -140,9 +140,9 @@ const circleStyleForStack = getCircleStyle(perimeter, perimeterWithoutGap, stackPtg, stepPtg, rotateDeg, gapDegree, gapPosition, color, 'butt', strokeWidth, stepGap); | ||
| }, restProps), !stepCount && /*#__PURE__*/React.createElement("circle", { | ||
| className: cls(`${prefixCls}-circle-trail`, classNames.rail), | ||
| className: cls(`${prefixCls}-circle-rail`, classNames.rail), | ||
| r: radius, | ||
| cx: halfSize, | ||
| cy: halfSize, | ||
| stroke: trailColor, | ||
| stroke: railColor, | ||
| strokeLinecap: mergedStrokeLinecap, | ||
| strokeWidth: trailWidth || strokeWidth, | ||
| strokeWidth: railWidth || strokeWidth, | ||
| style: { | ||
@@ -149,0 +149,0 @@ ...circleStyle, |
+2
-2
@@ -8,4 +8,4 @@ import { useRef, useEffect } from 'react'; | ||
| strokeWidth: 1, | ||
| trailColor: '#D9D9D9', | ||
| trailWidth: 1, | ||
| railColor: '#D9D9D9', | ||
| railWidth: 1, | ||
| gapPosition: 'bottom', | ||
@@ -12,0 +12,0 @@ loading: false |
@@ -6,3 +6,3 @@ /// <reference types="react" /> | ||
| strokeWidth?: number; | ||
| trailWidth?: number; | ||
| railWidth?: number; | ||
| className?: string; | ||
@@ -13,3 +13,3 @@ classNames?: Partial<Record<SemanticName, string>>; | ||
| strokeColor?: StrokeColorType; | ||
| trailColor?: string; | ||
| railColor?: string; | ||
| strokeLinecap?: StrokeLinecapType; | ||
@@ -16,0 +16,0 @@ prefixCls?: string; |
+5
-5
@@ -17,4 +17,4 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| style, | ||
| trailColor, | ||
| trailWidth, | ||
| railColor, | ||
| railWidth, | ||
| transition, | ||
@@ -56,7 +56,7 @@ loading, | ||
| }, restProps), /*#__PURE__*/React.createElement("path", { | ||
| className: `${prefixCls}-line-trail`, | ||
| className: `${prefixCls}-line-rail`, | ||
| d: pathString, | ||
| strokeLinecap: strokeLinecap, | ||
| stroke: trailColor, | ||
| strokeWidth: trailWidth || strokeWidth, | ||
| stroke: railColor, | ||
| strokeWidth: railWidth || strokeWidth, | ||
| fillOpacity: "0" | ||
@@ -63,0 +63,0 @@ }), percentList.map((ptg, index) => { |
@@ -30,6 +30,6 @@ "use strict"; | ||
| strokeWidth, | ||
| trailWidth, | ||
| railWidth, | ||
| gapDegree = 0, | ||
| gapPosition, | ||
| trailColor, | ||
| railColor, | ||
| strokeLinecap, | ||
@@ -72,3 +72,3 @@ style, | ||
| }); | ||
| const circleStyle = (0, _util.getCircleStyle)(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, trailColor, mergedStrokeLinecap, strokeWidth); | ||
| const circleStyle = (0, _util.getCircleStyle)(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, railColor, mergedStrokeLinecap, strokeWidth); | ||
| const paths = (0, _common.useTransitionDuration)(); | ||
@@ -115,3 +115,3 @@ const getStokeList = () => { | ||
| return new Array(stepCount).fill(null).map((_, index) => { | ||
| const color = index <= current - 1 ? strokeColorList[0] : trailColor; | ||
| const color = index <= current - 1 ? strokeColorList[0] : railColor; | ||
| const stroke = color && typeof color === 'object' ? `url(#${gradientId})` : undefined; | ||
@@ -149,9 +149,9 @@ const circleStyleForStack = (0, _util.getCircleStyle)(perimeter, perimeterWithoutGap, stackPtg, stepPtg, rotateDeg, gapDegree, gapPosition, color, 'butt', strokeWidth, stepGap); | ||
| }, restProps), !stepCount && /*#__PURE__*/React.createElement("circle", { | ||
| className: (0, _classnames.default)(`${prefixCls}-circle-trail`, classNames.rail), | ||
| className: (0, _classnames.default)(`${prefixCls}-circle-rail`, classNames.rail), | ||
| r: radius, | ||
| cx: halfSize, | ||
| cy: halfSize, | ||
| stroke: trailColor, | ||
| stroke: railColor, | ||
| strokeLinecap: mergedStrokeLinecap, | ||
| strokeWidth: trailWidth || strokeWidth, | ||
| strokeWidth: railWidth || strokeWidth, | ||
| style: { | ||
@@ -158,0 +158,0 @@ ...circleStyle, |
+2
-2
@@ -14,4 +14,4 @@ "use strict"; | ||
| strokeWidth: 1, | ||
| trailColor: '#D9D9D9', | ||
| trailWidth: 1, | ||
| railColor: '#D9D9D9', | ||
| railWidth: 1, | ||
| gapPosition: 'bottom', | ||
@@ -18,0 +18,0 @@ loading: false |
@@ -6,3 +6,3 @@ /// <reference types="react" /> | ||
| strokeWidth?: number; | ||
| trailWidth?: number; | ||
| railWidth?: number; | ||
| className?: string; | ||
@@ -13,3 +13,3 @@ classNames?: Partial<Record<SemanticName, string>>; | ||
| strokeColor?: StrokeColorType; | ||
| trailColor?: string; | ||
| railColor?: string; | ||
| strokeLinecap?: StrokeLinecapType; | ||
@@ -16,0 +16,0 @@ prefixCls?: string; |
+5
-5
@@ -26,4 +26,4 @@ "use strict"; | ||
| style, | ||
| trailColor, | ||
| trailWidth, | ||
| railColor, | ||
| railWidth, | ||
| transition, | ||
@@ -65,7 +65,7 @@ loading, | ||
| }, restProps), /*#__PURE__*/React.createElement("path", { | ||
| className: `${prefixCls}-line-trail`, | ||
| className: `${prefixCls}-line-rail`, | ||
| d: pathString, | ||
| strokeLinecap: strokeLinecap, | ||
| stroke: trailColor, | ||
| strokeWidth: trailWidth || strokeWidth, | ||
| stroke: railColor, | ||
| strokeWidth: railWidth || strokeWidth, | ||
| fillOpacity: "0" | ||
@@ -72,0 +72,0 @@ }), percentList.map((ptg, index) => { |
+1
-1
| { | ||
| "name": "@rc-component/progress", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "progress ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+4
-4
@@ -86,12 +86,12 @@ # @rc-component/progress | ||
| <tr> | ||
| <td>trailWidth</td> | ||
| <td>railWidth</td> | ||
| <td>Number</td> | ||
| <td>1</td> | ||
| <td>Width of the trail stroke. Unit is percentage of SVG canvas size. Trail is always centered relative to actual progress path. If trailWidth is not defined, it is the same as strokeWidth.</td> | ||
| <td>Width of the rail stroke. Unit is percentage of SVG canvas size. Rail is always centered relative to actual progress path. If railWidth is not defined, it is the same as strokeWidth.</td> | ||
| </tr> | ||
| <tr> | ||
| <td>trailColor</td> | ||
| <td>railColor</td> | ||
| <td>String</td> | ||
| <td>#D9D9D9</td> | ||
| <td>Color for lighter trail stroke underneath the actual progress path.</td> | ||
| <td>Color for lighter rail stroke underneath the actual progress path.</td> | ||
| </tr> | ||
@@ -98,0 +98,0 @@ <tr> |
52689
-0.07%