Skip to content

Commit

Permalink
release 1.0.7 fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
yjose committed Apr 13, 2018
1 parent ee95b75 commit 028ac2d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactjs-popup",
"version": "1.0.6",
"version": "1.0.7",
"description": "React Popup Component - Modals,Tooltips and Menus —  All in one",
"main": "reactjs-popup.es.js",
"module": "reactjs-popup.es.js",
Expand Down
12 changes: 7 additions & 5 deletions lib/reactjs-popup.cjs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* reactjs-popup v1.0.6
* reactjs-popup v1.0.7
* (c) 2018-present Youssouf EL AZIZI <[email protected]>
* Released under the MIT License.
*/
Expand Down Expand Up @@ -423,11 +423,13 @@ class Popup extends React.PureComponent {
render() {
const {
overlayStyle,
closeOnDocumentClick
closeOnDocumentClick,
on
} = this.props;
const {
modal
} = this.state;
const overlay = this.state.isOpen && !on.includes("hover") && closeOnDocumentClick;
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip;
return [this.state.isOpen && React.createElement("div", {
key: "H",
Expand All @@ -437,11 +439,11 @@ class Popup extends React.PureComponent {
left: "0px"
},
ref: this.setHelperRef
}), this.state.isOpen && React.createElement("div", {
}), overlay && React.createElement("div", {
key: "O",
className: "popup-overlay",
style: Object.assign({}, ovStyle, overlayStyle),
onClick: closeOnDocumentClick ? this.closePopup : undefined
onClick: this.closePopup
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, {
innerRef: this.setTriggerRef,
key: "R"
Expand All @@ -460,7 +462,7 @@ Object.defineProperty(Popup, "defaultProps", {
onClose: () => {},
defaultOpen: false,
open: false,
closeOnDocumentClick: false,
closeOnDocumentClick: true,
closeOnEscape: true,
on: ["click"],
contentStyle: {},
Expand Down
12 changes: 7 additions & 5 deletions lib/reactjs-popup.es.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* reactjs-popup v1.0.6
* reactjs-popup v1.0.7
* (c) 2018-present Youssouf EL AZIZI <[email protected]>
* Released under the MIT License.
*/
Expand Down Expand Up @@ -419,11 +419,13 @@ class Popup extends React.PureComponent {
render() {
const {
overlayStyle,
closeOnDocumentClick
closeOnDocumentClick,
on
} = this.props;
const {
modal
} = this.state;
const overlay = this.state.isOpen && !on.includes("hover") && closeOnDocumentClick;
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip;
return [this.state.isOpen && React.createElement("div", {
key: "H",
Expand All @@ -433,11 +435,11 @@ class Popup extends React.PureComponent {
left: "0px"
},
ref: this.setHelperRef
}), this.state.isOpen && React.createElement("div", {
}), overlay && React.createElement("div", {
key: "O",
className: "popup-overlay",
style: Object.assign({}, ovStyle, overlayStyle),
onClick: closeOnDocumentClick ? this.closePopup : undefined
onClick: this.closePopup
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, {
innerRef: this.setTriggerRef,
key: "R"
Expand All @@ -456,7 +458,7 @@ Object.defineProperty(Popup, "defaultProps", {
onClose: () => {},
defaultOpen: false,
open: false,
closeOnDocumentClick: false,
closeOnDocumentClick: true,
closeOnEscape: true,
on: ["click"],
contentStyle: {},
Expand Down
12 changes: 7 additions & 5 deletions lib/reactjs-popup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* reactjs-popup v1.0.6
* reactjs-popup v1.0.7
* (c) 2018-present Youssouf EL AZIZI <[email protected]>
* Released under the MIT License.
*/
Expand Down Expand Up @@ -424,11 +424,13 @@
render() {
const {
overlayStyle,
closeOnDocumentClick
closeOnDocumentClick,
on
} = this.props;
const {
modal
} = this.state;
const overlay = this.state.isOpen && !on.includes("hover") && closeOnDocumentClick;
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip;
return [this.state.isOpen && React.createElement("div", {
key: "H",
Expand All @@ -438,11 +440,11 @@
left: "0px"
},
ref: this.setHelperRef
}), this.state.isOpen && React.createElement("div", {
}), overlay && React.createElement("div", {
key: "O",
className: "popup-overlay",
style: Object.assign({}, ovStyle, overlayStyle),
onClick: closeOnDocumentClick ? this.closePopup : undefined
onClick: this.closePopup
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, {
innerRef: this.setTriggerRef,
key: "R"
Expand All @@ -461,7 +463,7 @@
onClose: () => {},
defaultOpen: false,
open: false,
closeOnDocumentClick: false,
closeOnDocumentClick: true,
closeOnEscape: true,
on: ["click"],
contentStyle: {},
Expand Down
4 changes: 2 additions & 2 deletions lib/reactjs-popup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/reactjs-popup.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactjs-popup",
"version": "1.0.6",
"version": "1.0.7",
"description":
"React Popup Component - Modals,Tooltips and Menus —  All in one",
"main": "reactjs-popup.es.js",
Expand Down

0 comments on commit 028ac2d

Please sign in to comment.