add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

17
node_modules/rc-progress/es/Circle/PtgCircle.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import * as React from 'react';
import type { ProgressProps } from '..';
import type { StrokeColorObject } from '../interface';
export interface ColorGradientProps {
prefixCls: 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;

77
node_modules/rc-progress/es/Circle/PtgCircle.js generated vendored Normal file
View File

@@ -0,0 +1,77 @@
import _typeof from "@babel/runtime/helpers/esm/typeof";
import * as React from 'react';
var Block = function Block(_ref) {
var bg = _ref.bg,
children = _ref.children;
return /*#__PURE__*/React.createElement("div", {
style: {
width: '100%',
height: '100%',
background: bg
}
}, children);
};
function getPtgColors(color, scale) {
return Object.keys(color).map(function (key) {
var parsedKey = parseFloat(key);
var ptgKey = "".concat(Math.floor(parsedKey * scale), "%");
return "".concat(color[key], " ").concat(ptgKey);
});
}
var PtgCircle = /*#__PURE__*/React.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
color = props.color,
gradientId = props.gradientId,
radius = props.radius,
circleStyleForStack = props.style,
ptg = props.ptg,
strokeLinecap = props.strokeLinecap,
strokeWidth = props.strokeWidth,
size = props.size,
gapDegree = props.gapDegree;
var isGradient = color && _typeof(color) === 'object';
var stroke = isGradient ? "#FFF" : undefined;
// ========================== Circle ==========================
var halfSize = size / 2;
var circleNode = /*#__PURE__*/React.createElement("circle", {
className: "".concat(prefixCls, "-circle-path"),
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;
}
var maskId = "".concat(gradientId, "-conic");
var fromDeg = gapDegree ? "".concat(180 + gapDegree / 2, "deg") : '0deg';
var conicColors = getPtgColors(color, (360 - gapDegree) / 360);
var linearColors = getPtgColors(color, 1);
var conicColorBg = "conic-gradient(from ".concat(fromDeg, ", ").concat(conicColors.join(', '), ")");
var linearColorBg = "linear-gradient(to ".concat(gapDegree ? 'bottom' : 'top', ", ").concat(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(#".concat(maskId, ")")
}, /*#__PURE__*/React.createElement(Block, {
bg: linearColorBg
}, /*#__PURE__*/React.createElement(Block, {
bg: conicColorBg
}))));
});
if (process.env.NODE_ENV !== 'production') {
PtgCircle.displayName = 'PtgCircle';
}
export default PtgCircle;

4
node_modules/rc-progress/es/Circle/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import * as React from 'react';
import type { ProgressProps } from '../interface';
declare const Circle: React.FC<ProgressProps>;
export default Circle;

130
node_modules/rc-progress/es/Circle/index.js generated vendored Normal file
View File

@@ -0,0 +1,130 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _typeof from "@babel/runtime/helpers/esm/typeof";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["id", "prefixCls", "steps", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor", "percent"];
import * as React from 'react';
import classNames from 'classnames';
import { defaultProps, useTransitionDuration } from "../common";
import useId from "../hooks/useId";
import PtgCircle from "./PtgCircle";
import { VIEW_BOX_SIZE, getCircleStyle } from "./util";
function toArray(value) {
var mergedValue = value !== null && value !== void 0 ? value : [];
return Array.isArray(mergedValue) ? mergedValue : [mergedValue];
}
var Circle = function Circle(props) {
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
id = _defaultProps$props.id,
prefixCls = _defaultProps$props.prefixCls,
steps = _defaultProps$props.steps,
strokeWidth = _defaultProps$props.strokeWidth,
trailWidth = _defaultProps$props.trailWidth,
_defaultProps$props$g = _defaultProps$props.gapDegree,
gapDegree = _defaultProps$props$g === void 0 ? 0 : _defaultProps$props$g,
gapPosition = _defaultProps$props.gapPosition,
trailColor = _defaultProps$props.trailColor,
strokeLinecap = _defaultProps$props.strokeLinecap,
style = _defaultProps$props.style,
className = _defaultProps$props.className,
strokeColor = _defaultProps$props.strokeColor,
percent = _defaultProps$props.percent,
restProps = _objectWithoutProperties(_defaultProps$props, _excluded);
var halfSize = VIEW_BOX_SIZE / 2;
var mergedId = useId(id);
var gradientId = "".concat(mergedId, "-gradient");
var radius = halfSize - strokeWidth / 2;
var perimeter = Math.PI * 2 * radius;
var rotateDeg = gapDegree > 0 ? 90 + gapDegree / 2 : -90;
var perimeterWithoutGap = perimeter * ((360 - gapDegree) / 360);
var _ref = _typeof(steps) === 'object' ? steps : {
count: steps,
gap: 2
},
stepCount = _ref.count,
stepGap = _ref.gap;
var percentList = toArray(percent);
var strokeColorList = toArray(strokeColor);
var gradient = strokeColorList.find(function (color) {
return color && _typeof(color) === 'object';
});
var isConicGradient = gradient && _typeof(gradient) === 'object';
var mergedStrokeLinecap = isConicGradient ? 'butt' : strokeLinecap;
var circleStyle = getCircleStyle(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, trailColor, mergedStrokeLinecap, strokeWidth);
var paths = useTransitionDuration();
var getStokeList = function getStokeList() {
var stackPtg = 0;
return percentList.map(function (ptg, index) {
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
var circleStyleForStack = getCircleStyle(perimeter, perimeterWithoutGap, stackPtg, ptg, rotateDeg, gapDegree, gapPosition, color, mergedStrokeLinecap, strokeWidth);
stackPtg += ptg;
return /*#__PURE__*/React.createElement(PtgCircle, {
key: index,
color: color,
ptg: ptg,
radius: radius,
prefixCls: prefixCls,
gradientId: gradientId,
style: circleStyleForStack,
strokeLinecap: mergedStrokeLinecap,
strokeWidth: strokeWidth,
gapDegree: gapDegree,
ref: function 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: VIEW_BOX_SIZE
});
}).reverse();
};
var getStepStokeList = function getStepStokeList() {
// only show the first percent when pass steps
var current = Math.round(stepCount * (percentList[0] / 100));
var stepPtg = 100 / stepCount;
var stackPtg = 0;
return new Array(stepCount).fill(null).map(function (_, index) {
var color = index <= current - 1 ? strokeColorList[0] : trailColor;
var stroke = color && _typeof(color) === 'object' ? "url(#".concat(gradientId, ")") : undefined;
var circleStyleForStack = 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: "".concat(prefixCls, "-circle-path"),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: stroke,
strokeWidth: strokeWidth,
opacity: 1,
style: circleStyleForStack,
ref: function ref(elem) {
paths[index] = elem;
}
});
});
};
return /*#__PURE__*/React.createElement("svg", _extends({
className: classNames("".concat(prefixCls, "-circle"), className),
viewBox: "0 0 ".concat(VIEW_BOX_SIZE, " ").concat(VIEW_BOX_SIZE),
style: style,
id: id,
role: "presentation"
}, restProps), !stepCount && /*#__PURE__*/React.createElement("circle", {
className: "".concat(prefixCls, "-circle-trail"),
r: radius,
cx: halfSize,
cy: halfSize,
stroke: trailColor,
strokeLinecap: mergedStrokeLinecap,
strokeWidth: trailWidth || strokeWidth,
style: circleStyle
}), stepCount ? getStepStokeList() : getStokeList());
};
if (process.env.NODE_ENV !== 'production') {
Circle.displayName = 'Circle';
}
export default Circle;

5
node_modules/rc-progress/es/Circle/util.d.ts generated vendored Normal file
View File

@@ -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;

31
node_modules/rc-progress/es/Circle/util.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
export var VIEW_BOX_SIZE = 100;
export var getCircleStyle = function getCircleStyle(perimeter, perimeterWithoutGap, offset, percent, rotateDeg, gapDegree, gapPosition, strokeColor, strokeLinecap, strokeWidth) {
var stepSpace = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
var offsetDeg = offset / 100 * 360 * ((360 - gapDegree) / 360);
var positionDeg = gapDegree === 0 ? 0 : {
bottom: 0,
top: 180,
left: 90,
right: -90
}[gapPosition];
var 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;
}
}
var halfSize = VIEW_BOX_SIZE / 2;
return {
stroke: typeof strokeColor === 'string' ? strokeColor : undefined,
strokeDasharray: "".concat(perimeterWithoutGap, "px ").concat(perimeter),
strokeDashoffset: strokeDashoffset + stepSpace,
transform: "rotate(".concat(rotateDeg + offsetDeg + positionDeg, "deg)"),
transformOrigin: "".concat(halfSize, "px ").concat(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
};
};