terra-toggle
Advanced tools
Comparing version 2.18.0 to 2.19.0
@@ -7,2 +7,7 @@ Changelog | ||
2.19.0 - (August 29, 2018) | ||
------------------ | ||
### Changed | ||
* Minor dependency version bump | ||
2.18.0 - (August 1, 2018) | ||
@@ -9,0 +14,0 @@ ------------------ |
@@ -9,4 +9,4 @@ # Dependency Information | ||
| react-animate-height | ^2.0.1 | >=15.6.2 | Lightweight React component for animating height using CSS transitions. | | ||
| terra-doc-template | ^1.11.0 | ^16.2.0 | Provides an adjustable template for documentation pages. | | ||
| terra-icon | ^2.18.0 | ^16.2.0 | terra-icon | | ||
| terra-doc-template | ^1.12.0 | ^16.2.0 | Provides an adjustable template for documentation pages. | | ||
| terra-icon | ^2.19.0 | ^16.2.0 | terra-icon | | ||
@@ -13,0 +13,0 @@ ## peerDependencies |
@@ -48,3 +48,5 @@ 'use strict'; | ||
value: function handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(function (prevState) { | ||
return { isOpen: !prevState.isOpen }; | ||
}); | ||
} | ||
@@ -54,2 +56,4 @@ }, { | ||
value: function render() { | ||
var isOpen = this.state.isOpen; | ||
return _react2.default.createElement( | ||
@@ -61,7 +65,7 @@ 'div', | ||
_Toggle2.default, | ||
{ isOpen: this.state.isOpen, isAnimated: true }, | ||
{ isOpen: isOpen, isAnimated: true }, | ||
_react2.default.createElement( | ||
'p', | ||
null, | ||
'Lorem ipsum dolor sit amet, ', | ||
'Lorem ipsum dolor sit amet,', | ||
_react2.default.createElement( | ||
@@ -72,3 +76,4 @@ 'a', | ||
), | ||
' adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
' ', | ||
'adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
) | ||
@@ -75,0 +80,0 @@ ) |
@@ -48,3 +48,5 @@ 'use strict'; | ||
value: function handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(function (prevState) { | ||
return { isOpen: !prevState.isOpen }; | ||
}); | ||
} | ||
@@ -54,2 +56,4 @@ }, { | ||
value: function render() { | ||
var isOpen = this.state.isOpen; | ||
return _react2.default.createElement( | ||
@@ -61,7 +65,7 @@ 'div', | ||
_Toggle2.default, | ||
{ isOpen: this.state.isOpen }, | ||
{ isOpen: isOpen }, | ||
_react2.default.createElement( | ||
'p', | ||
null, | ||
'Lorem ipsum dolor sit amet, ', | ||
'Lorem ipsum dolor sit amet,', | ||
_react2.default.createElement( | ||
@@ -72,3 +76,4 @@ 'a', | ||
), | ||
' adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
' ', | ||
'adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
) | ||
@@ -75,0 +80,0 @@ ) |
@@ -42,3 +42,5 @@ 'use strict'; | ||
value: function handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(function (prevState) { | ||
return { isOpen: !prevState.isOpen }; | ||
}); | ||
} | ||
@@ -48,2 +50,4 @@ }, { | ||
value: function render() { | ||
var isOpen = this.state.isOpen; | ||
return _react2.default.createElement( | ||
@@ -54,3 +58,3 @@ 'div', | ||
'button', | ||
{ id: 'trigger-toggle', onClick: this.handleOnClick }, | ||
{ type: 'button', id: 'trigger-toggle', onClick: this.handleOnClick }, | ||
'Animated Toggle' | ||
@@ -60,7 +64,7 @@ ), | ||
_Toggle2.default, | ||
{ id: 'toggle', isOpen: this.state.isOpen, isAnimated: true }, | ||
{ id: 'toggle', isOpen: isOpen, isAnimated: true }, | ||
_react2.default.createElement( | ||
'p', | ||
null, | ||
'Lorem ipsum dolor sit amet, ', | ||
'Lorem ipsum dolor sit amet,', | ||
_react2.default.createElement( | ||
@@ -71,3 +75,4 @@ 'a', | ||
), | ||
' adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
' ', | ||
'adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
), | ||
@@ -125,3 +130,3 @@ _react2.default.createElement( | ||
'button', | ||
{ id: 'button' }, | ||
{ type: 'button', id: 'button' }, | ||
'button' | ||
@@ -128,0 +133,0 @@ ) |
@@ -42,3 +42,5 @@ 'use strict'; | ||
value: function handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(function (prevState) { | ||
return { isOpen: !prevState.isOpen }; | ||
}); | ||
} | ||
@@ -53,3 +55,3 @@ }, { | ||
'button', | ||
{ id: 'trigger-toggle', onClick: this.handleOnClick }, | ||
{ type: 'button', id: 'trigger-toggle', onClick: this.handleOnClick }, | ||
'Default Toggle' | ||
@@ -63,3 +65,4 @@ ), | ||
null, | ||
'Lorem ipsum dolor sit amet, ', | ||
'Lorem ipsum dolor sit amet,', | ||
' ', | ||
_react2.default.createElement( | ||
@@ -70,3 +73,4 @@ 'a', | ||
), | ||
' adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
' ', | ||
'adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' | ||
), | ||
@@ -124,3 +128,3 @@ _react2.default.createElement( | ||
'button', | ||
{ id: 'button' }, | ||
{ type: 'button', id: 'button' }, | ||
'button' | ||
@@ -127,0 +131,0 @@ ) |
@@ -42,3 +42,5 @@ 'use strict'; | ||
value: function handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(function (prevState) { | ||
return { isOpen: !prevState.isOpen }; | ||
}); | ||
} | ||
@@ -48,2 +50,4 @@ }, { | ||
value: function render() { | ||
var isOpen = this.state.isOpen; | ||
return _react2.default.createElement( | ||
@@ -54,3 +58,3 @@ 'div', | ||
'button', | ||
{ id: 'trigger-toggle', onClick: this.handleOnClick }, | ||
{ type: 'button', id: 'trigger-toggle', onClick: this.handleOnClick }, | ||
'Open Toggle' | ||
@@ -60,3 +64,3 @@ ), | ||
_Toggle2.default, | ||
{ id: 'toggle', isOpen: this.state.isOpen }, | ||
{ id: 'toggle', isOpen: isOpen }, | ||
_react2.default.createElement( | ||
@@ -63,0 +67,0 @@ 'p', |
{ | ||
"name": "terra-toggle", | ||
"main": "lib/Toggle.js", | ||
"version": "2.18.0", | ||
"version": "2.19.0", | ||
"description": "Toggle component that transitions content in and out.", | ||
@@ -32,4 +32,4 @@ "repository": { | ||
"react-animate-height": "^2.0.1", | ||
"terra-doc-template": "^1.12.0", | ||
"terra-icon": "^2.19.0" | ||
"terra-doc-template": "^1.13.0", | ||
"terra-icon": "^2.20.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "scripts": { |
# Terra Toggle | ||
[![NPM version](http://img.shields.io/npm/v/terra-toggle.svg)](https://www.npmjs.org/package/terra-toggle) | ||
[![Build Status](https://travis-ci.org/cerner/terra-core.svg?branch=master)](https://travis-ci.org/cerner/terra-core) | ||
[![NPM version](https://badgen.net/npm/v/terra-toggle)](https://www.npmjs.org/package/terra-toggle) | ||
[![Build Status](https://badgen.net/travis/cerner/terra-core)](https://travis-ci.org/cerner/terra-core) | ||
@@ -7,0 +7,0 @@ Toggle component that transitions content in and out. |
@@ -15,11 +15,17 @@ import React from 'react'; | ||
handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(prevState => ({ isOpen: !prevState.isOpen })); | ||
} | ||
render() { | ||
const { isOpen } = this.state; | ||
return ( | ||
<div> | ||
<IconInformation onClick={this.handleOnClick} /> | ||
<Toggle isOpen={this.state.isOpen} isAnimated> | ||
<p>Lorem ipsum dolor sit amet, <a href="#test">consectetur</a> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
<Toggle isOpen={isOpen} isAnimated> | ||
<p> | ||
Lorem ipsum dolor sit amet, | ||
<a href="#test">consectetur</a> | ||
{' '} | ||
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
</Toggle> | ||
@@ -26,0 +32,0 @@ </div> |
@@ -15,11 +15,17 @@ import React from 'react'; | ||
handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(prevState => ({ isOpen: !prevState.isOpen })); | ||
} | ||
render() { | ||
const { isOpen } = this.state; | ||
return ( | ||
<div> | ||
<IconInformation onClick={this.handleOnClick} /> | ||
<Toggle isOpen={this.state.isOpen}> | ||
<p>Lorem ipsum dolor sit amet, <a href="#test">consectetur</a> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
<Toggle isOpen={isOpen}> | ||
<p> | ||
Lorem ipsum dolor sit amet, | ||
<a href="#test">consectetur</a> | ||
{' '} | ||
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
</Toggle> | ||
@@ -26,0 +32,0 @@ </div> |
@@ -13,11 +13,17 @@ import React from 'react'; | ||
handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(prevState => ({ isOpen: !prevState.isOpen })); | ||
} | ||
render() { | ||
const { isOpen } = this.state; | ||
return ( | ||
<div> | ||
<button id="trigger-toggle" onClick={this.handleOnClick}>Animated Toggle</button> | ||
<Toggle id="toggle" isOpen={this.state.isOpen} isAnimated> | ||
<p>Lorem ipsum dolor sit amet, <a id="link" href="#test">consectetur</a> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
<button type="button" id="trigger-toggle" onClick={this.handleOnClick}>Animated Toggle</button> | ||
<Toggle id="toggle" isOpen={isOpen} isAnimated> | ||
<p> | ||
Lorem ipsum dolor sit amet, | ||
<a id="link" href="#test">consectetur</a> | ||
{' '} | ||
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
<div> | ||
@@ -42,3 +48,3 @@ <label htmlFor="text-input">Text input</label> | ||
<div> | ||
<button id="button">button</button> | ||
<button type="button" id="button">button</button> | ||
</div> | ||
@@ -45,0 +51,0 @@ </Toggle> |
@@ -13,3 +13,3 @@ import React from 'react'; | ||
handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(prevState => ({ isOpen: !prevState.isOpen })); | ||
} | ||
@@ -20,5 +20,11 @@ | ||
<div> | ||
<button id="trigger-toggle" onClick={this.handleOnClick}>Default Toggle</button> | ||
<button type="button" id="trigger-toggle" onClick={this.handleOnClick}>Default Toggle</button> | ||
<Toggle id="toggle" isOpen={this.state.isOpen}> | ||
<p>Lorem ipsum dolor sit amet, <a id="link" href="#test">consectetur</a> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, | ||
{' '} | ||
<a id="link" href="#test">consectetur</a> | ||
{' '} | ||
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
<div> | ||
@@ -43,3 +49,3 @@ <label htmlFor="text-input">Text input</label> | ||
<div> | ||
<button id="button">button</button> | ||
<button type="button" id="button">button</button> | ||
</div> | ||
@@ -46,0 +52,0 @@ </Toggle> |
@@ -13,10 +13,11 @@ import React from 'react'; | ||
handleOnClick() { | ||
this.setState({ isOpen: !this.state.isOpen }); | ||
this.setState(prevState => ({ isOpen: !prevState.isOpen })); | ||
} | ||
render() { | ||
const { isOpen } = this.state; | ||
return ( | ||
<div> | ||
<button id="trigger-toggle" onClick={this.handleOnClick}>Open Toggle</button> | ||
<Toggle id="toggle" isOpen={this.state.isOpen}> | ||
<button type="button" id="trigger-toggle" onClick={this.handleOnClick}>Open Toggle</button> | ||
<Toggle id="toggle" isOpen={isOpen}> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
@@ -23,0 +24,0 @@ </Toggle> |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
87113
52
1729
34
Updatedterra-doc-template@^1.13.0
Updatedterra-icon@^2.20.0