react-simple-toasts
Advanced tools
Comparing version 3.1.2 to 3.1.3
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var hasClass = require('./hasClass.js'); | ||
@@ -13,5 +15,5 @@ | ||
function addClass(element, className) { | ||
if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className); | ||
if (element.classList) element.classList.add(className);else if (!hasClass.default(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className); | ||
} | ||
module.exports = addClass; | ||
exports.default = addClass; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
@@ -14,2 +16,2 @@ * Checks if a given element has a CSS class. | ||
module.exports = hasClass; | ||
exports.default = hasClass; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function replaceClassName(origClass, classToRemove) { | ||
@@ -24,2 +26,2 @@ return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ''); | ||
module.exports = removeClass; | ||
exports.default = removeClass; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var index = require('../../_virtual/index.js'); | ||
@@ -28,2 +30,5 @@ var index$1 = require('../react-is/index.js'); | ||
module.exports = index.exports; | ||
Object.defineProperty(exports, 'default', { | ||
enumerable: true, | ||
get: function () { return index.exports; } | ||
}); |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var config = { | ||
@@ -7,2 +9,2 @@ disabled: false | ||
module.exports = config; | ||
exports.default = config; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var _extends = require('../node_modules/@babel/runtime/helpers/esm/extends.js'); | ||
@@ -17,3 +19,3 @@ var objectWithoutPropertiesLoose = require('../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js'); | ||
return node && classes && classes.split(' ').forEach(function (c) { | ||
return addClass(node, c); | ||
return addClass.default(node, c); | ||
}); | ||
@@ -24,3 +26,3 @@ }; | ||
return node && classes && classes.split(' ').forEach(function (c) { | ||
return removeClass$1(node, c); | ||
return removeClass$1.default(node, c); | ||
}); | ||
@@ -100,3 +102,3 @@ }; | ||
var CSSTransition = /*#__PURE__*/function (_React$Component) { | ||
inheritsLoose(CSSTransition, _React$Component); | ||
inheritsLoose.default(CSSTransition, _React$Component); | ||
@@ -270,5 +272,5 @@ function CSSTransition() { | ||
_this$props.classNames; | ||
var props = objectWithoutPropertiesLoose(_this$props, ["classNames"]); | ||
var props = objectWithoutPropertiesLoose.default(_this$props, ["classNames"]); | ||
return /*#__PURE__*/React.createElement(Transition.default, _extends({}, props, { | ||
return /*#__PURE__*/React.createElement(Transition.default, _extends.default({}, props, { | ||
onEnter: this.onEnter, | ||
@@ -289,3 +291,3 @@ onEntered: this.onEntered, | ||
}; | ||
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, Transition.default.propTypes, { | ||
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends.default({}, Transition.default.propTypes, { | ||
/** | ||
@@ -422,2 +424,2 @@ * The animation classNames applied to the component as it appears, enters, | ||
module.exports = CSSTransition$1; | ||
exports.default = CSSTransition$1; |
@@ -114,3 +114,3 @@ 'use strict'; | ||
var Transition = /*#__PURE__*/function (_React$Component) { | ||
inheritsLoose(Transition, _React$Component); | ||
inheritsLoose.default(Transition, _React$Component); | ||
@@ -269,3 +269,3 @@ function Transition(props, context) { | ||
if (!mounting && !enter || config.disabled) { | ||
if (!mounting && !enter || config.default.disabled) { | ||
this.safeSetState({ | ||
@@ -302,3 +302,3 @@ status: ENTERED | ||
if (!exit || config.disabled) { | ||
if (!exit || config.default.disabled) { | ||
this.safeSetState({ | ||
@@ -410,3 +410,3 @@ status: EXITED | ||
_this$props.nodeRef; | ||
var childProps = objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); | ||
var childProps = objectWithoutPropertiesLoose.default(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); | ||
@@ -416,3 +416,3 @@ return ( | ||
// allows for nested Transitions | ||
React.createElement(TransitionGroupContext.Provider, { | ||
React.createElement(TransitionGroupContext.default.Provider, { | ||
value: null | ||
@@ -426,3 +426,3 @@ }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps)) | ||
Transition.contextType = TransitionGroupContext; | ||
Transition.contextType = TransitionGroupContext.default; | ||
Transition.propTypes = process.env.NODE_ENV !== "production" ? { | ||
@@ -429,0 +429,0 @@ /** |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var objectWithoutPropertiesLoose = require('../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js'); | ||
@@ -41,3 +43,3 @@ var _extends = require('../node_modules/@babel/runtime/helpers/esm/extends.js'); | ||
var TransitionGroup = /*#__PURE__*/function (_React$Component) { | ||
inheritsLoose(TransitionGroup, _React$Component); | ||
inheritsLoose.default(TransitionGroup, _React$Component); | ||
@@ -49,3 +51,3 @@ function TransitionGroup(props, context) { | ||
var handleExited = _this.handleExited.bind(assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear | ||
var handleExited = _this.handleExited.bind(assertThisInitialized.default(_this)); // Initial children should all be entering, dependent on appear | ||
@@ -99,3 +101,3 @@ | ||
this.setState(function (state) { | ||
var children = _extends({}, state.children); | ||
var children = _extends.default({}, state.children); | ||
@@ -114,3 +116,3 @@ delete children[child.key]; | ||
childFactory = _this$props.childFactory, | ||
props = objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]); | ||
props = objectWithoutPropertiesLoose.default(_this$props, ["component", "childFactory"]); | ||
@@ -124,3 +126,3 @@ var contextValue = this.state.contextValue; | ||
if (Component === null) { | ||
return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, { | ||
return /*#__PURE__*/React.createElement(TransitionGroupContext.default.Provider, { | ||
value: contextValue | ||
@@ -130,3 +132,3 @@ }, children); | ||
return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, { | ||
return /*#__PURE__*/React.createElement(TransitionGroupContext.default.Provider, { | ||
value: contextValue | ||
@@ -200,2 +202,2 @@ }, /*#__PURE__*/React.createElement(Component, props, children)); | ||
module.exports = TransitionGroup$1; | ||
exports.default = TransitionGroup$1; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var React = require('react'); | ||
@@ -7,2 +9,2 @@ | ||
module.exports = TransitionGroupContext; | ||
exports.default = TransitionGroupContext; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _assertThisInitialized(self) { | ||
@@ -10,2 +12,2 @@ if (self === void 0) { | ||
module.exports = _assertThisInitialized; | ||
exports.default = _assertThisInitialized; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _extends() { | ||
@@ -18,2 +20,2 @@ _extends = Object.assign ? Object.assign.bind() : function (target) { | ||
module.exports = _extends; | ||
exports.default = _extends; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var setPrototypeOf = require('./setPrototypeOf.js'); | ||
@@ -8,5 +10,5 @@ | ||
subClass.prototype.constructor = subClass; | ||
setPrototypeOf(subClass, superClass); | ||
setPrototypeOf.default(subClass, superClass); | ||
} | ||
module.exports = _inheritsLoose; | ||
exports.default = _inheritsLoose; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
@@ -16,2 +18,2 @@ if (source == null) return {}; | ||
module.exports = _objectWithoutPropertiesLoose; | ||
exports.default = _objectWithoutPropertiesLoose; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _setPrototypeOf(o, p) { | ||
@@ -11,2 +13,2 @@ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
module.exports = _setPrototypeOf; | ||
exports.default = _setPrototypeOf; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function styleInject(css, ref) { | ||
@@ -30,2 +32,2 @@ if ( ref === void 0 ) ref = {}; | ||
module.exports = styleInject; | ||
exports.default = styleInject; |
@@ -5,8 +5,8 @@ 'use strict'; | ||
var styleInject = require('/Users/cmlee/Code/react-simple-toasts/node_modules/style-inject/dist/style-inject.es.js'); | ||
var styleInject_es = require('./node_modules/style-inject/dist/style-inject.es.js'); | ||
var css = "#style_toast_container__o6MeG * {\n box-sizing: border-box;\n}\n.style_toast-list__378gH {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n line-height: 1.5;\n text-align: center;\n}\n.style_toast-list__378gH.style_bottom-left__3rQi7 {\n bottom: 20px;\n left: 30px;\n transform: translateX(0) translateZ(0);\n}\n.style_toast-list__378gH.style_bottom-center__2nLJ3 {\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%) translateZ(0);\n}\n.style_toast-list__378gH.style_bottom-right__2bG3x {\n right: 30px;\n bottom: 20px;\n left: auto;\n transform: translateX(0) translateZ(0);\n}\n.style_toast-list__378gH.style_top-left__3yYnl {\n top: 30px;\n left: 30px;\n transform: translateX(0) translateZ(0);\n}\n.style_toast-list__378gH.style_top-center__MLFiJ {\n top: 30px;\n left: 50%;\n transform: translateX(-50%) translateZ(0);\n}\n.style_toast-list__378gH.style_top-right__21C_h {\n top: 30px;\n right: 30px;\n left: auto;\n transform: translateX(0) translateZ(0);\n}\n.style_toast-message__3rB_q {\n opacity: 0;\n margin-bottom: 10px;\n transition: height 0.3s, opacity 0.3s, transform 0.3s;\n}\n.style_top-left__3yYnl .style_toast-message__3rB_q,\n.style_top-center__MLFiJ .style_toast-message__3rB_q,\n.style_top-right__21C_h .style_toast-message__3rB_q {\n transform: translateY(-10px);\n}\n.style_toast-content__kl8dC {\n display: inline-block;\n overflow: hidden;\n min-width: 290px;\n padding: 12px 22px;\n background: rgba(0, 0, 10, 0.8);\n box-shadow: 1px 2px 5px 1px rgba(0, 0, 0, 0.2);\n border-radius: 40px;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial, sans-serif;\n color: #fff;\n font-size: 16px;\n text-align: center;\n line-height: 1.5;\n vertical-align: top;\n white-space: pre-line;\n}\n.style_clickable__1kaol {\n cursor: pointer;\n}\n.style_toast-message__3rB_q.toast-enter,\n.style_toast-message__3rB_q.toast-appear {\n height: 0;\n}\n.style_toast-message__3rB_q.toast-enter-active,\n.style_toast-message__3rB_q.toast-appear-active {\n opacity: 1;\n transform: translateY(0px);\n}\n.style_toast-message__3rB_q.toast-enter-done,\n.style_toast-message__3rB_q.toast-appear-done {\n opacity: 1;\n transform: translateY(0px);\n}\n.style_toast-message__3rB_q.toast-exit-active {\n transform: translateY(-10px);\n}\n"; | ||
var styles = {"toast_container":"style_toast_container__o6MeG","toast-list":"style_toast-list__378gH","bottom-left":"style_bottom-left__3rQi7","bottom-center":"style_bottom-center__2nLJ3","bottom-right":"style_bottom-right__2bG3x","top-left":"style_top-left__3yYnl","top-center":"style_top-center__MLFiJ","top-right":"style_top-right__21C_h","toast-message":"style_toast-message__3rB_q","toast-content":"style_toast-content__kl8dC","clickable":"style_clickable__1kaol"}; | ||
styleInject(css); | ||
styleInject_es.default(css); | ||
exports.default = styles; |
{ | ||
"name": "react-simple-toasts", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Simple toast popup for React", | ||
@@ -5,0 +5,0 @@ "author": "almond-bongbong", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
644886
7987
53