@topvisor/ui 0.0.37 → 0.0.41
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/.chunks/datepicker-7f54fd80.es.js +275 -0
- package/.chunks/datepicker-7f54fd80.es.js.map +1 -0
- package/.chunks/datepicker-858c1cb6.amd.js +234 -0
- package/.chunks/datepicker-858c1cb6.amd.js.map +1 -0
- package/.chunks/forms-7f061546.es.js +1108 -0
- package/.chunks/forms-7f061546.es.js.map +1 -0
- package/.chunks/forms-b9e5edd2.amd.js +3 -0
- package/.chunks/forms-b9e5edd2.amd.js.map +1 -0
- package/.chunks/{popup-b9517276.es.js → popup-05538243.es.js} +420 -385
- package/.chunks/popup-05538243.es.js.map +1 -0
- package/.chunks/popup-a531e9ad.amd.js +377 -0
- package/.chunks/popup-a531e9ad.amd.js.map +1 -0
- package/README.md +80 -62
- package/{core.css → assets/core.css} +1 -1
- package/assets/forms.css +1 -0
- package/assets/popup.css +1 -0
- package/common/common.amd.js +1 -1
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +12 -11
- package/forms/helpers.amd.js +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js +1 -0
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -2
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +90 -86
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2945
- package/icomoon/fonts/Topvisor-2.svg +232 -232
- package/icomoon/style.css +647 -647
- package/package.json +19 -19
- package/popup/popup.amd.js +1 -2
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +74 -68
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +2 -3
- package/popup/worker.js.map +1 -1
- package/tabs/tabs.amd.js +1 -2
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js +30 -26
- package/tabs/tabs.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +2 -2
- package/utils/dom.amd.js +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js +3 -61
- package/utils/dom.js.map +1 -1
- package/.chunks/datepicker-6d57a408.es.js +0 -275
- package/.chunks/datepicker-6d57a408.es.js.map +0 -1
- package/.chunks/datepicker-a0840577.amd.js +0 -234
- package/.chunks/datepicker-a0840577.amd.js.map +0 -1
- package/.chunks/forms-1aa30229.amd.js +0 -3
- package/.chunks/forms-1aa30229.amd.js.map +0 -1
- package/.chunks/forms-7be951a7.es.js +0 -962
- package/.chunks/forms-7be951a7.es.js.map +0 -1
- package/.chunks/popup-604c0a49.amd.js +0 -341
- package/.chunks/popup-604c0a49.amd.js.map +0 -1
- package/.chunks/popup-b9517276.es.js.map +0 -1
- package/forms.css +0 -1
- package/popup.css +0 -1
- /package/{dark.css → assets/dark.css} +0 -0
- /package/{formsExt.css → assets/formsExt.css} +0 -0
- /package/{light.css → assets/light.css} +0 -0
- /package/{tabs.css → assets/tabs.css} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { C as f } from "./forms-
|
|
2
|
-
import
|
|
3
|
-
import n from "../popup/worker.js";
|
|
1
|
+
import { D as n, C as f } from "./forms-7f061546.es.js";
|
|
2
|
+
import i from "../popup/worker.js";
|
|
4
3
|
import "vue";
|
|
5
4
|
class m {
|
|
6
5
|
static componentName = "Top";
|
|
@@ -29,11 +28,11 @@ class m {
|
|
|
29
28
|
}
|
|
30
29
|
// получить инициированный компонент
|
|
31
30
|
static getComponent(t, p) {
|
|
32
|
-
return
|
|
31
|
+
return n.storage(t, "#" + p);
|
|
33
32
|
}
|
|
34
33
|
// устанвоить компонент
|
|
35
34
|
_setComponent(t) {
|
|
36
|
-
|
|
35
|
+
n.storage(t, "#" + this.componentName, this);
|
|
37
36
|
}
|
|
38
37
|
// функция подключения компонента
|
|
39
38
|
mount() {
|
|
@@ -41,7 +40,7 @@ class m {
|
|
|
41
40
|
}
|
|
42
41
|
// функция отключения компонента
|
|
43
42
|
unmount() {
|
|
44
|
-
|
|
43
|
+
n.storage(this.el, "#" + this.componentName, null), this.unmountEls.forEach((t) => {
|
|
45
44
|
t.remove();
|
|
46
45
|
}), this.unmountEls = [], this.unmountEvents.forEach((t) => {
|
|
47
46
|
t.el.removeEventListener(t.type, t.listener, t.options);
|
|
@@ -57,13 +56,13 @@ class m {
|
|
|
57
56
|
}
|
|
58
57
|
// указание новые события, которые должны будут удалиться после unmount
|
|
59
58
|
registerEventForUnmount(t, p, o, e) {
|
|
60
|
-
const
|
|
59
|
+
const r = {
|
|
61
60
|
el: t,
|
|
62
61
|
type: p,
|
|
63
62
|
listener: o,
|
|
64
63
|
options: e
|
|
65
64
|
};
|
|
66
|
-
this.unmountEvents.push(
|
|
65
|
+
this.unmountEvents.push(r);
|
|
67
66
|
}
|
|
68
67
|
// функция перенастройки уже подключенного компонента
|
|
69
68
|
reInit(t) {
|
|
@@ -100,15 +99,15 @@ class b {
|
|
|
100
99
|
if (!e || p.matches(".top-popup-noCloser"))
|
|
101
100
|
return;
|
|
102
101
|
if (p.getAttribute("href") === "." && t.preventDefault(), t.target.matches("[data-top-popup]")) {
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
const r = t.target.closest("ul"), l = t.target.closest("a, .a");
|
|
103
|
+
r && ((o = r.querySelector("a.top-active, .a.top-active")) == null || o.classList.remove("top-active")), l && l.classList.add("top-active");
|
|
105
104
|
return;
|
|
106
105
|
}
|
|
107
|
-
|
|
106
|
+
i.close(e);
|
|
108
107
|
}
|
|
109
108
|
if (t.target.matches(".top-popup-wrapper")) {
|
|
110
109
|
const e = t.target;
|
|
111
|
-
|
|
110
|
+
i.close(e);
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
/**
|
|
@@ -126,14 +125,14 @@ class b {
|
|
|
126
125
|
break;
|
|
127
126
|
case "Enter":
|
|
128
127
|
if (!o) {
|
|
129
|
-
if (
|
|
128
|
+
if (n.querySelectorVisible(p, ".preloader"))
|
|
130
129
|
break;
|
|
131
130
|
const u = p.querySelector(".top-popup_footer .go, .top-popup_footer [data-action]");
|
|
132
131
|
u && u.click();
|
|
133
132
|
break;
|
|
134
133
|
}
|
|
135
|
-
const
|
|
136
|
-
|
|
134
|
+
const r = n.querySelectorVisible(p, "li > a.top-active");
|
|
135
|
+
r && (t.preventDefault(), location.href = r.getAttribute("href"));
|
|
137
136
|
const l = p.querySelector("li > .top-active");
|
|
138
137
|
l && l.click();
|
|
139
138
|
break;
|
|
@@ -143,363 +142,399 @@ class b {
|
|
|
143
142
|
case "ArrowLeft":
|
|
144
143
|
if (!o)
|
|
145
144
|
break;
|
|
146
|
-
t.key === "ArrowRight" || t.key === "ArrowLeft" ?
|
|
147
|
-
const h = (e = p.querySelector("ul.top-popup_content > li:not(.top-
|
|
148
|
-
if (t.key === "ArrowRight" && h) {
|
|
145
|
+
t.key === "ArrowRight" || t.key === "ArrowLeft" ? n.querySelectorVisible(p, "ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active > .top-popup_listMore") && t.preventDefault() : t.preventDefault();
|
|
146
|
+
const h = (e = p.querySelector("ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active")) == null ? void 0 : e.parentElement;
|
|
147
|
+
if (console.log(h), t.key === "ArrowRight" && h) {
|
|
149
148
|
const u = h.querySelector(".top-active > .top-popup_listMore");
|
|
150
149
|
if (u)
|
|
151
150
|
return u.click();
|
|
152
151
|
}
|
|
153
|
-
const a =
|
|
152
|
+
const a = n.querySelectorAllVisible(p, "ul.top-popup_content > li:not(.top-popup_liNoSelectable)"), c = a.length;
|
|
154
153
|
let s = a.indexOf(h);
|
|
155
154
|
if (t.key === "ArrowUp" || t.key === "ArrowLeft" ? s-- : s++, t.key === "ArrowLeft" && s === -1)
|
|
156
|
-
return t.target.matches("input") ? void 0 :
|
|
155
|
+
return t.target.matches("input") ? void 0 : i.close(p);
|
|
157
156
|
if (t.key === "ArrowRight" && s === c)
|
|
158
157
|
return;
|
|
159
|
-
s < 0 && (s = c - 1), s > c - 1 && (s = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((u) => u.classList.remove("top-active")), a[s].querySelector(":scope > a, :scope > .a").classList.add("top-active"),
|
|
158
|
+
s < 0 && (s = c - 1), s > c - 1 && (s = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((u) => u.classList.remove("top-active")), a[s].querySelector(":scope > a, :scope > .a").classList.add("top-active"), i.scrollToActive(p);
|
|
160
159
|
break;
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
|
-
const x = `:root{
|
|
165
|
-
--top-popup-background-color: var(--color-bg-3)
|
|
166
|
-
--top-popup-background-color-hover: var(--color-
|
|
167
|
-
--top-popup-background-color-active: var(--color-
|
|
168
|
-
|
|
169
|
-
--top-popup-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
--top-popup-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
--top-popup-
|
|
187
|
-
--top-popup-
|
|
188
|
-
--top-popup-
|
|
189
|
-
--top-popup-
|
|
190
|
-
--top-popup-
|
|
191
|
-
--top-popup-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
.top-popup-wrapper
|
|
211
|
-
.top-popup-wrapper.
|
|
212
|
-
.top-popup-wrapper.
|
|
213
|
-
.top-popup-wrapper.
|
|
214
|
-
.top-popup-wrapper.
|
|
215
|
-
.top-popup-wrapper
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
.top-popup-wrapper.
|
|
219
|
-
.top-popup-wrapper.
|
|
220
|
-
.top-popup-wrapper.
|
|
221
|
-
.top-popup-wrapper.
|
|
222
|
-
.top-popup-wrapper.
|
|
223
|
-
.top-popup-wrapper.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
.top-popup-wrapper.
|
|
227
|
-
.top-popup-wrapper.
|
|
228
|
-
.top-popup-wrapper.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
.top-popup-wrapper.invert-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
.top-popup-wrapper.
|
|
238
|
-
.top-popup-wrapper.
|
|
239
|
-
.top-popup-wrapper.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
.top-popup-wrapper.
|
|
243
|
-
.top-popup-wrapper.
|
|
244
|
-
.top-popup-wrapper.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
.top-
|
|
249
|
-
.top-
|
|
250
|
-
.top-
|
|
251
|
-
.top-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
.top-popup_header
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
.top-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
--scroll-padding-top:
|
|
282
|
-
--scroll-padding-bottom: var(--
|
|
283
|
-
|
|
284
|
-
padding: var(--
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
ul.top-popup_content
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
ul.top-popup_content li >
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
.top-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
.top-
|
|
365
|
-
.top-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
.top-popup_content
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.top-popup .
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
.top-popup
|
|
419
|
-
.top-popup
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/*
|
|
433
|
-
.top-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
.
|
|
439
|
-
.top-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
.top-popup
|
|
479
|
-
.top-popup-wrapper.
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
.top-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
.top-popup-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
.top-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
163
|
+
const x = `:root{
|
|
164
|
+
--top-popup-background-color: var(--color-bg-3);
|
|
165
|
+
--top-popup-background-color-hover: var(--color-theme-75);
|
|
166
|
+
--top-popup-background-color-active: var(--color-theme-100);
|
|
167
|
+
|
|
168
|
+
--top-popup-border-color: var(--color-line-2-opacity);
|
|
169
|
+
--top-popup-title-background-color: var(--color-theme-50);
|
|
170
|
+
|
|
171
|
+
/* суммарный отсуп от каря popup до элемента */
|
|
172
|
+
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding));
|
|
173
|
+
|
|
174
|
+
/* списки */
|
|
175
|
+
--top-popup-list-padding: var(--top-padding-2);
|
|
176
|
+
|
|
177
|
+
--top-popup-listItem-radius: var(--top-radius-2);
|
|
178
|
+
--top-popup-listItem-padding: var(--top-padding-2);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.top-popup-front{ position: relative; }
|
|
182
|
+
|
|
183
|
+
.top-popup-wrapper{
|
|
184
|
+
/* см. recalcPosition() */
|
|
185
|
+
--top-popup-height: 0px;
|
|
186
|
+
--top-popup-right-bounding: 0px;
|
|
187
|
+
--top-popup-bottom-bounding: 0px;
|
|
188
|
+
--top-popup-top: 0px;
|
|
189
|
+
--top-popup-right: calc(100vw - var(--top-popup-right-bounding));
|
|
190
|
+
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));
|
|
191
|
+
--top-popup-left: 0px;
|
|
192
|
+
|
|
193
|
+
text-align: initial; white-space: normal; word-break: normal;
|
|
194
|
+
position: absolute; z-index: 200000;
|
|
195
|
+
}
|
|
196
|
+
.top-popup-wrapper:not(.top-popup-wrapper-shown){ overflow: hidden; }
|
|
197
|
+
|
|
198
|
+
/* top-popupPanel */
|
|
199
|
+
.top-popupPanel {
|
|
200
|
+
cursor: default;
|
|
201
|
+
box-shadow: var(--top-shadow-b);
|
|
202
|
+
border-radius: 8px;
|
|
203
|
+
background: var(--top-popup-background-color);
|
|
204
|
+
position: absolute; overflow: hidden;
|
|
205
|
+
display: flex; flex-direction: column;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* position */
|
|
209
|
+
.top-popup-wrapper > *{ opacity: 0; transition: opacity 100ms linear, transform 100ms linear; }
|
|
210
|
+
.top-popup-wrapper.p0 > *{ transform: translateY(-8px); }
|
|
211
|
+
.top-popup-wrapper.p1 > *{ transform: translateY(8px); }
|
|
212
|
+
.top-popup-wrapper.p2 > *{ transform: translateX(8px); }
|
|
213
|
+
.top-popup-wrapper.p3 > *{ transform: translateY(8px); }
|
|
214
|
+
.top-popup-wrapper.p4 > *{ transform: translateX(-8px); }
|
|
215
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > *{opacity: 1;transform: translate(0, 0) !important;}
|
|
216
|
+
|
|
217
|
+
.top-popup-wrapper.p0 > .top-popup{ top: calc(-16px); left: calc(0px - 8px); }
|
|
218
|
+
.top-popup-wrapper.p1 > .top-popup{ bottom: calc(100% + 8px); }
|
|
219
|
+
.top-popup-wrapper.p2 > .top-popup{ left: calc(100% + 8px); }
|
|
220
|
+
.top-popup-wrapper.p3 > .top-popup{ top: calc(100% + 8px); }
|
|
221
|
+
.top-popup-wrapper.p4 > .top-popup{ right: calc(100% + 8px); }
|
|
222
|
+
.top-popup-wrapper.p2 > .top-popup,
|
|
223
|
+
.top-popup-wrapper.p4 > .top-popup{ margin-top: -10px; }
|
|
224
|
+
|
|
225
|
+
.top-popup-wrapper.p1.with_notch > .top-popup{ margin-bottom: 5px; }
|
|
226
|
+
.top-popup-wrapper.p2.with_notch > .top-popup{ margin-left: 5px; }
|
|
227
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-top: 5px; }
|
|
228
|
+
.top-popup-wrapper.p4.with_notch > .top-popup{ margin-right: 5px; }
|
|
229
|
+
|
|
230
|
+
.top-popup-wrapper.invert-x > .top-popup{ right: 0; }
|
|
231
|
+
.top-popup-wrapper.invert-y > .top-popup{ bottom: 0; }
|
|
232
|
+
|
|
233
|
+
/* notch */
|
|
234
|
+
.top-popup-wrapper > .notch{ border: 7.4px solid transparent; position: absolute; display: block; }
|
|
235
|
+
|
|
236
|
+
.top-popup-wrapper.p1 > .notch{ border-bottom: 0; border-top: 7.4px solid var(--content-background-color); margin: 0 0 7.4px -7.4px; bottom: 100%; left: 50% }
|
|
237
|
+
.top-popup-wrapper.p2 > .notch{ border-left: 0; border-right: 7.4px solid var(--content-background-color); margin: 0 0 -7.4px 7.4px; bottom: 50%; left: 100%; }
|
|
238
|
+
.top-popup-wrapper.p3 > .notch{ border-top: 0; border-bottom: 7.4px solid var(--content-background-color); margin: 7.4px 0 0 -7.4px; top: 100%; left: 50%; }
|
|
239
|
+
.top-popup-wrapper.p4 > .notch{ border-right: 0; border-left: 7.4px solid var(--content-background-color); margin: 0 7.4px -7.4px 0; bottom: 50%; right: 100%; }
|
|
240
|
+
|
|
241
|
+
.top-popup-wrapper.p1 > .notch-border{ border-top-color: rgba(0,0,0,0.05); margin-bottom: 6px; }
|
|
242
|
+
.top-popup-wrapper.p2 > .notch-border{ border-right-color: rgba(0,0,0,0.05); margin-left: 6px; }
|
|
243
|
+
.top-popup-wrapper.p3 > .notch-border{ border-bottom-color: rgba(0,0,0,0.05); margin-top: 6px; }
|
|
244
|
+
.top-popup-wrapper.p4 > .notch-border{ border-left-color: rgba(0,0,0,0.05); margin-right: 6px; }
|
|
245
|
+
|
|
246
|
+
/* common */
|
|
247
|
+
.top-popup_header,
|
|
248
|
+
.top-popup_content,
|
|
249
|
+
.top-popup_footer{ font-size: 14px; }
|
|
250
|
+
.top-popup_header,
|
|
251
|
+
.top-popup_footer{ display: flex; align-items: center; justify-content: space-between; }
|
|
252
|
+
|
|
253
|
+
/* header */
|
|
254
|
+
.top-popup_header{
|
|
255
|
+
border-bottom: 1px solid var(--top-popup-border-color);
|
|
256
|
+
padding: var(--top-padding-3);
|
|
257
|
+
font-weight: 600;
|
|
258
|
+
}
|
|
259
|
+
.top-popup_header > *{ font-weight: 400; }
|
|
260
|
+
.top-popup_header > .a{ cursor: pointer; color: var(--color-blue-450); }
|
|
261
|
+
.top-popup_header > .a:hover{ color: var(--color-blue-350); }
|
|
262
|
+
|
|
263
|
+
.top-popup_headerButton{ width: 60px; }
|
|
264
|
+
|
|
265
|
+
/* content */
|
|
266
|
+
.top-popup_content{
|
|
267
|
+
margin: 0;
|
|
268
|
+
line-height:1 !important;
|
|
269
|
+
flex-grow: 1;
|
|
270
|
+
overflow-y: auto;
|
|
271
|
+
display: flex;
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
gap: var(--top-gap-4);
|
|
274
|
+
|
|
275
|
+
-webkit-overflow-scrolling: touch;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
div.top-popup_content{
|
|
279
|
+
/* has_scroll */
|
|
280
|
+
--scroll-padding-top: var(--top-popup-content-padding);
|
|
281
|
+
--scroll-padding-bottom: var(--top-popup-content-padding);
|
|
282
|
+
|
|
283
|
+
padding: var(--top-popup-content-padding);
|
|
284
|
+
}
|
|
285
|
+
div.top-popup_content > *{ flex-shrink: 0; }
|
|
286
|
+
div.top-popup_content > .top-button{ margin: 0; }
|
|
287
|
+
|
|
288
|
+
div.top-popup_content .top-unwrap{
|
|
289
|
+
--top-unwrap-x: var(--top-popup-content-padding);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
ul.top-popup_content{
|
|
293
|
+
--scroll-padding-top: var(--top-popup-list-padding);
|
|
294
|
+
--scroll-padding-bottom: var(--top-popup-list-padding);
|
|
295
|
+
|
|
296
|
+
padding: var(--top-popup-list-padding);
|
|
297
|
+
gap: 2px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
ul.top-popup_content .top-unwrap{
|
|
301
|
+
--top-unwrap-x: var(--top-popup-list-padding);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.top-popup_listItem{
|
|
305
|
+
border-radius: var(--top-popup-listItem-radius);
|
|
306
|
+
padding: var(--top-popup-listItem-padding);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
ul.top-popup_content li{ margin: 0; list-style:none; display: flex; position: relative }
|
|
310
|
+
ul.top-popup_content li > *{ flex-grow: 1; }
|
|
311
|
+
ul.top-popup_content li > a:not(.top-button),
|
|
312
|
+
ul.top-popup_content li > .a{
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
box-sizing: border-box;
|
|
315
|
+
border-radius: var(--top-popup-listItem-radius);
|
|
316
|
+
background: var(--top-popup-background-color);
|
|
317
|
+
padding: var(--top-popup-listItem-padding);
|
|
318
|
+
color:var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration:none !important; font-style: normal;
|
|
319
|
+
display:flex; flex: 1 1 100%; align-items: center;
|
|
320
|
+
transition: background-color 0.1s ease-in-out;
|
|
321
|
+
}
|
|
322
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button),
|
|
323
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > .a{ transition: none; }
|
|
324
|
+
|
|
325
|
+
ul.top-popup_content li > a:not(.top-button):hover,
|
|
326
|
+
ul.top-popup_content li > .a:hover{ background: var(--top-popup-background-color-hover); }
|
|
327
|
+
ul.top-popup_content li > a:not(.top-button).top-active,
|
|
328
|
+
ul.top-popup_content li > .a.top-active{ background: var(--top-popup-background-color-active); }
|
|
329
|
+
|
|
330
|
+
.top-popup_content + .top-popup_content{ padding-top: 0; }
|
|
331
|
+
|
|
332
|
+
/* listTitle */
|
|
333
|
+
.top-popup_listItem-title{
|
|
334
|
+
background: var(--top-popup-title-background-color);
|
|
335
|
+
color: var(--color-text-2); font-size: 12px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* listDelimiter */
|
|
339
|
+
.top-popup_listItem-delimiter{
|
|
340
|
+
border-radius: 3px;
|
|
341
|
+
background: var(--top-popup-border-color);
|
|
342
|
+
height: 1px;
|
|
343
|
+
padding: 0;
|
|
344
|
+
margin: 4px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* listMore */
|
|
348
|
+
.top-popup_listMore{
|
|
349
|
+
margin: calc(0px - var(--top-popup-listItem-padding)) 0;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
ul.top-popup_content li > .a.top-popup_listMore{
|
|
353
|
+
height: auto; padding-right: 4px; padding-left: 4px;
|
|
354
|
+
font-size: 24px; line-height: 17px; text-align: center;
|
|
355
|
+
flex-basis: 10px;
|
|
356
|
+
}
|
|
357
|
+
ul.top-popup_content li > .a.top-popup_listMore:before{ color: var(--color-gray-500); }
|
|
358
|
+
ul.top-popup_content li > * > .top-popup_listMore{
|
|
359
|
+
padding: 0 var(--top-popup-listItem-padding); margin-left: auto;
|
|
360
|
+
color: var(--color-gray-500);
|
|
361
|
+
font-size: 14px;
|
|
362
|
+
}
|
|
363
|
+
ul.top-popup_content li > * > i.top-popup_listMore:hover,
|
|
364
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ color: var(--color-blue-500); }
|
|
365
|
+
ul.top-popup_content li > * > i.top-popup_listMore:before{
|
|
366
|
+
transform: rotate(90deg);
|
|
367
|
+
display: block;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
ul.top-popup_content li a.close{ background: none !important; }
|
|
371
|
+
|
|
372
|
+
/* data-top-icon */
|
|
373
|
+
.top-popup_content > [data-top-icon]:before{
|
|
374
|
+
--top-icon-size: 20px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button):before{
|
|
378
|
+
--top-icon-color: var(--color-text-3);
|
|
379
|
+
--top-icon-size: 20px;
|
|
380
|
+
--top-icon-width: 20px;
|
|
381
|
+
|
|
382
|
+
height: 1rem; margin-right: 8px; transition: color 0.1s;
|
|
383
|
+
}
|
|
384
|
+
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button):before,
|
|
385
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button).top-active:before{
|
|
386
|
+
--top-icon-color: var(--color-text-2);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/* footer */
|
|
390
|
+
.top-popup_footer{
|
|
391
|
+
padding: var(--top-popup-list-padding);
|
|
392
|
+
border-top: 1px solid var(--top-popup-border-color);
|
|
393
|
+
display: flex;
|
|
394
|
+
gap:var(--top-gap-2);
|
|
395
|
+
justify-content: flex-end;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* Виджеты */
|
|
399
|
+
.top-popup > [data-widget]{ padding: 0 var(--top-popup-list-padding); }
|
|
400
|
+
.top-popup > [data-widget] + hr{ margin: 0 var(--top-popup-list-padding); }
|
|
401
|
+
|
|
402
|
+
.top-popup .placeholder{
|
|
403
|
+
border:1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background:#F9F9F9 !important; margin: -1px 0; z-index: 1;
|
|
404
|
+
position: relative;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* компоненты */
|
|
408
|
+
.top-popup-wrapper.simple_list > .top-popup{ min-width: 0; white-space: nowrap; }
|
|
409
|
+
|
|
410
|
+
.top-popup_content .top-column{ display: flex; flex-direction: column; gap: 4px; }
|
|
411
|
+
html .top-popup .top-popup_content li > .top-button{
|
|
412
|
+
margin:calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.top-popup li .check_all,
|
|
416
|
+
.top-popup li .clear_all{ cursor: pointer; color: var(--color-cyan); padding: 8px; display: inline-block; }
|
|
417
|
+
.top-popup li .check_all:hover,
|
|
418
|
+
.top-popup li .clear_all:hover{ text-decoration: underline; }
|
|
419
|
+
.top-popup li .clear_all{ display: none; }
|
|
420
|
+
|
|
421
|
+
/* table */
|
|
422
|
+
.top-popup_content table{ margin: -9px 0; }
|
|
423
|
+
.top-popup_content table td,
|
|
424
|
+
.top-popup_content table th{ padding: 9px var(--top-popup-listItem-padding) 9px 0; vertical-align: top; }
|
|
425
|
+
.top-popup_content table th{ width: 40%; font-weight: 600; white-space: nowrap; }
|
|
426
|
+
|
|
427
|
+
/* формы */
|
|
428
|
+
ul.top-popup_content .a > [type="checkbox"],
|
|
429
|
+
ul.top-popup_content .a > [type="radio"]{ margin: -8px 0 -8px auto; }
|
|
430
|
+
|
|
431
|
+
/* deprecated */
|
|
432
|
+
ul.top-popup_content a > [class*=icon],
|
|
433
|
+
ul.top-popup_content i.a > [class*=icon]{
|
|
434
|
+
transition: 0.1s;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.top-popup .buttons{ border-radius:0 0 4px 4px; border-top:1px solid #BDC3C7; background:#ECF0F1; padding:10px 15px; margin:10px -15px -10px -15px; white-space: nowrap; }
|
|
438
|
+
.top-popup_footer [class*=btn]:not(.btn-transparent){ min-width: 100px; padding: 5px 14px; margin-left: 10px; }
|
|
439
|
+
.top-popup_footer [class*=btn]:first-child{ margin-left: 0; }
|
|
440
|
+
.top-popup_footer .btn.full_width{ margin: 0; flex-grow: 1; }`, w = `:root{
|
|
441
|
+
--top-popup-list-padding: 0px;
|
|
442
|
+
|
|
443
|
+
--top-popup-listItem-radius: 0px;
|
|
444
|
+
--top-popup-listItem-padding: var(--top-padding-4);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
html.with_popup{ background: #808080; }
|
|
448
|
+
|
|
449
|
+
.top-popup-wrapper{
|
|
450
|
+
--top-popup-footer-offset: 25px;
|
|
451
|
+
|
|
452
|
+
width: auto !important; height: auto !important;
|
|
453
|
+
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden;
|
|
454
|
+
transition: background 0.3s;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){ background: rgba(0,0,0,0.5); backdrop-filter: blur(1px); }
|
|
458
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup{ opacity: 1 !important; }
|
|
459
|
+
|
|
460
|
+
.top-popup{
|
|
461
|
+
border-radius: 8px 8px 0 0; width: auto !important; max-height: calc(100% - var(--header-height) - 12px); margin: 0 !important;
|
|
462
|
+
top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
|
|
463
|
+
display: flex; flex-direction: column;
|
|
464
|
+
|
|
465
|
+
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%) */
|
|
466
|
+
transform: translateY(80%);
|
|
467
|
+
|
|
468
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* from top */
|
|
472
|
+
.top-popup-wrapper.p-from-top{
|
|
473
|
+
--top-popup-footer-offset: 0px;
|
|
474
|
+
|
|
475
|
+
top: var(--header-height) !important;
|
|
476
|
+
}
|
|
477
|
+
.with_dialog .top-popup-wrapper.p-from-top{ top: 50px !important; }
|
|
478
|
+
.top-popup-wrapper.p-from-top > .top-popup{
|
|
479
|
+
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important;
|
|
480
|
+
transform: translateY(calc(-100% - 24px));
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* content */
|
|
484
|
+
ul.top-popup_content{
|
|
485
|
+
--scroll-padding-top: 0px;
|
|
486
|
+
--scroll-padding-bottom: var(--scroll-padding-top);
|
|
487
|
+
|
|
488
|
+
gap: 0;
|
|
489
|
+
}
|
|
490
|
+
ul.top-popup_content li:not(:last-child){ border-bottom: 1px solid var(--top-popup-border-color); }
|
|
491
|
+
|
|
492
|
+
.top-popup-wrapper.top-style_alt > .top-popup > ul > li{ border-bottom: none; }
|
|
493
|
+
|
|
494
|
+
/* footer */
|
|
495
|
+
.top-popup_footer{
|
|
496
|
+
flex-direction: column-reverse;
|
|
497
|
+
}
|
|
498
|
+
.top-popup_footer > .top-button{
|
|
499
|
+
--top-forms-base-height: var(--top-forms-base-height_xl);
|
|
500
|
+
|
|
501
|
+
width: 100%;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/* listTitle */
|
|
505
|
+
ul.top-popup_content .top-popup_listItem-title{
|
|
506
|
+
--top-popup-padding-v: 12px;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/* listDelimiter */
|
|
510
|
+
ul.top-popup_content .top-popup_listItem-delimiter{ background: var(--color-line-1-opacity); height: 4px; margin: 0; }
|
|
511
|
+
ul.top-popup_content li:first-child > .top-popup_listItem-delimiter{ border-top: 1px solid var(--top-popup-border-color); }`, P = `html:not(.with_dialog){ margin-right: 0 !important; }
|
|
512
|
+
|
|
513
|
+
.top-popup{ min-width: 250px; max-width: calc(100vw - var(--top-popup-left) - 16px); max-height: calc(var(--top-popup-bottom) + var(--top-popup-height)); }
|
|
514
|
+
.top-popup-wrapper.invert-x > .top-popup{ max-width: calc(100vw - var(--top-popup-right) - 16px); }
|
|
515
|
+
.top-popup-wrapper.invert-y > .top-popup{ max-height: calc(100vh - var(--top-popup-bottom) - 16px); }
|
|
516
|
+
|
|
517
|
+
/* position */
|
|
518
|
+
.top-popup-wrapper.p1 > .top-popup{ max-height: calc(var(--top-popup-top) - var(--header-height) - 16px); }
|
|
519
|
+
.top-popup-wrapper.p3 > .top-popup{ max-height: calc(var(--top-popup-bottom) - 16px); }
|
|
520
|
+
.top-popup-wrapper.p2 > .top-popup{ max-width: calc(var(--top-popup-right) - 16px); }
|
|
521
|
+
.top-popup-wrapper.p4 > .top-popup{ max-width: calc(var(--top-popup-left) - 16px); }
|
|
522
|
+
|
|
523
|
+
/* notch */
|
|
524
|
+
.top-popup-wrapper.p1.with_notch > .top-popup,
|
|
525
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-left: -16px !important; }
|
|
526
|
+
.top-popup-wrapper.p1.with_notch > .notch,
|
|
527
|
+
.top-popup-wrapper.p3.with_notch > .notch{ margin-left: -8px !important; }
|
|
528
|
+
|
|
529
|
+
.top-popup-wrapper.p1.with_notch.invert-x,
|
|
530
|
+
.top-popup-wrapper.p3.with_notch.invert-x{ margin-left: 3px !important; }
|
|
531
|
+
.top-popup-wrapper.p1.with_notch.invert-x > .notch,
|
|
532
|
+
.top-popup-wrapper.p3.with_notch.invert-x > .notch{ margin-left: -9px !important; }
|
|
533
|
+
|
|
534
|
+
/* listMore */
|
|
535
|
+
ul.top-popup_content li > * > i.top-popup_listMore{ visibility: hidden; transition: none; }
|
|
536
|
+
ul.top-popup_content li:hover > * > i.top-popup_listMore,
|
|
537
|
+
ul.top-popup_content li > *.top-active > i.top-popup_listMore,
|
|
503
538
|
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ visibility: visible; }`;
|
|
504
539
|
f.appendStyle(x);
|
|
505
540
|
f.appendStyle(w, "m");
|
|
@@ -558,19 +593,19 @@ class g extends m {
|
|
|
558
593
|
}
|
|
559
594
|
async mount() {
|
|
560
595
|
const t = this.vueGetComponent();
|
|
561
|
-
if (this.popupParent =
|
|
562
|
-
this.type = "vue", this.options.popup = "", this.elPopup =
|
|
596
|
+
if (this.popupParent = i.getPopup(this.el.closest(".top-popup-wrapper")), await this.mountJQuery(), n.css(this.el, "position") !== "absolute" && (this.el.style.position = "relative"), this.el.dataset.topPopupOpened = "opened", this.elActiveByDefault = this.el.classList.contains("top-active"), this.el.classList.add("top-active"), t)
|
|
597
|
+
this.type = "vue", this.options.popup = "", this.elPopup = n.genEl("div", {}, this.options.popup);
|
|
563
598
|
else if (this.options.popup.match(/^[#.]/))
|
|
564
599
|
this.type = "selector", this.elPopup = document.querySelector(`${this.options.popup}.template`);
|
|
565
600
|
else {
|
|
566
601
|
if (this.type = "html", this.options.useOriginal)
|
|
567
602
|
throw "Option useOriginal not allowed for text templates";
|
|
568
|
-
this.elPopup =
|
|
603
|
+
this.elPopup = n.genEl("div", {}, this.options.popup);
|
|
569
604
|
}
|
|
570
605
|
if (!this.elPopup || t != null && t.opened) {
|
|
571
606
|
if (this.options.useOriginal || t != null && t.opened) {
|
|
572
607
|
if (t != null && t.opened ? this.elPopup = t.popup.elPopup : this.elPopup = document.querySelector(`${this.options.popup}.top-popup-wrapper-shown`), this.elPopup) {
|
|
573
|
-
this.el.dataset.topPopupOpened = "", this.elActiveByDefault || this.el.classList.remove("top-active"),
|
|
608
|
+
this.el.dataset.topPopupOpened = "", this.elActiveByDefault || this.el.classList.remove("top-active"), i.close(this.elPopup), setTimeout(() => this.mount(), 300);
|
|
574
609
|
return;
|
|
575
610
|
}
|
|
576
611
|
throw "Option useOriginal state allowed only elements .template";
|
|
@@ -579,7 +614,7 @@ class g extends m {
|
|
|
579
614
|
}
|
|
580
615
|
if (!this.elPopup)
|
|
581
616
|
return;
|
|
582
|
-
for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition =
|
|
617
|
+
for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition = n.wrap(this.elPopup, "i"), this.elStartPosition.classList.add("top-popup-el-start-position", "hidden"))) : (this.elPopup = this.elPopup.cloneNode(!0), this.type === "selector" && !this.elPopup.matches(".template") && (this.elPopup.classList.remove("hidden"), this.elPopup.querySelector(":scope > .top-popup_content") || this.elPopup.classList.add("top-popup_content"), this.elPopup = n.wrap(this.elPopup, "div")), this.type === "html" && (this.elPopup.querySelector(":scope > .top-popup_content") || (this.elPopup.classList.add("top-popup_content"), this.elPopup = n.wrap(this.elPopup, "div"))), (this.type === "selector" && !this.elPopup.matches(".template") || this.type === "html" || this.type === "vue") && (n.querySelectorAllArray(this.elPopup, "[data-top-popup]").forEach((e) => e.dataset.topPopupPosBy = "fixed"), n.querySelectorAllArray(this.elPopup, ".top-popup-wrapper").forEach((e) => e.remove()))), i.decoratorBeforeOpen(this), t && (this.options.class = t.classRef.value), this.elPopupInner = document.createElement("div"), this.elPopupInner.classList.add("top-popupPanel", "top-popup"); this.elPopup.firstChild; )
|
|
583
618
|
this.elPopupInner.appendChild(this.elPopup.firstChild);
|
|
584
619
|
if (this.elPopup.append(this.elPopupInner), this.elPopup.classList.add("top-popup-wrapper"), this.options.class) {
|
|
585
620
|
const e = this.options.class.split(" ");
|
|
@@ -587,9 +622,9 @@ class g extends m {
|
|
|
587
622
|
}
|
|
588
623
|
this.options.notch && (this.elPopup.classList.add("with_notch"), this.elPopup.insertAdjacentHTML("beforeend", '<i class="notch notch-border"></i><i class="notch"></i>')), await this.vueOpen(), this.elPopupHeader = this.elPopupInner.querySelector(".top-popup_header"), this.elPopupBody = this.elPopupInner.querySelector(".top-popup_content"), this.elPopupFooter = this.elPopupInner.querySelector(".top-popup_footer");
|
|
589
624
|
const p = !!this.elPopup.querySelector('[data-widget="search"]');
|
|
590
|
-
this.options.isFullScreen && !p && (this.elPopupHeader || (this.elPopupHeader =
|
|
625
|
+
this.options.isFullScreen && !p && (this.elPopupHeader || (this.elPopupHeader = n.genEl("i", { class: "top-popup_header" }), this.elPopupInner.prepend(this.elPopupHeader), this.elPopupHeader.prepend(n.genEl("i", { class: "a closer" }, this.options.i18n.Close)), this.elPopupHeader.append(n.genEl("i", { class: "top-popup_headerButton" })))), n.storage(this.elPopup, "Popup", this), this.options.frontSelector && (this.elFront = document.querySelector(this.options.frontSelector)), this.elFront || (this.elFront = this.el.closest(".top-popup-front")), this.elFront || (this.elFront = document.body), this.elPopup.style.width = this.el.offsetWidth + "px", this.elPopup.style.height = this.el.offsetHeight + "px", this.elPopup.style.top = this.el.offsetTop + "px", this.elPopup.style.right = parseInt(this.el.style.right || 0) + "px", this.elPopup.style.bottom = parseInt(this.el.style.bottom || 0) + "px", this.el.parentElement.insertBefore(this.elPopup, this.el), this.elPopup.classList.remove("template"), this.options.invertX && this.elPopup.classList.add("invert-x");
|
|
591
626
|
let o = !!this.el.closest(".modal-header");
|
|
592
|
-
o || (o = !!this.el.closest("#top_panel")), o || (o = !!this.el.closest("#secondmenu")), o && this.elPopup.classList.add("p-from-top"), setTimeout(() => this.elPopup.classList.add("top-popup-wrapper-shown")), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top =
|
|
627
|
+
o || (o = !!this.el.closest("#top_panel")), o || (o = !!this.el.closest("#secondmenu")), o && this.elPopup.classList.add("p-from-top"), setTimeout(() => this.elPopup.classList.add("top-popup-wrapper-shown")), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top = n.offset(this.el).top - this.el.offsetTop - n.offset(this.elFront).top, this.shift.left = n.offset(this.el).left - this.el.offsetLeft - n.offset(this.elFront).left, this.shift.top -= parseInt(this.el.style["margin-top"] || 0), this.shift.left -= parseInt(this.el.style["margin-left"] || 0), this.elPopup.style.top = parseInt(this.elPopup.style.top || "0") + this.shift.top + "px", this.elPopup.style.left = parseInt(this.elPopup.style.left || "0") + this.shift.left + "px"), this.$ && this.$.trigger("aftershow.top-menu-popup", [jQuery(this.elPopup)]), this.recalcPosition(), this.elPopup.setAttribute("tabindex", 0), this.focus(), i.decoratorAfterOpen(this), this.mountEvents();
|
|
593
628
|
}
|
|
594
629
|
async mountJQuery() {
|
|
595
630
|
typeof jQuery == "function" && (this.$ = jQuery(this.el));
|
|
@@ -598,8 +633,8 @@ class g extends m {
|
|
|
598
633
|
* Выполнить фокусировку на нужный элемент после открытия окна
|
|
599
634
|
*/
|
|
600
635
|
focus() {
|
|
601
|
-
let t =
|
|
602
|
-
t || (t =
|
|
636
|
+
let t = n.querySelectorVisible(this.elPopup, ".top-popup-autofocus");
|
|
637
|
+
t || (t = n.querySelectorVisible(this.elPopup, ":read-write, select:not(:disabled)")), t || (t = n.querySelectorVisible(this.elPopup, ".top-popup_footer .top-button")), t || (t = this.elPopup), t.focus();
|
|
603
638
|
}
|
|
604
639
|
mountEvents() {
|
|
605
640
|
this.addEventListenerWithUnmount(document, "mousedown", (t) => this.onMousedown(t)), this.addEventListenerWithUnmount(this.elPopup, "focus", (t) => this.onFocus(t)), this.options.openByHover && (this.addEventListenerWithUnmount(this.elPopup, "mouseleave", (t) => this.onMouseleave(t)), this.addEventListenerWithUnmount(this.elPopupInner, "mouseleave", (t) => this.onMouseleave(t))), this.options.isFullScreen && this.addEventListenerWithUnmount(this.elPopupBody, "touchmove", (t) => this.onTouchmove(t));
|
|
@@ -611,8 +646,8 @@ class g extends m {
|
|
|
611
646
|
onMousedown(t) {
|
|
612
647
|
if (!this.elPopup || !this.isFirstClick || (this.isFirstClick = !1, setTimeout(() => this.isFirstClick = !0), t.button !== 0))
|
|
613
648
|
return;
|
|
614
|
-
let p =
|
|
615
|
-
p && p !== this.elPopup || (p =
|
|
649
|
+
let p = n.querySelectorVisibleLast(document.body, ":scope > .top-popup-wrapper");
|
|
650
|
+
p && p !== this.elPopup || (p = n.querySelectorVisibleLast(t.target.closest(".top-popup-front"), ":scope > .top-popup-wrapper"), !(p && p !== this.elPopup) && (this.elPopup.contains(t.target) || this.elPopup.closest(".ui-dialog") && !t.target.closest(".ui-dialog") || i.decoratorIsIgnoreOuterClick(t) || i.close(this.elPopup)));
|
|
616
651
|
}
|
|
617
652
|
/**
|
|
618
653
|
* Закрыть другие Popup при фокусе на элемент формы в текущем
|
|
@@ -621,9 +656,9 @@ class g extends m {
|
|
|
621
656
|
onFocus(t) {
|
|
622
657
|
if (t.target.matches("input") || this.isClosed)
|
|
623
658
|
return;
|
|
624
|
-
|
|
625
|
-
var e,
|
|
626
|
-
this.elPopup.contains(o) || ((e = this.popupParent) == null ? void 0 : e.elPopup) === o || ((l = (
|
|
659
|
+
i.getAllVisible().forEach((o) => {
|
|
660
|
+
var e, r, l;
|
|
661
|
+
this.elPopup.contains(o) || ((e = this.popupParent) == null ? void 0 : e.elPopup) === o || ((l = (r = this.popupParent) == null ? void 0 : r.popupParent) == null ? void 0 : l.elPopup) === o || i.close(o);
|
|
627
662
|
});
|
|
628
663
|
}
|
|
629
664
|
/**
|
|
@@ -632,14 +667,14 @@ class g extends m {
|
|
|
632
667
|
*/
|
|
633
668
|
onMouseleave(t) {
|
|
634
669
|
setTimeout(() => {
|
|
635
|
-
this.elPopupInner.matches(":hover") ||
|
|
670
|
+
this.elPopupInner.matches(":hover") || i.close(this.elPopup);
|
|
636
671
|
}, 100);
|
|
637
672
|
}
|
|
638
673
|
/**
|
|
639
674
|
* Контроль положения Popup при fixed позиционировании
|
|
640
675
|
*/
|
|
641
676
|
onResize() {
|
|
642
|
-
this.elPopup.parentElement !== document.body && document.body.append(this.elPopup), this.elPopup.style.top =
|
|
677
|
+
this.elPopup.parentElement !== document.body && document.body.append(this.elPopup), this.elPopup.style.top = n.offset(this.el).top + "px", this.elPopup.style.left = n.offset(this.el).left + "px";
|
|
643
678
|
}
|
|
644
679
|
unmount() {
|
|
645
680
|
super.unmount(), this.el.dataset.topPopupOpened = "", this.elActiveByDefault || this.el.classList.remove("top-active");
|
|
@@ -664,20 +699,20 @@ class g extends m {
|
|
|
664
699
|
}
|
|
665
700
|
const o = this.elPopup.getBoundingClientRect();
|
|
666
701
|
this.elPopup.style.setProperty("--top-popup-height", this.elPopup.offsetHeight + "px"), this.elPopup.style.setProperty("--top-popup-right-bounding", o.right + "px"), this.elPopup.style.setProperty("--top-popup-bottom-bounding", o.bottom + "px"), this.elPopup.style.setProperty("--top-popup-top", o.top + "px"), this.elPopup.style.setProperty("--top-popup-left", o.left + "px"), this.elPopupInner.style.maxWidth = "unset", this.elPopupInner.style.maxHeight = "unset";
|
|
667
|
-
let e = !1,
|
|
702
|
+
let e = !1, r = !1, l = !1, h = !1, a = o.left > window.innerWidth / 2, c = o.top > window.innerHeight / 2;
|
|
668
703
|
t === 4 && (a = !a), t === 1 && (c = !c);
|
|
669
704
|
const s = this.elPopupInner.getBoundingClientRect(), u = window.innerWidth - s.right, v = window.innerHeight - s.bottom, d = 8;
|
|
670
|
-
s.top < d && (e = !0), u < d && (
|
|
705
|
+
s.top < d && (e = !0), u < d && (r = !0), v < d && (l = !0), s.left < d && (h = !0), e && (t === 0 || t === 1) && c && (t = 3), l && t === 3 && c && (t = 1), r && t === 2 && a && (t = 4), h && t === 4 && a && (t = 2), r && (t === 0 || t === 1 || t === 3) && this.elPopup.classList.add("invert-x"), l && (t === 2 || t === 4) && c && (t === 2 && !a && this.elPopup.classList.add("invert-y"), t === 4 && !a && this.elPopup.classList.add("invert-x"), this.elPopup.matches(".invert-y") || (t = 1)), this.elPopup.classList.remove("p0", "p1", "p2", "p3", "p4"), this.elPopup.classList.add("p" + t), this.elPopupInner.style.maxWidth = "", this.elPopupInner.style.maxHeight = "", i.scrollToActive(this.elPopup);
|
|
671
706
|
}
|
|
672
707
|
onTouchmove(t) {
|
|
673
708
|
t.currentTarget.scrollWidth > t.currentTarget.offsetWidth || t.target.parentElement.scrollWidth > t.target.parentElement.offsetWidth || t.currentTarget.matches(".has_scroll") || t.preventDefault();
|
|
674
709
|
}
|
|
675
710
|
close() {
|
|
676
|
-
this.isClosed || (this.isClosed = !0, this.$ && this.$.trigger("afterclose.top-menu-popup", [jQuery(this.elPopup)]), !
|
|
677
|
-
var o, e,
|
|
678
|
-
this.vueClose(), this.options.useOriginal ? (this.elPopup.removeAttribute("style"), this.elPopup.classList.remove("top-popup-wrapper-shown", "top-popup-wrapper-closed"), this.elPopup.classList.add("template"), this.elStartPosition.append(this.elPopup), (o = this.elPopup.querySelector("div.top-popup_content.top-column")) == null || o.classList.remove("top-column"), (e = this.elPopup.querySelector(".notch-border")) == null || e.remove(), (
|
|
679
|
-
const t =
|
|
680
|
-
p ?
|
|
711
|
+
this.isClosed || (this.isClosed = !0, this.$ && this.$.trigger("afterclose.top-menu-popup", [jQuery(this.elPopup)]), !i.noClose && (this.unmount(), this.elPopup.classList.add("top-popup-wrapper-closed"), setTimeout(() => {
|
|
712
|
+
var o, e, r;
|
|
713
|
+
this.vueClose(), this.options.useOriginal ? (this.elPopup.removeAttribute("style"), this.elPopup.classList.remove("top-popup-wrapper-shown", "top-popup-wrapper-closed"), this.elPopup.classList.add("template"), this.elStartPosition.append(this.elPopup), (o = this.elPopup.querySelector("div.top-popup_content.top-column")) == null || o.classList.remove("top-column"), (e = this.elPopup.querySelector(".notch-border")) == null || e.remove(), (r = this.elPopup.querySelector(".notch")) == null || r.remove(), this.elPopupInner.replaceWith(...this.elPopupInner.childNodes), n.storageClear(this.elPopup)) : (n.storageClear(this.elPopup), this.elPopup.remove(), delete this.elPopup);
|
|
714
|
+
const t = i.getAllVisible(), p = t.length && t[t.length - 1];
|
|
715
|
+
p ? i.getPopup(p).focus() : document.documentElement.classList.remove("with_popup");
|
|
681
716
|
}, 300)));
|
|
682
717
|
}
|
|
683
718
|
async vueOpen() {
|
|
@@ -690,11 +725,11 @@ class g extends m {
|
|
|
690
725
|
}
|
|
691
726
|
// получить vueConnectors компонента Popup
|
|
692
727
|
vueGetComponent() {
|
|
693
|
-
return
|
|
728
|
+
return i.vueConnectors.get(this.el.dataset.topPopupId);
|
|
694
729
|
}
|
|
695
730
|
}
|
|
696
731
|
b.init();
|
|
697
732
|
export {
|
|
698
733
|
g as default
|
|
699
734
|
};
|
|
700
|
-
//# sourceMappingURL=popup-
|
|
735
|
+
//# sourceMappingURL=popup-05538243.es.js.map
|