rc-progress
Advanced tools
Comparing version 3.1.1 to 3.1.2
import * as React from 'react'; | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
declare const Circle: React.FC<ProgressProps>; | ||
export default Circle; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
@@ -102,3 +103,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
stackPtg += ptg; | ||
return React.createElement("path", { | ||
return /*#__PURE__*/React.createElement("path", { | ||
key: index, | ||
@@ -118,7 +119,7 @@ className: "".concat(prefixCls, "-circle-path"), | ||
return React.createElement("svg", Object.assign({ | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
className: classNames("".concat(prefixCls, "-circle"), className), | ||
viewBox: "0 0 100 100", | ||
style: style | ||
}, restProps), gradient && React.createElement("defs", null, React.createElement("linearGradient", { | ||
}, restProps), gradient && /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", { | ||
id: "".concat(prefixCls, "-gradient-").concat(gradientId), | ||
@@ -132,3 +133,3 @@ x1: "100%", | ||
}).map(function (key, index) { | ||
return React.createElement("stop", { | ||
return /*#__PURE__*/React.createElement("stop", { | ||
key: index, | ||
@@ -138,3 +139,3 @@ offset: key, | ||
}); | ||
}))), React.createElement("path", { | ||
}))), /*#__PURE__*/React.createElement("path", { | ||
className: "".concat(prefixCls, "-circle-trail"), | ||
@@ -141,0 +142,0 @@ d: pathString, |
/// <reference types="react" /> | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
export declare const defaultProps: Partial<ProgressProps>; | ||
export declare const useTransitionDuration: (percentList: number[]) => import("react").MutableRefObject<undefined>[][]; |
/// <reference types="react" /> | ||
import Line from './Line'; | ||
import Circle from './Circle'; | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
export { Line, Circle, ProgressProps }; | ||
@@ -6,0 +6,0 @@ declare const _default: { |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import type * as React from 'react'; | ||
export interface ProgressProps { | ||
@@ -3,0 +3,0 @@ strokeWidth?: number; |
import * as React from 'react'; | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
declare const Line: React.FC<ProgressProps>; | ||
export default Line; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
@@ -34,3 +35,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var stackPtg = 0; | ||
return React.createElement("svg", Object.assign({ | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
className: classNames("".concat(prefixCls, "-line"), className), | ||
@@ -40,3 +41,3 @@ viewBox: viewBoxString, | ||
style: style | ||
}, restProps), React.createElement("path", { | ||
}, restProps), /*#__PURE__*/React.createElement("path", { | ||
className: "".concat(prefixCls, "-line-trail"), | ||
@@ -49,4 +50,20 @@ d: pathString, | ||
}), percentList.map(function (ptg, index) { | ||
var dashPercent = 1; | ||
switch (strokeLinecap) { | ||
case 'round': | ||
dashPercent = 1 - strokeWidth / 100; | ||
break; | ||
case 'square': | ||
dashPercent = 1 - strokeWidth / 2 / 100; | ||
break; | ||
default: | ||
dashPercent = 1; | ||
break; | ||
} | ||
var pathStyle = { | ||
strokeDasharray: "".concat(ptg, "px, 100px"), | ||
strokeDasharray: "".concat(ptg * dashPercent, "px, 100px"), | ||
strokeDashoffset: "-".concat(stackPtg, "px"), | ||
@@ -57,3 +74,3 @@ transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear' | ||
stackPtg += ptg; | ||
return React.createElement("path", { | ||
return /*#__PURE__*/React.createElement("path", { | ||
key: index, | ||
@@ -60,0 +77,0 @@ className: "".concat(prefixCls, "-line-path"), |
import * as React from 'react'; | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
declare const Circle: React.FC<ProgressProps>; | ||
export default Circle; |
@@ -12,2 +12,4 @@ "use strict"; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
@@ -118,3 +120,3 @@ | ||
stackPtg += ptg; | ||
return React.createElement("path", { | ||
return /*#__PURE__*/React.createElement("path", { | ||
key: index, | ||
@@ -134,7 +136,7 @@ className: "".concat(prefixCls, "-circle-path"), | ||
return React.createElement("svg", Object.assign({ | ||
return /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({ | ||
className: (0, _classnames.default)("".concat(prefixCls, "-circle"), className), | ||
viewBox: "0 0 100 100", | ||
style: style | ||
}, restProps), gradient && React.createElement("defs", null, React.createElement("linearGradient", { | ||
}, restProps), gradient && /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", { | ||
id: "".concat(prefixCls, "-gradient-").concat(gradientId), | ||
@@ -148,3 +150,3 @@ x1: "100%", | ||
}).map(function (key, index) { | ||
return React.createElement("stop", { | ||
return /*#__PURE__*/React.createElement("stop", { | ||
key: index, | ||
@@ -154,3 +156,3 @@ offset: key, | ||
}); | ||
}))), React.createElement("path", { | ||
}))), /*#__PURE__*/React.createElement("path", { | ||
className: "".concat(prefixCls, "-circle-trail"), | ||
@@ -157,0 +159,0 @@ d: pathString, |
/// <reference types="react" /> | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
export declare const defaultProps: Partial<ProgressProps>; | ||
export declare const useTransitionDuration: (percentList: number[]) => import("react").MutableRefObject<undefined>[][]; |
/// <reference types="react" /> | ||
import Line from './Line'; | ||
import Circle from './Circle'; | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
export { Line, Circle, ProgressProps }; | ||
@@ -6,0 +6,0 @@ declare const _default: { |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import type * as React from 'react'; | ||
export interface ProgressProps { | ||
@@ -3,0 +3,0 @@ strokeWidth?: number; |
@@ -1,1 +0,5 @@ | ||
"use strict"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); |
import * as React from 'react'; | ||
import { ProgressProps } from './interface'; | ||
import type { ProgressProps } from './interface'; | ||
declare const Line: React.FC<ProgressProps>; | ||
export default Line; |
@@ -12,2 +12,4 @@ "use strict"; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
@@ -49,3 +51,3 @@ | ||
var stackPtg = 0; | ||
return React.createElement("svg", Object.assign({ | ||
return /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({ | ||
className: (0, _classnames.default)("".concat(prefixCls, "-line"), className), | ||
@@ -55,3 +57,3 @@ viewBox: viewBoxString, | ||
style: style | ||
}, restProps), React.createElement("path", { | ||
}, restProps), /*#__PURE__*/React.createElement("path", { | ||
className: "".concat(prefixCls, "-line-trail"), | ||
@@ -64,4 +66,20 @@ d: pathString, | ||
}), percentList.map(function (ptg, index) { | ||
var dashPercent = 1; | ||
switch (strokeLinecap) { | ||
case 'round': | ||
dashPercent = 1 - strokeWidth / 100; | ||
break; | ||
case 'square': | ||
dashPercent = 1 - strokeWidth / 2 / 100; | ||
break; | ||
default: | ||
dashPercent = 1; | ||
break; | ||
} | ||
var pathStyle = { | ||
strokeDasharray: "".concat(ptg, "px, 100px"), | ||
strokeDasharray: "".concat(ptg * dashPercent, "px, 100px"), | ||
strokeDashoffset: "-".concat(stackPtg, "px"), | ||
@@ -72,3 +90,3 @@ transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear' | ||
stackPtg += ptg; | ||
return React.createElement("path", { | ||
return /*#__PURE__*/React.createElement("path", { | ||
key: index, | ||
@@ -75,0 +93,0 @@ className: "".concat(prefixCls, "-line-path"), |
{ | ||
"name": "rc-progress", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "progress ui component for react", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish", | ||
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", | ||
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js", | ||
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", | ||
@@ -35,0 +35,0 @@ "test": "father test", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33516
632