Latest updates from IceHrmPro
This commit is contained in:
1 parent
60c92d7935
commit
7453a58aad
18012 files changed
+2089245
-10173
No files matched your search
+87
@@ -0,0 +1,87 @@
|
||||
# History
|
||||
----
|
||||
|
||||
## 7.4.0 / 2019-05-10
|
||||
|
||||
- Update accessibility.
|
||||
|
||||
## 7.3.0 / 2018-12-06
|
||||
|
||||
- Support `forceRender` for dialog.
|
||||
|
||||
## 7.2.0 / 2018-07-30
|
||||
|
||||
- Add closeIcon. [#89](*https://github.com/react-component/dialog/pull/89) [@HeskeyBaozi ](https://github.com/HeskeyBaozi)
|
||||
|
||||
## 7.1.0 / 2017-12-28
|
||||
|
||||
- Add destroyOnClose. [#72](https://github.com/react-component/dialog/pull/72) [@Rohanhacker](https://github.com/Rohanhacker)
|
||||
|
||||
## 7.0.0 / 2017-11-02
|
||||
|
||||
|
||||
- Remove ReactNative support, please use https://github.com/react-component/m-dialog instead.
|
||||
- Support React 16.
|
||||
|
||||
Notable change: Close animation won't trigger when dialog unmounting after React 16, see [facebook/react#10826](https://github.com/facebook/react/issues/10826)
|
||||
|
||||
## 6.5.11 / 2017-8-21
|
||||
|
||||
- fixed: RN modal support landscape orientation, https://github.com/react-component/dialog/pull/64
|
||||
|
||||
## 6.5.0 / 2016-10-25
|
||||
|
||||
- remove rc-dialog/lib/Modal's entry prop, add animationType prop
|
||||
|
||||
## 6.4.0 / 2016-09-19
|
||||
|
||||
- add rc-dialog/lib/Modal to support react-native
|
||||
|
||||
## 6.2.0 / 2016-07-18
|
||||
|
||||
- use getContainerRenderMixin from 'rc-util'
|
||||
|
||||
## 6.0.0 / 2016-03-18
|
||||
|
||||
- new html structure and class
|
||||
- disable window scroll when show
|
||||
|
||||
## 5.4.0 / 2016-02-27
|
||||
|
||||
- add maskClosable
|
||||
|
||||
## 5.3.0 / 2015-11-23
|
||||
|
||||
- separate close and header
|
||||
|
||||
## 5.1.0 / 2015-10-20
|
||||
|
||||
- only support react 0.14
|
||||
|
||||
## 5.0.0 / 2015-08-17
|
||||
|
||||
- refactor to clean api. remove onShow onBeforeClose
|
||||
|
||||
## 4.5.0 / 2015-07-23
|
||||
|
||||
use rc-animate & rc-align
|
||||
|
||||
## 4.4.0 / 2015-07-03
|
||||
|
||||
support esc to close
|
||||
|
||||
## 4.2.0 / 2015-06-09
|
||||
|
||||
add renderToBody props
|
||||
|
||||
## 4.0.0 / 2015-04-28
|
||||
|
||||
make dialog render to body and use [dom-align](https://github.com/yiminghe/dom-align) to align
|
||||
|
||||
## 3.0.0 / 2015-03-17
|
||||
|
||||
support es6 and react 0.13
|
||||
|
||||
## 2.1.0 / 2015-03-05
|
||||
|
||||
`new` [#3](https://github.com/react-component/dialog/issues/3) support closable requestClose onBeforeClose
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present yiminghe
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
# rc-dialog
|
||||
---
|
||||
|
||||
react dialog component
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
[![gemnasium deps][gemnasium-image]][gemnasium-url]
|
||||
[![npm download][download-image]][download-url]
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/rc-dialog.svg?style=flat-square
|
||||
[npm-url]: http://npmjs.org/package/rc-dialog
|
||||
[travis-image]: https://img.shields.io/travis/react-component/dialog.svg?style=flat-square
|
||||
[travis-url]: https://travis-ci.org/react-component/dialog
|
||||
[coveralls-image]: https://img.shields.io/coveralls/react-component/dialog.svg?style=flat-square
|
||||
[coveralls-url]: https://coveralls.io/r/react-component/dialog?branch=master
|
||||
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/dialog.svg?style=flat-square
|
||||
[gemnasium-url]: https://gemnasium.com/react-component/dialog
|
||||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
|
||||
[node-url]: http://nodejs.org/download/
|
||||
[download-image]: https://img.shields.io/npm/dm/rc-dialog.svg?style=flat-square
|
||||
[download-url]: https://npmjs.org/package/rc-dialog
|
||||
|
||||
## Screenshot
|
||||
|
||||
<img src="http://gtms04.alicdn.com/tps/i4/TB1dp5lHXXXXXbmXpXXyVug.FXX-664-480.png" />
|
||||
|
||||
## Install
|
||||
|
||||
[](https://npmjs.org/package/rc-dialog)
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var Dialog = require('rc-dialog');
|
||||
|
||||
ReactDOM.render(
|
||||
<Dialog title={title} onClose={callback1} visible>
|
||||
<p>first dialog</p>
|
||||
</Dialog>
|
||||
), document.getElementById('t1'));
|
||||
|
||||
// use dialog
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### rc-dialog
|
||||
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">name</th>
|
||||
<th style="width: 50px;">type</th>
|
||||
<th>default</th>
|
||||
<th>description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>prefixCls</td>
|
||||
<td>String</td>
|
||||
<td>rc-dialog</td>
|
||||
<td>The dialog dom node's prefixCls</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>className</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>additional className for dialog</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>wrapClassName</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>additional className for dialog wrap</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>style</td>
|
||||
<td>Object</td>
|
||||
<td>{}</td>
|
||||
<td>Root style for dialog element.Such as width, height</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zIndex</td>
|
||||
<td>Number</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bodyStyle</td>
|
||||
<td>Object</td>
|
||||
<td>{}</td>
|
||||
<td>body style for dialog body element.Such as height</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maskStyle</td>
|
||||
<td>Object</td>
|
||||
<td>{}</td>
|
||||
<td>style for mask element.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>visible</td>
|
||||
<td>Boolean</td>
|
||||
<td>false</td>
|
||||
<td>current dialog's visible status</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>animation</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>part of dialog animation css class name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maskAnimation</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>part of dialog's mask animation css class name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>transitionName</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>dialog animation css class name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maskTransitionName</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>mask animation css class name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
<td>String|React.Element</td>
|
||||
<td></td>
|
||||
<td>Title of the dialog</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>footer</td>
|
||||
<td>React.Element</td>
|
||||
<td></td>
|
||||
<td>footer of the dialog</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>closable</td>
|
||||
<td>Boolean</td>
|
||||
<td>true</td>
|
||||
<td>whether show close button</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mask</td>
|
||||
<td>Boolean</td>
|
||||
<td>true</td>
|
||||
<td>whether show mask</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maskClosable</td>
|
||||
<td>Boolean</td>
|
||||
<td>true</td>
|
||||
<td>whether click mask to close</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>keyboard</td>
|
||||
<td>Boolean</td>
|
||||
<td>true</td>
|
||||
<td>whether support press esc to close</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mousePosition</td>
|
||||
<td>{x:number,y:number}</td>
|
||||
<td></td>
|
||||
<td>set pageX and pageY of current mouse(it will cause transform origin to be set).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onClose</td>
|
||||
<td>function()</td>
|
||||
<td></td>
|
||||
<td>called when click close button or mask</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>afterClose</td>
|
||||
<td>function()</td>
|
||||
<td></td>
|
||||
<td>called when close animation end</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>getContainer</td>
|
||||
<td>function(): HTMLElement</td>
|
||||
<td></td>
|
||||
<td>to determine where Dialog will be mounted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>destroyOnClose</td>
|
||||
<td>Boolean</td>
|
||||
<td>false</td>
|
||||
<td>to unmount child compenents on onClose</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>closeIcon</td>
|
||||
<td>ReactNode</td>
|
||||
<td></td>
|
||||
<td>specific the close icon.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>forceRender</td>
|
||||
<td>Boolean</td>
|
||||
<td>false</td>
|
||||
<td>Create dialog dom node before dialog first show </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>focusTriggerAfterClose</td>
|
||||
<td>Boolean</td>
|
||||
<td>true</td>
|
||||
<td>focus trigger element when dialog closed</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Development
|
||||
|
||||
```
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
http://localhost:8007/examples/
|
||||
|
||||
online example: http://react-component.github.io/dialog/
|
||||
|
||||
## Test Case
|
||||
|
||||
```
|
||||
npm test
|
||||
npm run chrome-test
|
||||
```
|
||||
|
||||
## Coverage
|
||||
|
||||
```
|
||||
npm run coverage
|
||||
```
|
||||
|
||||
open coverage/ dir
|
||||
|
||||
|
||||
## License
|
||||
|
||||
rc-dialog is released under the MIT license.
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
.rc-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
.rc-dialog-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-header {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.rc-dialog-close {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-close-x:after {
|
||||
content: '×';
|
||||
}
|
||||
.rc-dialog-close:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-title {
|
||||
margin: 0;
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
.rc-dialog-body {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
}
|
||||
.rc-dialog-footer {
|
||||
padding: 15px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.rc-dialog-footer .btn + .btn {
|
||||
margin-left: 5px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.rc-dialog-footer .btn-group .btn + .btn {
|
||||
margin-left: -1px;
|
||||
}
|
||||
.rc-dialog-footer .btn-block + .btn-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.rc-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
.rc-dialog-slide-fade-enter,
|
||||
.rc-dialog-slide-fade-appear {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
.rc-dialog-slide-fade-enter,
|
||||
.rc-dialog-slide-fade-appear,
|
||||
.rc-dialog-slide-fade-leave {
|
||||
animation-duration: .3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: ease-out;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-slide-fade-enter.rc-dialog-slide-fade-enter-active,
|
||||
.rc-dialog-slide-fade-appear.rc-dialog-slide-fade-appear-active {
|
||||
animation-name: rcDialogSlideFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-slide-fade-leave.rc-dialog-slide-fade-leave-active {
|
||||
animation-name: rcDialogSlideFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogSlideFadeIn {
|
||||
0% {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogSlideFadeOut {
|
||||
0% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
}
|
||||
.rc-dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1050;
|
||||
}
|
||||
.rc-dialog-mask-hidden {
|
||||
display: none;
|
||||
}
|
||||
.rc-dialog-fade-enter,
|
||||
.rc-dialog-fade-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-enter.rc-dialog-fade-enter-active,
|
||||
.rc-dialog-fade-appear.rc-dialog-fade-appear-active {
|
||||
animation-name: rcDialogFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-fade-leave.rc-dialog-fade-leave-active {
|
||||
animation-name: rcDialogFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogFadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogFadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
.rc-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
.rc-dialog-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-title {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
position: relative;
|
||||
background-color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.rc-dialog-close {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-close-x:after {
|
||||
content: '×';
|
||||
}
|
||||
.rc-dialog-close:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-header {
|
||||
padding: 13px 20px 14px 20px;
|
||||
border-radius: 5px 5px 0 0;
|
||||
background: #fff;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
.rc-dialog-body {
|
||||
padding: 20px;
|
||||
}
|
||||
.rc-dialog-footer {
|
||||
border-top: 1px solid #e9e9e9;
|
||||
padding: 10px 20px;
|
||||
text-align: right;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.rc-dialog-zoom-enter,
|
||||
.rc-dialog-zoom-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-zoom-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-zoom-enter.rc-dialog-zoom-enter-active,
|
||||
.rc-dialog-zoom-appear.rc-dialog-zoom-appear-active {
|
||||
animation-name: rcDialogZoomIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-zoom-leave.rc-dialog-zoom-leave-active {
|
||||
animation-name: rcDialogZoomOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogZoomIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogZoomOut {
|
||||
0% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.rc-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
}
|
||||
.rc-dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1050;
|
||||
}
|
||||
.rc-dialog-mask-hidden {
|
||||
display: none;
|
||||
}
|
||||
.rc-dialog-fade-enter,
|
||||
.rc-dialog-fade-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-enter.rc-dialog-fade-enter-active,
|
||||
.rc-dialog-fade-appear.rc-dialog-fade-appear-active {
|
||||
animation-name: rcDialogFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-fade-leave.rc-dialog-fade-leave-active {
|
||||
animation-name: rcDialogFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogFadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogFadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
.rc-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
.rc-dialog-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-header {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.rc-dialog-close {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-close-x:after {
|
||||
content: '\D7';
|
||||
}
|
||||
.rc-dialog-close:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-title {
|
||||
margin: 0;
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
.rc-dialog-body {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
}
|
||||
.rc-dialog-footer {
|
||||
padding: 15px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.rc-dialog-footer .btn + .btn {
|
||||
margin-left: 5px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.rc-dialog-footer .btn-group .btn + .btn {
|
||||
margin-left: -1px;
|
||||
}
|
||||
.rc-dialog-footer .btn-block + .btn-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.rc-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
.rc-dialog-slide-fade-enter,
|
||||
.rc-dialog-slide-fade-appear {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
.rc-dialog-slide-fade-enter,
|
||||
.rc-dialog-slide-fade-appear,
|
||||
.rc-dialog-slide-fade-leave {
|
||||
animation-duration: .3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: ease-out;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-slide-fade-enter.rc-dialog-slide-fade-enter-active,
|
||||
.rc-dialog-slide-fade-appear.rc-dialog-slide-fade-appear-active {
|
||||
animation-name: rcDialogSlideFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-slide-fade-leave.rc-dialog-slide-fade-leave-active {
|
||||
animation-name: rcDialogSlideFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogSlideFadeIn {
|
||||
0% {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogSlideFadeOut {
|
||||
0% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
}
|
||||
.rc-dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1050;
|
||||
}
|
||||
.rc-dialog-mask-hidden {
|
||||
display: none;
|
||||
}
|
||||
.rc-dialog-fade-enter,
|
||||
.rc-dialog-fade-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-enter.rc-dialog-fade-enter-active,
|
||||
.rc-dialog-fade-appear.rc-dialog-fade-appear-active {
|
||||
animation-name: rcDialogFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-fade-leave.rc-dialog-fade-leave-active {
|
||||
animation-name: rcDialogFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogFadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogFadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=rc-dialog-bootstrap.css.map*/
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///./assets/bootstrap/Dialog.less","webpack:///./assets/bootstrap.less","webpack:///./assets/bootstrap/effect.less","webpack:///./assets/index/Mask.less"],"names":[],"mappings":"AAaA;EAkBE;EACA;EACA;CC7BD;ADWC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAIA;CCZH;ADqBC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;CCpBH;ADyBC;EACE;EACA;CCvBH;AD2BC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCzBH;AD2BG;EACE;CCzBL;AD4BG;EACE;EACA;EACA;CC1BL;AD+BC;EACE;EACA;CC7BH;ADkCC;EACE;EACA;CChCH;ADoCC;EACE;EACA;EACA;CClCH;AD+BC;EAQI;EACA;CCpCL;AD2BC;EAaI;CCrCL;ADwBC;EAiBI;CCtCL;AD4CD;EACE;IAEE;IACA;GC3CD;ED6CC;IACE;GC3CH;CACF;ACpFC;;EAEE;CDsFH;ACnFC;;;EAGE;EACA;EACA;EACA;CDqFH;AClFC;;EACE;EACA;CDqFH;AClFC;EACE;EACA;CDoFH;ACjFC;EACE;IACE;GDmFH;ECjFC;IACE;GDmFH;CACF;ACjFC;EACE;IACE;GDmFH;ECjFC;IACE;GDmFH;CACF;AEzHC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CF2HH;AEzHG;EACE;CF2HL;AEjHC;;EACE;EANA;EACA;EACA;EAMA;CFsHH;AEnHC;EAXE;EACA;EACA;EAWA;CFuHH;AEpHC;;EACE;EACA;CFuHH;AEpHC;EACE;EACA;CFsHH;AEnHC;EACE;IACE;GFqHH;EEnHC;IACE;GFqHH;CACF;AElHC;EACE;IACE;GFoHH;EElHC;IACE;GFoHH;CACF","file":"rc-dialog-bootstrap.css","sourcesContent":["@import \"./variables.less\";\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n\n.@{prefixCls} {\n // Container that the rc-dialog scrolls within\n &-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n }\n\n // Shell div to position the rc-dialog with bottom padding\n position: relative;\n width: auto;\n margin: 10px;\n\n // Actual rc-dialog\n &-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n background-clip: padding-box;\n // Remove focus outline from opened rc-dialog\n outline: 0;\n }\n\n // Modal header\n // Top section of the rc-dialog w/ title and dismiss\n &-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n }\n\n &-close {\n cursor: pointer;\n border: 0;\n background: transparent;\n font-size: 21px;\n position: absolute;\n right: 20px;\n top: 12px;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n text-decoration: none;\n\n &-x:after {\n content: '×'\n }\n\n &:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n text-decoration: none;\n }\n }\n\n // Title text within header\n &-title {\n margin: 0;\n line-height: @modal-title-line-height;\n }\n\n // Modal body\n // Where all rc-dialog content resides (sibling of &-header and &-footer)\n &-body {\n position: relative;\n padding: @modal-inner-padding;\n }\n\n // Footer (for actions)\n &-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n }\n}\n\n// Scale up the rc-dialog\n@media (min-width: @screen-sm-min) {\n .@{prefixCls} {\n // Automatically set rc-dialog's width for larger viewports\n width: @modal-md;\n margin: 30px auto;\n\n &-content {\n box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n }\n }\n}\n\n@import \"./effect.less\";\n\n\n\n// WEBPACK FOOTER //\n// ./assets/bootstrap/Dialog.less",".rc-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.rc-dialog-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.rc-dialog-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.rc-dialog-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;Line truncated
|
||||
+6235
File diff suppressed because it is too large.
Load diff
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap a3b71505de7774dd341a","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_global.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_core.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_descriptors.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-dp.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_has.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_export.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_hide.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_is-object.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-iobject.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_wks.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_an-object.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_fails.js","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}","webpack:///./node_modules/_prop-types@15.7.2@prop-types/index.js","webpack:///./node_modules/_process@0.11.10@process/browser.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_property-desc.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-keys.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_library.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_uid.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-pie.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/classCallCheck.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/inherits.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-primitive.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_defined.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-integer.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_shared-key.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_shared.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_enum-bug-keys.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-gops.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-object.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_iterators.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-create.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_set-to-string-tag.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_wks-ext.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_wks-define.js","webpack:///./node_modules/_prop-types@15.7.2@prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_ctx.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_dom-create.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-keys-internal.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_iobject.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_cof.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_iter-define.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_redefine.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-gopn.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-gopd.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/define-property.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/createClass.js","webpack:///./node_modules/_react-is@16.13.1@react-is/index.js","webpack:///./node_modules/_component-indexof@0.0.3@component-indexof/index.js","webpack:///./node_modules/_rc-animate@2.10.3@rc-animate/es/util/animate.js","webpack:///./node_modules/_rc-util@4.20.1@rc-util/es/setStyle.js","webpack:///./index.js","webpack:///./src/DialogWrap.tsx","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/assign.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/fn/object/assign.js","webpack:///.Line truncated
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
.rc-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
.rc-dialog-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-header {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.rc-dialog-close {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-close-x:after {
|
||||
content: '\D7';
|
||||
}
|
||||
.rc-dialog-close:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-title {
|
||||
margin: 0;
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
.rc-dialog-body {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
}
|
||||
.rc-dialog-footer {
|
||||
padding: 15px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.rc-dialog-footer .btn + .btn {
|
||||
margin-left: 5px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.rc-dialog-footer .btn-group .btn + .btn {
|
||||
margin-left: -1px;
|
||||
}
|
||||
.rc-dialog-footer .btn-block + .btn-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.rc-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
.rc-dialog-slide-fade-enter,
|
||||
.rc-dialog-slide-fade-appear {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
.rc-dialog-slide-fade-enter,
|
||||
.rc-dialog-slide-fade-appear,
|
||||
.rc-dialog-slide-fade-leave {
|
||||
animation-duration: .3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: ease-out;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-slide-fade-enter.rc-dialog-slide-fade-enter-active,
|
||||
.rc-dialog-slide-fade-appear.rc-dialog-slide-fade-appear-active {
|
||||
animation-name: rcDialogSlideFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-slide-fade-leave.rc-dialog-slide-fade-leave-active {
|
||||
animation-name: rcDialogSlideFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogSlideFadeIn {
|
||||
0% {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogSlideFadeOut {
|
||||
0% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, -25%);
|
||||
}
|
||||
}
|
||||
.rc-dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1050;
|
||||
}
|
||||
.rc-dialog-mask-hidden {
|
||||
display: none;
|
||||
}
|
||||
.rc-dialog-fade-enter,
|
||||
.rc-dialog-fade-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-enter.rc-dialog-fade-enter-active,
|
||||
.rc-dialog-fade-appear.rc-dialog-fade-appear-active {
|
||||
animation-name: rcDialogFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-fade-leave.rc-dialog-fade-leave-active {
|
||||
animation-name: rcDialogFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogFadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogFadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=rc-dialog-bootstrap.min.css.map*/
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///./assets/bootstrap/Dialog.less","webpack:///./assets/bootstrap.less","webpack:///./assets/bootstrap/effect.less","webpack:///./assets/index/Mask.less"],"names":[],"mappings":"AAaA;EAkBE;EACA;EACA;CC7BD;ADWC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAIA;CCZH;ADqBC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;CCpBH;ADyBC;EACE;EACA;CCvBH;AD2BC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCzBH;AD2BG;EACE;CCzBL;AD4BG;EACE;EACA;EACA;CC1BL;AD+BC;EACE;EACA;CC7BH;ADkCC;EACE;EACA;CChCH;ADoCC;EACE;EACA;EACA;CClCH;AD+BC;EAQI;EACA;CCpCL;AD2BC;EAaI;CCrCL;ADwBC;EAiBI;CCtCL;AD4CD;EACE;IAEE;IACA;GC3CD;ED6CC;IACE;GC3CH;CACF;ACpFC;;EAEE;CDsFH;ACnFC;;;EAGE;EACA;EACA;EACA;CDqFH;AClFC;;EACE;EACA;CDqFH;AClFC;EACE;EACA;CDoFH;ACjFC;EACE;IACE;GDmFH;ECjFC;IACE;GDmFH;CACF;ACjFC;EACE;IACE;GDmFH;ECjFC;IACE;GDmFH;CACF;AEzHC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CF2HH;AEzHG;EACE;CF2HL;AEjHC;;EACE;EANA;EACA;EACA;EAMA;CFsHH;AEnHC;EAXE;EACA;EACA;EAWA;CFuHH;AEpHC;;EACE;EACA;CFuHH;AEpHC;EACE;EACA;CFsHH;AEnHC;EACE;IACE;GFqHH;EEnHC;IACE;GFqHH;CACF;AElHC;EACE;IACE;GFoHH;EElHC;IACE;GFoHH;CACF","file":"rc-dialog-bootstrap.min.css","sourcesContent":["@import \"./variables.less\";\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n\n.@{prefixCls} {\n // Container that the rc-dialog scrolls within\n &-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n }\n\n // Shell div to position the rc-dialog with bottom padding\n position: relative;\n width: auto;\n margin: 10px;\n\n // Actual rc-dialog\n &-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n background-clip: padding-box;\n // Remove focus outline from opened rc-dialog\n outline: 0;\n }\n\n // Modal header\n // Top section of the rc-dialog w/ title and dismiss\n &-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n }\n\n &-close {\n cursor: pointer;\n border: 0;\n background: transparent;\n font-size: 21px;\n position: absolute;\n right: 20px;\n top: 12px;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n text-decoration: none;\n\n &-x:after {\n content: '×'\n }\n\n &:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n text-decoration: none;\n }\n }\n\n // Title text within header\n &-title {\n margin: 0;\n line-height: @modal-title-line-height;\n }\n\n // Modal body\n // Where all rc-dialog content resides (sibling of &-header and &-footer)\n &-body {\n position: relative;\n padding: @modal-inner-padding;\n }\n\n // Footer (for actions)\n &-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n }\n}\n\n// Scale up the rc-dialog\n@media (min-width: @screen-sm-min) {\n .@{prefixCls} {\n // Automatically set rc-dialog's width for larger viewports\n width: @modal-md;\n margin: 30px auto;\n\n &-content {\n box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n }\n }\n}\n\n@import \"./effect.less\";\n\n\n\n// WEBPACK FOOTER //\n// ./assets/bootstrap/Dialog.less",".rc-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.rc-dialog-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.rc-dialog-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.rc-dialog-header {\n padding: 15px;\n border-bottom: 1px solid #e5eLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports["rc-dialog"]=e(require("react"),require("react-dom")):t["rc-dialog"]=e(t.React,t.ReactDOM)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=116)}([function(e,n){e.exports=t},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(11),o=n(39),i=n(24),a=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(1),o=n(2),i=n(38),a=n(7),s=n(5),c=function(t,e,n){var u,f,l,p=t&c.F,d=t&c.G,y=t&c.S,h=t&c.P,v=t&c.B,m=t&c.W,b=d?o:o[e]||(o[e]={}),E=b.prototype,g=d?r:y?r[e]:(r[e]||{}).prototype;d&&(n=e);for(u in n)(f=!p&&g&&void 0!==g[u])&&s(b,u)||(l=f?g[u]:n[u],b[u]=d&&"function"!=typeof g[u]?n[u]:v&&f?i(l,r):m&&g[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((b.virtual||(b.virtual={}))[u]=l,t&c.R&&E&&!E[u]&&a(E,u,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(4),o=n(16);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(42),o=n(25);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(28)("wks"),o=n(19),i=n(1).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=e},function(t,e,n){t.exports=n(99)()},function(t,e,n){"use strict";e.__esModule=!0;var r=n(55),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(41),o=n(29);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(32),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(86),i=r(o),a=n(90),s=r(a),c=n(32),u=r(c);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,u.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primiLine truncated
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
.rc-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
.rc-dialog-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-title {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
position: relative;
|
||||
background-color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.rc-dialog-close {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-close-x:after {
|
||||
content: '\D7';
|
||||
}
|
||||
.rc-dialog-close:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-header {
|
||||
padding: 13px 20px 14px 20px;
|
||||
border-radius: 5px 5px 0 0;
|
||||
background: #fff;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
.rc-dialog-body {
|
||||
padding: 20px;
|
||||
}
|
||||
.rc-dialog-footer {
|
||||
border-top: 1px solid #e9e9e9;
|
||||
padding: 10px 20px;
|
||||
text-align: right;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.rc-dialog-zoom-enter,
|
||||
.rc-dialog-zoom-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-zoom-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-zoom-enter.rc-dialog-zoom-enter-active,
|
||||
.rc-dialog-zoom-appear.rc-dialog-zoom-appear-active {
|
||||
animation-name: rcDialogZoomIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-zoom-leave.rc-dialog-zoom-leave-active {
|
||||
animation-name: rcDialogZoomOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogZoomIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogZoomOut {
|
||||
0% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.rc-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
}
|
||||
.rc-dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1050;
|
||||
}
|
||||
.rc-dialog-mask-hidden {
|
||||
display: none;
|
||||
}
|
||||
.rc-dialog-fade-enter,
|
||||
.rc-dialog-fade-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-enter.rc-dialog-fade-enter-active,
|
||||
.rc-dialog-fade-appear.rc-dialog-fade-appear-active {
|
||||
animation-name: rcDialogFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-fade-leave.rc-dialog-fade-leave-active {
|
||||
animation-name: rcDialogFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogFadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogFadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=rc-dialog.css.map*/
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///./assets/index/Dialog.less","webpack:///./assets/index.less","webpack:///./assets/index/Mask.less"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;CCCD;ADCC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCCH;ADEC;EACE;EACA;EACA;EACA;CCAH;ADGC;EACE;EACA;EACA;EACA;EACA;CCDH;ADIC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCFH;ADIG;EACE;CCFL;ADKG;EACE;EACA;EACA;CCHL;ADOC;EACE;EACA;EACA;EACA;EACA;CCLH;ADQC;EACE;CCNH;ADSC;EACE;EACA;EACA;EACA;CCPH;ADeC;;EACE;EALA;EACA;EAMA;EACA;CCXH;ADcC;EAXE;EACA;EAYA;EACA;CCXH;ADcC;;EACE;EACA;CCXH;ADcC;EACE;EACA;CCZH;ADeC;EACE;IACE;IACA;GCbH;EDeC;IACE;IACA;GCbH;CACF;ADeC;EACE;IAEE;GCdH;EDgBC;IACE;IACA;GCdH;CACF;ADkBD;EACE;IACE;IACA;GChBD;CACF;ACnHC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CDqHH;ACnHG;EACE;CDqHL;AC3GC;;EACE;EANA;EACA;EACA;EAMA;CDgHH;AC7GC;EAXE;EACA;EACA;EAWA;CDiHH;AC9GC;;EACE;EACA;CDiHH;AC9GC;EACE;EACA;CDgHH;AC7GC;EACE;IACE;GD+GH;EC7GC;IACE;GD+GH;CACF;AC5GC;EACE;IACE;GD8GH;EC5GC;IACE;GD8GH;CACF","file":"rc-dialog.css","sourcesContent":[".@{prefixCls} {\n position: relative;\n width: auto;\n margin: 10px;\n\n &-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n }\n\n &-title {\n margin: 0;\n font-size: 14px;\n line-height: 21px;\n font-weight: bold;\n }\n\n &-content {\n position: relative;\n background-color: #ffffff;\n border: none;\n border-radius: 6px 6px;\n background-clip: padding-box;\n }\n\n &-close {\n cursor: pointer;\n border: 0;\n background: transparent;\n font-size: 21px;\n position: absolute;\n right: 20px;\n top: 12px;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n text-decoration: none;\n\n &-x:after {\n content: '×'\n }\n\n &:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n text-decoration: none;\n }\n }\n\n &-header {\n padding: 13px 20px 14px 20px;\n border-radius: 5px 5px 0 0;\n background: #fff;\n color: #666;\n border-bottom: 1px solid #e9e9e9;\n }\n\n &-body {\n padding: 20px;\n }\n\n &-footer {\n border-top: 1px solid #e9e9e9;\n padding: 10px 20px;\n text-align: right;\n border-radius: 0 0 5px 5px;\n }\n\n .effect() {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n\n &-zoom-enter, &-zoom-appear {\n opacity: 0;\n .effect();\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n animation-play-state: paused;\n }\n\n &-zoom-leave {\n .effect();\n animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);\n animation-play-state: paused;\n }\n\n &-zoom-enter&-zoom-enter-active, &-zoom-appear&-zoom-appear-active {\n animation-name: rcDialogZoomIn;\n animation-play-state: running;\n }\n\n &-zoom-leave&-zoom-leave-active {\n animation-name: rcDialogZoomOut;\n animation-play-state: running;\n }\n\n @keyframes rcDialogZoomIn {\n 0% {\n opacity: 0;\n transform: scale(0, 0);\n }\n 100% {\n opacity: 1;\n transform: scale(1, 1);\n }\n }\n @keyframes rcDialogZoomOut {\n 0% {\n\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform: scale(0, 0);\n }\n }\n}\n\n@media (min-width: 768px) {\n .@{prefixCls} {\n width: 600px;\n margin: 30px auto;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/index/Dialog.less",".rc-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.rc-dialog-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.rc-dialog-title {\n margin: 0;\n font-size: 14px;\n line-height: 21px;\n font-weight: bold;\n}\n.rc-dialog-content {\n position: relative;\n background-color: #ffffff;\n border: none;\n border-radius: 6px 6px;\n background-clip: padding-box;\n}\n.rc-dialog-close {\n cursor: pointer;\n border: 0;\n background: transparent;\n font-size: 21px;\n position: absolute;\n right: 20px;\n top: 12px;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n text-decoration: none;\n}\n.rc-dialog-close-x:after {\n content: '×';\n}\n.rc-dialog-close:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n text-decoration: none;\n}\n.rc-dialog-header {\n padding: 13px 20px 14px 20px;\n border-radius: 5px 5px 0 0;\n background: #fff;\n color: #666;\n border-bottom: 1px solid #e9e9e9;\n}\n.rc-dialog-body {\n padding: 20px;\n}\n.rc-dialog-footer {\n border-top: 1px solid #e9e9e9;\n padding: 10px 20px;\n text-align: right;\n border-radius: 0 0 5px 5px;\n}\n.rc-dialog-zoom-enter,\n.rc-dialog-zoom-appear {\n opacity: 0;\n animaLine truncated
|
||||
+6233
File diff suppressed because it is too large.
Load diff
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap a3b71505de7774dd341a","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_global.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_core.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_descriptors.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-dp.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_has.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_export.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_hide.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_is-object.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-iobject.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_wks.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_an-object.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_fails.js","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}","webpack:///./node_modules/_prop-types@15.7.2@prop-types/index.js","webpack:///./node_modules/_process@0.11.10@process/browser.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_property-desc.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-keys.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_library.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_uid.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-pie.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/classCallCheck.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/inherits.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-primitive.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_defined.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-integer.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_shared-key.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_shared.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_enum-bug-keys.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-gops.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_to-object.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_iterators.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-create.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_set-to-string-tag.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_wks-ext.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_wks-define.js","webpack:///./node_modules/_prop-types@15.7.2@prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_ctx.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_dom-create.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-keys-internal.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_iobject.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_cof.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_iter-define.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_redefine.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-gopn.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/modules/_object-gopd.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/define-property.js","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/createClass.js","webpack:///./node_modules/_react-is@16.13.1@react-is/index.js","webpack:///./node_modules/_component-indexof@0.0.3@component-indexof/index.js","webpack:///./node_modules/_rc-animate@2.10.3@rc-animate/es/util/animate.js","webpack:///./node_modules/_rc-util@4.20.1@rc-util/es/setStyle.js","webpack:///./index.js","webpack:///./src/DialogWrap.tsx","webpack:///./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/assign.js","webpack:///./node_modules/_core-js@2.6.11@core-js/library/fn/object/assign.js","webpack:///.Line truncated
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
.rc-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
.rc-dialog-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
.rc-dialog-title {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.rc-dialog-content {
|
||||
position: relative;
|
||||
background-color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.rc-dialog-close {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-close-x:after {
|
||||
content: '\D7';
|
||||
}
|
||||
.rc-dialog-close:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
text-decoration: none;
|
||||
}
|
||||
.rc-dialog-header {
|
||||
padding: 13px 20px 14px 20px;
|
||||
border-radius: 5px 5px 0 0;
|
||||
background: #fff;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
.rc-dialog-body {
|
||||
padding: 20px;
|
||||
}
|
||||
.rc-dialog-footer {
|
||||
border-top: 1px solid #e9e9e9;
|
||||
padding: 10px 20px;
|
||||
text-align: right;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.rc-dialog-zoom-enter,
|
||||
.rc-dialog-zoom-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-zoom-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-zoom-enter.rc-dialog-zoom-enter-active,
|
||||
.rc-dialog-zoom-appear.rc-dialog-zoom-appear-active {
|
||||
animation-name: rcDialogZoomIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-zoom-leave.rc-dialog-zoom-leave-active {
|
||||
animation-name: rcDialogZoomOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogZoomIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogZoomOut {
|
||||
0% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.rc-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
}
|
||||
.rc-dialog-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1050;
|
||||
}
|
||||
.rc-dialog-mask-hidden {
|
||||
display: none;
|
||||
}
|
||||
.rc-dialog-fade-enter,
|
||||
.rc-dialog-fade-appear {
|
||||
opacity: 0;
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-leave {
|
||||
animation-duration: 0.3s;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.rc-dialog-fade-enter.rc-dialog-fade-enter-active,
|
||||
.rc-dialog-fade-appear.rc-dialog-fade-appear-active {
|
||||
animation-name: rcDialogFadeIn;
|
||||
animation-play-state: running;
|
||||
}
|
||||
.rc-dialog-fade-leave.rc-dialog-fade-leave-active {
|
||||
animation-name: rcDialogFadeOut;
|
||||
animation-play-state: running;
|
||||
}
|
||||
@keyframes rcDialogFadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes rcDialogFadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=rc-dialog.min.css.map*/
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///./assets/index/Dialog.less","webpack:///./assets/index.less","webpack:///./assets/index/Mask.less"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;CCCD;ADCC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCCH;ADEC;EACE;EACA;EACA;EACA;CCAH;ADGC;EACE;EACA;EACA;EACA;EACA;CCDH;ADIC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCFH;ADIG;EACE;CCFL;ADKG;EACE;EACA;EACA;CCHL;ADOC;EACE;EACA;EACA;EACA;EACA;CCLH;ADQC;EACE;CCNH;ADSC;EACE;EACA;EACA;EACA;CCPH;ADeC;;EACE;EALA;EACA;EAMA;EACA;CCXH;ADcC;EAXE;EACA;EAYA;EACA;CCXH;ADcC;;EACE;EACA;CCXH;ADcC;EACE;EACA;CCZH;ADeC;EACE;IACE;IACA;GCbH;EDeC;IACE;IACA;GCbH;CACF;ADeC;EACE;IAEE;GCdH;EDgBC;IACE;IACA;GCdH;CACF;ADkBD;EACE;IACE;IACA;GChBD;CACF;ACnHC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CDqHH;ACnHG;EACE;CDqHL;AC3GC;;EACE;EANA;EACA;EACA;EAMA;CDgHH;AC7GC;EAXE;EACA;EACA;EAWA;CDiHH;AC9GC;;EACE;EACA;CDiHH;AC9GC;EACE;EACA;CDgHH;AC7GC;EACE;IACE;GD+GH;EC7GC;IACE;GD+GH;CACF;AC5GC;EACE;IACE;GD8GH;EC5GC;IACE;GD8GH;CACF","file":"rc-dialog.min.css","sourcesContent":[".@{prefixCls} {\n position: relative;\n width: auto;\n margin: 10px;\n\n &-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n }\n\n &-title {\n margin: 0;\n font-size: 14px;\n line-height: 21px;\n font-weight: bold;\n }\n\n &-content {\n position: relative;\n background-color: #ffffff;\n border: none;\n border-radius: 6px 6px;\n background-clip: padding-box;\n }\n\n &-close {\n cursor: pointer;\n border: 0;\n background: transparent;\n font-size: 21px;\n position: absolute;\n right: 20px;\n top: 12px;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n text-decoration: none;\n\n &-x:after {\n content: '×'\n }\n\n &:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n text-decoration: none;\n }\n }\n\n &-header {\n padding: 13px 20px 14px 20px;\n border-radius: 5px 5px 0 0;\n background: #fff;\n color: #666;\n border-bottom: 1px solid #e9e9e9;\n }\n\n &-body {\n padding: 20px;\n }\n\n &-footer {\n border-top: 1px solid #e9e9e9;\n padding: 10px 20px;\n text-align: right;\n border-radius: 0 0 5px 5px;\n }\n\n .effect() {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n\n &-zoom-enter, &-zoom-appear {\n opacity: 0;\n .effect();\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n animation-play-state: paused;\n }\n\n &-zoom-leave {\n .effect();\n animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);\n animation-play-state: paused;\n }\n\n &-zoom-enter&-zoom-enter-active, &-zoom-appear&-zoom-appear-active {\n animation-name: rcDialogZoomIn;\n animation-play-state: running;\n }\n\n &-zoom-leave&-zoom-leave-active {\n animation-name: rcDialogZoomOut;\n animation-play-state: running;\n }\n\n @keyframes rcDialogZoomIn {\n 0% {\n opacity: 0;\n transform: scale(0, 0);\n }\n 100% {\n opacity: 1;\n transform: scale(1, 1);\n }\n }\n @keyframes rcDialogZoomOut {\n 0% {\n\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform: scale(0, 0);\n }\n }\n}\n\n@media (min-width: 768px) {\n .@{prefixCls} {\n width: 600px;\n margin: 30px auto;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/index/Dialog.less",".rc-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.rc-dialog-wrap {\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.rc-dialog-title {\n margin: 0;\n font-size: 14px;\n line-height: 21px;\n font-weight: bold;\n}\n.rc-dialog-content {\n position: relative;\n background-color: #ffffff;\n border: none;\n border-radius: 6px 6px;\n background-clip: padding-box;\n}\n.rc-dialog-close {\n cursor: pointer;\n border: 0;\n background: transparent;\n font-size: 21px;\n position: absolute;\n right: 20px;\n top: 12px;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n text-decoration: none;\n}\n.rc-dialog-close-x:after {\n content: '×';\n}\n.rc-dialog-close:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n text-decoration: none;\n}\n.rc-dialog-header {\n padding: 13px 20px 14px 20px;\n border-radius: 5px 5px 0 0;\n background: #fff;\n color: #666;\n border-bottom: 1px solid #e9e9e9;\n}\n.rc-dialog-body {\n padding: 20px;\n}\n.rc-dialog-footer {\n border-top: 1px solid #e9e9e9;\n padding: 10px 20px;\n text-align: right;\n border-radius: 0 0 5px 5px;\n}\n.rc-dialog-zoom-enter,\n.rc-dialog-zoom-appear {\n opacity: 0;\n aLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports["rc-dialog"]=e(require("react"),require("react-dom")):t["rc-dialog"]=e(t.React,t.ReactDOM)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=114)}([function(e,n){e.exports=t},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(11),o=n(39),i=n(24),a=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(1),o=n(2),i=n(38),a=n(7),s=n(5),c=function(t,e,n){var u,f,l,p=t&c.F,d=t&c.G,y=t&c.S,h=t&c.P,v=t&c.B,m=t&c.W,b=d?o:o[e]||(o[e]={}),E=b.prototype,g=d?r:y?r[e]:(r[e]||{}).prototype;d&&(n=e);for(u in n)(f=!p&&g&&void 0!==g[u])&&s(b,u)||(l=f?g[u]:n[u],b[u]=d&&"function"!=typeof g[u]?n[u]:v&&f?i(l,r):m&&g[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((b.virtual||(b.virtual={}))[u]=l,t&c.R&&E&&!E[u]&&a(E,u,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(4),o=n(16);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(42),o=n(25);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(28)("wks"),o=n(19),i=n(1).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=e},function(t,e,n){t.exports=n(99)()},function(t,e,n){"use strict";e.__esModule=!0;var r=n(55),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(41),o=n(29);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(32),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(86),i=r(o),a=n(90),s=r(a),c=n(32),u=r(c);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,u.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primiLine truncated
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
import * as React from 'react';
|
||||
import IDialogPropTypes from './IDialogPropTypes';
|
||||
export interface IDialogChildProps extends IDialogPropTypes {
|
||||
getOpenCount: () => number;
|
||||
switchScrollingEffect?: () => void;
|
||||
}
|
||||
export default class Dialog extends React.Component<IDialogChildProps, any> {
|
||||
static defaultProps: {
|
||||
className: string;
|
||||
mask: boolean;
|
||||
visible: boolean;
|
||||
keyboard: boolean;
|
||||
closable: boolean;
|
||||
maskClosable: boolean;
|
||||
destroyOnClose: boolean;
|
||||
prefixCls: string;
|
||||
focusTriggerAfterClose: boolean;
|
||||
};
|
||||
private inTransition;
|
||||
private titleId;
|
||||
private openTime;
|
||||
private lastOutSideFocusNode;
|
||||
private wrap;
|
||||
private dialog;
|
||||
private sentinelStart;
|
||||
private sentinelEnd;
|
||||
private dialogMouseDown;
|
||||
private timeoutId;
|
||||
private switchScrollingEffect;
|
||||
constructor(props: IDialogChildProps);
|
||||
componentDidMount(): void;
|
||||
componentDidUpdate(prevProps: IDialogPropTypes): void;
|
||||
componentWillUnmount(): void;
|
||||
tryFocus(): void;
|
||||
onAnimateLeave: () => void;
|
||||
onDialogMouseDown: () => void;
|
||||
onMaskMouseUp: React.MouseEventHandler<HTMLDivElement>;
|
||||
onMaskClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||
onKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
||||
getDialogElement: () => JSX.Element;
|
||||
getZIndexStyle: () => any;
|
||||
getWrapStyle: () => any;
|
||||
getMaskStyle: () => any;
|
||||
getMaskElement: () => JSX.Element | undefined;
|
||||
getMaskTransitionName: () => string | undefined;
|
||||
getTransitionName: () => string | undefined;
|
||||
close: (e: any) => void;
|
||||
saveRef: (name: string) => (node: any) => void;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
+288
@@ -0,0 +1,288 @@
|
||||
import _extends from 'babel-runtime/helpers/extends';
|
||||
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
||||
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
||||
import _inherits from 'babel-runtime/helpers/inherits';
|
||||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import KeyCode from 'rc-util/es/KeyCode';
|
||||
import contains from 'rc-util/es/Dom/contains';
|
||||
import Animate from 'rc-animate';
|
||||
import LazyRenderBox from './LazyRenderBox';
|
||||
var uuid = 0;
|
||||
/* eslint react/no-is-mounted:0 */
|
||||
function getScroll(w, top) {
|
||||
var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
|
||||
var method = 'scroll' + (top ? 'Top' : 'Left');
|
||||
if (typeof ret !== 'number') {
|
||||
var d = w.document;
|
||||
ret = d.documentElement[method];
|
||||
if (typeof ret !== 'number') {
|
||||
ret = d.body[method];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
function setTransformOrigin(node, value) {
|
||||
var style = node.style;
|
||||
['Webkit', 'Moz', 'Ms', 'ms'].forEach(function (prefix) {
|
||||
style[prefix + 'TransformOrigin'] = value;
|
||||
});
|
||||
style['transformOrigin'] = value;
|
||||
}
|
||||
function offset(el) {
|
||||
var rect = el.getBoundingClientRect();
|
||||
var pos = {
|
||||
left: rect.left,
|
||||
top: rect.top
|
||||
};
|
||||
var doc = el.ownerDocument;
|
||||
var w = doc.defaultView || doc.parentWindow;
|
||||
pos.left += getScroll(w);
|
||||
pos.top += getScroll(w, true);
|
||||
return pos;
|
||||
}
|
||||
|
||||
var Dialog = function (_React$Component) {
|
||||
_inherits(Dialog, _React$Component);
|
||||
|
||||
function Dialog(props) {
|
||||
_classCallCheck(this, Dialog);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
||||
|
||||
_this.inTransition = false;
|
||||
_this.onAnimateLeave = function () {
|
||||
var afterClose = _this.props.afterClose;
|
||||
// need demo?
|
||||
// https://github.com/react-component/dialog/pull/28
|
||||
|
||||
if (_this.wrap) {
|
||||
_this.wrap.style.display = 'none';
|
||||
}
|
||||
_this.inTransition = false;
|
||||
_this.switchScrollingEffect();
|
||||
if (afterClose) {
|
||||
afterClose();
|
||||
}
|
||||
};
|
||||
_this.onDialogMouseDown = function () {
|
||||
_this.dialogMouseDown = true;
|
||||
};
|
||||
_this.onMaskMouseUp = function () {
|
||||
if (_this.dialogMouseDown) {
|
||||
_this.timeoutId = setTimeout(function () {
|
||||
_this.dialogMouseDown = false;
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
_this.onMaskClick = function (e) {
|
||||
// android trigger click on open (fastclick??)
|
||||
if (Date.now() - _this.openTime < 300) {
|
||||
return;
|
||||
}
|
||||
if (e.target === e.currentTarget && !_this.dialogMouseDown) {
|
||||
_this.close(e);
|
||||
}
|
||||
};
|
||||
_this.onKeyDown = function (e) {
|
||||
var props = _this.props;
|
||||
if (props.keyboard && e.keyCode === KeyCode.ESC) {
|
||||
e.stopPropagation();
|
||||
_this.close(e);
|
||||
return;
|
||||
}
|
||||
// keep focus inside dialog
|
||||
if (props.visible) {
|
||||
if (e.keyCode === KeyCode.TAB) {
|
||||
var activeElement = document.activeElement;
|
||||
var sentinelStart = _this.sentinelStart;
|
||||
if (e.shiftKey) {
|
||||
if (activeElement === sentinelStart) {
|
||||
_this.sentinelEnd.focus();
|
||||
}
|
||||
} else if (activeElement === _this.sentinelEnd) {
|
||||
sentinelStart.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
_this.getDialogElement = function () {
|
||||
var props = _this.props;
|
||||
var closable = props.closable;
|
||||
var prefixCls = props.prefixCls;
|
||||
var dest = {};
|
||||
if (props.width !== undefined) {
|
||||
dest.width = props.width;
|
||||
}
|
||||
if (props.height !== undefined) {
|
||||
dest.height = props.height;
|
||||
}
|
||||
var footer = void 0;
|
||||
if (props.footer) {
|
||||
footer = React.createElement("div", { className: prefixCls + '-footer', ref: _this.saveRef('footer') }, props.footer);
|
||||
}
|
||||
var header = void 0;
|
||||
if (props.title) {
|
||||
header = React.createElement("div", { className: prefixCls + '-header', ref: _this.saveRef('header') }, React.createElement("div", { className: prefixCls + '-title', id: _this.titleId }, props.title));
|
||||
}
|
||||
var closer = void 0;
|
||||
if (closable) {
|
||||
closer = React.createElement("button", { type: "button", onClick: _this.close, "aria-label": "Close", className: prefixCls + '-close' }, props.closeIcon || React.createElement("span", { className: prefixCls + '-close-x' }));
|
||||
}
|
||||
var style = _extends({}, props.style, dest);
|
||||
var sentinelStyle = { width: 0, height: 0, overflow: 'hidden', outline: 'none' };
|
||||
var transitionName = _this.getTransitionName();
|
||||
var dialogElement = React.createElement(LazyRenderBox, { key: "dialog-element", role: "document", ref: _this.saveRef('dialog'), style: style, className: prefixCls + ' ' + (props.className || ''), visible: props.visible, forceRender: props.forceRender, onMouseDown: _this.onDialogMouseDown }, React.createElement("div", { tabIndex: 0, ref: _this.saveRef('sentinelStart'), style: sentinelStyle, "aria-hidden": "true" }), React.createElement("div", { className: prefixCls + '-content' }, closer, header, React.createElement("div", _extends({ className: prefixCls + '-body', style: props.bodyStyle, ref: _this.saveRef('body') }, props.bodyProps), props.children), footer), React.createElement("div", { tabIndex: 0, ref: _this.saveRef('sentinelEnd'), style: sentinelStyle, "aria-hidden": "true" }));
|
||||
return React.createElement(Animate, { key: "dialog", showProp: "visible", onLeave: _this.onAnimateLeave, transitionName: transitionName, component: "", transitionAppear: true }, props.visible || !props.destroyOnClose ? dialogElement : null);
|
||||
};
|
||||
_this.getZIndexStyle = function () {
|
||||
var style = {};
|
||||
var props = _this.props;
|
||||
if (props.zIndex !== undefined) {
|
||||
style.zIndex = props.zIndex;
|
||||
}
|
||||
return style;
|
||||
};
|
||||
_this.getWrapStyle = function () {
|
||||
return _extends({}, _this.getZIndexStyle(), _this.props.wrapStyle);
|
||||
};
|
||||
_this.getMaskStyle = function () {
|
||||
return _extends({}, _this.getZIndexStyle(), _this.props.maskStyle);
|
||||
};
|
||||
_this.getMaskElement = function () {
|
||||
var props = _this.props;
|
||||
var maskElement = void 0;
|
||||
if (props.mask) {
|
||||
var maskTransition = _this.getMaskTransitionName();
|
||||
maskElement = React.createElement(LazyRenderBox, _extends({ style: _this.getMaskStyle(), key: "mask", className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }, props.maskProps));
|
||||
if (maskTransition) {
|
||||
maskElement = React.createElement(Animate, { key: "mask", showProp: "visible", transitionAppear: true, component: "", transitionName: maskTransition }, maskElement);
|
||||
}
|
||||
}
|
||||
return maskElement;
|
||||
};
|
||||
_this.getMaskTransitionName = function () {
|
||||
var props = _this.props;
|
||||
var transitionName = props.maskTransitionName;
|
||||
var animation = props.maskAnimation;
|
||||
if (!transitionName && animation) {
|
||||
transitionName = props.prefixCls + '-' + animation;
|
||||
}
|
||||
return transitionName;
|
||||
};
|
||||
_this.getTransitionName = function () {
|
||||
var props = _this.props;
|
||||
var transitionName = props.transitionName;
|
||||
var animation = props.animation;
|
||||
if (!transitionName && animation) {
|
||||
transitionName = props.prefixCls + '-' + animation;
|
||||
}
|
||||
return transitionName;
|
||||
};
|
||||
_this.close = function (e) {
|
||||
var onClose = _this.props.onClose;
|
||||
|
||||
if (onClose) {
|
||||
onClose(e);
|
||||
}
|
||||
};
|
||||
_this.saveRef = function (name) {
|
||||
return function (node) {
|
||||
_this[name] = node;
|
||||
};
|
||||
};
|
||||
_this.titleId = 'rcDialogTitle' + uuid++;
|
||||
_this.switchScrollingEffect = props.switchScrollingEffect || function () {};
|
||||
return _this;
|
||||
}
|
||||
|
||||
Dialog.prototype.componentDidMount = function componentDidMount() {
|
||||
this.componentDidUpdate({});
|
||||
// if forceRender is true, set element style display to be none;
|
||||
if ((this.props.forceRender || this.props.getContainer === false && !this.props.visible) && this.wrap) {
|
||||
this.wrap.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||||
var _props = this.props,
|
||||
visible = _props.visible,
|
||||
mask = _props.mask,
|
||||
focusTriggerAfterClose = _props.focusTriggerAfterClose;
|
||||
|
||||
var mousePosition = this.props.mousePosition;
|
||||
if (visible) {
|
||||
// first show
|
||||
if (!prevProps.visible) {
|
||||
this.openTime = Date.now();
|
||||
this.switchScrollingEffect();
|
||||
this.tryFocus();
|
||||
var dialogNode = ReactDOM.findDOMNode(this.dialog);
|
||||
if (mousePosition) {
|
||||
var elOffset = offset(dialogNode);
|
||||
setTransformOrigin(dialogNode, mousePosition.x - elOffset.left + 'px ' + (mousePosition.y - elOffset.top) + 'px');
|
||||
} else {
|
||||
setTransformOrigin(dialogNode, '');
|
||||
}
|
||||
}
|
||||
} else if (prevProps.visible) {
|
||||
this.inTransition = true;
|
||||
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) {
|
||||
try {
|
||||
this.lastOutSideFocusNode.focus();
|
||||
} catch (e) {
|
||||
this.lastOutSideFocusNode = null;
|
||||
}
|
||||
this.lastOutSideFocusNode = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||
var _props2 = this.props,
|
||||
visible = _props2.visible,
|
||||
getOpenCount = _props2.getOpenCount;
|
||||
|
||||
if ((visible || this.inTransition) && !getOpenCount()) {
|
||||
this.switchScrollingEffect();
|
||||
}
|
||||
clearTimeout(this.timeoutId);
|
||||
};
|
||||
|
||||
Dialog.prototype.tryFocus = function tryFocus() {
|
||||
if (!contains(this.wrap, document.activeElement)) {
|
||||
this.lastOutSideFocusNode = document.activeElement;
|
||||
this.sentinelStart.focus();
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.prototype.render = function render() {
|
||||
var props = this.props;
|
||||
var prefixCls = props.prefixCls,
|
||||
maskClosable = props.maskClosable;
|
||||
|
||||
var style = this.getWrapStyle();
|
||||
// clear hide display
|
||||
// and only set display after async anim, not here for hide
|
||||
if (props.visible) {
|
||||
style.display = null;
|
||||
}
|
||||
return React.createElement("div", { className: prefixCls + '-root' }, this.getMaskElement(), React.createElement("div", _extends({ tabIndex: -1, onKeyDown: this.onKeyDown, className: prefixCls + '-wrap ' + (props.wrapClassName || ''), ref: this.saveRef('wrap'), onClick: maskClosable ? this.onMaskClick : null, onMouseUp: maskClosable ? this.onMaskMouseUp : null, role: "dialog", "aria-labelledby": props.title ? this.titleId : null, style: style }, props.wrapProps), this.getDialogElement()));
|
||||
};
|
||||
|
||||
return Dialog;
|
||||
}(React.Component);
|
||||
|
||||
export default Dialog;
|
||||
|
||||
Dialog.defaultProps = {
|
||||
className: '',
|
||||
mask: true,
|
||||
visible: false,
|
||||
keyboard: true,
|
||||
closable: true,
|
||||
maskClosable: true,
|
||||
destroyOnClose: false,
|
||||
prefixCls: 'rc-dialog',
|
||||
focusTriggerAfterClose: true
|
||||
};
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/// <reference types="react" />
|
||||
import IDialogPropTypes from './IDialogPropTypes';
|
||||
declare const _default: (props: IDialogPropTypes) => JSX.Element;
|
||||
export default _default;
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
import _extends from 'babel-runtime/helpers/extends';
|
||||
import * as React from 'react';
|
||||
import Dialog from './Dialog';
|
||||
import Portal from 'rc-util/es/PortalWrapper';
|
||||
// fix issue #10656
|
||||
/*
|
||||
* getContainer remarks
|
||||
* Custom container should not be return, because in the Portal component, it will remove the
|
||||
* return container element here, if the custom container is the only child of it's component,
|
||||
* like issue #10656, It will has a conflict with removeChild method in react-dom.
|
||||
* So here should add a child (div element) to custom container.
|
||||
* */
|
||||
export default (function (props) {
|
||||
var visible = props.visible,
|
||||
getContainer = props.getContainer,
|
||||
forceRender = props.forceRender;
|
||||
// 渲染在当前 dom 里;
|
||||
|
||||
if (getContainer === false) {
|
||||
return React.createElement(Dialog, _extends({}, props, { getOpenCount: function getOpenCount() {
|
||||
return 2;
|
||||
} }));
|
||||
}
|
||||
return React.createElement(Portal, { visible: visible, forceRender: forceRender, getContainer: getContainer }, function (childProps) {
|
||||
return React.createElement(Dialog, _extends({}, props, childProps));
|
||||
});
|
||||
});
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
import { ReactNode, CSSProperties, SyntheticEvent } from 'react';
|
||||
declare type IStringOrHtmlElement = string | HTMLElement;
|
||||
interface IDialogPropTypes {
|
||||
className?: string;
|
||||
keyboard?: boolean;
|
||||
style?: CSSProperties;
|
||||
mask?: boolean;
|
||||
children?: any;
|
||||
afterClose?: () => any;
|
||||
onClose?: (e: SyntheticEvent<HTMLDivElement>) => any;
|
||||
closable?: boolean;
|
||||
maskClosable?: boolean;
|
||||
visible?: boolean;
|
||||
destroyOnClose?: boolean;
|
||||
mousePosition?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
title?: ReactNode;
|
||||
footer?: ReactNode;
|
||||
transitionName?: string;
|
||||
maskTransitionName?: string;
|
||||
animation?: any;
|
||||
maskAnimation?: any;
|
||||
wrapStyle?: {};
|
||||
bodyStyle?: {};
|
||||
maskStyle?: {};
|
||||
prefixCls?: string;
|
||||
wrapClassName?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
zIndex?: number;
|
||||
bodyProps?: any;
|
||||
maskProps?: any;
|
||||
wrapProps?: any;
|
||||
getContainer?: IStringOrHtmlElement | (() => IStringOrHtmlElement) | false;
|
||||
closeIcon?: ReactNode;
|
||||
forceRender?: boolean;
|
||||
focusTriggerAfterClose?: boolean;
|
||||
}
|
||||
export default IDialogPropTypes;
|
||||
Whitespace-only changes.
+14
@@ -0,0 +1,14 @@
|
||||
import * as React from 'react';
|
||||
export interface ILazyRenderBoxPropTypes {
|
||||
className?: string;
|
||||
visible?: boolean;
|
||||
hiddenClassName?: string;
|
||||
role?: string;
|
||||
style?: {};
|
||||
forceRender?: boolean;
|
||||
onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
|
||||
}
|
||||
export default class LazyRenderBox extends React.Component<ILazyRenderBoxPropTypes, any> {
|
||||
shouldComponentUpdate(nextProps: ILazyRenderBoxPropTypes): boolean;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import _extends from "babel-runtime/helpers/extends";
|
||||
import _classCallCheck from "babel-runtime/helpers/classCallCheck";
|
||||
import _possibleConstructorReturn from "babel-runtime/helpers/possibleConstructorReturn";
|
||||
import _inherits from "babel-runtime/helpers/inherits";
|
||||
var __rest = this && this.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
|
||||
}return t;
|
||||
};
|
||||
import * as React from 'react';
|
||||
|
||||
var LazyRenderBox = function (_React$Component) {
|
||||
_inherits(LazyRenderBox, _React$Component);
|
||||
|
||||
function LazyRenderBox() {
|
||||
_classCallCheck(this, LazyRenderBox);
|
||||
|
||||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
||||
}
|
||||
|
||||
LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
||||
if (nextProps.forceRender) {
|
||||
return true;
|
||||
}
|
||||
return !!nextProps.hiddenClassName || !!nextProps.visible;
|
||||
};
|
||||
|
||||
LazyRenderBox.prototype.render = function render() {
|
||||
var _a = this.props,
|
||||
className = _a.className,
|
||||
hiddenClassName = _a.hiddenClassName,
|
||||
visible = _a.visible,
|
||||
forceRender = _a.forceRender,
|
||||
restProps = __rest(_a, ["className", "hiddenClassName", "visible", "forceRender"]);
|
||||
var useClassName = className;
|
||||
if (!!hiddenClassName && !visible) {
|
||||
useClassName += " " + hiddenClassName;
|
||||
}
|
||||
return React.createElement("div", _extends({}, restProps, { className: useClassName }));
|
||||
};
|
||||
|
||||
return LazyRenderBox;
|
||||
}(React.Component);
|
||||
|
||||
export default LazyRenderBox;
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
import * as React from 'react';
|
||||
import IDialogPropTypes from './IDialogPropTypes';
|
||||
export interface IDialogChildProps extends IDialogPropTypes {
|
||||
getOpenCount: () => number;
|
||||
switchScrollingEffect?: () => void;
|
||||
}
|
||||
export default class Dialog extends React.Component<IDialogChildProps, any> {
|
||||
static defaultProps: {
|
||||
className: string;
|
||||
mask: boolean;
|
||||
visible: boolean;
|
||||
keyboard: boolean;
|
||||
closable: boolean;
|
||||
maskClosable: boolean;
|
||||
destroyOnClose: boolean;
|
||||
prefixCls: string;
|
||||
focusTriggerAfterClose: boolean;
|
||||
};
|
||||
private inTransition;
|
||||
private titleId;
|
||||
private openTime;
|
||||
private lastOutSideFocusNode;
|
||||
private wrap;
|
||||
private dialog;
|
||||
private sentinelStart;
|
||||
private sentinelEnd;
|
||||
private dialogMouseDown;
|
||||
private timeoutId;
|
||||
private switchScrollingEffect;
|
||||
constructor(props: IDialogChildProps);
|
||||
componentDidMount(): void;
|
||||
componentDidUpdate(prevProps: IDialogPropTypes): void;
|
||||
componentWillUnmount(): void;
|
||||
tryFocus(): void;
|
||||
onAnimateLeave: () => void;
|
||||
onDialogMouseDown: () => void;
|
||||
onMaskMouseUp: React.MouseEventHandler<HTMLDivElement>;
|
||||
onMaskClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||
onKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
||||
getDialogElement: () => JSX.Element;
|
||||
getZIndexStyle: () => any;
|
||||
getWrapStyle: () => any;
|
||||
getMaskStyle: () => any;
|
||||
getMaskElement: () => JSX.Element | undefined;
|
||||
getMaskTransitionName: () => string | undefined;
|
||||
getTransitionName: () => string | undefined;
|
||||
close: (e: any) => void;
|
||||
saveRef: (name: string) => (node: any) => void;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
+327
@@ -0,0 +1,327 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require('babel-runtime/helpers/inherits');
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
var _react = require('react');
|
||||
|
||||
var React = _interopRequireWildcard(_react);
|
||||
|
||||
var _reactDom = require('react-dom');
|
||||
|
||||
var ReactDOM = _interopRequireWildcard(_reactDom);
|
||||
|
||||
var _KeyCode = require('rc-util/lib/KeyCode');
|
||||
|
||||
var _KeyCode2 = _interopRequireDefault(_KeyCode);
|
||||
|
||||
var _contains = require('rc-util/lib/Dom/contains');
|
||||
|
||||
var _contains2 = _interopRequireDefault(_contains);
|
||||
|
||||
var _rcAnimate = require('rc-animate');
|
||||
|
||||
var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
|
||||
|
||||
var _LazyRenderBox = require('./LazyRenderBox');
|
||||
|
||||
var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||||
|
||||
var uuid = 0;
|
||||
/* eslint react/no-is-mounted:0 */
|
||||
function getScroll(w, top) {
|
||||
var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
|
||||
var method = 'scroll' + (top ? 'Top' : 'Left');
|
||||
if (typeof ret !== 'number') {
|
||||
var d = w.document;
|
||||
ret = d.documentElement[method];
|
||||
if (typeof ret !== 'number') {
|
||||
ret = d.body[method];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
function setTransformOrigin(node, value) {
|
||||
var style = node.style;
|
||||
['Webkit', 'Moz', 'Ms', 'ms'].forEach(function (prefix) {
|
||||
style[prefix + 'TransformOrigin'] = value;
|
||||
});
|
||||
style['transformOrigin'] = value;
|
||||
}
|
||||
function offset(el) {
|
||||
var rect = el.getBoundingClientRect();
|
||||
var pos = {
|
||||
left: rect.left,
|
||||
top: rect.top
|
||||
};
|
||||
var doc = el.ownerDocument;
|
||||
var w = doc.defaultView || doc.parentWindow;
|
||||
pos.left += getScroll(w);
|
||||
pos.top += getScroll(w, true);
|
||||
return pos;
|
||||
}
|
||||
|
||||
var Dialog = function (_React$Component) {
|
||||
(0, _inherits3['default'])(Dialog, _React$Component);
|
||||
|
||||
function Dialog(props) {
|
||||
(0, _classCallCheck3['default'])(this, Dialog);
|
||||
|
||||
var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props));
|
||||
|
||||
_this.inTransition = false;
|
||||
_this.onAnimateLeave = function () {
|
||||
var afterClose = _this.props.afterClose;
|
||||
// need demo?
|
||||
// https://github.com/react-component/dialog/pull/28
|
||||
|
||||
if (_this.wrap) {
|
||||
_this.wrap.style.display = 'none';
|
||||
}
|
||||
_this.inTransition = false;
|
||||
_this.switchScrollingEffect();
|
||||
if (afterClose) {
|
||||
afterClose();
|
||||
}
|
||||
};
|
||||
_this.onDialogMouseDown = function () {
|
||||
_this.dialogMouseDown = true;
|
||||
};
|
||||
_this.onMaskMouseUp = function () {
|
||||
if (_this.dialogMouseDown) {
|
||||
_this.timeoutId = setTimeout(function () {
|
||||
_this.dialogMouseDown = false;
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
_this.onMaskClick = function (e) {
|
||||
// android trigger click on open (fastclick??)
|
||||
if (Date.now() - _this.openTime < 300) {
|
||||
return;
|
||||
}
|
||||
if (e.target === e.currentTarget && !_this.dialogMouseDown) {
|
||||
_this.close(e);
|
||||
}
|
||||
};
|
||||
_this.onKeyDown = function (e) {
|
||||
var props = _this.props;
|
||||
if (props.keyboard && e.keyCode === _KeyCode2['default'].ESC) {
|
||||
e.stopPropagation();
|
||||
_this.close(e);
|
||||
return;
|
||||
}
|
||||
// keep focus inside dialog
|
||||
if (props.visible) {
|
||||
if (e.keyCode === _KeyCode2['default'].TAB) {
|
||||
var activeElement = document.activeElement;
|
||||
var sentinelStart = _this.sentinelStart;
|
||||
if (e.shiftKey) {
|
||||
if (activeElement === sentinelStart) {
|
||||
_this.sentinelEnd.focus();
|
||||
}
|
||||
} else if (activeElement === _this.sentinelEnd) {
|
||||
sentinelStart.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
_this.getDialogElement = function () {
|
||||
var props = _this.props;
|
||||
var closable = props.closable;
|
||||
var prefixCls = props.prefixCls;
|
||||
var dest = {};
|
||||
if (props.width !== undefined) {
|
||||
dest.width = props.width;
|
||||
}
|
||||
if (props.height !== undefined) {
|
||||
dest.height = props.height;
|
||||
}
|
||||
var footer = void 0;
|
||||
if (props.footer) {
|
||||
footer = React.createElement("div", { className: prefixCls + '-footer', ref: _this.saveRef('footer') }, props.footer);
|
||||
}
|
||||
var header = void 0;
|
||||
if (props.title) {
|
||||
header = React.createElement("div", { className: prefixCls + '-header', ref: _this.saveRef('header') }, React.createElement("div", { className: prefixCls + '-title', id: _this.titleId }, props.title));
|
||||
}
|
||||
var closer = void 0;
|
||||
if (closable) {
|
||||
closer = React.createElement("button", { type: "button", onClick: _this.close, "aria-label": "Close", className: prefixCls + '-close' }, props.closeIcon || React.createElement("span", { className: prefixCls + '-close-x' }));
|
||||
}
|
||||
var style = (0, _extends3['default'])({}, props.style, dest);
|
||||
var sentinelStyle = { width: 0, height: 0, overflow: 'hidden', outline: 'none' };
|
||||
var transitionName = _this.getTransitionName();
|
||||
var dialogElement = React.createElement(_LazyRenderBox2['default'], { key: "dialog-element", role: "document", ref: _this.saveRef('dialog'), style: style, className: prefixCls + ' ' + (props.className || ''), visible: props.visible, forceRender: props.forceRender, onMouseDown: _this.onDialogMouseDown }, React.createElement("div", { tabIndex: 0, ref: _this.saveRef('sentinelStart'), style: sentinelStyle, "aria-hidden": "true" }), React.createElement("div", { className: prefixCls + '-content' }, closer, header, React.createElement("div", (0, _extends3['default'])({ className: prefixCls + '-body', style: props.bodyStyle, ref: _this.saveRef('body') }, props.bodyProps), props.children), footer), React.createElement("div", { tabIndex: 0, ref: _this.saveRef('sentinelEnd'), style: sentinelStyle, "aria-hidden": "true" }));
|
||||
return React.createElement(_rcAnimate2['default'], { key: "dialog", showProp: "visible", onLeave: _this.onAnimateLeave, transitionName: transitionName, component: "", transitionAppear: true }, props.visible || !props.destroyOnClose ? dialogElement : null);
|
||||
};
|
||||
_this.getZIndexStyle = function () {
|
||||
var style = {};
|
||||
var props = _this.props;
|
||||
if (props.zIndex !== undefined) {
|
||||
style.zIndex = props.zIndex;
|
||||
}
|
||||
return style;
|
||||
};
|
||||
_this.getWrapStyle = function () {
|
||||
return (0, _extends3['default'])({}, _this.getZIndexStyle(), _this.props.wrapStyle);
|
||||
};
|
||||
_this.getMaskStyle = function () {
|
||||
return (0, _extends3['default'])({}, _this.getZIndexStyle(), _this.props.maskStyle);
|
||||
};
|
||||
_this.getMaskElement = function () {
|
||||
var props = _this.props;
|
||||
var maskElement = void 0;
|
||||
if (props.mask) {
|
||||
var maskTransition = _this.getMaskTransitionName();
|
||||
maskElement = React.createElement(_LazyRenderBox2['default'], (0, _extends3['default'])({ style: _this.getMaskStyle(), key: "mask", className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }, props.maskProps));
|
||||
if (maskTransition) {
|
||||
maskElement = React.createElement(_rcAnimate2['default'], { key: "mask", showProp: "visible", transitionAppear: true, component: "", transitionName: maskTransition }, maskElement);
|
||||
}
|
||||
}
|
||||
return maskElement;
|
||||
};
|
||||
_this.getMaskTransitionName = function () {
|
||||
var props = _this.props;
|
||||
var transitionName = props.maskTransitionName;
|
||||
var animation = props.maskAnimation;
|
||||
if (!transitionName && animation) {
|
||||
transitionName = props.prefixCls + '-' + animation;
|
||||
}
|
||||
return transitionName;
|
||||
};
|
||||
_this.getTransitionName = function () {
|
||||
var props = _this.props;
|
||||
var transitionName = props.transitionName;
|
||||
var animation = props.animation;
|
||||
if (!transitionName && animation) {
|
||||
transitionName = props.prefixCls + '-' + animation;
|
||||
}
|
||||
return transitionName;
|
||||
};
|
||||
_this.close = function (e) {
|
||||
var onClose = _this.props.onClose;
|
||||
|
||||
if (onClose) {
|
||||
onClose(e);
|
||||
}
|
||||
};
|
||||
_this.saveRef = function (name) {
|
||||
return function (node) {
|
||||
_this[name] = node;
|
||||
};
|
||||
};
|
||||
_this.titleId = 'rcDialogTitle' + uuid++;
|
||||
_this.switchScrollingEffect = props.switchScrollingEffect || function () {};
|
||||
return _this;
|
||||
}
|
||||
|
||||
Dialog.prototype.componentDidMount = function componentDidMount() {
|
||||
this.componentDidUpdate({});
|
||||
// if forceRender is true, set element style display to be none;
|
||||
if ((this.props.forceRender || this.props.getContainer === false && !this.props.visible) && this.wrap) {
|
||||
this.wrap.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||||
var _props = this.props,
|
||||
visible = _props.visible,
|
||||
mask = _props.mask,
|
||||
focusTriggerAfterClose = _props.focusTriggerAfterClose;
|
||||
|
||||
var mousePosition = this.props.mousePosition;
|
||||
if (visible) {
|
||||
// first show
|
||||
if (!prevProps.visible) {
|
||||
this.openTime = Date.now();
|
||||
this.switchScrollingEffect();
|
||||
this.tryFocus();
|
||||
var dialogNode = ReactDOM.findDOMNode(this.dialog);
|
||||
if (mousePosition) {
|
||||
var elOffset = offset(dialogNode);
|
||||
setTransformOrigin(dialogNode, mousePosition.x - elOffset.left + 'px ' + (mousePosition.y - elOffset.top) + 'px');
|
||||
} else {
|
||||
setTransformOrigin(dialogNode, '');
|
||||
}
|
||||
}
|
||||
} else if (prevProps.visible) {
|
||||
this.inTransition = true;
|
||||
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) {
|
||||
try {
|
||||
this.lastOutSideFocusNode.focus();
|
||||
} catch (e) {
|
||||
this.lastOutSideFocusNode = null;
|
||||
}
|
||||
this.lastOutSideFocusNode = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||
var _props2 = this.props,
|
||||
visible = _props2.visible,
|
||||
getOpenCount = _props2.getOpenCount;
|
||||
|
||||
if ((visible || this.inTransition) && !getOpenCount()) {
|
||||
this.switchScrollingEffect();
|
||||
}
|
||||
clearTimeout(this.timeoutId);
|
||||
};
|
||||
|
||||
Dialog.prototype.tryFocus = function tryFocus() {
|
||||
if (!(0, _contains2['default'])(this.wrap, document.activeElement)) {
|
||||
this.lastOutSideFocusNode = document.activeElement;
|
||||
this.sentinelStart.focus();
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.prototype.render = function render() {
|
||||
var props = this.props;
|
||||
var prefixCls = props.prefixCls,
|
||||
maskClosable = props.maskClosable;
|
||||
|
||||
var style = this.getWrapStyle();
|
||||
// clear hide display
|
||||
// and only set display after async anim, not here for hide
|
||||
if (props.visible) {
|
||||
style.display = null;
|
||||
}
|
||||
return React.createElement("div", { className: prefixCls + '-root' }, this.getMaskElement(), React.createElement("div", (0, _extends3['default'])({ tabIndex: -1, onKeyDown: this.onKeyDown, className: prefixCls + '-wrap ' + (props.wrapClassName || ''), ref: this.saveRef('wrap'), onClick: maskClosable ? this.onMaskClick : null, onMouseUp: maskClosable ? this.onMaskMouseUp : null, role: "dialog", "aria-labelledby": props.title ? this.titleId : null, style: style }, props.wrapProps), this.getDialogElement()));
|
||||
};
|
||||
|
||||
return Dialog;
|
||||
}(React.Component);
|
||||
|
||||
exports['default'] = Dialog;
|
||||
|
||||
Dialog.defaultProps = {
|
||||
className: '',
|
||||
mask: true,
|
||||
visible: false,
|
||||
keyboard: true,
|
||||
closable: true,
|
||||
maskClosable: true,
|
||||
destroyOnClose: false,
|
||||
prefixCls: 'rc-dialog',
|
||||
focusTriggerAfterClose: true
|
||||
};
|
||||
module.exports = exports['default'];
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/// <reference types="react" />
|
||||
import IDialogPropTypes from './IDialogPropTypes';
|
||||
declare const _default: (props: IDialogPropTypes) => JSX.Element;
|
||||
export default _default;
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _react = require('react');
|
||||
|
||||
var React = _interopRequireWildcard(_react);
|
||||
|
||||
var _Dialog = require('./Dialog');
|
||||
|
||||
var _Dialog2 = _interopRequireDefault(_Dialog);
|
||||
|
||||
var _PortalWrapper = require('rc-util/lib/PortalWrapper');
|
||||
|
||||
var _PortalWrapper2 = _interopRequireDefault(_PortalWrapper);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||||
|
||||
// fix issue #10656
|
||||
/*
|
||||
* getContainer remarks
|
||||
* Custom container should not be return, because in the Portal component, it will remove the
|
||||
* return container element here, if the custom container is the only child of it's component,
|
||||
* like issue #10656, It will has a conflict with removeChild method in react-dom.
|
||||
* So here should add a child (div element) to custom container.
|
||||
* */
|
||||
exports['default'] = function (props) {
|
||||
var visible = props.visible,
|
||||
getContainer = props.getContainer,
|
||||
forceRender = props.forceRender;
|
||||
// 渲染在当前 dom 里;
|
||||
|
||||
if (getContainer === false) {
|
||||
return React.createElement(_Dialog2['default'], (0, _extends3['default'])({}, props, { getOpenCount: function getOpenCount() {
|
||||
return 2;
|
||||
} }));
|
||||
}
|
||||
return React.createElement(_PortalWrapper2['default'], { visible: visible, forceRender: forceRender, getContainer: getContainer }, function (childProps) {
|
||||
return React.createElement(_Dialog2['default'], (0, _extends3['default'])({}, props, childProps));
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = exports['default'];
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
import { ReactNode, CSSProperties, SyntheticEvent } from 'react';
|
||||
declare type IStringOrHtmlElement = string | HTMLElement;
|
||||
interface IDialogPropTypes {
|
||||
className?: string;
|
||||
keyboard?: boolean;
|
||||
style?: CSSProperties;
|
||||
mask?: boolean;
|
||||
children?: any;
|
||||
afterClose?: () => any;
|
||||
onClose?: (e: SyntheticEvent<HTMLDivElement>) => any;
|
||||
closable?: boolean;
|
||||
maskClosable?: boolean;
|
||||
visible?: boolean;
|
||||
destroyOnClose?: boolean;
|
||||
mousePosition?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
title?: ReactNode;
|
||||
footer?: ReactNode;
|
||||
transitionName?: string;
|
||||
maskTransitionName?: string;
|
||||
animation?: any;
|
||||
maskAnimation?: any;
|
||||
wrapStyle?: {};
|
||||
bodyStyle?: {};
|
||||
maskStyle?: {};
|
||||
prefixCls?: string;
|
||||
wrapClassName?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
zIndex?: number;
|
||||
bodyProps?: any;
|
||||
maskProps?: any;
|
||||
wrapProps?: any;
|
||||
getContainer?: IStringOrHtmlElement | (() => IStringOrHtmlElement) | false;
|
||||
closeIcon?: ReactNode;
|
||||
forceRender?: boolean;
|
||||
focusTriggerAfterClose?: boolean;
|
||||
}
|
||||
export default IDialogPropTypes;
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import * as React from 'react';
|
||||
export interface ILazyRenderBoxPropTypes {
|
||||
className?: string;
|
||||
visible?: boolean;
|
||||
hiddenClassName?: string;
|
||||
role?: string;
|
||||
style?: {};
|
||||
forceRender?: boolean;
|
||||
onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
|
||||
}
|
||||
export default class LazyRenderBox extends React.Component<ILazyRenderBoxPropTypes, any> {
|
||||
shouldComponentUpdate(nextProps: ILazyRenderBoxPropTypes): boolean;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _extends2 = require("babel-runtime/helpers/extends");
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require("babel-runtime/helpers/inherits");
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
var _react = require("react");
|
||||
|
||||
var React = _interopRequireWildcard(_react);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
var __rest = undefined && undefined.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
|
||||
}return t;
|
||||
};
|
||||
|
||||
var LazyRenderBox = function (_React$Component) {
|
||||
(0, _inherits3["default"])(LazyRenderBox, _React$Component);
|
||||
|
||||
function LazyRenderBox() {
|
||||
(0, _classCallCheck3["default"])(this, LazyRenderBox);
|
||||
return (0, _possibleConstructorReturn3["default"])(this, _React$Component.apply(this, arguments));
|
||||
}
|
||||
|
||||
LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
||||
if (nextProps.forceRender) {
|
||||
return true;
|
||||
}
|
||||
return !!nextProps.hiddenClassName || !!nextProps.visible;
|
||||
};
|
||||
|
||||
LazyRenderBox.prototype.render = function render() {
|
||||
var _a = this.props,
|
||||
className = _a.className,
|
||||
hiddenClassName = _a.hiddenClassName,
|
||||
visible = _a.visible,
|
||||
forceRender = _a.forceRender,
|
||||
restProps = __rest(_a, ["className", "hiddenClassName", "visible", "forceRender"]);
|
||||
var useClassName = className;
|
||||
if (!!hiddenClassName && !visible) {
|
||||
useClassName += " " + hiddenClassName;
|
||||
}
|
||||
return React.createElement("div", (0, _extends3["default"])({}, restProps, { className: useClassName }));
|
||||
};
|
||||
|
||||
return LazyRenderBox;
|
||||
}(React.Component);
|
||||
|
||||
exports["default"] = LazyRenderBox;
|
||||
module.exports = exports['default'];
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"_from": "rc-dialog@~7.6.0",
|
||||
"_id": "rc-dialog@7.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-KUKf+2eZ4YL+lnXMG3hR4ZtIhC9glfH27NtTVz3gcoDIPAf3uUvaXVRNoDCiSi+OGKLyIb/b6EoidFh6nQC5Wg==",
|
||||
"_location": "/rc-dialog",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "rc-dialog@~7.6.0",
|
||||
"name": "rc-dialog",
|
||||
"escapedName": "rc-dialog",
|
||||
"rawSpec": "~7.6.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~7.6.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/antd"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-7.6.1.tgz",
|
||||
"_shasum": "11545ccc0b945934fa76079726e0d853e52d705f",
|
||||
"_spec": "rc-dialog@~7.6.0",
|
||||
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/antd",
|
||||
"author": {
|
||||
"name": "yiminghe@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/react-component/dialog/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"config": {
|
||||
"port": 8007,
|
||||
"entry": {
|
||||
"rc-dialog": [
|
||||
"./index.js",
|
||||
"./assets/index.less"
|
||||
],
|
||||
"rc-dialog-bootstrap": [
|
||||
"./index.js",
|
||||
"./assets/bootstrap.less"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-runtime": "6.x",
|
||||
"rc-animate": "2.x",
|
||||
"rc-util": "^4.16.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "dialog ui component for react",
|
||||
"devDependencies": {
|
||||
"@types/mocha": "~7.0.1",
|
||||
"@types/react": "^16.0.19",
|
||||
"@types/react-dom": "^16.0.2",
|
||||
"async": "^0.9.0",
|
||||
"bluebird": "~3.7.2",
|
||||
"bootstrap": "^4.3.1",
|
||||
"core-js": "^2.5.1",
|
||||
"expect.js": "~0.3.1",
|
||||
"jquery": "^3.3.1",
|
||||
"pre-commit": "1.x",
|
||||
"rc-drawer": "3.1.3",
|
||||
"rc-test": "^6.0.1",
|
||||
"rc-tools": "7.x",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"es",
|
||||
"assets/*.css",
|
||||
"dist"
|
||||
],
|
||||
"homepage": "http://github.com/react-component/dialog",
|
||||
"keywords": [
|
||||
"react",
|
||||
"react-component",
|
||||
"react-dialog",
|
||||
"dialog",
|
||||
"ui"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/DialogWrap",
|
||||
"module": "./es/DialogWrap",
|
||||
"name": "rc-dialog",
|
||||
"pre-commit": [
|
||||
"lint"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/react-component/dialog.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rc-tools run build",
|
||||
"chrome-test": "rc-test run chrome-test",
|
||||
"compile": "rc-tools run compile --babel-runtime",
|
||||
"coverage": "rc-test run coverage",
|
||||
"dist": "rc-tools run dist",
|
||||
"gh-pages": "rc-tools run gh-pages",
|
||||
"karma": "rc-test run karma",
|
||||
"lint": "rc-tools run lint --no-js-lint",
|
||||
"lint:ts": "tsc",
|
||||
"prepublish": "rc-tools run guard",
|
||||
"pub": "rc-tools run pub --babel-runtime",
|
||||
"saucelabs": "rc-test run saucelabs",
|
||||
"start": "rc-tools run server",
|
||||
"test": "rc-test run test",
|
||||
"watch-tsc": "rc-tools run watch-tsc"
|
||||
},
|
||||
"typings": "./lib/DialogWrap.d.ts",
|
||||
"version": "7.6.1"
|
||||
}
|
||||
Reference in new issue
Block a user