Socket
Socket
Sign inDemoInstall

@hig/progress-bar

Package Overview
Dependencies
Maintainers
6
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/progress-bar - npm Package Compare versions

Comparing version 1.1.3 to 2.0.0

120

build/index.es.js
import { keyframes, cx, css } from 'emotion';
import React, { Component } from 'react';
import React from 'react';
import PropTypes from 'prop-types';

@@ -88,84 +88,62 @@ import { ThemeContext } from '@hig/theme-context';

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var ProgressBar = function ProgressBar(props) {
var percentComplete = props.percentComplete,
customStylesheet = props.stylesheet,
otherProps = _objectWithoutProperties(props, ["percentComplete", "stylesheet"]);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
var className = otherProps.className;
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var innerWrapperClassNames = createCustomClassNames(className, "progress-bar");
var fillClassNames = createCustomClassNames(className, "fill");
var polygonClassNames = createCustomClassNames(className, "polygon");
var ProgressBar = function (_Component) {
_inherits(ProgressBar, _Component);
return React.createElement(
ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
function ProgressBar() {
_classCallCheck(this, ProgressBar);
return _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).apply(this, arguments));
}
_createClass(ProgressBar, [{
key: "render",
value: function render() {
var _props = this.props,
percentComplete = _props.percentComplete,
customStylesheet = _props.stylesheet,
otherProps = _objectWithoutProperties(_props, ["percentComplete", "stylesheet"]);
var className = otherProps.className;
var innerWrapperClassNames = createCustomClassNames(className, "progress-bar");
var fillClassNames = createCustomClassNames(className, "fill");
var polygonClassNames = createCustomClassNames(className, "polygon");
var styles = stylesheet({ percentComplete: percentComplete, stylesheet: customStylesheet }, resolvedRoles);
return React.createElement(
ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
var styles = stylesheet({ percentComplete: percentComplete, stylesheet: customStylesheet }, resolvedRoles);
return React.createElement(
"div",
"div",
{
className: cx(css(styles.wrapper), className),
role: "progressbar",
"aria-valuemin": "0",
"aria-valuemax": "100",
"aria-valuenow": percentComplete
},
React.createElement(
"div",
{
className: cx(css(styles.progressBar), innerWrapperClassNames)
},
React.createElement("div", {
className: cx(css(styles.progressBarFill), fillClassNames)
}),
React.createElement(
"svg",
{
className: cx(css(styles.wrapper), className),
role: "progressbar",
"aria-valuemin": "0",
"aria-valuemax": "100",
"aria-valuenow": percentComplete
width: "3px",
height: "4px",
viewBox: "0 0 3 4",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink"
},
React.createElement(
"div",
{
className: cx(css(styles.progressBar), innerWrapperClassNames)
},
React.createElement("div", {
className: cx(css(styles.progressBarFill), fillClassNames)
}),
React.createElement(
"svg",
{
width: "3px",
height: "4px",
viewBox: "0 0 3 4",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink"
},
React.createElement("polygon", {
className: cx(css(styles.polygon), polygonClassNames),
id: "end-right",
points: "0 0 2.68 0 1 4 0 4"
})
)
)
);
}
React.createElement("polygon", {
className: cx(css(styles.polygon), polygonClassNames),
id: "end-right",
points: "0 0 2.68 0 1 4 0 4"
})
)
)
);
}
}]);
);
};
return ProgressBar;
}(Component);
ProgressBar.displayName = "ProgressBar";

@@ -172,0 +150,0 @@ ProgressBar.propTypes = {

@@ -8,4 +8,3 @@ 'use strict';

var emotion = require('emotion');
var React = require('react');
var React__default = _interopDefault(React);
var React = _interopDefault(require('react'));
var PropTypes = _interopDefault(require('prop-types'));

@@ -96,84 +95,62 @@ var themeContext = require('@hig/theme-context');

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var ProgressBar = function ProgressBar(props) {
var percentComplete = props.percentComplete,
customStylesheet = props.stylesheet,
otherProps = _objectWithoutProperties(props, ["percentComplete", "stylesheet"]);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
var className = otherProps.className;
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var innerWrapperClassNames = utils.createCustomClassNames(className, "progress-bar");
var fillClassNames = utils.createCustomClassNames(className, "fill");
var polygonClassNames = utils.createCustomClassNames(className, "polygon");
var ProgressBar = function (_Component) {
_inherits(ProgressBar, _Component);
return React.createElement(
themeContext.ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
function ProgressBar() {
_classCallCheck(this, ProgressBar);
return _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).apply(this, arguments));
}
_createClass(ProgressBar, [{
key: "render",
value: function render() {
var _props = this.props,
percentComplete = _props.percentComplete,
customStylesheet = _props.stylesheet,
otherProps = _objectWithoutProperties(_props, ["percentComplete", "stylesheet"]);
var className = otherProps.className;
var innerWrapperClassNames = utils.createCustomClassNames(className, "progress-bar");
var fillClassNames = utils.createCustomClassNames(className, "fill");
var polygonClassNames = utils.createCustomClassNames(className, "polygon");
return React__default.createElement(
themeContext.ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
var styles = stylesheet({ percentComplete: percentComplete, stylesheet: customStylesheet }, resolvedRoles);
return React__default.createElement(
"div",
var styles = stylesheet({ percentComplete: percentComplete, stylesheet: customStylesheet }, resolvedRoles);
return React.createElement(
"div",
{
className: emotion.cx(emotion.css(styles.wrapper), className),
role: "progressbar",
"aria-valuemin": "0",
"aria-valuemax": "100",
"aria-valuenow": percentComplete
},
React.createElement(
"div",
{
className: emotion.cx(emotion.css(styles.progressBar), innerWrapperClassNames)
},
React.createElement("div", {
className: emotion.cx(emotion.css(styles.progressBarFill), fillClassNames)
}),
React.createElement(
"svg",
{
className: emotion.cx(emotion.css(styles.wrapper), className),
role: "progressbar",
"aria-valuemin": "0",
"aria-valuemax": "100",
"aria-valuenow": percentComplete
width: "3px",
height: "4px",
viewBox: "0 0 3 4",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink"
},
React__default.createElement(
"div",
{
className: emotion.cx(emotion.css(styles.progressBar), innerWrapperClassNames)
},
React__default.createElement("div", {
className: emotion.cx(emotion.css(styles.progressBarFill), fillClassNames)
}),
React__default.createElement(
"svg",
{
width: "3px",
height: "4px",
viewBox: "0 0 3 4",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink"
},
React__default.createElement("polygon", {
className: emotion.cx(emotion.css(styles.polygon), polygonClassNames),
id: "end-right",
points: "0 0 2.68 0 1 4 0 4"
})
)
)
);
}
React.createElement("polygon", {
className: emotion.cx(emotion.css(styles.polygon), polygonClassNames),
id: "end-right",
points: "0 0 2.68 0 1 4 0 4"
})
)
)
);
}
}]);
);
};
return ProgressBar;
}(React.Component);
ProgressBar.displayName = "ProgressBar";

@@ -180,0 +157,0 @@ ProgressBar.propTypes = {

@@ -0,1 +1,13 @@

# [@hig/progress-bar-v2.0.0](https://github.com/Autodesk/hig/compare/@hig/progress-bar@1.1.3...@hig/progress-bar@2.0.0) (2022-01-13)
### Code Refactoring
* Major Release - React 17 Upgrade ([2523711](https://github.com/Autodesk/hig/commit/2523711))
### BREAKING CHANGES
* This release includes upgrading to React 17 and all associated libraries. The components have also had structural changes, utilizing stateless components and hooks. There should be no change in look or behavior of components. The code usage is the same so if you’re already on react 17 you can bump the version directly. If you’re on an old version of react you’ll need to upgrade your project’s react first to 17 and then the HIG components. This upgrade also means no more fixes for the react 15 version but it will still be available for download from NPM. You can fork the repo and make fixes with the older version if there is something critical past this release date.
# [@hig/progress-bar-v1.1.3](https://github.com/Autodesk/hig/compare/@hig/progress-bar@1.1.2...@hig/progress-bar@1.1.3) (2022-01-12)

@@ -2,0 +14,0 @@

{
"name": "@hig/progress-bar",
"version": "1.1.3",
"version": "2.0.0",
"description": "HIG Progress Bar",

@@ -26,4 +26,4 @@ "author": "Autodesk Inc.",

"@hig/theme-context": "^3.0.3",
"@hig/theme-data": "^2.22.0",
"react": "^15.4.1 || ^16.3.2"
"@hig/theme-data": "^2.22.1",
"react": "^17.0.0"
},

@@ -30,0 +30,0 @@ "devDependencies": {

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