@whitesev/pops 1.7.3 → 1.7.5
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/index.amd.js +138 -1498
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +138 -1498
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +138 -1498
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +138 -1498
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +138 -1498
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +138 -1498
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +2 -1
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +1 -0
- package/dist/types/src/utils/PopsUtils.d.ts +2 -1
- package/package.json +2 -1
- package/src/Pops.ts +1 -1
- package/src/components/alert/index.css +13 -11
- package/src/components/confirm/index.css +13 -11
- package/src/components/drawer/config.ts +0 -4
- package/src/components/drawer/index.css +12 -7
- package/src/components/folder/index.css +20 -12
- package/src/components/iframe/config.ts +1 -1
- package/src/components/iframe/index.css +26 -11
- package/src/components/iframe/index.ts +93 -134
- package/src/components/loading/index.css +2 -1
- package/src/components/panel/PanelHandleContentDetails.ts +1 -1
- package/src/components/panel/index.css +33 -14
- package/src/components/prompt/index.css +13 -11
- package/src/components/rightClickMenu/index.css +2 -1
- package/src/css/button.css +1 -1
- package/src/css/common.css +15 -1
- package/src/css/index.css +15 -5
- package/src/utils/PopsInstanceUtils.ts +112 -118
- package/src/utils/PopsUtils.ts +5 -2
- package/dist/types/src/utils/AnyTouch.d.ts +0 -17
- package/src/utils/AnyTouch.js +0 -1394
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ declare class Pops {
|
|
|
79
79
|
formatTime(text?: string | number | Date, formatType?: string): string;
|
|
80
80
|
formatTime(text?: string | number | Date, formatType?: "yyyy-MM-dd HH:mm:ss" | "yyyy/MM/dd HH:mm:ss" | "yyyy_MM_dd_HH_mm_ss" | "yyyy\u5E74MM\u6708dd\u65E5 HH\u65F6mm\u5206ss\u79D2" | "yyyy\u5E74MM\u6708dd\u65E5 hh:mm:ss" | "yyyy\u5E74MM\u6708dd\u65E5 HH:mm:ss" | "yyyy-MM-dd" | "yyyyMMdd" | "HH:mm:ss"): string;
|
|
81
81
|
formatByteToSize<T extends boolean>(byteSize: number | string, addType?: T | undefined): T extends true ? string : number;
|
|
82
|
-
AnyTouch: () => any;
|
|
82
|
+
AnyTouch: () => typeof import("any-touch").default;
|
|
83
83
|
};
|
|
84
84
|
/** pops使用的DOM工具类 */
|
|
85
85
|
DOMUtils: {
|
|
@@ -162,6 +162,7 @@ declare class Pops {
|
|
|
162
162
|
drag(moveElement: HTMLElement, options: {
|
|
163
163
|
dragElement: HTMLElement;
|
|
164
164
|
limit: boolean;
|
|
165
|
+
triggerClick?: boolean;
|
|
165
166
|
extraDistance: number;
|
|
166
167
|
container?: Window | typeof globalThis | HTMLElement;
|
|
167
168
|
moveCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
|
|
@@ -92,6 +92,7 @@ export declare const PopsInstanceUtils: {
|
|
|
92
92
|
drag(moveElement: HTMLElement, options: {
|
|
93
93
|
dragElement: HTMLElement;
|
|
94
94
|
limit: boolean;
|
|
95
|
+
triggerClick?: boolean;
|
|
95
96
|
extraDistance: number;
|
|
96
97
|
container?: Window | typeof globalThis | HTMLElement;
|
|
97
98
|
moveCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import AnyTouch from "any-touch";
|
|
1
2
|
declare class PopsUtils {
|
|
2
3
|
/**
|
|
3
4
|
* 判断是否是window,例如window、self、globalThis
|
|
@@ -117,7 +118,7 @@ declare class PopsUtils {
|
|
|
117
118
|
* > 793.27
|
|
118
119
|
**/
|
|
119
120
|
formatByteToSize<T extends boolean>(byteSize: number | string, addType?: T): T extends true ? string : number;
|
|
120
|
-
AnyTouch: () =>
|
|
121
|
+
AnyTouch: () => typeof AnyTouch;
|
|
121
122
|
}
|
|
122
123
|
declare const popsUtils: PopsUtils;
|
|
123
124
|
export { popsUtils };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whitesev/pops",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "弹窗库",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@rollup/plugin-commonjs": "^25.0.8",
|
|
38
38
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
39
39
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
40
|
+
"any-touch": "^2.2.0",
|
|
40
41
|
"rollup-plugin-clear": "^2.0.7",
|
|
41
42
|
"tslib": "^2.6.2"
|
|
42
43
|
},
|
package/src/Pops.ts
CHANGED
|
@@ -16,30 +16,32 @@
|
|
|
16
16
|
text-overflow: ellipsis;
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
font-weight: 500;
|
|
19
|
-
line-height:
|
|
20
|
-
}
|
|
21
|
-
.pops[type-value="alert"] .pops-alert-content p[pops] {
|
|
22
|
-
padding: 5px 10px;
|
|
23
|
-
color: rgb(51, 51, 51);
|
|
24
|
-
text-indent: 15px;
|
|
19
|
+
line-height: normal;
|
|
25
20
|
}
|
|
26
21
|
.pops[type-value="alert"] .pops-alert-content {
|
|
27
22
|
width: 100%;
|
|
28
|
-
height: calc(
|
|
23
|
+
/*height: calc(
|
|
29
24
|
100% - var(--container-title-height) - var(--container-bottom-btn-height)
|
|
30
|
-
)
|
|
25
|
+
);*/
|
|
26
|
+
flex: 1;
|
|
31
27
|
overflow: auto;
|
|
32
28
|
word-break: break-word;
|
|
33
29
|
}
|
|
30
|
+
.pops[type-value="alert"] .pops-alert-content p[pops] {
|
|
31
|
+
padding: 5px 10px;
|
|
32
|
+
color: rgb(51, 51, 51);
|
|
33
|
+
text-indent: 15px;
|
|
34
|
+
}
|
|
34
35
|
.pops[type-value="alert"] .pops-alert-btn {
|
|
35
|
-
position: absolute;
|
|
36
|
-
bottom: 0
|
|
36
|
+
/*position: absolute;
|
|
37
|
+
bottom: 0;*/
|
|
37
38
|
display: flex;
|
|
38
39
|
padding: 10px 10px 10px 10px;
|
|
39
40
|
width: 100%;
|
|
40
41
|
height: var(--container-bottom-btn-height);
|
|
42
|
+
max-height: var(--container-bottom-btn-height);
|
|
43
|
+
line-height: normal;
|
|
41
44
|
border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
42
45
|
text-align: right;
|
|
43
|
-
line-height: var(--container-bottom-btn-height);
|
|
44
46
|
align-items: center;
|
|
45
47
|
}
|
|
@@ -16,30 +16,32 @@
|
|
|
16
16
|
text-overflow: ellipsis;
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
font-weight: 500;
|
|
19
|
-
line-height:
|
|
20
|
-
}
|
|
21
|
-
.pops[type-value="confirm"] .pops-confirm-content p[pops] {
|
|
22
|
-
padding: 5px 10px;
|
|
23
|
-
color: rgb(51, 51, 51);
|
|
24
|
-
text-indent: 15px;
|
|
19
|
+
line-height: normal;
|
|
25
20
|
}
|
|
26
21
|
.pops[type-value="confirm"] .pops-confirm-content {
|
|
27
22
|
width: 100%;
|
|
28
|
-
height: calc(
|
|
23
|
+
/*height: calc(
|
|
29
24
|
100% - var(--container-title-height) - var(--container-bottom-btn-height)
|
|
30
|
-
)
|
|
25
|
+
);*/
|
|
26
|
+
flex: 1;
|
|
31
27
|
overflow: auto;
|
|
32
28
|
word-break: break-word;
|
|
33
29
|
}
|
|
30
|
+
.pops[type-value="confirm"] .pops-confirm-content p[pops] {
|
|
31
|
+
padding: 5px 10px;
|
|
32
|
+
color: rgb(51, 51, 51);
|
|
33
|
+
text-indent: 15px;
|
|
34
|
+
}
|
|
34
35
|
.pops[type-value="confirm"] .pops-confirm-btn {
|
|
35
|
-
position: absolute;
|
|
36
|
-
bottom: 0
|
|
36
|
+
/*position: absolute;
|
|
37
|
+
bottom: 0;*/
|
|
37
38
|
display: flex;
|
|
38
39
|
padding: 10px 10px 10px 10px;
|
|
39
40
|
width: 100%;
|
|
40
41
|
height: var(--container-bottom-btn-height);
|
|
42
|
+
max-height: var(--container-bottom-btn-height);
|
|
43
|
+
line-height: normal;
|
|
41
44
|
border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
42
45
|
text-align: right;
|
|
43
|
-
line-height: var(--container-bottom-btn-height);
|
|
44
46
|
align-items: center;
|
|
45
47
|
}
|
|
@@ -7,20 +7,16 @@ export const PopsDrawerConfig = (): Required<PopsDrawerDetails> => {
|
|
|
7
7
|
position: "center",
|
|
8
8
|
text: "默认标题",
|
|
9
9
|
html: false,
|
|
10
|
-
style: "height: 60px;line-height: 60px;",
|
|
11
10
|
},
|
|
12
11
|
content: {
|
|
13
12
|
text: "默认内容",
|
|
14
13
|
html: false,
|
|
15
|
-
style: "overflow: auto;padding: 0px 10px;",
|
|
16
14
|
},
|
|
17
15
|
btn: {
|
|
18
16
|
position: "flex-end",
|
|
19
17
|
ok: {
|
|
20
18
|
enable: true,
|
|
21
|
-
|
|
22
19
|
size: void 0,
|
|
23
|
-
|
|
24
20
|
icon: void 0,
|
|
25
21
|
rightIcon: false,
|
|
26
22
|
iconIsLoading: false,
|
|
@@ -13,7 +13,19 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
}
|
|
16
|
+
.pops[type-value] .pops-drawer-title p[pops] {
|
|
17
|
+
line-height: normal;
|
|
18
|
+
align-content: center;
|
|
19
|
+
}
|
|
16
20
|
|
|
21
|
+
.pops-drawer-content {
|
|
22
|
+
flex: 1;
|
|
23
|
+
overflow: auto;
|
|
24
|
+
}
|
|
25
|
+
.pops[type-value="drawer"] .pops-drawer-btn {
|
|
26
|
+
padding-top: 10px;
|
|
27
|
+
padding-bottom: 10px;
|
|
28
|
+
}
|
|
17
29
|
.pops[type-value="drawer"][direction="top"] {
|
|
18
30
|
width: 100%;
|
|
19
31
|
left: 0;
|
|
@@ -38,10 +50,3 @@
|
|
|
38
50
|
bottom: 0;
|
|
39
51
|
right: 0;
|
|
40
52
|
}
|
|
41
|
-
.pops-drawer-content {
|
|
42
|
-
height: 100%;
|
|
43
|
-
}
|
|
44
|
-
.pops[type-value="drawer"] .pops-drawer-btn {
|
|
45
|
-
padding-top: 10px;
|
|
46
|
-
padding-bottom: 10px;
|
|
47
|
-
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
text-overflow: ellipsis;
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
font-weight: 500;
|
|
19
|
-
line-height:
|
|
19
|
+
line-height: normal;
|
|
20
20
|
}
|
|
21
21
|
.pops[type-value="folder"] .pops-folder-content p[pops] {
|
|
22
22
|
padding: 5px 10px;
|
|
@@ -25,22 +25,24 @@
|
|
|
25
25
|
}
|
|
26
26
|
.pops[type-value="folder"] .pops-folder-content {
|
|
27
27
|
width: 100%;
|
|
28
|
-
height: calc(
|
|
28
|
+
/*height: calc(
|
|
29
29
|
100% - var(--container-title-height) - var(--container-bottom-btn-height)
|
|
30
|
-
)
|
|
30
|
+
);*/
|
|
31
|
+
flex: 1;
|
|
31
32
|
overflow: auto;
|
|
32
33
|
word-break: break-word;
|
|
33
34
|
}
|
|
34
35
|
.pops[type-value="folder"] .pops-folder-btn {
|
|
35
|
-
position: absolute;
|
|
36
|
-
bottom: 0
|
|
36
|
+
/*position: absolute;
|
|
37
|
+
bottom: 0;*/
|
|
37
38
|
display: flex;
|
|
38
39
|
padding: 10px 10px 10px 10px;
|
|
39
40
|
width: 100%;
|
|
40
41
|
height: var(--container-bottom-btn-height);
|
|
42
|
+
max-height: var(--container-bottom-btn-height);
|
|
43
|
+
line-height: normal;
|
|
41
44
|
border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
42
45
|
text-align: right;
|
|
43
|
-
line-height: var(--container-bottom-btn-height);
|
|
44
46
|
align-items: center;
|
|
45
47
|
}
|
|
46
48
|
.pops-folder-list .cursor-p {
|
|
@@ -79,11 +81,13 @@ table.pops-folder-list-table__body {
|
|
|
79
81
|
user-select: none;
|
|
80
82
|
}
|
|
81
83
|
.pops-folder-list table tr {
|
|
82
|
-
line-height:
|
|
84
|
+
line-height: normal;
|
|
85
|
+
align-content: center;
|
|
83
86
|
}
|
|
84
87
|
.pops-folder-list-table__header-row {
|
|
85
88
|
height: 50px;
|
|
86
|
-
line-height:
|
|
89
|
+
line-height: normal;
|
|
90
|
+
align-content: center;
|
|
87
91
|
color: rgb(129, 137, 153);
|
|
88
92
|
text-align: left;
|
|
89
93
|
font-size: 12px;
|
|
@@ -96,7 +100,8 @@ table.pops-folder-list-table__body {
|
|
|
96
100
|
}
|
|
97
101
|
.pops-folder-list-table__body-row {
|
|
98
102
|
height: 50px;
|
|
99
|
-
line-height:
|
|
103
|
+
line-height: normal;
|
|
104
|
+
align-content: center;
|
|
100
105
|
color: #03081a;
|
|
101
106
|
font-size: 12px;
|
|
102
107
|
}
|
|
@@ -115,7 +120,8 @@ table.pops-folder-list-table__body {
|
|
|
115
120
|
.pops-folder-list .list-name-text {
|
|
116
121
|
display: inline-block;
|
|
117
122
|
padding-left: 12px;
|
|
118
|
-
line-height:
|
|
123
|
+
line-height: normal;
|
|
124
|
+
align-content: center;
|
|
119
125
|
max-width: 176px;
|
|
120
126
|
}
|
|
121
127
|
.pops-folder-list-file-name > div {
|
|
@@ -204,7 +210,8 @@ table.pops-folder-list-table__body {
|
|
|
204
210
|
height: 32px;
|
|
205
211
|
}
|
|
206
212
|
.pops-folder-list .pops-folder-list-file-icon {
|
|
207
|
-
line-height:
|
|
213
|
+
line-height: normal;
|
|
214
|
+
align-content: center;
|
|
208
215
|
position: relative;
|
|
209
216
|
vertical-align: middle;
|
|
210
217
|
}
|
|
@@ -265,7 +272,8 @@ table.pops-folder-list-table__body {
|
|
|
265
272
|
.pops-folder-list .pops-folder-file-list-breadcrumb-allFiles {
|
|
266
273
|
font-size: 12px;
|
|
267
274
|
color: #333;
|
|
268
|
-
line-height:
|
|
275
|
+
line-height: normal;
|
|
276
|
+
align-content: center;
|
|
269
277
|
font-weight: 700;
|
|
270
278
|
display: inline-block;
|
|
271
279
|
max-width: 140px;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.pops[type-value="iframe"] {
|
|
2
2
|
--container-title-height: 55px;
|
|
3
|
+
transition: width 0.35s ease, height 0.35s ease;
|
|
3
4
|
}
|
|
4
5
|
.pops[type-value] .pops-iframe-title {
|
|
5
6
|
display: flex;
|
|
@@ -19,19 +20,21 @@
|
|
|
19
20
|
text-overflow: ellipsis;
|
|
20
21
|
white-space: nowrap;
|
|
21
22
|
font-weight: 500;
|
|
22
|
-
line-height:
|
|
23
|
-
|
|
24
|
-
.pops[type-value="iframe"] .pops-iframe-content p[pops] {
|
|
25
|
-
padding: 5px 10px;
|
|
26
|
-
color: #333;
|
|
27
|
-
text-indent: 15px;
|
|
23
|
+
line-height: normal;
|
|
24
|
+
align-content: center;
|
|
28
25
|
}
|
|
29
26
|
.pops[type-value="iframe"] .pops-iframe-content {
|
|
30
27
|
width: 100%;
|
|
31
|
-
height: calc(100% - var(--container-title-height))
|
|
28
|
+
/*height: calc(100% - var(--container-title-height));*/
|
|
29
|
+
flex: 1;
|
|
32
30
|
overflow: hidden;
|
|
33
31
|
word-break: break-word;
|
|
34
32
|
}
|
|
33
|
+
.pops[type-value="iframe"] .pops-iframe-content p[pops] {
|
|
34
|
+
padding: 5px 10px;
|
|
35
|
+
color: #333;
|
|
36
|
+
text-indent: 15px;
|
|
37
|
+
}
|
|
35
38
|
.pops-loading {
|
|
36
39
|
position: absolute;
|
|
37
40
|
top: 40px;
|
|
@@ -56,22 +59,30 @@
|
|
|
56
59
|
animation: pops-anim-wait-rotate 1.2s linear infinite;
|
|
57
60
|
}
|
|
58
61
|
.pops[type-value="iframe"].pops[type-module="min"] {
|
|
59
|
-
top: unset !important;
|
|
60
62
|
bottom: 0;
|
|
61
63
|
max-width: 200px;
|
|
62
64
|
max-height: 53px;
|
|
63
|
-
|
|
65
|
+
position: unset;
|
|
64
66
|
}
|
|
65
67
|
.pops[type-value="iframe"].pops[type-module="min"]
|
|
66
68
|
.pops-header-control[type="min"] {
|
|
67
69
|
display: none;
|
|
68
70
|
}
|
|
69
|
-
.pops[type-value="iframe"].pops
|
|
71
|
+
.pops[type-value="iframe"].pops-iframe-unset-top {
|
|
70
72
|
top: unset !important;
|
|
73
|
+
}
|
|
74
|
+
.pops[type-value="iframe"].pops-iframe-unset-left {
|
|
71
75
|
left: unset !important;
|
|
76
|
+
}
|
|
77
|
+
.pops[type-value="iframe"].pops-iframe-unset-transform {
|
|
78
|
+
transform: none !important;
|
|
79
|
+
}
|
|
80
|
+
.pops[type-value="iframe"].pops-iframe-unset-transition {
|
|
81
|
+
transition: none !important;
|
|
82
|
+
}
|
|
83
|
+
.pops[type-value="iframe"].pops[type-module="max"] {
|
|
72
84
|
width: 100% !important;
|
|
73
85
|
height: 100% !important;
|
|
74
|
-
transform: none;
|
|
75
86
|
}
|
|
76
87
|
.pops[type-value="iframe"] iframe[pops] {
|
|
77
88
|
width: calc(100% - 4px);
|
|
@@ -88,3 +99,7 @@
|
|
|
88
99
|
background: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));
|
|
89
100
|
animation: iframeLoadingChange 2s forwards;
|
|
90
101
|
}
|
|
102
|
+
|
|
103
|
+
.pops-anim:has(.pops[type-value="iframe"].pops[type-module="min"]) {
|
|
104
|
+
position: unset;
|
|
105
|
+
}
|