-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from yjose/v1.3.0
V1.3.0
- Loading branch information
Showing
12 changed files
with
46 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* reactjs-popup v1.2.0 | ||
* reactjs-popup v1.3.0 | ||
* (c) 2018-present Youssouf EL AZIZI <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -384,7 +384,8 @@ function (_React$PureComponent) { | |
position = _this$props.position, | ||
offsetX = _this$props.offsetX, | ||
offsetY = _this$props.offsetY, | ||
keepTooltipInside = _this$props.keepTooltipInside; | ||
keepTooltipInside = _this$props.keepTooltipInside, | ||
arrowStyle = _this$props.arrowStyle; | ||
var modal = _this.state.modal; | ||
if (modal) return; | ||
|
||
|
@@ -410,8 +411,8 @@ function (_React$PureComponent) { | |
_this.ArrowEl.style["transform"] = cords.transform; | ||
_this.ArrowEl.style["-ms-transform"] = cords.transform; | ||
_this.ArrowEl.style["-webkit-transform"] = cords.transform; | ||
_this.ArrowEl.style.top = cords.arrowTop; | ||
_this.ArrowEl.style.left = cords.arrowLeft; | ||
_this.ArrowEl.style.top = arrowStyle.top || cords.arrowTop; | ||
_this.ArrowEl.style.left = arrowStyle.left || cords.arrowLeft; | ||
} | ||
|
||
if (window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "static" || window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "") _this.TriggerEl.style.position = "relative"; | ||
|
@@ -455,6 +456,7 @@ function (_React$PureComponent) { | |
case "hover": | ||
triggerProps.onMouseEnter = _this.onMouseEnter; | ||
triggerProps.onMouseLeave = _this.onMouseLeave; | ||
break; | ||
|
||
case "focus": | ||
triggerProps.onFocus = _this.onMouseEnter; | ||
|
@@ -535,7 +537,10 @@ function (_React$PureComponent) { | |
var modal = this.state.modal; | ||
var overlay = this.state.isOpen && !(on.indexOf("hover") >= 0); | ||
var ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; | ||
return [this.state.isOpen && React.createElement("div", { | ||
return [!!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
}, this.renderTrigger()), this.state.isOpen && React.createElement("div", { | ||
key: "H", | ||
style: { | ||
position: "absolute", | ||
|
@@ -548,10 +553,7 @@ function (_React$PureComponent) { | |
className: "popup-overlay", | ||
style: Object.assign({}, ovStyle, overlayStyle), | ||
onClick: closeOnDocumentClick ? this.closePopup : undefined | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
}, this.renderTrigger())]; | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent()]; | ||
} | ||
}]); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* reactjs-popup v1.2.0 | ||
* reactjs-popup v1.3.0 | ||
* (c) 2018-present Youssouf EL AZIZI <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -380,7 +380,8 @@ function (_React$PureComponent) { | |
position = _this$props.position, | ||
offsetX = _this$props.offsetX, | ||
offsetY = _this$props.offsetY, | ||
keepTooltipInside = _this$props.keepTooltipInside; | ||
keepTooltipInside = _this$props.keepTooltipInside, | ||
arrowStyle = _this$props.arrowStyle; | ||
var modal = _this.state.modal; | ||
if (modal) return; | ||
|
||
|
@@ -406,8 +407,8 @@ function (_React$PureComponent) { | |
_this.ArrowEl.style["transform"] = cords.transform; | ||
_this.ArrowEl.style["-ms-transform"] = cords.transform; | ||
_this.ArrowEl.style["-webkit-transform"] = cords.transform; | ||
_this.ArrowEl.style.top = cords.arrowTop; | ||
_this.ArrowEl.style.left = cords.arrowLeft; | ||
_this.ArrowEl.style.top = arrowStyle.top || cords.arrowTop; | ||
_this.ArrowEl.style.left = arrowStyle.left || cords.arrowLeft; | ||
} | ||
|
||
if (window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "static" || window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "") _this.TriggerEl.style.position = "relative"; | ||
|
@@ -451,6 +452,7 @@ function (_React$PureComponent) { | |
case "hover": | ||
triggerProps.onMouseEnter = _this.onMouseEnter; | ||
triggerProps.onMouseLeave = _this.onMouseLeave; | ||
break; | ||
|
||
case "focus": | ||
triggerProps.onFocus = _this.onMouseEnter; | ||
|
@@ -531,7 +533,10 @@ function (_React$PureComponent) { | |
var modal = this.state.modal; | ||
var overlay = this.state.isOpen && !(on.indexOf("hover") >= 0); | ||
var ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; | ||
return [this.state.isOpen && React.createElement("div", { | ||
return [!!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
}, this.renderTrigger()), this.state.isOpen && React.createElement("div", { | ||
key: "H", | ||
style: { | ||
position: "absolute", | ||
|
@@ -544,10 +549,7 @@ function (_React$PureComponent) { | |
className: "popup-overlay", | ||
style: Object.assign({}, ovStyle, overlayStyle), | ||
onClick: closeOnDocumentClick ? this.closePopup : undefined | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
}, this.renderTrigger())]; | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent()]; | ||
} | ||
}]); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* reactjs-popup v1.2.0 | ||
* reactjs-popup v1.3.0 | ||
* (c) 2018-present Youssouf EL AZIZI <[email protected]> | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -385,7 +385,8 @@ | |
position = _this$props.position, | ||
offsetX = _this$props.offsetX, | ||
offsetY = _this$props.offsetY, | ||
keepTooltipInside = _this$props.keepTooltipInside; | ||
keepTooltipInside = _this$props.keepTooltipInside, | ||
arrowStyle = _this$props.arrowStyle; | ||
var modal = _this.state.modal; | ||
if (modal) return; | ||
|
||
|
@@ -411,8 +412,8 @@ | |
_this.ArrowEl.style["transform"] = cords.transform; | ||
_this.ArrowEl.style["-ms-transform"] = cords.transform; | ||
_this.ArrowEl.style["-webkit-transform"] = cords.transform; | ||
_this.ArrowEl.style.top = cords.arrowTop; | ||
_this.ArrowEl.style.left = cords.arrowLeft; | ||
_this.ArrowEl.style.top = arrowStyle.top || cords.arrowTop; | ||
_this.ArrowEl.style.left = arrowStyle.left || cords.arrowLeft; | ||
} | ||
|
||
if (window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "static" || window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "") _this.TriggerEl.style.position = "relative"; | ||
|
@@ -456,6 +457,7 @@ | |
case "hover": | ||
triggerProps.onMouseEnter = _this.onMouseEnter; | ||
triggerProps.onMouseLeave = _this.onMouseLeave; | ||
break; | ||
|
||
case "focus": | ||
triggerProps.onFocus = _this.onMouseEnter; | ||
|
@@ -536,7 +538,10 @@ | |
var modal = this.state.modal; | ||
var overlay = this.state.isOpen && !(on.indexOf("hover") >= 0); | ||
var ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; | ||
return [this.state.isOpen && React.createElement("div", { | ||
return [!!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
}, this.renderTrigger()), this.state.isOpen && React.createElement("div", { | ||
key: "H", | ||
style: { | ||
position: "absolute", | ||
|
@@ -549,10 +554,7 @@ | |
className: "popup-overlay", | ||
style: Object.assign({}, ovStyle, overlayStyle), | ||
onClick: closeOnDocumentClick ? this.closePopup : undefined | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && React.createElement(Ref, { | ||
innerRef: this.setTriggerRef, | ||
key: "R" | ||
}, this.renderTrigger())]; | ||
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent()]; | ||
} | ||
}]); | ||
|
||
|
Oops, something went wrong.