Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-dialog

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-dialog - npm Package Compare versions

Comparing version 4.1.2 to 4.1.3

33

lib/Dialog.js

@@ -60,2 +60,3 @@ 'use strict';

var dialogDomNode, maskNode;
var transitionName, maskTransitionName;
if (props.visible) {

@@ -68,10 +69,18 @@ this.monitorWindowResize();

dialogDomNode = React.findDOMNode(this.refs.dialog);
if (props.animation) {
transitionName = props.transitionName;
if (!transitionName && props.animation) {
transitionName = prefixClsFn(props.prefixCls, props.animation + '-enter');
}
if (transitionName) {
// dialogDomNode.style.visibility = 'hidden';
anim(dialogDomNode, prefixClsFn(props.prefixCls, props.animation + '-enter'));
anim(dialogDomNode, transitionName);
// dialogDomNode.style.visibility = '';
}
if (props.maskAnimation) {
maskTransitionName = props.maskTransitionName;
if (!maskTransitionName && props.maskAnimation) {
maskTransitionName = prefixClsFn(props.prefixCls, props.maskAnimation + '-enter');
}
if (maskTransitionName) {
maskNode = React.findDOMNode(this.refs.mask);
anim(maskNode, prefixClsFn(props.prefixCls, props.maskAnimation + '-enter'));
anim(maskNode, maskTransitionName);
}

@@ -85,8 +94,16 @@ dialogDomNode.focus();

dialogDomNode = React.findDOMNode(this.refs.dialog);
if (props.animation) {
anim(dialogDomNode, prefixClsFn(props.prefixCls, props.animation + '-leave'));
transitionName = props.transitionName;
if (!transitionName && props.animation) {
transitionName = prefixClsFn(props.prefixCls, props.animation + '-leave');
}
if (props.maskAnimation) {
if (transitionName) {
anim(dialogDomNode, transitionName);
}
maskTransitionName = props.maskTransitionName;
if (!maskTransitionName && props.maskAnimation) {
maskTransitionName = prefixClsFn(props.prefixCls, props.maskAnimation + '-leave');
}
if (maskTransitionName) {
maskNode = React.findDOMNode(this.refs.mask);
anim(maskNode, prefixClsFn(props.prefixCls, props.maskAnimation + '-leave'));
anim(maskNode, maskTransitionName);
}

@@ -93,0 +110,0 @@ }

@@ -104,3 +104,3 @@ 'use strict';

var props = this.props;
var dialogProps = copy(props, ['className', 'closable', 'align', 'title', 'footer', 'animation', 'maskAnimation', 'prefixCls', 'style', 'width', 'height', 'zIndex']);
var dialogProps = copy(props, ['className', 'closable', 'align', 'title', 'footer', 'animation', 'transitionName', 'maskAnimation', 'maskTransitionName', 'prefixCls', 'style', 'width', 'height', 'zIndex']);
var dialogElement = React.createElement(

@@ -107,0 +107,0 @@ Dialog,

{
"name": "rc-dialog",
"version": "4.1.2",
"version": "4.1.3",
"description": "dialog ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

@@ -68,2 +68,8 @@ # rc-dialog

#### transitionName
* dialog animation css class name
#### maskTransitionName
* dialog's mask animation css class name
#### title

@@ -70,0 +76,0 @@ * Title of the dialog

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc