@the-control-group/ui
Advanced tools
Comparing version 1.7.0 to 1.7.2
@@ -93,3 +93,5 @@ /** | ||
window.requestAnimationFrame(() => { | ||
const transitionDuration = Math.max(this.accordionContent.current.clientHeight * 2, 300); | ||
const transitionDuration = Math.max(this.accordionContent.current.clientHeight, 300) > 5000 | ||
? 5000 | ||
: Math.max(this.accordionContent.current.clientHeight, 300); | ||
@@ -100,2 +102,3 @@ // Set fixed height (based on height of content) and set transition-duration for .ui-accordion-content-wrapper. | ||
this.accordionContent.current.parentNode.style.height = `${this.accordionContent.current.clientHeight}px`; | ||
this.accordionContent.current.parentNode.style.overflow = 'hidden'; | ||
@@ -107,2 +110,3 @@ // Set auto height for .ui-accordion-content-wrapper after animation is complete. | ||
this.accordionContent.current.parentNode.style.height = 'auto'; | ||
this.accordionContent.current.parentNode.style.overflow = 'visible'; | ||
}, transitionDuration); | ||
@@ -118,2 +122,3 @@ }); | ||
this.accordionContent.current.parentNode.style.height = `${this.accordionContent.current.clientHeight}px`; | ||
this.accordionContent.current.parentNode.style.overflow = 'hidden'; | ||
@@ -130,3 +135,3 @@ // Set height and transition-duration for slide up animation. | ||
this.disableToggle = false; | ||
}, this.accordionContent.current.clientHeight * 2); | ||
}, this.accordionContent.current.clientHeight); | ||
}); | ||
@@ -133,0 +138,0 @@ } |
@@ -71,2 +71,3 @@ /** | ||
'name', | ||
'defaultValue', | ||
'value', | ||
@@ -101,5 +102,7 @@ 'htmlFor', | ||
// If the "value" or "checked" attribute is present, it should be added regardless of truthiness | ||
/* eslint-disable */ | ||
if(other[v] || (v === 'value' && other.hasOwnProperty('value')) || (v === 'checked' && other.hasOwnProperty('checked'))) { | ||
attributes[v] = other[v]; | ||
} | ||
/* eslint-enable */ | ||
}); | ||
@@ -106,0 +109,0 @@ |
@@ -60,4 +60,10 @@ /** | ||
> | ||
{Object.keys(options).map((keyName, keyIndex) => | ||
<option key={keyIndex} value={keyName}>{options[keyName]}</option> | ||
{Array.isArray(options) ? ( | ||
options.map(keyName => | ||
<option key={keyName} value={keyName}>{keyName}</option> | ||
) | ||
) : ( | ||
Object.keys(options).map((keyName, keyIndex) => | ||
<option key={keyIndex} value={keyName}>{options[keyName]}</option> | ||
) | ||
)} | ||
@@ -64,0 +70,0 @@ </Common> |
{ | ||
"name": "@the-control-group/ui", | ||
"version": "1.7.0", | ||
"version": "1.7.2", | ||
"description": "UI kit based on ReactJS for TCG projects", | ||
@@ -28,8 +28,8 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"babel-eslint": "^8.2.6", | ||
"babel-eslint": "^10.0.3", | ||
"classnames": "^2.2.6", | ||
"cpx": "^1.5.0", | ||
"docz": "^0.10.2", | ||
"docz-plugin-css": "^0.10.2", | ||
"eslint": "^5.3.0", | ||
"docz": "^1.3.2", | ||
"docz-plugin-css": "^0.11.0", | ||
"eslint": "^6.6.0", | ||
"eslint-plugin-react": "^7.11.1", | ||
@@ -36,0 +36,0 @@ "prop-types": "^15.6.2", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
71601
1495
0