wargerm 0.4.32 → 0.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DragBox/index.d.ts +14 -0
- package/dist/index.css +212 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.css +212 -0
- package/dist/index.esm.js +180 -1
- package/dist/index.js +180 -0
- package/package.json +1 -1
@@ -0,0 +1,14 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
declare type Props = {
|
3
|
+
title?: string | ReactNode;
|
4
|
+
children?: string | ReactNode;
|
5
|
+
closeIcon?: ReactNode;
|
6
|
+
onClose?: () => void;
|
7
|
+
visible: boolean;
|
8
|
+
isDrag?: boolean;
|
9
|
+
isResize?: boolean;
|
10
|
+
className?: string;
|
11
|
+
style?: React.CSSProperties;
|
12
|
+
};
|
13
|
+
export default function DragBox({ title, children, closeIcon, onClose, visible, isDrag, isResize, className, style, }: Props): false | JSX.Element;
|
14
|
+
export {};
|
package/dist/index.css
CHANGED
@@ -29,6 +29,7 @@
|
|
29
29
|
/* Common Styles */
|
30
30
|
/* Bullets */
|
31
31
|
/* Progress */
|
32
|
+
/* Animation css */
|
32
33
|
}
|
33
34
|
[data-prefers-color='dark'] .__dumi-default-previewer {
|
34
35
|
background: linear-gradient(#1c274f 0%, #2f4262 100%);
|
@@ -1412,6 +1413,111 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
|
|
1412
1413
|
[data-prefers-color='dark'] .ant-modal-confirm-btns {
|
1413
1414
|
display: flex;
|
1414
1415
|
}
|
1416
|
+
[data-prefers-color='dark'] [class*='animation-'] {
|
1417
|
+
-webkit-animation-duration: 0.5s;
|
1418
|
+
animation-duration: 0.5s;
|
1419
|
+
-webkit-animation-timing-function: ease-out;
|
1420
|
+
animation-timing-function: ease-out;
|
1421
|
+
-webkit-animation-fill-mode: both;
|
1422
|
+
animation-fill-mode: both;
|
1423
|
+
}
|
1424
|
+
[data-prefers-color='dark'] .animation-fade {
|
1425
|
+
-webkit-animation-name: fadeIn;
|
1426
|
+
animation-name: fadeIn;
|
1427
|
+
-webkit-animation-duration: 0.8s;
|
1428
|
+
animation-duration: 0.8s;
|
1429
|
+
-webkit-animation-timing-function: linear;
|
1430
|
+
animation-timing-function: linear;
|
1431
|
+
}
|
1432
|
+
[data-prefers-color='dark'] .animation-fade-out {
|
1433
|
+
-webkit-animation-name: fadeOut;
|
1434
|
+
animation-name: fadeOut;
|
1435
|
+
-webkit-animation-duration: 0.8s;
|
1436
|
+
animation-duration: 0.8s;
|
1437
|
+
-webkit-animation-timing-function: linear;
|
1438
|
+
animation-timing-function: linear;
|
1439
|
+
}
|
1440
|
+
@-webkit-keyframes fadeIn {
|
1441
|
+
0% {
|
1442
|
+
opacity: 0;
|
1443
|
+
}
|
1444
|
+
100% {
|
1445
|
+
opacity: 1;
|
1446
|
+
}
|
1447
|
+
}
|
1448
|
+
@keyframes fadeIn {
|
1449
|
+
0% {
|
1450
|
+
opacity: 0;
|
1451
|
+
}
|
1452
|
+
100% {
|
1453
|
+
opacity: 1;
|
1454
|
+
}
|
1455
|
+
}
|
1456
|
+
@-webkit-keyframes fadeOut {
|
1457
|
+
0% {
|
1458
|
+
opacity: 1;
|
1459
|
+
}
|
1460
|
+
100% {
|
1461
|
+
opacity: 0;
|
1462
|
+
}
|
1463
|
+
}
|
1464
|
+
@keyframes fadeOut {
|
1465
|
+
0% {
|
1466
|
+
opacity: 1;
|
1467
|
+
}
|
1468
|
+
100% {
|
1469
|
+
opacity: 0;
|
1470
|
+
}
|
1471
|
+
}
|
1472
|
+
[data-prefers-color='dark'] .drag-container {
|
1473
|
+
position: fixed;
|
1474
|
+
width: 300px;
|
1475
|
+
height: 200px;
|
1476
|
+
display: flex;
|
1477
|
+
flex-direction: column;
|
1478
|
+
z-index: 999;
|
1479
|
+
min-width: 50px;
|
1480
|
+
min-height: 50px;
|
1481
|
+
}
|
1482
|
+
[data-prefers-color='dark'] .drag-container .drag-title {
|
1483
|
+
display: flex;
|
1484
|
+
justify-content: space-between;
|
1485
|
+
width: 100%;
|
1486
|
+
}
|
1487
|
+
[data-prefers-color='dark'] .drag-container .drag-title.move {
|
1488
|
+
cursor: move;
|
1489
|
+
z-index: 100;
|
1490
|
+
}
|
1491
|
+
[data-prefers-color='dark'] .drag-container .drag-body {
|
1492
|
+
flex: 1;
|
1493
|
+
}
|
1494
|
+
[data-prefers-color='dark'] .resizer {
|
1495
|
+
width: 10px;
|
1496
|
+
height: 100%;
|
1497
|
+
position: absolute;
|
1498
|
+
right: 0;
|
1499
|
+
top: 0;
|
1500
|
+
cursor: e-resize;
|
1501
|
+
z-index: 100;
|
1502
|
+
}
|
1503
|
+
[data-prefers-color='dark'] .resizeb {
|
1504
|
+
width: 100%;
|
1505
|
+
height: 10px;
|
1506
|
+
position: absolute;
|
1507
|
+
left: 0;
|
1508
|
+
bottom: 0;
|
1509
|
+
cursor: n-resize;
|
1510
|
+
z-index: 100;
|
1511
|
+
}
|
1512
|
+
[data-prefers-color='dark'] .resizerb {
|
1513
|
+
width: 20px;
|
1514
|
+
height: 20px;
|
1515
|
+
position: absolute;
|
1516
|
+
right: 0;
|
1517
|
+
bottom: 0;
|
1518
|
+
cursor: se-resize;
|
1519
|
+
z-index: 101;
|
1520
|
+
}
|
1415
1521
|
[data-prefers-color='dark'] .empty {
|
1416
1522
|
background: #16191e;
|
1417
1523
|
width: 100%;
|
@@ -1522,6 +1628,7 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
|
|
1522
1628
|
/* Common Styles */
|
1523
1629
|
/* Bullets */
|
1524
1630
|
/* Progress */
|
1631
|
+
/* Animation css */
|
1525
1632
|
}
|
1526
1633
|
[data-prefers-color='light'] .ant-btn-dangerous.ant-btn-primary {
|
1527
1634
|
color: #d8655f;
|
@@ -2648,6 +2755,111 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
|
|
2648
2755
|
[data-prefers-color='light'] .ant-modal-confirm-btns {
|
2649
2756
|
display: flex;
|
2650
2757
|
}
|
2758
|
+
[data-prefers-color='light'] [class*='animation-'] {
|
2759
|
+
-webkit-animation-duration: 0.5s;
|
2760
|
+
animation-duration: 0.5s;
|
2761
|
+
-webkit-animation-timing-function: ease-out;
|
2762
|
+
animation-timing-function: ease-out;
|
2763
|
+
-webkit-animation-fill-mode: both;
|
2764
|
+
animation-fill-mode: both;
|
2765
|
+
}
|
2766
|
+
[data-prefers-color='light'] .animation-fade {
|
2767
|
+
-webkit-animation-name: fadeIn;
|
2768
|
+
animation-name: fadeIn;
|
2769
|
+
-webkit-animation-duration: 0.8s;
|
2770
|
+
animation-duration: 0.8s;
|
2771
|
+
-webkit-animation-timing-function: linear;
|
2772
|
+
animation-timing-function: linear;
|
2773
|
+
}
|
2774
|
+
[data-prefers-color='light'] .animation-fade-out {
|
2775
|
+
-webkit-animation-name: fadeOut;
|
2776
|
+
animation-name: fadeOut;
|
2777
|
+
-webkit-animation-duration: 0.8s;
|
2778
|
+
animation-duration: 0.8s;
|
2779
|
+
-webkit-animation-timing-function: linear;
|
2780
|
+
animation-timing-function: linear;
|
2781
|
+
}
|
2782
|
+
@-webkit-keyframes fadeIn {
|
2783
|
+
0% {
|
2784
|
+
opacity: 0;
|
2785
|
+
}
|
2786
|
+
100% {
|
2787
|
+
opacity: 1;
|
2788
|
+
}
|
2789
|
+
}
|
2790
|
+
@keyframes fadeIn {
|
2791
|
+
0% {
|
2792
|
+
opacity: 0;
|
2793
|
+
}
|
2794
|
+
100% {
|
2795
|
+
opacity: 1;
|
2796
|
+
}
|
2797
|
+
}
|
2798
|
+
@-webkit-keyframes fadeOut {
|
2799
|
+
0% {
|
2800
|
+
opacity: 1;
|
2801
|
+
}
|
2802
|
+
100% {
|
2803
|
+
opacity: 0;
|
2804
|
+
}
|
2805
|
+
}
|
2806
|
+
@keyframes fadeOut {
|
2807
|
+
0% {
|
2808
|
+
opacity: 1;
|
2809
|
+
}
|
2810
|
+
100% {
|
2811
|
+
opacity: 0;
|
2812
|
+
}
|
2813
|
+
}
|
2814
|
+
[data-prefers-color='light'] .drag-container {
|
2815
|
+
position: fixed;
|
2816
|
+
width: 300px;
|
2817
|
+
height: 200px;
|
2818
|
+
display: flex;
|
2819
|
+
flex-direction: column;
|
2820
|
+
z-index: 999;
|
2821
|
+
min-width: 50px;
|
2822
|
+
min-height: 50px;
|
2823
|
+
}
|
2824
|
+
[data-prefers-color='light'] .drag-container .drag-title {
|
2825
|
+
display: flex;
|
2826
|
+
justify-content: space-between;
|
2827
|
+
width: 100%;
|
2828
|
+
}
|
2829
|
+
[data-prefers-color='light'] .drag-container .drag-title.move {
|
2830
|
+
cursor: move;
|
2831
|
+
z-index: 100;
|
2832
|
+
}
|
2833
|
+
[data-prefers-color='light'] .drag-container .drag-body {
|
2834
|
+
flex: 1;
|
2835
|
+
}
|
2836
|
+
[data-prefers-color='light'] .resizer {
|
2837
|
+
width: 10px;
|
2838
|
+
height: 100%;
|
2839
|
+
position: absolute;
|
2840
|
+
right: 0;
|
2841
|
+
top: 0;
|
2842
|
+
cursor: e-resize;
|
2843
|
+
z-index: 100;
|
2844
|
+
}
|
2845
|
+
[data-prefers-color='light'] .resizeb {
|
2846
|
+
width: 100%;
|
2847
|
+
height: 10px;
|
2848
|
+
position: absolute;
|
2849
|
+
left: 0;
|
2850
|
+
bottom: 0;
|
2851
|
+
cursor: n-resize;
|
2852
|
+
z-index: 100;
|
2853
|
+
}
|
2854
|
+
[data-prefers-color='light'] .resizerb {
|
2855
|
+
width: 20px;
|
2856
|
+
height: 20px;
|
2857
|
+
position: absolute;
|
2858
|
+
right: 0;
|
2859
|
+
bottom: 0;
|
2860
|
+
cursor: se-resize;
|
2861
|
+
z-index: 101;
|
2862
|
+
}
|
2651
2863
|
[data-prefers-color='light'] .ant-form-item-label > label {
|
2652
2864
|
font-size: 16px;
|
2653
2865
|
color: #4281a1;
|
package/dist/index.d.ts
CHANGED
@@ -22,6 +22,7 @@ export { default as Breadcrumb } from './components/Breadcrumb';
|
|
22
22
|
export { default as Card } from './components/Card';
|
23
23
|
export { default as Modal } from './components/Modal';
|
24
24
|
export { default as ModalTips } from './components/ModalTips';
|
25
|
+
export { default as DragBox } from './components/DragBox';
|
25
26
|
export { default as ModalForm } from './components/ModalForm';
|
26
27
|
export { default as TabelCard } from './components/TabelCard';
|
27
28
|
export { default as Cascader } from './components/Cascader';
|
package/dist/index.esm.css
CHANGED
@@ -29,6 +29,7 @@
|
|
29
29
|
/* Common Styles */
|
30
30
|
/* Bullets */
|
31
31
|
/* Progress */
|
32
|
+
/* Animation css */
|
32
33
|
}
|
33
34
|
[data-prefers-color='dark'] .__dumi-default-previewer {
|
34
35
|
background: linear-gradient(#1c274f 0%, #2f4262 100%);
|
@@ -1412,6 +1413,111 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
|
|
1412
1413
|
[data-prefers-color='dark'] .ant-modal-confirm-btns {
|
1413
1414
|
display: flex;
|
1414
1415
|
}
|
1416
|
+
[data-prefers-color='dark'] [class*='animation-'] {
|
1417
|
+
-webkit-animation-duration: 0.5s;
|
1418
|
+
animation-duration: 0.5s;
|
1419
|
+
-webkit-animation-timing-function: ease-out;
|
1420
|
+
animation-timing-function: ease-out;
|
1421
|
+
-webkit-animation-fill-mode: both;
|
1422
|
+
animation-fill-mode: both;
|
1423
|
+
}
|
1424
|
+
[data-prefers-color='dark'] .animation-fade {
|
1425
|
+
-webkit-animation-name: fadeIn;
|
1426
|
+
animation-name: fadeIn;
|
1427
|
+
-webkit-animation-duration: 0.8s;
|
1428
|
+
animation-duration: 0.8s;
|
1429
|
+
-webkit-animation-timing-function: linear;
|
1430
|
+
animation-timing-function: linear;
|
1431
|
+
}
|
1432
|
+
[data-prefers-color='dark'] .animation-fade-out {
|
1433
|
+
-webkit-animation-name: fadeOut;
|
1434
|
+
animation-name: fadeOut;
|
1435
|
+
-webkit-animation-duration: 0.8s;
|
1436
|
+
animation-duration: 0.8s;
|
1437
|
+
-webkit-animation-timing-function: linear;
|
1438
|
+
animation-timing-function: linear;
|
1439
|
+
}
|
1440
|
+
@-webkit-keyframes fadeIn {
|
1441
|
+
0% {
|
1442
|
+
opacity: 0;
|
1443
|
+
}
|
1444
|
+
100% {
|
1445
|
+
opacity: 1;
|
1446
|
+
}
|
1447
|
+
}
|
1448
|
+
@keyframes fadeIn {
|
1449
|
+
0% {
|
1450
|
+
opacity: 0;
|
1451
|
+
}
|
1452
|
+
100% {
|
1453
|
+
opacity: 1;
|
1454
|
+
}
|
1455
|
+
}
|
1456
|
+
@-webkit-keyframes fadeOut {
|
1457
|
+
0% {
|
1458
|
+
opacity: 1;
|
1459
|
+
}
|
1460
|
+
100% {
|
1461
|
+
opacity: 0;
|
1462
|
+
}
|
1463
|
+
}
|
1464
|
+
@keyframes fadeOut {
|
1465
|
+
0% {
|
1466
|
+
opacity: 1;
|
1467
|
+
}
|
1468
|
+
100% {
|
1469
|
+
opacity: 0;
|
1470
|
+
}
|
1471
|
+
}
|
1472
|
+
[data-prefers-color='dark'] .drag-container {
|
1473
|
+
position: fixed;
|
1474
|
+
width: 300px;
|
1475
|
+
height: 200px;
|
1476
|
+
display: flex;
|
1477
|
+
flex-direction: column;
|
1478
|
+
z-index: 999;
|
1479
|
+
min-width: 50px;
|
1480
|
+
min-height: 50px;
|
1481
|
+
}
|
1482
|
+
[data-prefers-color='dark'] .drag-container .drag-title {
|
1483
|
+
display: flex;
|
1484
|
+
justify-content: space-between;
|
1485
|
+
width: 100%;
|
1486
|
+
}
|
1487
|
+
[data-prefers-color='dark'] .drag-container .drag-title.move {
|
1488
|
+
cursor: move;
|
1489
|
+
z-index: 100;
|
1490
|
+
}
|
1491
|
+
[data-prefers-color='dark'] .drag-container .drag-body {
|
1492
|
+
flex: 1;
|
1493
|
+
}
|
1494
|
+
[data-prefers-color='dark'] .resizer {
|
1495
|
+
width: 10px;
|
1496
|
+
height: 100%;
|
1497
|
+
position: absolute;
|
1498
|
+
right: 0;
|
1499
|
+
top: 0;
|
1500
|
+
cursor: e-resize;
|
1501
|
+
z-index: 100;
|
1502
|
+
}
|
1503
|
+
[data-prefers-color='dark'] .resizeb {
|
1504
|
+
width: 100%;
|
1505
|
+
height: 10px;
|
1506
|
+
position: absolute;
|
1507
|
+
left: 0;
|
1508
|
+
bottom: 0;
|
1509
|
+
cursor: n-resize;
|
1510
|
+
z-index: 100;
|
1511
|
+
}
|
1512
|
+
[data-prefers-color='dark'] .resizerb {
|
1513
|
+
width: 20px;
|
1514
|
+
height: 20px;
|
1515
|
+
position: absolute;
|
1516
|
+
right: 0;
|
1517
|
+
bottom: 0;
|
1518
|
+
cursor: se-resize;
|
1519
|
+
z-index: 101;
|
1520
|
+
}
|
1415
1521
|
[data-prefers-color='dark'] .empty {
|
1416
1522
|
background: #16191e;
|
1417
1523
|
width: 100%;
|
@@ -1522,6 +1628,7 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
|
|
1522
1628
|
/* Common Styles */
|
1523
1629
|
/* Bullets */
|
1524
1630
|
/* Progress */
|
1631
|
+
/* Animation css */
|
1525
1632
|
}
|
1526
1633
|
[data-prefers-color='light'] .ant-btn-dangerous.ant-btn-primary {
|
1527
1634
|
color: #d8655f;
|
@@ -2648,6 +2755,111 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
|
|
2648
2755
|
[data-prefers-color='light'] .ant-modal-confirm-btns {
|
2649
2756
|
display: flex;
|
2650
2757
|
}
|
2758
|
+
[data-prefers-color='light'] [class*='animation-'] {
|
2759
|
+
-webkit-animation-duration: 0.5s;
|
2760
|
+
animation-duration: 0.5s;
|
2761
|
+
-webkit-animation-timing-function: ease-out;
|
2762
|
+
animation-timing-function: ease-out;
|
2763
|
+
-webkit-animation-fill-mode: both;
|
2764
|
+
animation-fill-mode: both;
|
2765
|
+
}
|
2766
|
+
[data-prefers-color='light'] .animation-fade {
|
2767
|
+
-webkit-animation-name: fadeIn;
|
2768
|
+
animation-name: fadeIn;
|
2769
|
+
-webkit-animation-duration: 0.8s;
|
2770
|
+
animation-duration: 0.8s;
|
2771
|
+
-webkit-animation-timing-function: linear;
|
2772
|
+
animation-timing-function: linear;
|
2773
|
+
}
|
2774
|
+
[data-prefers-color='light'] .animation-fade-out {
|
2775
|
+
-webkit-animation-name: fadeOut;
|
2776
|
+
animation-name: fadeOut;
|
2777
|
+
-webkit-animation-duration: 0.8s;
|
2778
|
+
animation-duration: 0.8s;
|
2779
|
+
-webkit-animation-timing-function: linear;
|
2780
|
+
animation-timing-function: linear;
|
2781
|
+
}
|
2782
|
+
@-webkit-keyframes fadeIn {
|
2783
|
+
0% {
|
2784
|
+
opacity: 0;
|
2785
|
+
}
|
2786
|
+
100% {
|
2787
|
+
opacity: 1;
|
2788
|
+
}
|
2789
|
+
}
|
2790
|
+
@keyframes fadeIn {
|
2791
|
+
0% {
|
2792
|
+
opacity: 0;
|
2793
|
+
}
|
2794
|
+
100% {
|
2795
|
+
opacity: 1;
|
2796
|
+
}
|
2797
|
+
}
|
2798
|
+
@-webkit-keyframes fadeOut {
|
2799
|
+
0% {
|
2800
|
+
opacity: 1;
|
2801
|
+
}
|
2802
|
+
100% {
|
2803
|
+
opacity: 0;
|
2804
|
+
}
|
2805
|
+
}
|
2806
|
+
@keyframes fadeOut {
|
2807
|
+
0% {
|
2808
|
+
opacity: 1;
|
2809
|
+
}
|
2810
|
+
100% {
|
2811
|
+
opacity: 0;
|
2812
|
+
}
|
2813
|
+
}
|
2814
|
+
[data-prefers-color='light'] .drag-container {
|
2815
|
+
position: fixed;
|
2816
|
+
width: 300px;
|
2817
|
+
height: 200px;
|
2818
|
+
display: flex;
|
2819
|
+
flex-direction: column;
|
2820
|
+
z-index: 999;
|
2821
|
+
min-width: 50px;
|
2822
|
+
min-height: 50px;
|
2823
|
+
}
|
2824
|
+
[data-prefers-color='light'] .drag-container .drag-title {
|
2825
|
+
display: flex;
|
2826
|
+
justify-content: space-between;
|
2827
|
+
width: 100%;
|
2828
|
+
}
|
2829
|
+
[data-prefers-color='light'] .drag-container .drag-title.move {
|
2830
|
+
cursor: move;
|
2831
|
+
z-index: 100;
|
2832
|
+
}
|
2833
|
+
[data-prefers-color='light'] .drag-container .drag-body {
|
2834
|
+
flex: 1;
|
2835
|
+
}
|
2836
|
+
[data-prefers-color='light'] .resizer {
|
2837
|
+
width: 10px;
|
2838
|
+
height: 100%;
|
2839
|
+
position: absolute;
|
2840
|
+
right: 0;
|
2841
|
+
top: 0;
|
2842
|
+
cursor: e-resize;
|
2843
|
+
z-index: 100;
|
2844
|
+
}
|
2845
|
+
[data-prefers-color='light'] .resizeb {
|
2846
|
+
width: 100%;
|
2847
|
+
height: 10px;
|
2848
|
+
position: absolute;
|
2849
|
+
left: 0;
|
2850
|
+
bottom: 0;
|
2851
|
+
cursor: n-resize;
|
2852
|
+
z-index: 100;
|
2853
|
+
}
|
2854
|
+
[data-prefers-color='light'] .resizerb {
|
2855
|
+
width: 20px;
|
2856
|
+
height: 20px;
|
2857
|
+
position: absolute;
|
2858
|
+
right: 0;
|
2859
|
+
bottom: 0;
|
2860
|
+
cursor: se-resize;
|
2861
|
+
z-index: 101;
|
2862
|
+
}
|
2651
2863
|
[data-prefers-color='light'] .ant-form-item-label > label {
|
2652
2864
|
font-size: 16px;
|
2653
2865
|
color: #4281a1;
|
package/dist/index.esm.js
CHANGED
@@ -10323,6 +10323,185 @@ Modal$1.hidden = function () {
|
|
10323
10323
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
10324
10324
|
};
|
10325
10325
|
|
10326
|
+
function DragBox(_ref) {
|
10327
|
+
var title = _ref.title,
|
10328
|
+
children = _ref.children,
|
10329
|
+
closeIcon = _ref.closeIcon,
|
10330
|
+
onClose = _ref.onClose,
|
10331
|
+
visible = _ref.visible,
|
10332
|
+
isDrag = _ref.isDrag,
|
10333
|
+
isResize = _ref.isResize,
|
10334
|
+
className = _ref.className,
|
10335
|
+
style = _ref.style;
|
10336
|
+
var titleRef = useRef(null);
|
10337
|
+
var containerRef = useRef(null);
|
10338
|
+
var ltRef = useRef(null);
|
10339
|
+
var rRef = useRef(null);
|
10340
|
+
var bRef = useRef(null);
|
10341
|
+
var rbRef = useRef(null);
|
10342
|
+
|
10343
|
+
var _useState = useState(false),
|
10344
|
+
_useState2 = _slicedToArray(_useState, 2),
|
10345
|
+
delayVisiable = _useState2[0],
|
10346
|
+
setDelayVisiable = _useState2[1];
|
10347
|
+
|
10348
|
+
useEffect(function () {
|
10349
|
+
var timer = null;
|
10350
|
+
|
10351
|
+
if (visible) {
|
10352
|
+
setDelayVisiable(visible);
|
10353
|
+
} else {
|
10354
|
+
timer = setTimeout(function () {
|
10355
|
+
setDelayVisiable(visible);
|
10356
|
+
}, 1000);
|
10357
|
+
}
|
10358
|
+
|
10359
|
+
return function () {
|
10360
|
+
timer && clearTimeout(timer);
|
10361
|
+
};
|
10362
|
+
}, [visible]);
|
10363
|
+
useEffect(function () {
|
10364
|
+
var tltleEl = titleRef.current;
|
10365
|
+
var containerEl = containerRef.current;
|
10366
|
+
console.log(titleRef, containerRef);
|
10367
|
+
var tltleElOnmousedown = null;
|
10368
|
+
|
10369
|
+
if (tltleEl && containerEl && isDrag) {
|
10370
|
+
tltleElOnmousedown = function tltleElOnmousedown(eventDown) {
|
10371
|
+
var left = containerEl.offsetLeft;
|
10372
|
+
var top = containerEl.offsetTop;
|
10373
|
+
var downX = eventDown.clientX;
|
10374
|
+
var downY = eventDown.clientY;
|
10375
|
+
console.log(left, top);
|
10376
|
+
|
10377
|
+
document.onmousemove = function (eventMove) {
|
10378
|
+
eventMove.stopPropagation();
|
10379
|
+
eventMove.preventDefault();
|
10380
|
+
var moveX = eventMove.clientX - downX;
|
10381
|
+
var moveY = eventMove.clientY - downY;
|
10382
|
+
containerEl.style.left = "".concat(left + moveX, "px");
|
10383
|
+
containerEl.style.top = "".concat(top + moveY, "px");
|
10384
|
+
};
|
10385
|
+
};
|
10386
|
+
|
10387
|
+
tltleEl.onmousedown = tltleElOnmousedown;
|
10388
|
+
}
|
10389
|
+
|
10390
|
+
var rEl = rRef.current;
|
10391
|
+
var bEl = bRef.current;
|
10392
|
+
var rbEl = rbRef.current;
|
10393
|
+
var rElOnmousedown = null;
|
10394
|
+
var bElOnmousedown = null;
|
10395
|
+
var rbElOnmousedown = null;
|
10396
|
+
|
10397
|
+
if (containerEl && isResize && rEl && bEl && rbEl) {
|
10398
|
+
rElOnmousedown = function rElOnmousedown(e) {
|
10399
|
+
var disX = e.clientX - rEl.offsetLeft;
|
10400
|
+
|
10401
|
+
document.onmousemove = function (e) {
|
10402
|
+
e.stopPropagation();
|
10403
|
+
e.preventDefault();
|
10404
|
+
var l = e.clientX - disX;
|
10405
|
+
containerEl.style.width = "".concat(l, "px");
|
10406
|
+
};
|
10407
|
+
|
10408
|
+
document.onmouseup = function (e) {
|
10409
|
+
document.onmousemove = null;
|
10410
|
+
};
|
10411
|
+
};
|
10412
|
+
|
10413
|
+
rEl.onmousedown = rElOnmousedown;
|
10414
|
+
|
10415
|
+
bElOnmousedown = function bElOnmousedown(e) {
|
10416
|
+
var disY = e.clientY - bEl.offsetTop;
|
10417
|
+
|
10418
|
+
document.onmousemove = function (e) {
|
10419
|
+
e.stopPropagation();
|
10420
|
+
e.preventDefault();
|
10421
|
+
var h = e.clientY - disY;
|
10422
|
+
containerEl.style.height = "".concat(h, "px");
|
10423
|
+
};
|
10424
|
+
|
10425
|
+
document.onmouseup = function (e) {
|
10426
|
+
document.onmousemove = null;
|
10427
|
+
};
|
10428
|
+
};
|
10429
|
+
|
10430
|
+
bEl.onmousedown = bElOnmousedown;
|
10431
|
+
|
10432
|
+
rbElOnmousedown = function rbElOnmousedown(e) {
|
10433
|
+
var disX = e.clientX - rbEl.offsetLeft;
|
10434
|
+
var disY = e.clientY - rbEl.offsetTop;
|
10435
|
+
|
10436
|
+
document.onmousemove = function (e) {
|
10437
|
+
e.stopPropagation();
|
10438
|
+
e.preventDefault();
|
10439
|
+
var l = e.clientX - disX;
|
10440
|
+
var h = e.clientY - disY;
|
10441
|
+
containerEl.style.width = "".concat(l, "px");
|
10442
|
+
containerEl.style.height = "".concat(h, "px");
|
10443
|
+
};
|
10444
|
+
|
10445
|
+
document.onmouseup = function (e) {
|
10446
|
+
document.onmousemove = null;
|
10447
|
+
};
|
10448
|
+
};
|
10449
|
+
|
10450
|
+
rbEl.onmousedown = rbElOnmousedown;
|
10451
|
+
}
|
10452
|
+
|
10453
|
+
document.onmouseup = function (eventMove) {
|
10454
|
+
document.onmousemove = null;
|
10455
|
+
};
|
10456
|
+
|
10457
|
+
return function () {
|
10458
|
+
if (tltleElOnmousedown) {
|
10459
|
+
document.onmousemove = null;
|
10460
|
+
}
|
10461
|
+
|
10462
|
+
if (rElOnmousedown) {
|
10463
|
+
rElOnmousedown = null;
|
10464
|
+
}
|
10465
|
+
|
10466
|
+
if (bElOnmousedown) {
|
10467
|
+
rElOnmousedown = null;
|
10468
|
+
}
|
10469
|
+
|
10470
|
+
if (rbElOnmousedown) {
|
10471
|
+
rElOnmousedown = null;
|
10472
|
+
}
|
10473
|
+
};
|
10474
|
+
}, [isDrag, delayVisiable, visible, isResize]);
|
10475
|
+
return delayVisiable && /*#__PURE__*/React.createElement("div", {
|
10476
|
+
ref: containerRef,
|
10477
|
+
className: "drag-container ".concat(visible ? 'animation-fade' : 'animation-fade-out', " ").concat(className),
|
10478
|
+
style: _objectSpread2({
|
10479
|
+
animationDelay: "0.3s"
|
10480
|
+
}, style || {})
|
10481
|
+
}, isResize && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
10482
|
+
ref: rRef,
|
10483
|
+
className: "resizer"
|
10484
|
+
}), /*#__PURE__*/React.createElement("div", {
|
10485
|
+
ref: bRef,
|
10486
|
+
className: "resizeb"
|
10487
|
+
}), /*#__PURE__*/React.createElement("div", {
|
10488
|
+
ref: rbRef,
|
10489
|
+
className: "resizerb"
|
10490
|
+
})), /*#__PURE__*/React.createElement("div", {
|
10491
|
+
ref: titleRef,
|
10492
|
+
className: "drag-title ".concat(isDrag ? 'move' : '')
|
10493
|
+
}, title, /*#__PURE__*/React.createElement("span", {
|
10494
|
+
style: {
|
10495
|
+
cursor: 'pointer'
|
10496
|
+
},
|
10497
|
+
onClick: function onClick() {
|
10498
|
+
onClose && onClose();
|
10499
|
+
}
|
10500
|
+
}, closeIcon || /*#__PURE__*/React.createElement(CloseCircleOutlined, null))), /*#__PURE__*/React.createElement("div", {
|
10501
|
+
className: "drag-body"
|
10502
|
+
}, children));
|
10503
|
+
}
|
10504
|
+
|
10326
10505
|
var _excluded$g = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild"];
|
10327
10506
|
|
10328
10507
|
var ModalForm = function ModalForm(props, ref) {
|
@@ -12442,4 +12621,4 @@ function WaterLevelCharts(config) {
|
|
12442
12621
|
});
|
12443
12622
|
}
|
12444
12623
|
|
12445
|
-
export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, index$1 as Card, WCascader as Cascader, Index$3 as Checkbox, Index$8 as CountUp, Index$1 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$7 as Number, NumericInput, Index$2 as Radio, Select, Index$a as Swiper, WSwitch as Switch, index$2 as TabelCard, Table, Index$6 as TreeSelect, index$4 as Video, index$3 as VideoPlayer, Index$5 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart };
|
12624
|
+
export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, index$1 as Card, WCascader as Cascader, Index$3 as Checkbox, Index$8 as CountUp, Index$1 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$7 as Number, NumericInput, Index$2 as Radio, Select, Index$a as Swiper, WSwitch as Switch, index$2 as TabelCard, Table, Index$6 as TreeSelect, index$4 as Video, index$3 as VideoPlayer, Index$5 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart };
|
package/dist/index.js
CHANGED
@@ -10382,6 +10382,185 @@ Modal$1.hidden = function () {
|
|
10382
10382
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
10383
10383
|
};
|
10384
10384
|
|
10385
|
+
function DragBox(_ref) {
|
10386
|
+
var title = _ref.title,
|
10387
|
+
children = _ref.children,
|
10388
|
+
closeIcon = _ref.closeIcon,
|
10389
|
+
onClose = _ref.onClose,
|
10390
|
+
visible = _ref.visible,
|
10391
|
+
isDrag = _ref.isDrag,
|
10392
|
+
isResize = _ref.isResize,
|
10393
|
+
className = _ref.className,
|
10394
|
+
style = _ref.style;
|
10395
|
+
var titleRef = React.useRef(null);
|
10396
|
+
var containerRef = React.useRef(null);
|
10397
|
+
var ltRef = React.useRef(null);
|
10398
|
+
var rRef = React.useRef(null);
|
10399
|
+
var bRef = React.useRef(null);
|
10400
|
+
var rbRef = React.useRef(null);
|
10401
|
+
|
10402
|
+
var _useState = React.useState(false),
|
10403
|
+
_useState2 = _slicedToArray(_useState, 2),
|
10404
|
+
delayVisiable = _useState2[0],
|
10405
|
+
setDelayVisiable = _useState2[1];
|
10406
|
+
|
10407
|
+
React.useEffect(function () {
|
10408
|
+
var timer = null;
|
10409
|
+
|
10410
|
+
if (visible) {
|
10411
|
+
setDelayVisiable(visible);
|
10412
|
+
} else {
|
10413
|
+
timer = setTimeout(function () {
|
10414
|
+
setDelayVisiable(visible);
|
10415
|
+
}, 1000);
|
10416
|
+
}
|
10417
|
+
|
10418
|
+
return function () {
|
10419
|
+
timer && clearTimeout(timer);
|
10420
|
+
};
|
10421
|
+
}, [visible]);
|
10422
|
+
React.useEffect(function () {
|
10423
|
+
var tltleEl = titleRef.current;
|
10424
|
+
var containerEl = containerRef.current;
|
10425
|
+
console.log(titleRef, containerRef);
|
10426
|
+
var tltleElOnmousedown = null;
|
10427
|
+
|
10428
|
+
if (tltleEl && containerEl && isDrag) {
|
10429
|
+
tltleElOnmousedown = function tltleElOnmousedown(eventDown) {
|
10430
|
+
var left = containerEl.offsetLeft;
|
10431
|
+
var top = containerEl.offsetTop;
|
10432
|
+
var downX = eventDown.clientX;
|
10433
|
+
var downY = eventDown.clientY;
|
10434
|
+
console.log(left, top);
|
10435
|
+
|
10436
|
+
document.onmousemove = function (eventMove) {
|
10437
|
+
eventMove.stopPropagation();
|
10438
|
+
eventMove.preventDefault();
|
10439
|
+
var moveX = eventMove.clientX - downX;
|
10440
|
+
var moveY = eventMove.clientY - downY;
|
10441
|
+
containerEl.style.left = "".concat(left + moveX, "px");
|
10442
|
+
containerEl.style.top = "".concat(top + moveY, "px");
|
10443
|
+
};
|
10444
|
+
};
|
10445
|
+
|
10446
|
+
tltleEl.onmousedown = tltleElOnmousedown;
|
10447
|
+
}
|
10448
|
+
|
10449
|
+
var rEl = rRef.current;
|
10450
|
+
var bEl = bRef.current;
|
10451
|
+
var rbEl = rbRef.current;
|
10452
|
+
var rElOnmousedown = null;
|
10453
|
+
var bElOnmousedown = null;
|
10454
|
+
var rbElOnmousedown = null;
|
10455
|
+
|
10456
|
+
if (containerEl && isResize && rEl && bEl && rbEl) {
|
10457
|
+
rElOnmousedown = function rElOnmousedown(e) {
|
10458
|
+
var disX = e.clientX - rEl.offsetLeft;
|
10459
|
+
|
10460
|
+
document.onmousemove = function (e) {
|
10461
|
+
e.stopPropagation();
|
10462
|
+
e.preventDefault();
|
10463
|
+
var l = e.clientX - disX;
|
10464
|
+
containerEl.style.width = "".concat(l, "px");
|
10465
|
+
};
|
10466
|
+
|
10467
|
+
document.onmouseup = function (e) {
|
10468
|
+
document.onmousemove = null;
|
10469
|
+
};
|
10470
|
+
};
|
10471
|
+
|
10472
|
+
rEl.onmousedown = rElOnmousedown;
|
10473
|
+
|
10474
|
+
bElOnmousedown = function bElOnmousedown(e) {
|
10475
|
+
var disY = e.clientY - bEl.offsetTop;
|
10476
|
+
|
10477
|
+
document.onmousemove = function (e) {
|
10478
|
+
e.stopPropagation();
|
10479
|
+
e.preventDefault();
|
10480
|
+
var h = e.clientY - disY;
|
10481
|
+
containerEl.style.height = "".concat(h, "px");
|
10482
|
+
};
|
10483
|
+
|
10484
|
+
document.onmouseup = function (e) {
|
10485
|
+
document.onmousemove = null;
|
10486
|
+
};
|
10487
|
+
};
|
10488
|
+
|
10489
|
+
bEl.onmousedown = bElOnmousedown;
|
10490
|
+
|
10491
|
+
rbElOnmousedown = function rbElOnmousedown(e) {
|
10492
|
+
var disX = e.clientX - rbEl.offsetLeft;
|
10493
|
+
var disY = e.clientY - rbEl.offsetTop;
|
10494
|
+
|
10495
|
+
document.onmousemove = function (e) {
|
10496
|
+
e.stopPropagation();
|
10497
|
+
e.preventDefault();
|
10498
|
+
var l = e.clientX - disX;
|
10499
|
+
var h = e.clientY - disY;
|
10500
|
+
containerEl.style.width = "".concat(l, "px");
|
10501
|
+
containerEl.style.height = "".concat(h, "px");
|
10502
|
+
};
|
10503
|
+
|
10504
|
+
document.onmouseup = function (e) {
|
10505
|
+
document.onmousemove = null;
|
10506
|
+
};
|
10507
|
+
};
|
10508
|
+
|
10509
|
+
rbEl.onmousedown = rbElOnmousedown;
|
10510
|
+
}
|
10511
|
+
|
10512
|
+
document.onmouseup = function (eventMove) {
|
10513
|
+
document.onmousemove = null;
|
10514
|
+
};
|
10515
|
+
|
10516
|
+
return function () {
|
10517
|
+
if (tltleElOnmousedown) {
|
10518
|
+
document.onmousemove = null;
|
10519
|
+
}
|
10520
|
+
|
10521
|
+
if (rElOnmousedown) {
|
10522
|
+
rElOnmousedown = null;
|
10523
|
+
}
|
10524
|
+
|
10525
|
+
if (bElOnmousedown) {
|
10526
|
+
rElOnmousedown = null;
|
10527
|
+
}
|
10528
|
+
|
10529
|
+
if (rbElOnmousedown) {
|
10530
|
+
rElOnmousedown = null;
|
10531
|
+
}
|
10532
|
+
};
|
10533
|
+
}, [isDrag, delayVisiable, visible, isResize]);
|
10534
|
+
return delayVisiable && /*#__PURE__*/React__default['default'].createElement("div", {
|
10535
|
+
ref: containerRef,
|
10536
|
+
className: "drag-container ".concat(visible ? 'animation-fade' : 'animation-fade-out', " ").concat(className),
|
10537
|
+
style: _objectSpread2({
|
10538
|
+
animationDelay: "0.3s"
|
10539
|
+
}, style || {})
|
10540
|
+
}, isResize && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
10541
|
+
ref: rRef,
|
10542
|
+
className: "resizer"
|
10543
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
10544
|
+
ref: bRef,
|
10545
|
+
className: "resizeb"
|
10546
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
10547
|
+
ref: rbRef,
|
10548
|
+
className: "resizerb"
|
10549
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
10550
|
+
ref: titleRef,
|
10551
|
+
className: "drag-title ".concat(isDrag ? 'move' : '')
|
10552
|
+
}, title, /*#__PURE__*/React__default['default'].createElement("span", {
|
10553
|
+
style: {
|
10554
|
+
cursor: 'pointer'
|
10555
|
+
},
|
10556
|
+
onClick: function onClick() {
|
10557
|
+
onClose && onClose();
|
10558
|
+
}
|
10559
|
+
}, closeIcon || /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, null))), /*#__PURE__*/React__default['default'].createElement("div", {
|
10560
|
+
className: "drag-body"
|
10561
|
+
}, children));
|
10562
|
+
}
|
10563
|
+
|
10385
10564
|
var _excluded$g = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild"];
|
10386
10565
|
|
10387
10566
|
var ModalForm = function ModalForm(props, ref) {
|
@@ -12509,6 +12688,7 @@ exports.Cascader = WCascader;
|
|
12509
12688
|
exports.Checkbox = Index$3;
|
12510
12689
|
exports.CountUp = Index$8;
|
12511
12690
|
exports.DatePicker = Index$1;
|
12691
|
+
exports.DragBox = DragBox;
|
12512
12692
|
exports.IconFont = index;
|
12513
12693
|
exports.Input = Index;
|
12514
12694
|
exports.InputNumber = WInputNumber;
|