This commit is contained in:
2026-05-25 17:08:18 +08:00
parent df501f6151
commit f1259b71b5
9178 changed files with 1626125 additions and 0 deletions
@@ -0,0 +1,18 @@
import * as React from 'react';
import type { ProgressProps } from '..';
import type { StrokeColorObject } from '../interface';
export interface ColorGradientProps {
prefixCls: string;
className?: string;
gradientId: string;
style: React.CSSProperties;
ptg: number;
radius: number;
strokeLinecap: ProgressProps['strokeLinecap'];
strokeWidth: ProgressProps['strokeWidth'];
size: number;
color: string | StrokeColorObject;
gapDegree: number;
}
declare const PtgCircle: React.ForwardRefExoticComponent<ColorGradientProps & React.RefAttributes<SVGCircleElement>>;
export default PtgCircle;
@@ -0,0 +1,87 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _clsx = require("clsx");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const Block = ({
bg,
children
}) => /*#__PURE__*/React.createElement("div", {
style: {
width: '100%',
height: '100%',
background: bg
}
}, children);
function getPtgColors(color, scale) {
return Object.keys(color).map(key => {
const parsedKey = parseFloat(key);
const ptgKey = `${Math.floor(parsedKey * scale)}%`;
return `${color[key]} ${ptgKey}`;
});
}
const PtgCircle = /*#__PURE__*/React.forwardRef((props, ref) => {
const {
prefixCls,
color,
gradientId,
radius,
className,
style: circleStyleForStack,
ptg,
strokeLinecap,
strokeWidth,
size,
gapDegree
} = props;
const isGradient = color && typeof color === 'object';
const stroke = isGradient ? `#FFF` : undefined;
// ========================== Circle ==========================
const halfSize = size / 2;
const circleNode = /*#__PURE__*/React.createElement("circle", {
className: (0, _clsx.clsx)(`${prefixCls}-circle-path`, className),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: stroke,
strokeLinecap: strokeLinecap,
strokeWidth: strokeWidth,
opacity: ptg === 0 ? 0 : 1,
style: circleStyleForStack,
ref: ref
});
// ========================== Render ==========================
if (!isGradient) {
return circleNode;
}
const maskId = `${gradientId}-conic`;
const fromDeg = gapDegree ? `${180 + gapDegree / 2}deg` : '0deg';
const conicColors = getPtgColors(color, (360 - gapDegree) / 360);
const linearColors = getPtgColors(color, 1);
const conicColorBg = `conic-gradient(from ${fromDeg}, ${conicColors.join(', ')})`;
const linearColorBg = `linear-gradient(to ${gapDegree ? 'bottom' : 'top'}, ${linearColors.join(', ')})`;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("mask", {
id: maskId
}, circleNode), /*#__PURE__*/React.createElement("foreignObject", {
x: 0,
y: 0,
width: size,
height: size,
mask: `url(#${maskId})`
}, /*#__PURE__*/React.createElement(Block, {
bg: linearColorBg
}, /*#__PURE__*/React.createElement(Block, {
bg: conicColorBg
}))));
});
if (process.env.NODE_ENV !== 'production') {
PtgCircle.displayName = 'PtgCircle';
}
var _default = exports.default = PtgCircle;
@@ -0,0 +1,4 @@
import * as React from 'react';
import type { ProgressProps } from '../interface';
declare const Circle: React.FC<ProgressProps>;
export default Circle;
+162
View File
@@ -0,0 +1,162 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _clsx = require("clsx");
var _common = require("../common");
var _useId = _interopRequireDefault(require("@rc-component/util/lib/hooks/useId"));
var _PtgCircle = _interopRequireDefault(require("./PtgCircle"));
var _util = require("./util");
var _getIndeterminateCircle = _interopRequireDefault(require("../utils/getIndeterminateCircle"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
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); }
function toArray(value) {
const mergedValue = value ?? [];
return Array.isArray(mergedValue) ? mergedValue : [mergedValue];
}
const Circle = props => {
const {
id,
prefixCls,
classNames = {},
styles = {},
steps,
strokeWidth,
railWidth,
gapDegree = 0,
gapPosition,
railColor,
strokeLinecap,
style,
className,
strokeColor,
percent,
loading,
...restProps
} = {
..._common.defaultProps,
...props
};
const halfSize = _util.VIEW_BOX_SIZE / 2;
const mergedId = (0, _useId.default)(id);
const gradientId = `${mergedId}-gradient`;
const radius = halfSize - strokeWidth / 2;
const perimeter = Math.PI * 2 * radius;
const rotateDeg = gapDegree > 0 ? 90 + gapDegree / 2 : -90;
const perimeterWithoutGap = perimeter * ((360 - gapDegree) / 360);
const {
count: stepCount,
gap: stepGap
} = typeof steps === 'object' ? steps : {
count: steps,
gap: 2
};
const percentList = toArray(percent);
const strokeColorList = toArray(strokeColor);
const gradient = strokeColorList.find(color => color && typeof color === 'object');
const isConicGradient = gradient && typeof gradient === 'object';
const mergedStrokeLinecap = isConicGradient ? 'butt' : strokeLinecap;
const {
indeterminateStyleProps,
indeterminateStyleAnimation
} = (0, _getIndeterminateCircle.default)({
id: mergedId,
loading
});
const circleStyle = (0, _util.getCircleStyle)(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, railColor, mergedStrokeLinecap, strokeWidth);
const paths = (0, _common.useTransitionDuration)();
const getStokeList = () => {
let stackPtg = 0;
return percentList.map((ptg, index) => {
const color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
const circleStyleForStack = (0, _util.getCircleStyle)(perimeter, perimeterWithoutGap, stackPtg, ptg, rotateDeg, gapDegree, gapPosition, color, mergedStrokeLinecap, strokeWidth);
stackPtg += ptg;
return /*#__PURE__*/React.createElement(_PtgCircle.default, {
key: index,
color: color,
ptg: ptg,
radius: radius,
prefixCls: prefixCls,
gradientId: gradientId,
className: classNames.track,
style: {
...circleStyleForStack,
...indeterminateStyleProps,
...styles.track
},
strokeLinecap: mergedStrokeLinecap,
strokeWidth: strokeWidth,
gapDegree: gapDegree,
ref: elem => {
// https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
// React will call the ref callback with the DOM element when the component mounts,
// and call it with `null` when it unmounts.
// Refs are guaranteed to be up-to-date before componentDidMount or componentDidUpdate fires.
paths[index] = elem;
},
size: _util.VIEW_BOX_SIZE
});
}).reverse();
};
const getStepStokeList = () => {
// only show the first percent when pass steps
const current = Math.round(stepCount * (percentList[0] / 100));
const stepPtg = 100 / stepCount;
let stackPtg = 0;
return new Array(stepCount).fill(null).map((_, index) => {
const color = index <= current - 1 ? strokeColorList[0] : railColor;
const stroke = color && typeof color === 'object' ? `url(#${gradientId})` : undefined;
const circleStyleForStack = (0, _util.getCircleStyle)(perimeter, perimeterWithoutGap, stackPtg, stepPtg, rotateDeg, gapDegree, gapPosition, color, 'butt', strokeWidth, stepGap);
stackPtg += (perimeterWithoutGap - circleStyleForStack.strokeDashoffset + stepGap) * 100 / perimeterWithoutGap;
return /*#__PURE__*/React.createElement("circle", {
key: index,
className: (0, _clsx.clsx)(`${prefixCls}-circle-path`, classNames.track),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: stroke,
strokeWidth: strokeWidth,
opacity: 1,
style: {
...circleStyleForStack,
...styles.track
},
ref: elem => {
paths[index] = elem;
}
});
});
};
return /*#__PURE__*/React.createElement("svg", _extends({
className: (0, _clsx.clsx)(`${prefixCls}-circle`, classNames.root, className),
viewBox: `0 0 ${_util.VIEW_BOX_SIZE} ${_util.VIEW_BOX_SIZE}`,
style: {
...styles.root,
...style
},
id: id,
role: "presentation"
}, restProps), !stepCount && /*#__PURE__*/React.createElement("circle", {
className: (0, _clsx.clsx)(`${prefixCls}-circle-rail`, classNames.rail),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: railColor,
strokeLinecap: mergedStrokeLinecap,
strokeWidth: railWidth || strokeWidth,
style: {
...circleStyle,
...styles.rail
}
}), stepCount ? getStepStokeList() : getStokeList(), indeterminateStyleAnimation);
};
if (process.env.NODE_ENV !== 'production') {
Circle.displayName = 'Circle';
}
var _default = exports.default = Circle;
@@ -0,0 +1,5 @@
import type { StrokeColorType } from '../interface';
import type { ProgressProps } from '..';
import type React from 'react';
export declare const VIEW_BOX_SIZE = 100;
export declare const getCircleStyle: (perimeter: number, perimeterWithoutGap: number, offset: number, percent: number, rotateDeg: number, gapDegree: number, gapPosition: ProgressProps['gapPosition'] | undefined, strokeColor: StrokeColorType, strokeLinecap: ProgressProps['strokeLinecap'], strokeWidth: number, stepSpace?: number) => React.CSSProperties;
+37
View File
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getCircleStyle = exports.VIEW_BOX_SIZE = void 0;
const VIEW_BOX_SIZE = exports.VIEW_BOX_SIZE = 100;
const getCircleStyle = (perimeter, perimeterWithoutGap, offset, percent, rotateDeg, gapDegree, gapPosition, strokeColor, strokeLinecap, strokeWidth, stepSpace = 0) => {
const offsetDeg = offset / 100 * 360 * ((360 - gapDegree) / 360);
const positionDeg = gapDegree === 0 ? 0 : {
bottom: 0,
top: 180,
left: 90,
right: -90
}[gapPosition];
let strokeDashoffset = (100 - percent) / 100 * perimeterWithoutGap;
// Fix percent accuracy when strokeLinecap is round
// https://github.com/ant-design/ant-design/issues/35009
if (strokeLinecap === 'round' && percent !== 100) {
strokeDashoffset += strokeWidth / 2;
// when percent is small enough (<= 1%), keep smallest value to avoid it's disappearance
if (strokeDashoffset >= perimeterWithoutGap) {
strokeDashoffset = perimeterWithoutGap - 0.01;
}
}
const halfSize = VIEW_BOX_SIZE / 2;
return {
stroke: typeof strokeColor === 'string' ? strokeColor : undefined,
strokeDasharray: `${perimeterWithoutGap}px ${perimeter}`,
strokeDashoffset: strokeDashoffset + stepSpace,
transform: `rotate(${rotateDeg + offsetDeg + positionDeg}deg)`,
transformOrigin: `${halfSize}px ${halfSize}px`,
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s',
fillOpacity: 0
};
};
exports.getCircleStyle = getCircleStyle;
+4
View File
@@ -0,0 +1,4 @@
import * as React from 'react';
import type { ProgressProps } from './interface';
declare const Line: React.FC<ProgressProps>;
export default Line;
+114
View File
@@ -0,0 +1,114 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _clsx = require("clsx");
var _common = require("./common");
var _getIndeterminateLine = _interopRequireDefault(require("./utils/getIndeterminateLine"));
var _useId = _interopRequireDefault(require("@rc-component/util/lib/hooks/useId"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
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); }
const Line = props => {
const {
id,
className,
percent,
prefixCls,
strokeColor,
strokeLinecap,
strokeWidth,
style,
railColor,
railWidth,
transition,
loading,
...restProps
} = {
..._common.defaultProps,
...props
};
const mergedId = (0, _useId.default)(id);
// eslint-disable-next-line no-param-reassign
delete restProps.gapPosition;
const percentList = Array.isArray(percent) ? percent : [percent];
const strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor];
const paths = (0, _common.useTransitionDuration)();
const center = strokeWidth / 2;
const right = 100 - strokeWidth / 2;
const pathString = `M ${strokeLinecap === 'round' ? center : 0},${center}
L ${strokeLinecap === 'round' ? right : 100},${center}`;
const viewBoxString = `0 0 100 ${strokeWidth}`;
let stackPtg = 0;
const {
indeterminateStyleProps,
indeterminateStyleAnimation
} = (0, _getIndeterminateLine.default)({
id: mergedId,
loading,
percent: percentList[0],
strokeLinecap,
strokeWidth
});
return /*#__PURE__*/React.createElement("svg", _extends({
className: (0, _clsx.clsx)(`${prefixCls}-line`, className),
viewBox: viewBoxString,
preserveAspectRatio: "none",
style: style
}, restProps), /*#__PURE__*/React.createElement("path", {
className: `${prefixCls}-line-rail`,
d: pathString,
strokeLinecap: strokeLinecap,
stroke: railColor,
strokeWidth: railWidth || strokeWidth,
fillOpacity: "0"
}), percentList.map((ptg, index) => {
let dashPercent = 1;
switch (strokeLinecap) {
case 'round':
dashPercent = 1 - strokeWidth / 100;
break;
case 'square':
dashPercent = 1 - strokeWidth / 2 / 100;
break;
default:
dashPercent = 1;
break;
}
const pathStyle = {
strokeDasharray: `${ptg * dashPercent}px, 100px`,
strokeDashoffset: `-${stackPtg}px`,
transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear',
...indeterminateStyleProps
};
const color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
stackPtg += ptg;
return /*#__PURE__*/React.createElement("path", {
key: index,
className: `${prefixCls}-line-path`,
d: pathString,
strokeLinecap: strokeLinecap,
stroke: color,
strokeWidth: strokeWidth,
fillOpacity: "0",
ref: elem => {
// https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
// React will call the ref callback with the DOM element when the component mounts,
// and call it with `null` when it unmounts.
// Refs are guaranteed to be up-to-date before componentDidMount or componentDidUpdate fires.
paths[index] = elem;
},
style: pathStyle
});
}), indeterminateStyleAnimation);
};
if (process.env.NODE_ENV !== 'production') {
Line.displayName = 'Line';
}
var _default = exports.default = Line;
+3
View File
@@ -0,0 +1,3 @@
import type { ProgressProps } from './interface';
export declare const defaultProps: Partial<ProgressProps>;
export declare const useTransitionDuration: () => SVGPathElement[];
+42
View File
@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useTransitionDuration = exports.defaultProps = void 0;
var _react = require("react");
const defaultProps = exports.defaultProps = {
percent: 0,
prefixCls: 'rc-progress',
strokeColor: '#2db7f5',
strokeLinecap: 'round',
strokeWidth: 1,
railColor: '#D9D9D9',
railWidth: 1,
gapPosition: 'bottom',
loading: false
};
const useTransitionDuration = () => {
const pathsRef = (0, _react.useRef)([]);
const prevTimeStamp = (0, _react.useRef)(null);
(0, _react.useEffect)(() => {
const now = Date.now();
let updated = false;
pathsRef.current.forEach(path => {
if (!path) {
return;
}
updated = true;
const pathStyle = path.style;
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
if (prevTimeStamp.current && now - prevTimeStamp.current < 100) {
pathStyle.transitionDuration = '0s, 0s';
}
});
if (updated) {
prevTimeStamp.current = Date.now();
}
});
return pathsRef.current;
};
exports.useTransitionDuration = useTransitionDuration;
+4
View File
@@ -0,0 +1,4 @@
import Line from './Line';
import Circle from './Circle';
export type { ProgressProps } from './interface';
export { Line, Circle };
+20
View File
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Circle", {
enumerable: true,
get: function () {
return _Circle.default;
}
});
Object.defineProperty(exports, "Line", {
enumerable: true,
get: function () {
return _Line.default;
}
});
var _Line = _interopRequireDefault(require("./Line"));
var _Circle = _interopRequireDefault(require("./Circle"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+30
View File
@@ -0,0 +1,30 @@
/// <reference types="react" />
export type SemanticName = 'root' | 'rail' | 'track';
export interface ProgressProps {
id?: string;
strokeWidth?: number;
railWidth?: number;
className?: string;
classNames?: Partial<Record<SemanticName, string>>;
styles?: Partial<Record<SemanticName, React.CSSProperties>>;
percent?: number | number[];
strokeColor?: StrokeColorType;
railColor?: string;
strokeLinecap?: StrokeLinecapType;
prefixCls?: string;
style?: React.CSSProperties;
gapDegree?: number;
gapPosition?: GapPositionType;
transition?: string;
onClick?: React.MouseEventHandler;
steps?: number | {
count: number;
gap: number;
};
loading?: boolean;
}
export type StrokeColorObject = Record<string, string | boolean>;
export type BaseStrokeColorType = string | StrokeColorObject;
export type StrokeColorType = BaseStrokeColorType | BaseStrokeColorType[];
export type GapPositionType = 'top' | 'right' | 'bottom' | 'left';
export type StrokeLinecapType = 'round' | 'butt' | 'square';
+5
View File
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1,19 @@
import React from 'react';
interface IndeterminateOption {
id: string;
loading: boolean;
}
declare const _default: ({ id, loading }: IndeterminateOption) => {
indeterminateStyleProps: {
transform?: undefined;
animation?: undefined;
};
indeterminateStyleAnimation: any;
} | {
indeterminateStyleProps: {
transform: string;
animation: string;
};
indeterminateStyleAnimation: React.JSX.Element;
};
export default _default;
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = ({
id,
loading
}) => {
if (!loading) {
return {
indeterminateStyleProps: {},
indeterminateStyleAnimation: null
};
}
const animationName = `${id}-indeterminate-animate`;
return {
indeterminateStyleProps: {
transform: 'rotate(0deg)',
animation: `${animationName} 1s linear infinite`
},
indeterminateStyleAnimation: /*#__PURE__*/_react.default.createElement("style", null, `@keyframes ${animationName} {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}`)
};
};
exports.default = _default;
@@ -0,0 +1,25 @@
import type { StrokeLinecapType } from "../interface";
import React from 'react';
interface IndeterminateOption {
id: string;
loading: boolean;
percent: number;
strokeLinecap: StrokeLinecapType;
strokeWidth: number;
}
declare const _default: (options: IndeterminateOption) => {
indeterminateStyleProps: {
strokeDasharray?: undefined;
animation?: undefined;
strokeDashoffset?: undefined;
};
indeterminateStyleAnimation: any;
} | {
indeterminateStyleProps: {
strokeDasharray: string;
animation: string;
strokeDashoffset: number;
};
indeterminateStyleAnimation: React.JSX.Element;
};
export default _default;
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = options => {
const {
id,
percent,
strokeLinecap,
strokeWidth,
loading
} = options;
if (!loading) {
return {
indeterminateStyleProps: {},
indeterminateStyleAnimation: null
};
}
const animationName = `${id}-indeterminate-animate`;
const strokeDashOffset = 100 - (percent + (strokeLinecap === 'round' ? strokeWidth : 0));
return {
indeterminateStyleProps: {
strokeDasharray: `${percent} 100`,
animation: `${animationName} .6s linear alternate infinite`,
strokeDashoffset: 0
},
indeterminateStyleAnimation: /*#__PURE__*/_react.default.createElement("style", null, `@keyframes ${animationName} {
0% { stroke-dashoffset: 0; }
100% { stroke-dashoffset: -${strokeDashOffset};
}`)
};
};
exports.default = _default;