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

@the-control-group/ui

Package Overview
Dependencies
Maintainers
7
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@the-control-group/ui - npm Package Compare versions

Comparing version 1.7.7 to 1.7.8

1

lib/elements/Input/Input.js

@@ -149,2 +149,3 @@ /**

name: PropTypes.string.isRequired,
defaultValue: PropTypes.string,
rows: PropTypes.oneOfType([

@@ -151,0 +152,0 @@ PropTypes.string,

@@ -34,3 +34,6 @@ /**

pressedKKey: false,
pressedControlKey: false
pressedControlKey: false,
segmentStartTime: '',
currentSegment: null,
percentageForNextSegment: 0
};

@@ -61,6 +64,11 @@

timer() {
const { segmentStartTime, currentSegment, percentage, percentageForNextSegment } = this.state;
this.setState({
percentage: this.state.percentage + 1
// Sometimes state doesn't get updated fast enough and it slows down the progress bar. Need to use Date.now() to get the timestamp in milliseconds for accurate timer
percentage: Date.now() >= segmentStartTime + currentSegment.duration
? percentageForNextSegment
: percentage + 1
}, () => {
if (this.state.percentage >= 100) {
if (percentage >= 100) {
clearInterval(this.interval);

@@ -119,2 +127,8 @@ setTimeout(this.props.onComplete, this.props.completeDelay);

startSegmentBar(segment) {
this.setState({
segmentStartTime: Date.now(),
percentageForNextSegment: this.state.percentageForNextSegment + segment.percentage,
currentSegment: segment
});
this.interval = setInterval(this.timer, (segment.duration / segment.percentage));

@@ -121,0 +135,0 @@ }

2

package.json
{
"name": "@the-control-group/ui",
"version": "1.7.7",
"version": "1.7.8",
"description": "UI kit based on ReactJS for TCG projects",

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

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