Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-md/progress

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-md/progress - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [3.1.0](https://github.com/mlaursen/react-md/compare/v3.0.1...v3.1.0) (2021-09-10)
### Other Internal Changes
* ran `yarn format` to include new files ([48d3d7f](https://github.com/mlaursen/react-md/commit/48d3d7fddb0435edf7dec9d0ba38cf3f0f251709))
## [3.0.1](https://github.com/mlaursen/react-md/compare/v3.0.0...v3.0.1) (2021-08-15)

@@ -8,0 +20,0 @@

16

lib/CircularProgress.js

@@ -51,10 +51,10 @@ "use strict";

var utils_1 = require("@react-md/utils");
var block = utils_1.bem("rmd-circular-progress");
exports.CircularProgress = react_1.forwardRef(function CircularProgress(_a, ref) {
var block = (0, utils_1.bem)("rmd-circular-progress");
exports.CircularProgress = (0, react_1.forwardRef)(function CircularProgress(_a, ref) {
var className = _a.className, propSvgStyle = _a.svgStyle, svgClassName = _a.svgClassName, propCircleStyle = _a.circleStyle, circleClassName = _a.circleClassName, value = _a.value, _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, _d = _a.radius, radius = _d === void 0 ? 30 : _d, _e = _a.center, center = _e === void 0 ? 33 : _e, _f = _a.viewBox, viewBox = _f === void 0 ? "0 0 66 66" : _f, _g = _a.dashoffset, dashoffset = _g === void 0 ? 187 : _g, _h = _a.animate, animate = _h === void 0 ? true : _h, _j = _a.centered, centered = _j === void 0 ? true : _j, _k = _a.maxRotation, maxRotation = _k === void 0 ? 360 * 1.75 : _k, _l = _a.small, small = _l === void 0 ? false : _l, props = __rest(_a, ["className", "svgStyle", "svgClassName", "circleStyle", "circleClassName", "value", "min", "max", "radius", "center", "viewBox", "dashoffset", "animate", "centered", "maxRotation", "small"]);
var progress;
if (typeof value === "number") {
progress = utils_1.getPercentage(min, max, value);
progress = (0, utils_1.getPercentage)(min, max, value);
}
var svgStyle = react_1.useMemo(function () {
var svgStyle = (0, react_1.useMemo)(function () {
if (typeof progress !== "number") {

@@ -70,3 +70,3 @@ return propSvgStyle;

}, [progress, maxRotation, propSvgStyle]);
var circleStyle = react_1.useMemo(function () {
var circleStyle = (0, react_1.useMemo)(function () {
if (typeof progress !== "number") {

@@ -79,4 +79,4 @@ return propCircleStyle;

var indeterminate = !determinate;
return (react_1.default.createElement("span", __assign({}, props, { ref: ref, role: "progressbar", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, className: classnames_1.default(block({ centered: centered, small: small }), className) }),
react_1.default.createElement("svg", { style: svgStyle, className: classnames_1.default(block("svg", {
return (react_1.default.createElement("span", __assign({}, props, { ref: ref, role: "progressbar", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, className: (0, classnames_1.default)(block({ centered: centered, small: small }), className) }),
react_1.default.createElement("svg", { style: svgStyle, className: (0, classnames_1.default)(block("svg", {
animate: animate && determinate,

@@ -86,3 +86,3 @@ determinate: determinate,

}), svgClassName), viewBox: viewBox },
react_1.default.createElement("circle", { style: circleStyle, className: classnames_1.default(block("circle", {
react_1.default.createElement("circle", { style: circleStyle, className: (0, classnames_1.default)(block("circle", {
animate: animate && determinate,

@@ -89,0 +89,0 @@ determinate: determinate,

@@ -51,6 +51,6 @@ "use strict";

var utils_1 = require("@react-md/utils");
var block = utils_1.bem("rmd-linear-progress");
exports.LinearProgress = react_1.forwardRef(function LinearProgress(_a, ref) {
var block = (0, utils_1.bem)("rmd-linear-progress");
exports.LinearProgress = (0, react_1.forwardRef)(function LinearProgress(_a, ref) {
var propStyle = _a.style, className = _a.className, propBarStyle = _a.barStyle, barClassName = _a.barClassName, _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, value = _a.value, _d = _a.reverse, reverse = _d === void 0 ? false : _d, _e = _a.animate, animate = _e === void 0 ? true : _e, _f = _a.vertical, vertical = _f === void 0 ? false : _f, _g = _a.verticalHeight, verticalHeight = _g === void 0 ? 240 : _g, props = __rest(_a, ["style", "className", "barStyle", "barClassName", "min", "max", "value", "reverse", "animate", "vertical", "verticalHeight"]);
var style = react_1.useMemo(function () {
var style = (0, react_1.useMemo)(function () {
if (!vertical || verticalHeight === null) {

@@ -63,5 +63,5 @@ return propStyle;

if (typeof value === "number") {
progress = utils_1.getPercentage(min, max, value);
progress = (0, utils_1.getPercentage)(min, max, value);
}
var barStyle = react_1.useMemo(function () {
var barStyle = (0, react_1.useMemo)(function () {
var _a;

@@ -76,3 +76,3 @@ if (typeof progress !== "number") {

var indeterminate = !determinate;
return (react_1.default.createElement("span", __assign({}, props, { ref: ref, style: style, role: "progressbar", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, className: classnames_1.default(block({
return (react_1.default.createElement("span", __assign({}, props, { ref: ref, style: style, role: "progressbar", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, className: (0, classnames_1.default)(block({
vertical: vertical,

@@ -82,3 +82,3 @@ determinate: determinate,

}), className) }),
react_1.default.createElement("span", { style: barStyle, className: classnames_1.default(block("bar", {
react_1.default.createElement("span", { style: barStyle, className: (0, classnames_1.default)(block("bar", {
vertical: vertical,

@@ -85,0 +85,0 @@ "vertical-reverse": vertical && reverse,

{
"name": "@react-md/progress",
"version": "3.0.1",
"version": "3.1.0",
"description": "Create horizontal, vertical, and circular progress indicators",

@@ -31,5 +31,5 @@ "main": "./lib/index.js",

"dependencies": {
"@react-md/theme": "^3.0.0",
"@react-md/transition": "^3.0.1",
"@react-md/utils": "^3.0.0",
"@react-md/theme": "^3.1.0",
"@react-md/transition": "^3.1.0",
"@react-md/utils": "^3.1.0",
"classnames": "^2.3.1"

@@ -51,3 +51,3 @@ },

},
"gitHead": "68149668ebc79c4bbcbb2875d65b9ac243e12c77"
"gitHead": "5891a3255f12fb34d2cc82d81d10f85f712a21e8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc