@whitesev/pops 1.7.4 → 1.7.6

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.
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "弹窗库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -16,30 +16,32 @@
16
16
  text-overflow: ellipsis;
17
17
  white-space: nowrap;
18
18
  font-weight: 500;
19
- line-height: var(--container-title-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: var(--container-title-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,18 @@
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
+ }
24
+ .pops[type-value="drawer"] .pops-drawer-btn {
25
+ padding-top: 10px;
26
+ padding-bottom: 10px;
27
+ }
17
28
  .pops[type-value="drawer"][direction="top"] {
18
29
  width: 100%;
19
30
  left: 0;
@@ -38,10 +49,3 @@
38
49
  bottom: 0;
39
50
  right: 0;
40
51
  }
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: var(--container-title-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: 1;
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: 50px;
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: 50px;
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: 40px;
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: 1;
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: 20px;
275
+ line-height: normal;
276
+ align-content: center;
269
277
  font-weight: 700;
270
278
  display: inline-block;
271
279
  max-width: 140px;
@@ -28,7 +28,7 @@ export const PopsIframeConfig = (): Required<PopsIframeDetails> => {
28
28
  },
29
29
  animation: "pops-anim-fadein-zoom",
30
30
  position: "center",
31
- drag: false,
31
+ drag: true,
32
32
  dragLimit: true,
33
33
  dragExtraDistance: 3,
34
34
  dragMoveCallBack() {},
@@ -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: var(--container-title-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
- transform: none;
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[type-module="max"] {
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
+ }
@@ -1,3 +1,4 @@
1
+ import { PopsCore } from "../../Core";
1
2
  import { GlobalConfig } from "../../GlobalConfig";
2
3
  import { PopsElementHandler } from "../../handler/PopsElementHandler";
3
4
  import { PopsHandler } from "../../handler/PopsHandler";
@@ -20,7 +21,6 @@ export class PopsIframe {
20
21
  pops.config.cssText.common,
21
22
  pops.config.cssText.iframeCSS,
22
23
  ]);
23
-
24
24
  let config: Required<PopsIframeDetails> = PopsIframeConfig();
25
25
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
26
26
  config = popsUtils.assign(config, details);
@@ -98,6 +98,16 @@ export class PopsIframe {
98
98
  headerMaxBtnElement,
99
99
  headerMiseBtnElement,
100
100
  } = PopsHandler.handleQueryElement($anim, PopsType);
101
+ let $iframeContainer = PopsCore.document.querySelector<HTMLDivElement>(
102
+ ".pops-iframe-container"
103
+ );
104
+ if (!$iframeContainer) {
105
+ $iframeContainer = PopsCore.document.createElement("div");
106
+ $iframeContainer.className = "pops-iframe-container";
107
+ $iframeContainer.style.cssText =
108
+ "display: flex;position: fixed;bottom: 0px;flex-flow: wrap-reverse;user-select: none;-webkit-user-select: none;-ms-user-select: none;-moz-user-select: none;";
109
+ popsDOMUtils.appendBody($iframeContainer);
110
+ }
101
111
  /**
102
112
  * 遮罩层元素
103
113
  */
@@ -145,9 +155,7 @@ export class PopsIframe {
145
155
  popsDOMUtils.on($iframe, "load", () => {
146
156
  /* iframe加载中... */
147
157
  loadingElement?.remove();
148
-
149
158
  $contentLoading!.style.animation = "iframeLoadingChange_85 0.3s forwards";
150
-
151
159
  popsDOMUtils.on(
152
160
  $contentLoading,
153
161
  popsDOMUtils.getAnimationEndNameList(),
@@ -159,12 +167,11 @@ export class PopsIframe {
159
167
 
160
168
  if (config.title!.text!.trim() === "" && $iframe!.contentDocument) {
161
169
  /* 同域名下的才可以获取网页标题 */
162
-
163
170
  $title!.querySelector<HTMLElement>("p")!.innerText =
164
171
  $iframe!.contentDocument.title;
165
172
  }
166
173
 
167
- config.loadEndCallBack(eventDetails as any);
174
+ config.loadEndCallBack(eventDetails);
168
175
  });
169
176
  /* 创建到页面中 */
170
177
 
@@ -173,7 +180,7 @@ export class PopsIframe {
173
180
  config.beforeAppendToPageCallBack($shadowRoot, $shadowContainer);
174
181
  }
175
182
 
176
- popsDOMUtils.appendBody($shadowContainer);
183
+ $iframeContainer.appendChild($shadowContainer);
177
184
  if ($mask != null) {
178
185
  $anim.after($mask);
179
186
  }
@@ -187,46 +194,33 @@ export class PopsIframe {
187
194
  endCallBack: config.dragEndCallBack,
188
195
  });
189
196
  }
190
- let normalLeft = "";
197
+ const TYPE_MODULE = "type-module";
191
198
  /* 最小化按钮点击事件 */
192
-
199
+ let origin_left = "";
200
+ let origin_top = "";
201
+ let origin_is_max = false;
193
202
  popsDOMUtils.on<PointerEvent | MouseEvent>(
194
203
  headerMinBtnElement,
195
204
  "click",
196
205
  (event) => {
197
- /**
198
- * 所有最小化的iframe数组
199
- */
200
- let allMinElementList: HTMLElement[] = [];
201
-
202
- pops.config.layer.iframe.forEach((item) => {
203
- if (
204
- item.animElement != $anim &&
205
- item.popsElement.getAttribute("type-module") === "min"
206
- ) {
207
- allMinElementList.push(item.popsElement);
208
- }
209
- });
210
- let maxLeftValue = allMinElementList.length
211
- ? allMinElementList.length * 205
212
- : 0;
213
-
214
- $pops!.style.transitionDuration = "";
215
-
216
- normalLeft = $pops!.style.left;
217
-
218
- $pops!.style.left = maxLeftValue + "px";
219
-
220
- $pops!.setAttribute("type-module", "min");
221
-
222
- $anim!
223
- .querySelector<HTMLDivElement>(".pops-header-controls")
224
- ?.setAttribute("type", "max");
225
-
226
- config.btn.min.callback(eventDetails, event);
227
- },
228
- {
229
- capture: true,
206
+ event.preventDefault();
207
+ event.stopPropagation();
208
+ origin_left = $pops.style.left;
209
+ origin_top = $pops.style.top;
210
+ $pops.classList.add("pops-iframe-unset-top");
211
+ $pops.classList.add("pops-iframe-unset-left");
212
+ $pops.classList.add("pops-iframe-unset-transform");
213
+ $pops.style.transitionDuration = "";
214
+
215
+ $pops.setAttribute(TYPE_MODULE, "min");
216
+ headerControlsElement.setAttribute("type", "min");
217
+ // 隐藏放大图标
218
+ headerMaxBtnElement.style.setProperty("display", "none");
219
+ // 显示复位图标
220
+ headerMiseBtnElement.style.setProperty("display", "");
221
+ if (typeof config?.btn?.min?.callback === "function") {
222
+ config.btn.min.callback(eventDetails, event);
223
+ }
230
224
  }
231
225
  );
232
226
  /* 最大化按钮点击事件 */
@@ -234,75 +228,69 @@ export class PopsIframe {
234
228
  headerMaxBtnElement,
235
229
  "click",
236
230
  (event) => {
237
- $pops!.style.transitionDuration = "";
238
-
239
- normalLeft = $pops!.style.left;
240
-
241
- $pops!.removeAttribute("type-module");
242
-
243
- $pops!.setAttribute("type-module", "max");
244
-
245
- headerControlsElement!.setAttribute("type", "max");
246
-
247
- headerMaxBtnElement!.style.setProperty("display", "none");
248
-
249
- headerMiseBtnElement!.style.setProperty("display", "");
250
-
251
- config.btn.max.callback(eventDetails, event);
252
- },
253
- {
254
- capture: true,
231
+ event.preventDefault();
232
+ event.stopPropagation();
233
+ if ($pops.getAttribute(TYPE_MODULE) !== "min") {
234
+ origin_left = $pops.style.left;
235
+ origin_top = $pops.style.top;
236
+ }
237
+ origin_is_max = true;
238
+ $pops.style.transitionDuration = "";
239
+ $pops.style.transform = "";
240
+ $pops.removeAttribute(TYPE_MODULE);
241
+ $pops.classList.add("pops-iframe-unset-transition");
242
+ $pops.classList.add("pops-iframe-unset-left");
243
+ $pops.classList.add("pops-iframe-unset-top");
244
+ $pops.classList.add("pops-iframe-unset-transform");
245
+ $pops.classList.remove("pops-iframe-unset-transition");
246
+ $pops.setAttribute(TYPE_MODULE, "max");
247
+ headerControlsElement.setAttribute("type", "max");
248
+ // 隐藏放大图标
249
+ headerMaxBtnElement.style.setProperty("display", "none");
250
+ // 显示复位图标
251
+ headerMiseBtnElement.style.setProperty("display", "");
252
+ if (typeof config?.btn?.max?.callback === "function") {
253
+ config.btn.max.callback(eventDetails, event);
254
+ }
255
255
  }
256
256
  );
257
257
  /* 先隐藏窗口化按钮 */
258
258
  headerMiseBtnElement?.style?.setProperty("display", "none");
259
- /* 窗口化按钮点击事件 */
259
+ /* 复位按钮点击事件 */
260
260
  popsDOMUtils.on<MouseEvent | PointerEvent>(
261
261
  headerMiseBtnElement,
262
262
  "click",
263
263
  (event) => {
264
- $pops!.style.transitionDuration = "";
265
-
266
- $pops!.style.left = normalLeft;
267
-
268
- headerControlsElement!.removeAttribute("type");
269
-
270
- $pops!.removeAttribute("type-module");
271
- /**
272
- * 所有最小化的iframe数组
273
- */
274
- let allMinElementList: HTMLElement[] = [];
275
- pops.config.layer.iframe.forEach((item) => {
276
- if (
277
- item.animElement != $anim &&
278
- $pops!.getAttribute("type-module") === "min"
279
- ) {
280
- allMinElementList.push(item.popsElement);
281
- }
282
- });
283
- allMinElementList.sort(
284
- PopsInstanceUtils.sortElementListByProperty<HTMLElement, number>(
285
- (obj) => {
286
- return parseInt(getComputedStyle(obj).left);
287
- },
288
- (obj) => {
289
- return parseInt(getComputedStyle(obj).left);
290
- },
291
- false
292
- )
293
- );
294
- allMinElementList.forEach((item, index) => {
295
- item.style.left = index * 205 + "px";
296
- });
297
-
298
- headerMiseBtnElement!.style.setProperty("display", "none");
299
-
300
- headerMaxBtnElement!.style.setProperty("display", "");
301
-
302
- config.btn.mise.callback(eventDetails, event);
303
- },
304
- {
305
- capture: true,
264
+ event.preventDefault();
265
+ event.stopPropagation();
266
+ if (origin_is_max && $pops.getAttribute(TYPE_MODULE) === "min") {
267
+ $pops.classList.add("pops-iframe-unset-transition");
268
+ $pops.classList.add("pops-iframe-unset-left");
269
+ $pops.classList.add("pops-iframe-unset-top");
270
+ $pops.classList.add("pops-iframe-unset-transform");
271
+ $pops.classList.remove("pops-iframe-unset-transition");
272
+ $pops.setAttribute(TYPE_MODULE, "max");
273
+ headerControlsElement.setAttribute("type", "max");
274
+ } else {
275
+ origin_is_max = false;
276
+ $pops.style.left = origin_left;
277
+ $pops.style.top = origin_top;
278
+ $pops.style.transitionDuration = "";
279
+ $pops.style.transform = "";
280
+ headerControlsElement.removeAttribute("type");
281
+ $pops.removeAttribute(TYPE_MODULE);
282
+ $pops.classList.remove("pops-iframe-unset-top");
283
+ $pops.classList.remove("pops-iframe-unset-left");
284
+ $pops.classList.remove("pops-iframe-unset-transform");
285
+
286
+ // 显示放大图标
287
+ headerMaxBtnElement.style.setProperty("display", "");
288
+ // 隐藏复位图标
289
+ headerMiseBtnElement.style.setProperty("display", "none");
290
+ }
291
+ if (typeof config?.btn?.mise?.callback === "function") {
292
+ config.btn.mise.callback(eventDetails, event);
293
+ }
306
294
  }
307
295
  );
308
296
  /* 关闭按钮点击事件 */
@@ -315,38 +303,9 @@ export class PopsIframe {
315
303
  guid,
316
304
  false
317
305
  );
318
- setTimeout(() => {
319
- let allIsMinElementList: HTMLElement[] = [];
320
- pops.config.layer.iframe.forEach((item) => {
321
- if (
322
- item.animElement != $anim &&
323
- $pops!.getAttribute("type-module") === "min"
324
- ) {
325
- allIsMinElementList.push(item.popsElement);
326
- }
327
- });
328
-
329
- allIsMinElementList.sort(
330
- PopsInstanceUtils.sortElementListByProperty(
331
- (obj) => {
332
- return parseInt(getComputedStyle(obj).left);
333
- },
334
- (obj) => {
335
- return parseInt(getComputedStyle(obj).left);
336
- },
337
- false
338
- )
339
- );
340
-
341
- allIsMinElementList.forEach((item, index) => {
342
- item.style.left = index * 205 + "px";
343
- });
344
- }, 1000 * 0.3);
345
-
346
- config.btn.close.callback(eventDetails, event);
347
- },
348
- {
349
- capture: true,
306
+ if (typeof config?.btn?.close?.callback === "function") {
307
+ config.btn.close.callback(eventDetails, event);
308
+ }
350
309
  }
351
310
  );
352
311
 
@@ -48,7 +48,8 @@
48
48
  overflow: hidden;
49
49
  width: auto;
50
50
  font-size: inherit;
51
- line-height: 2em;
51
+ line-height: normal;
52
+ align-content: center;
52
53
  }
53
54
  .pops[type-value="loading"] .pops-loading-content p[pops] {
54
55
  display: inline-block;