@topvisor/ui 1.0.1 → 1.0.3
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-3uPurK_5.es.js +290 -0
- package/.chunks/datepicker-3uPurK_5.es.js.map +1 -0
- package/.chunks/datepicker-BJGX0c7G.amd.js +248 -0
- package/.chunks/datepicker-BJGX0c7G.amd.js.map +1 -0
- package/.chunks/forms-BImXJ_ZO.amd.js +3 -0
- package/.chunks/forms-BImXJ_ZO.amd.js.map +1 -0
- package/.chunks/forms-D9r2-H5Y.es.js +2000 -0
- package/.chunks/forms-D9r2-H5Y.es.js.map +1 -0
- package/.chunks/i18n-C_OH9IT3.amd.js.map +1 -1
- package/.chunks/i18n-DuTvft1T.es.js.map +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-B3E-SDdg.es.js → listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js} +2 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-uKhci19t.amd.js → listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js} +2 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js.map +1 -0
- package/.chunks/{menu-CcyqVSfg.es.js → menu-B0Ul7Kbg.es.js} +2 -2
- package/.chunks/menu-B0Ul7Kbg.es.js.map +1 -0
- package/.chunks/{menu-DTbsTDGK.amd.js → menu-CbhB9e4x.amd.js} +2 -2
- package/.chunks/menu-CbhB9e4x.amd.js.map +1 -0
- package/.chunks/{popup-C5yk4q8p.es.js → popup-Coq_61yv.es.js} +495 -495
- package/.chunks/popup-Coq_61yv.es.js.map +1 -0
- package/.chunks/{popup-DAruCfQv.amd.js → popup-pQCswyfj.amd.js} +447 -447
- package/.chunks/popup-pQCswyfj.amd.js.map +1 -0
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
- package/.chunks/store-esTid5oI.amd.js.map +1 -1
- package/README.md +86 -86
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/assets/menu.css +1 -1
- package/assets/popup.css +1 -1
- package/assets/tabs.css +1 -1
- package/assets/tabsView.css +1 -1
- package/assets/themes/dark.css +1 -0
- package/assets/themes/light.css +1 -0
- package/components/forms/select/select.d.ts +1 -2
- package/components/tabsView/tabsView/store.d.ts +1 -1
- package/components/tabsView/tabsView/tabsView.d.ts +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +58 -59
- package/core/app.js.map +1 -1
- package/core/core/core.d.ts +10 -9
- package/core/core/events/resize.d.ts +16 -0
- package/core/core/events.d.ts +12 -17
- package/core/core/options.d.ts +22 -0
- package/core/core/state.d.ts +12 -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 +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +17 -18
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Read Me.txt +7 -7
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +3379 -3379
- package/icomoon/fonts/Topvisor-2.svg +263 -263
- package/icomoon/style.css +740 -740
- package/package.json +37 -36
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +18 -18
- 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 -2
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +3 -3
- package/project/project.js.map +1 -1
- package/require/css.amd.js +12 -12
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js +7 -8
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +106 -98
- package/tabsView/tabsView.js.map +1 -1
- package/test/themes/themes/dark-positions.amd.js +2 -0
- package/test/themes/themes/dark-positions.amd.js.map +1 -0
- package/test/themes/themes/dark-positions.d.ts +1 -0
- package/test/themes/themes/dark-positions.js +2 -0
- package/test/themes/themes/dark-positions.js.map +1 -0
- package/test/themes/themes/dark.amd.js +2 -0
- package/test/themes/themes/dark.amd.js.map +1 -0
- package/test/themes/themes/dark.d.ts +1 -0
- package/test/themes/themes/dark.js +4 -0
- package/test/themes/themes/dark.js.map +1 -0
- package/test/themes/themes/light-positions.amd.js +2 -0
- package/test/themes/themes/light-positions.amd.js.map +1 -0
- package/test/themes/themes/light-positions.d.ts +1 -0
- package/test/themes/themes/light-positions.js +2 -0
- package/test/themes/themes/light-positions.js.map +1 -0
- package/test/themes/themes/light.amd.js +2 -0
- package/test/themes/themes/light.amd.js.map +1 -0
- package/test/themes/themes/light.d.ts +1 -0
- package/test/themes/themes/light.js +4 -0
- package/test/themes/themes/light.js.map +1 -0
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.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 +3 -3
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.amd.js.map +1 -1
- package/utils/lodash.js +6 -703
- package/utils/lodash.js.map +1 -1
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +1 -1
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js.map +1 -1
- package/web-types.json +72 -72
- package/.chunks/datepicker-CS24dmLk.es.js +0 -290
- package/.chunks/datepicker-CS24dmLk.es.js.map +0 -1
- package/.chunks/datepicker-DsMs2YKL.amd.js +0 -248
- package/.chunks/datepicker-DsMs2YKL.amd.js.map +0 -1
- package/.chunks/debounce-4ipCj607.amd.js +0 -2
- package/.chunks/debounce-4ipCj607.amd.js.map +0 -1
- package/.chunks/debounce-BISRz08p.es.js +0 -116
- package/.chunks/debounce-BISRz08p.es.js.map +0 -1
- package/.chunks/forms-DKL0e9tp.amd.js +0 -3
- package/.chunks/forms-DKL0e9tp.amd.js.map +0 -1
- package/.chunks/forms-DT_fsN6V.es.js +0 -1161
- package/.chunks/forms-DT_fsN6V.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B3E-SDdg.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-uKhci19t.amd.js.map +0 -1
- package/.chunks/menu-CcyqVSfg.es.js.map +0 -1
- package/.chunks/menu-DTbsTDGK.amd.js.map +0 -1
- package/.chunks/popup-C5yk4q8p.es.js.map +0 -1
- package/.chunks/popup-DAruCfQv.amd.js.map +0 -1
- package/assets/dark.css +0 -1
- package/assets/light.css +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as f } from "./forms-
|
|
2
|
-
import
|
|
1
|
+
import { C as f } from "./forms-D9r2-H5Y.es.js";
|
|
2
|
+
import r from "../utils/dom.js";
|
|
3
3
|
import { TopPopupWorker as s } from "../popup/worker.js";
|
|
4
4
|
import { a as P } from "./i18n-DuTvft1T.es.js";
|
|
5
|
-
class
|
|
5
|
+
class x {
|
|
6
6
|
static componentName = "Top";
|
|
7
7
|
componentName;
|
|
8
8
|
// имя класса компонента
|
|
@@ -22,18 +22,18 @@ class b {
|
|
|
22
22
|
init(t, p, o) {
|
|
23
23
|
if (!p)
|
|
24
24
|
throw t + ": el is undefined";
|
|
25
|
-
const e =
|
|
25
|
+
const e = x.getComponent(p, t);
|
|
26
26
|
if (e)
|
|
27
27
|
return e.reInit(o), e;
|
|
28
28
|
this.componentName = t, this.className = "top" + t[0].toUpperCase() + t.substring(1), this.uid = this.componentName + (Math.random() + "").replace(".", ""), this._setComponent(p), this.el = p, this.el.classList.add(this.className), this.options = Object.assign(this.options, o), this.mount();
|
|
29
29
|
}
|
|
30
30
|
// получить инициированный компонент
|
|
31
31
|
static getComponent(t, p) {
|
|
32
|
-
return
|
|
32
|
+
return r.storage(t, "#" + p);
|
|
33
33
|
}
|
|
34
34
|
// устанвоить компонент
|
|
35
35
|
_setComponent(t) {
|
|
36
|
-
|
|
36
|
+
r.storage(t, "#" + this.componentName, this);
|
|
37
37
|
}
|
|
38
38
|
// функция подключения компонента
|
|
39
39
|
mount() {
|
|
@@ -41,7 +41,7 @@ class b {
|
|
|
41
41
|
}
|
|
42
42
|
// функция отключения компонента
|
|
43
43
|
unmount() {
|
|
44
|
-
|
|
44
|
+
r.storage(this.el, "#" + this.componentName, null), this.unmountEls.forEach((t) => {
|
|
45
45
|
t.remove();
|
|
46
46
|
}), this.unmountEls = [], this.unmountEvents.forEach((t) => {
|
|
47
47
|
t.el.removeEventListener(t.type, t.listener, t.options);
|
|
@@ -57,13 +57,13 @@ class b {
|
|
|
57
57
|
}
|
|
58
58
|
// указание новые события, которые должны будут удалиться после unmount
|
|
59
59
|
registerEventForUnmount(t, p, o, e) {
|
|
60
|
-
const
|
|
60
|
+
const i = {
|
|
61
61
|
el: t,
|
|
62
62
|
type: p,
|
|
63
63
|
listener: o,
|
|
64
64
|
options: e
|
|
65
65
|
};
|
|
66
|
-
this.unmountEvents.push(
|
|
66
|
+
this.unmountEvents.push(i);
|
|
67
67
|
}
|
|
68
68
|
// функция перенастройки уже подключенного компонента
|
|
69
69
|
reInit(t) {
|
|
@@ -107,8 +107,8 @@ class w {
|
|
|
107
107
|
if (!e || p.matches(".top-popup-noCloser"))
|
|
108
108
|
return;
|
|
109
109
|
if (p.getAttribute("href") === "." && t.preventDefault(), t.target.matches("[data-top-popup]")) {
|
|
110
|
-
const
|
|
111
|
-
|
|
110
|
+
const i = t.target.closest("ul"), n = t.target.closest("a, .a");
|
|
111
|
+
i && ((o = i.querySelector("a.top-active, .a.top-active")) == null || o.classList.remove("top-active")), n && n.classList.add("top-active");
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
s.close(e);
|
|
@@ -122,7 +122,7 @@ class w {
|
|
|
122
122
|
* Глобальный обработчик нажатия кнопки на клавиатуре
|
|
123
123
|
*/
|
|
124
124
|
static onkeydown(t) {
|
|
125
|
-
var e,
|
|
125
|
+
var e, i;
|
|
126
126
|
if (!(t.target instanceof HTMLElement)) return;
|
|
127
127
|
const p = t.target.closest(".top-popup-wrapper");
|
|
128
128
|
if (!p)
|
|
@@ -134,19 +134,19 @@ class w {
|
|
|
134
134
|
break;
|
|
135
135
|
case "Enter":
|
|
136
136
|
if (!o) {
|
|
137
|
-
if (
|
|
137
|
+
if (r.querySelectorVisible(p, ".preloader"))
|
|
138
138
|
break;
|
|
139
|
-
const c =
|
|
139
|
+
const c = r.querySelectorVisible(p, ".top-popup_footer .go, .top-popup_footer [data-action]");
|
|
140
140
|
if (c instanceof HTMLElement) {
|
|
141
141
|
c.click();
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
|
-
const m =
|
|
144
|
+
const m = r.querySelectorVisibleLast(p, ".top-popup_footer .top-button");
|
|
145
145
|
m instanceof HTMLElement && m.click();
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
|
-
const
|
|
149
|
-
|
|
148
|
+
const n = r.querySelectorVisible(p, "li > a.top-active");
|
|
149
|
+
n && n.getAttribute("href") && (t.preventDefault(), location.href = n.getAttribute("href"));
|
|
150
150
|
const u = p.querySelector("li > .top-active");
|
|
151
151
|
u instanceof HTMLElement && u.click();
|
|
152
152
|
break;
|
|
@@ -156,7 +156,7 @@ class w {
|
|
|
156
156
|
case "ArrowLeft":
|
|
157
157
|
if (!o)
|
|
158
158
|
break;
|
|
159
|
-
t.key === "ArrowRight" || t.key === "ArrowLeft" ?
|
|
159
|
+
t.key === "ArrowRight" || t.key === "ArrowLeft" ? r.querySelectorVisible(
|
|
160
160
|
p,
|
|
161
161
|
"ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active > .top-popup_listMore"
|
|
162
162
|
) && t.preventDefault() : t.preventDefault();
|
|
@@ -166,7 +166,7 @@ class w {
|
|
|
166
166
|
if (c instanceof HTMLElement)
|
|
167
167
|
return c.click();
|
|
168
168
|
}
|
|
169
|
-
const d =
|
|
169
|
+
const d = r.querySelectorAllVisible(p, "ul.top-popup_content > li:not(.top-popup_liNoSelectable)"), h = d.length;
|
|
170
170
|
if (!h)
|
|
171
171
|
return;
|
|
172
172
|
let a = -1;
|
|
@@ -174,461 +174,461 @@ class w {
|
|
|
174
174
|
return t.target.matches("input") ? void 0 : s.close(p);
|
|
175
175
|
if (t.key === "ArrowRight" && a === h)
|
|
176
176
|
return;
|
|
177
|
-
a < 0 && (a = h - 1), a > h - 1 && (a = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((c) => c.classList.remove("top-active")), (
|
|
177
|
+
a < 0 && (a = h - 1), a > h - 1 && (a = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((c) => c.classList.remove("top-active")), (i = d[a].querySelector(":scope > a, :scope > .a")) == null || i.classList.add("top-active"), s.scrollToActive(p);
|
|
178
178
|
break;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
const y = `:root {
|
|
183
|
-
--top-popup-z-index: 200000
|
|
184
|
-
--top-popup-transition-delay: 100ms
|
|
185
|
-
|
|
186
|
-
--top-popup-background-color: var(--color-
|
|
187
|
-
--top-popup-background-color-hover: var(--color-
|
|
188
|
-
--top-popup-background-color-active: var(--color-
|
|
189
|
-
|
|
190
|
-
--top-popup-border-color: var(--color-line-2-opacity)
|
|
191
|
-
--top-popup-title-background-color: var(--color-layer-
|
|
192
|
-
|
|
193
|
-
/* суммарный отсуп от каря popup до элемента
|
|
194
|
-
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding))
|
|
195
|
-
|
|
196
|
-
/* списки
|
|
197
|
-
--top-popup-list-padding: var(--top-padding-2)
|
|
198
|
-
|
|
199
|
-
--top-popup-listItem-radius: var(--top-radius-2)
|
|
200
|
-
--top-popup-listItem-padding: var(--top-padding-2)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.top-popup-front { position: relative; }
|
|
204
|
-
|
|
205
|
-
.top-popup-wrapper {
|
|
206
|
-
/* см. recalcPosition()
|
|
207
|
-
--top-popup-height: 0px
|
|
208
|
-
--top-popup-right-bounding: 0px
|
|
209
|
-
--top-popup-bottom-bounding: 0px
|
|
210
|
-
--top-popup-top: 0px
|
|
211
|
-
--top-popup-right: calc(100vw - var(--top-popup-right-bounding))
|
|
212
|
-
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding))
|
|
213
|
-
--top-popup-left: 0px
|
|
214
|
-
|
|
215
|
-
text-align: initial; white-space: normal; word-break: normal
|
|
216
|
-
position: absolute; z-index: 200000
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.top-popup-wrapper:not(.top-popup-wrapper-shown) { overflow: hidden; }
|
|
220
|
-
|
|
221
|
-
/* top-popupPanel
|
|
222
|
-
.top-popupPanel {
|
|
223
|
-
cursor: default
|
|
224
|
-
box-shadow: var(--top-shadow-b)
|
|
225
|
-
border-radius: 14px
|
|
226
|
-
background: var(--top-popup-background-color)
|
|
227
|
-
position: absolute; overflow: hidden
|
|
228
|
-
display: flex; flex-direction: column
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/* position
|
|
232
|
-
.top-popup-wrapper > * {
|
|
233
|
-
opacity: 0
|
|
234
|
-
transition: opacity var(--top-popup-transition-delay) linear, transform var(--top-popup-transition-delay) linear
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.top-popup-wrapper.p0 > * { transform: translateY(-8px); }
|
|
238
|
-
|
|
239
|
-
.top-popup-wrapper.p1 > * { transform: translateY(8px); }
|
|
240
|
-
|
|
241
|
-
.top-popup-wrapper.p2 > * { transform: translateX(8px); }
|
|
242
|
-
|
|
243
|
-
.top-popup-wrapper.p3 > * { transform: translateY(8px); }
|
|
244
|
-
|
|
245
|
-
.top-popup-wrapper.p4 > * { transform: translateX(-8px); }
|
|
246
|
-
|
|
247
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > * {opacity: 1;transform: translate(0, 0) !important;}
|
|
248
|
-
|
|
249
|
-
.top-popup-wrapper.p0 > .top-popup { top: calc(-16px); left: calc(0px - 8px); }
|
|
250
|
-
|
|
251
|
-
.top-popup-wrapper.p1 > .top-popup { bottom: calc(100% + 8px); }
|
|
252
|
-
|
|
253
|
-
.top-popup-wrapper.p2 > .top-popup { left: calc(100% + 8px); }
|
|
254
|
-
|
|
255
|
-
.top-popup-wrapper.p3 > .top-popup { top: calc(100% + 8px); }
|
|
256
|
-
|
|
257
|
-
.top-popup-wrapper.p4 > .top-popup { right: calc(100% + 8px); }
|
|
258
|
-
|
|
259
|
-
.top-popup-wrapper.p2 > .top-popup
|
|
260
|
-
.top-popup-wrapper.p4 > .top-popup { margin-top: -10px; }
|
|
261
|
-
|
|
262
|
-
.top-popup-wrapper.p1.with_notch > .top-popup { margin-bottom: 5px; }
|
|
263
|
-
|
|
264
|
-
.top-popup-wrapper.p2.with_notch > .top-popup { margin-left: 5px; }
|
|
265
|
-
|
|
266
|
-
.top-popup-wrapper.p3.with_notch > .top-popup { margin-top: 5px; }
|
|
267
|
-
|
|
268
|
-
.top-popup-wrapper.p4.with_notch > .top-popup { margin-right: 5px; }
|
|
269
|
-
|
|
270
|
-
.top-popup-wrapper.invert-x > .top-popup { right: 0; }
|
|
271
|
-
|
|
272
|
-
.top-popup-wrapper.invert-y > .top-popup { bottom: 0; }
|
|
273
|
-
|
|
274
|
-
/* notch
|
|
275
|
-
.top-popup-wrapper > .notch { border: 7.4px solid transparent; position: absolute; display: block; }
|
|
276
|
-
|
|
277
|
-
.top-popup-wrapper.p1 > .notch { border-bottom: 0; border-top: 7.4px solid var(--
|
|
278
|
-
|
|
279
|
-
.top-popup-wrapper.p2 > .notch { border-left: 0; border-right: 7.4px solid var(--
|
|
280
|
-
|
|
281
|
-
.top-popup-wrapper.p3 > .notch { border-top: 0; border-bottom: 7.4px solid var(--
|
|
282
|
-
|
|
283
|
-
.top-popup-wrapper.p4 > .notch { border-right: 0; border-left: 7.4px solid var(--
|
|
284
|
-
|
|
285
|
-
.top-popup-wrapper.p1 > .notch-border { border-top-color: rgba(0, 0, 0, 0.05); margin-bottom: 6px; }
|
|
286
|
-
|
|
287
|
-
.top-popup-wrapper.p2 > .notch-border { border-right-color: rgba(0, 0, 0, 0.05); margin-left: 6px; }
|
|
288
|
-
|
|
289
|
-
.top-popup-wrapper.p3 > .notch-border { border-bottom-color: rgba(0, 0, 0, 0.05); margin-top: 6px; }
|
|
290
|
-
|
|
291
|
-
.top-popup-wrapper.p4 > .notch-border { border-left-color: rgba(0, 0, 0, 0.05); margin-right: 6px; }
|
|
292
|
-
|
|
293
|
-
/* common
|
|
294
|
-
.top-popup_header
|
|
295
|
-
.top-popup_content
|
|
296
|
-
.top-popup_footer { font-size: 14px; }
|
|
297
|
-
|
|
298
|
-
.top-popup_header
|
|
299
|
-
.top-popup_footer { display: flex; align-items: center; justify-content: space-between; }
|
|
300
|
-
|
|
301
|
-
/* header
|
|
302
|
-
.top-popup_header {
|
|
303
|
-
color: var(--color-text-1)
|
|
304
|
-
border-bottom: 1px solid var(--top-popup-border-color)
|
|
305
|
-
padding: var(--top-padding-3)
|
|
306
|
-
font-weight: 600
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.top-popup_header > * { font-weight: 400; }
|
|
310
|
-
|
|
311
|
-
.top-popup_header > .a { cursor: pointer;}
|
|
312
|
-
|
|
313
|
-
.top-popup_header > .a:hover { color: var(--color-text-primary
|
|
314
|
-
|
|
315
|
-
.top-popup_headerButton { width: 60px; }
|
|
316
|
-
|
|
317
|
-
/* widget
|
|
318
|
-
.top-popup_widget {
|
|
319
|
-
padding: var(--top-padding-2) var(--top-padding-2) 0 var(--top-padding-2)
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/* content
|
|
323
|
-
.top-popup_content {
|
|
324
|
-
margin: 0
|
|
325
|
-
flex-grow: 1
|
|
326
|
-
overflow-y: auto
|
|
327
|
-
display: flex
|
|
328
|
-
flex-direction: column
|
|
329
|
-
gap: var(--top-gap-4)
|
|
330
|
-
|
|
331
|
-
-webkit-overflow-scrolling: touch
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
div.top-popup_content {
|
|
335
|
-
color: var(--color-text-1)
|
|
336
|
-
padding: var(--top-popup-content-padding)
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
div.top-popup_content > * { flex-shrink: 0; }
|
|
340
|
-
|
|
341
|
-
div.top-popup_content > .top-button { margin: 0; }
|
|
342
|
-
|
|
343
|
-
div.top-popup_content .top-unwrap {
|
|
344
|
-
--top-unwrap-x: var(--top-popup-content-padding)
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
ul.top-popup_content {
|
|
348
|
-
color: var(--color-text-1)
|
|
349
|
-
padding: var(--top-popup-list-padding)
|
|
350
|
-
gap: 2px
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
ul.top-popup_content .top-unwrap {
|
|
354
|
-
--top-unwrap-x: var(--top-popup-list-padding)
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.top-popup_listItem {
|
|
358
|
-
border-radius: var(--top-popup-listItem-radius)
|
|
359
|
-
padding: var(--top-popup-listItem-padding)
|
|
360
|
-
line-height: 1 !important
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
ul.top-popup_content li { margin: 0; list-style: none; display: flex; position: relative }
|
|
364
|
-
|
|
365
|
-
ul.top-popup_content li > * { flex-grow: 1; }
|
|
366
|
-
|
|
367
|
-
ul.top-popup_content li > a:not(.top-button)
|
|
368
|
-
ul.top-popup_content li > .a {
|
|
369
|
-
cursor: pointer
|
|
370
|
-
box-sizing: border-box
|
|
371
|
-
border-radius: var(--top-popup-listItem-radius)
|
|
372
|
-
background: var(--top-popup-background-color)
|
|
373
|
-
padding: var(--top-popup-listItem-padding)
|
|
374
|
-
color: var(--color-text-1) !important; font-size: 14px; font-weight: normal !important; text-decoration: none !important; font-style: normal
|
|
375
|
-
line-height: 1 !important
|
|
376
|
-
display: flex; flex: 1 1 100%; align-items: center
|
|
377
|
-
transition: background-color 0.1s ease-in-out
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button)
|
|
381
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > .a { transition: none; }
|
|
382
|
-
|
|
383
|
-
ul.top-popup_content li > a:not(.top-button):hover
|
|
384
|
-
ul.top-popup_content li > .a:hover { background: var(--top-popup-background-color-hover); }
|
|
385
|
-
|
|
386
|
-
ul.top-popup_content li > a:not(.top-button).top-active
|
|
387
|
-
ul.top-popup_content li > .a.top-active {
|
|
388
|
-
--top-icon-color: var(--color-
|
|
389
|
-
|
|
390
|
-
background: var(--top-popup-background-color-active)
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.top-popup_content + .top-popup_content { padding-top: 0; }
|
|
394
|
-
|
|
395
|
-
/* listTitle
|
|
396
|
-
.top-popup_listItem-title {
|
|
397
|
-
background: var(--color-layer-
|
|
398
|
-
color: var(--color-text-1); font-size: 12px
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/* listDelimiter
|
|
402
|
-
.top-popup_listItem-delimiter {
|
|
403
|
-
border-radius: 3px
|
|
404
|
-
background: var(--top-popup-border-color)
|
|
405
|
-
height: 1px
|
|
406
|
-
padding: 0
|
|
407
|
-
margin: 4px
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/* listMore
|
|
411
|
-
.top-popup_listMore {
|
|
412
|
-
font-size: 20px
|
|
413
|
-
margin: calc(0px - var(--top-popup-listItem-padding)) calc(0px - var(--top-popup-listItem-padding) / 2) calc(0px - var(--top-popup-listItem-padding)) 0
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.top-popup_listMore.top-button { margin: 0; }
|
|
417
|
-
|
|
418
|
-
ul.top-popup_content li > .a.top-popup_listMore {
|
|
419
|
-
text-align: center
|
|
420
|
-
flex-basis: 10px
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
ul.top-popup_content li > .a.top-popup_listMore:before { color: var(--color-
|
|
424
|
-
|
|
425
|
-
ul.top-popup_content li > * > .top-popup_listMore {
|
|
426
|
-
margin-left: auto
|
|
427
|
-
color: var(--color-layer-
|
|
428
|
-
font-size: 14px
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
ul.top-popup_content li > * > i.top-popup_listMore:hover
|
|
432
|
-
ul.top-popup_content li > * > i.top-popup_listMore.top-active { color: var(--color-text-primary
|
|
433
|
-
|
|
434
|
-
ul.top-popup_content li > * > i.top-popup_listMore:before {
|
|
435
|
-
transform: rotate(90deg)
|
|
436
|
-
display: block
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
ul.top-popup_content li a.close { background: none !important; }
|
|
440
|
-
|
|
441
|
-
/* data-top-icon
|
|
442
|
-
.top-popup_content > [data-top-icon]:before {
|
|
443
|
-
--top-icon-size: 20px
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button) {
|
|
447
|
-
--top-icon-color: var(--color-
|
|
448
|
-
--top-icon-size: 20px
|
|
449
|
-
--top-icon-width: 20px
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button):before {
|
|
453
|
-
height: 1rem; margin-right: 8px; transition: color 0.1s
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button) {
|
|
457
|
-
--top-icon-color: var(--color-
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/* footer
|
|
461
|
-
.top-popup_footer {
|
|
462
|
-
padding: var(--top-popup-list-padding)
|
|
463
|
-
border-top: 1px solid var(--top-popup-border-color)
|
|
464
|
-
display: flex
|
|
465
|
-
gap: var(--top-gap-2)
|
|
466
|
-
justify-content: flex-end
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/* footerSupportLink
|
|
470
|
-
.top-popup_footerSupportLink {
|
|
471
|
-
margin-right: auto
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/* Виджеты
|
|
475
|
-
.top-popup > [data-widget] { padding: 0 var(--top-popup-list-padding); }
|
|
476
|
-
|
|
477
|
-
.top-popup > [data-widget] + hr { margin: 0 var(--top-popup-list-padding); }
|
|
478
|
-
|
|
479
|
-
.top-popup .placeholder {
|
|
480
|
-
border: 1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background: #F9F9F9 !important; margin: -1px 0; z-index: 1
|
|
481
|
-
position: relative
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/* компоненты
|
|
485
|
-
.top-popup-wrapper.simple_list > .top-popup { min-width: 0; white-space: nowrap; }
|
|
486
|
-
|
|
487
|
-
.top-popup_content .top-column { display: flex; flex-direction: column; gap: 4px; }
|
|
488
|
-
|
|
489
|
-
html .top-popup .top-popup_content li > .top-button {
|
|
490
|
-
margin: calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding)
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.top-popup li .check_all
|
|
494
|
-
.top-popup li .clear_all { cursor: pointer; color: var(--color-text-primary
|
|
495
|
-
|
|
496
|
-
.top-popup li .check_all:hover
|
|
497
|
-
.top-popup li .clear_all:hover { text-decoration: underline; }
|
|
498
|
-
|
|
499
|
-
.top-popup li .clear_all { display: none; }
|
|
500
|
-
|
|
501
|
-
/* table
|
|
502
|
-
.top-popup_content table { margin: -9px 0; }
|
|
503
|
-
|
|
504
|
-
.top-popup_content table td
|
|
505
|
-
.top-popup_content table th { padding: 9px var(--top-popup-listItem-padding) 9px 0; vertical-align: top; }
|
|
506
|
-
|
|
507
|
-
.top-popup_content table th { width: 40%; font-weight: 600; white-space: nowrap; }
|
|
508
|
-
|
|
509
|
-
/* формы
|
|
510
|
-
ul.top-popup_content .a > [type="checkbox"]
|
|
511
|
-
ul.top-popup_content .a > [type="radio"] { margin: -8px 0 -8px auto; }
|
|
512
|
-
|
|
513
|
-
/* deprecated
|
|
514
|
-
ul.top-popup_content a > [class*=icon]
|
|
515
|
-
ul.top-popup_content i.a > [class*=icon] {
|
|
516
|
-
transition: 0.1s
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.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; }
|
|
520
|
-
|
|
521
|
-
.top-popup_footer [class*=btn]:not(.btn-transparent) { min-width: 100px; padding: 5px 14px; margin-left: 10px; }
|
|
522
|
-
|
|
523
|
-
.top-popup_footer [class*=btn]:first-child { margin-left: 0; }
|
|
524
|
-
|
|
525
|
-
.top-popup_footer .btn.full_width { margin: 0; flex-grow: 1; }
|
|
526
|
-
`, _ = `:root {
|
|
527
|
-
--top-popup-list-padding: 0px
|
|
528
|
-
|
|
529
|
-
--top-popup-listItem-radius: 0px
|
|
530
|
-
--top-popup-listItem-padding: var(--top-padding-4)
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
html.with_popup { background: #808080; }
|
|
534
|
-
|
|
535
|
-
.top-popup-wrapper {
|
|
536
|
-
--top-popup-footer-offset: 25px
|
|
537
|
-
|
|
538
|
-
width: auto !important; height: auto !important
|
|
539
|
-
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden
|
|
540
|
-
transition: background 0.3s
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(1px); }
|
|
544
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup { opacity: 1 !important; }
|
|
545
|
-
|
|
546
|
-
.top-popup {
|
|
547
|
-
border-radius: 8px 8px 0 0; width: auto !important; max-height: calc(100% - var(--header-height, 0px) - var(--toolbar-height, 0px) - 12px); margin: 0 !important
|
|
548
|
-
top: auto !important; right: 0 !important; bottom: var(--toolbar-height, 0px) !important; left: 0 !important
|
|
549
|
-
display: flex; flex-direction: column
|
|
550
|
-
|
|
551
|
-
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%)
|
|
552
|
-
transform: translateY(80%)
|
|
553
|
-
|
|
554
|
-
transition: opacity 0.3s, transform 0.3s
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/* from top
|
|
558
|
-
.top-popup-wrapper.p-from-top {
|
|
559
|
-
--top-popup-footer-offset: 0px
|
|
560
|
-
|
|
561
|
-
top: var(--header-height, 0px) !important
|
|
562
|
-
}
|
|
563
|
-
.with_dialog .top-popup-wrapper.p-from-top { top: 50px !important; }
|
|
564
|
-
.top-popup-wrapper.p-from-top > .top-popup {
|
|
565
|
-
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important
|
|
566
|
-
transform: translateY(calc(-100% - 24px))
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
/* widget
|
|
570
|
-
.top-popup_widget { padding: var(--top-padding-2);}
|
|
571
|
-
.top-popup_widget:not(.p-from-top) { order: 10; }
|
|
572
|
-
|
|
573
|
-
/* content
|
|
574
|
-
ul.top-popup_content {
|
|
575
|
-
gap: 0
|
|
576
|
-
}
|
|
577
|
-
ul.top-popup_content li:not(:last-child) { border-bottom: 1px solid var(--top-popup-border-color); }
|
|
578
|
-
|
|
579
|
-
.top-popup-wrapper.top-style_alt > .top-popup > ul > li { border-bottom: none; }
|
|
580
|
-
|
|
581
|
-
/* footer
|
|
582
|
-
.top-popup_footer {
|
|
583
|
-
flex-direction: column-reverse
|
|
584
|
-
}
|
|
585
|
-
.top-popup_footer > .top-button {
|
|
586
|
-
--top-forms-base-height: var(--top-forms-base-height_l)
|
|
587
|
-
|
|
588
|
-
width: 100
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/* listTitle
|
|
592
|
-
ul.top-popup_content .top-popup_listItem-title {
|
|
593
|
-
--top-popup-padding-v: 12px
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/* listDelimiter
|
|
597
|
-
ul.top-popup_content .top-popup_listItem-delimiter { background: var(--color-line-1-opacity); height: 4px; margin: 0; }
|
|
598
|
-
ul.top-popup_content li:first-child > .top-popup_listItem-delimiter { border-top: 1px solid var(--top-popup-border-color); }
|
|
599
|
-
`, L = `html:not(.with_dialog) { margin-right: 0 !important; }
|
|
600
|
-
|
|
601
|
-
.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)); }
|
|
602
|
-
.top-popup-wrapper.invert-x > .top-popup { max-width: calc(100vw - var(--top-popup-right) - 16px); }
|
|
603
|
-
.top-popup-wrapper.invert-y > .top-popup { max-height: calc(100vh - var(--top-popup-bottom) - 16px); }
|
|
604
|
-
|
|
605
|
-
/* position
|
|
606
|
-
.top-popup-wrapper.p1 > .top-popup { max-height: calc(var(--top-popup-top) - var(--header-height, 0px) - 16px); }
|
|
607
|
-
.top-popup-wrapper.p3 > .top-popup { max-height: calc(var(--top-popup-bottom) - 16px); }
|
|
608
|
-
.top-popup-wrapper.p2 > .top-popup { max-width: calc(var(--top-popup-right) - 16px); }
|
|
609
|
-
.top-popup-wrapper.p4 > .top-popup { max-width: calc(var(--top-popup-left) - 16px); }
|
|
610
|
-
|
|
611
|
-
/* notch
|
|
612
|
-
.top-popup-wrapper.p1.with_notch > .top-popup
|
|
613
|
-
.top-popup-wrapper.p3.with_notch > .top-popup { margin-left: -16px !important; }
|
|
614
|
-
.top-popup-wrapper.p1.with_notch > .notch
|
|
615
|
-
.top-popup-wrapper.p3.with_notch > .notch { margin-left: -8px !important; }
|
|
616
|
-
|
|
617
|
-
.top-popup-wrapper.p1.with_notch.invert-x
|
|
618
|
-
.top-popup-wrapper.p3.with_notch.invert-x { margin-left: 3px !important; }
|
|
619
|
-
.top-popup-wrapper.p1.with_notch.invert-x > .notch
|
|
620
|
-
.top-popup-wrapper.p3.with_notch.invert-x > .notch { margin-left: -9px !important; }
|
|
621
|
-
|
|
622
|
-
/* listMore
|
|
623
|
-
ul.top-popup_content li > * > i.top-popup_listMore { visibility: hidden; transition: none; }
|
|
624
|
-
ul.top-popup_content li:hover > * > i.top-popup_listMore
|
|
625
|
-
ul.top-popup_content li > *.top-active > i.top-popup_listMore
|
|
626
|
-
ul.top-popup_content li > * > i.top-popup_listMore.top-active { visibility: visible; }
|
|
182
|
+
const y = `:root {\r
|
|
183
|
+
--top-popup-z-index: 200000;\r
|
|
184
|
+
--top-popup-transition-delay: 100ms;\r
|
|
185
|
+
\r
|
|
186
|
+
--top-popup-background-color: var(--color-layout-front-1);\r
|
|
187
|
+
--top-popup-background-color-hover: var(--color-layout-front-3);\r
|
|
188
|
+
--top-popup-background-color-active: var(--color-layout-front-4);\r
|
|
189
|
+
\r
|
|
190
|
+
--top-popup-border-color: var(--color-line-2-opacity);\r
|
|
191
|
+
--top-popup-title-background-color: var(--color-layer-1);\r
|
|
192
|
+
\r
|
|
193
|
+
/* суммарный отсуп от каря popup до элемента */\r
|
|
194
|
+
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding));\r
|
|
195
|
+
\r
|
|
196
|
+
/* списки */\r
|
|
197
|
+
--top-popup-list-padding: var(--top-padding-2);\r
|
|
198
|
+
\r
|
|
199
|
+
--top-popup-listItem-radius: var(--top-radius-2);\r
|
|
200
|
+
--top-popup-listItem-padding: var(--top-padding-2);\r
|
|
201
|
+
}\r
|
|
202
|
+
\r
|
|
203
|
+
.top-popup-front { position: relative; }\r
|
|
204
|
+
\r
|
|
205
|
+
.top-popup-wrapper {\r
|
|
206
|
+
/* см. recalcPosition() */\r
|
|
207
|
+
--top-popup-height: 0px;\r
|
|
208
|
+
--top-popup-right-bounding: 0px;\r
|
|
209
|
+
--top-popup-bottom-bounding: 0px;\r
|
|
210
|
+
--top-popup-top: 0px;\r
|
|
211
|
+
--top-popup-right: calc(100vw - var(--top-popup-right-bounding));\r
|
|
212
|
+
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));\r
|
|
213
|
+
--top-popup-left: 0px;\r
|
|
214
|
+
\r
|
|
215
|
+
text-align: initial; white-space: normal; word-break: normal;\r
|
|
216
|
+
position: absolute; z-index: 200000;\r
|
|
217
|
+
}\r
|
|
218
|
+
\r
|
|
219
|
+
.top-popup-wrapper:not(.top-popup-wrapper-shown) { overflow: hidden; }\r
|
|
220
|
+
\r
|
|
221
|
+
/* top-popupPanel */\r
|
|
222
|
+
.top-popupPanel {\r
|
|
223
|
+
cursor: default;\r
|
|
224
|
+
box-shadow: var(--top-shadow-b);\r
|
|
225
|
+
border-radius: 14px;\r
|
|
226
|
+
background: var(--top-popup-background-color);\r
|
|
227
|
+
position: absolute; overflow: hidden;\r
|
|
228
|
+
display: flex; flex-direction: column;\r
|
|
229
|
+
}\r
|
|
230
|
+
\r
|
|
231
|
+
/* position */\r
|
|
232
|
+
.top-popup-wrapper > * {\r
|
|
233
|
+
opacity: 0;\r
|
|
234
|
+
transition: opacity var(--top-popup-transition-delay) linear, transform var(--top-popup-transition-delay) linear;\r
|
|
235
|
+
}\r
|
|
236
|
+
\r
|
|
237
|
+
.top-popup-wrapper.p0 > * { transform: translateY(-8px); }\r
|
|
238
|
+
\r
|
|
239
|
+
.top-popup-wrapper.p1 > * { transform: translateY(8px); }\r
|
|
240
|
+
\r
|
|
241
|
+
.top-popup-wrapper.p2 > * { transform: translateX(8px); }\r
|
|
242
|
+
\r
|
|
243
|
+
.top-popup-wrapper.p3 > * { transform: translateY(8px); }\r
|
|
244
|
+
\r
|
|
245
|
+
.top-popup-wrapper.p4 > * { transform: translateX(-8px); }\r
|
|
246
|
+
\r
|
|
247
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > * {opacity: 1;transform: translate(0, 0) !important;}\r
|
|
248
|
+
\r
|
|
249
|
+
.top-popup-wrapper.p0 > .top-popup { top: calc(-16px); left: calc(0px - 8px); }\r
|
|
250
|
+
\r
|
|
251
|
+
.top-popup-wrapper.p1 > .top-popup { bottom: calc(100% + 8px); }\r
|
|
252
|
+
\r
|
|
253
|
+
.top-popup-wrapper.p2 > .top-popup { left: calc(100% + 8px); }\r
|
|
254
|
+
\r
|
|
255
|
+
.top-popup-wrapper.p3 > .top-popup { top: calc(100% + 8px); }\r
|
|
256
|
+
\r
|
|
257
|
+
.top-popup-wrapper.p4 > .top-popup { right: calc(100% + 8px); }\r
|
|
258
|
+
\r
|
|
259
|
+
.top-popup-wrapper.p2 > .top-popup,\r
|
|
260
|
+
.top-popup-wrapper.p4 > .top-popup { margin-top: -10px; }\r
|
|
261
|
+
\r
|
|
262
|
+
.top-popup-wrapper.p1.with_notch > .top-popup { margin-bottom: 5px; }\r
|
|
263
|
+
\r
|
|
264
|
+
.top-popup-wrapper.p2.with_notch > .top-popup { margin-left: 5px; }\r
|
|
265
|
+
\r
|
|
266
|
+
.top-popup-wrapper.p3.with_notch > .top-popup { margin-top: 5px; }\r
|
|
267
|
+
\r
|
|
268
|
+
.top-popup-wrapper.p4.with_notch > .top-popup { margin-right: 5px; }\r
|
|
269
|
+
\r
|
|
270
|
+
.top-popup-wrapper.invert-x > .top-popup { right: 0; }\r
|
|
271
|
+
\r
|
|
272
|
+
.top-popup-wrapper.invert-y > .top-popup { bottom: 0; }\r
|
|
273
|
+
\r
|
|
274
|
+
/* notch */\r
|
|
275
|
+
.top-popup-wrapper > .notch { border: 7.4px solid transparent; position: absolute; display: block; }\r
|
|
276
|
+
\r
|
|
277
|
+
.top-popup-wrapper.p1 > .notch { border-bottom: 0; border-top: 7.4px solid var(--color-layout-front-1); margin: 0 0 7.4px -7.4px; bottom: 100%; left: 50% }\r
|
|
278
|
+
\r
|
|
279
|
+
.top-popup-wrapper.p2 > .notch { border-left: 0; border-right: 7.4px solid var(--color-layout-front-1); margin: 0 0 -7.4px 7.4px; bottom: 50%; left: 100%; }\r
|
|
280
|
+
\r
|
|
281
|
+
.top-popup-wrapper.p3 > .notch { border-top: 0; border-bottom: 7.4px solid var(--color-layout-front-1); margin: 7.4px 0 0 -7.4px; top: 100%; left: 50%; }\r
|
|
282
|
+
\r
|
|
283
|
+
.top-popup-wrapper.p4 > .notch { border-right: 0; border-left: 7.4px solid var(--color-layout-front-1); margin: 0 7.4px -7.4px 0; bottom: 50%; right: 100%; }\r
|
|
284
|
+
\r
|
|
285
|
+
.top-popup-wrapper.p1 > .notch-border { border-top-color: rgba(0, 0, 0, 0.05); margin-bottom: 6px; }\r
|
|
286
|
+
\r
|
|
287
|
+
.top-popup-wrapper.p2 > .notch-border { border-right-color: rgba(0, 0, 0, 0.05); margin-left: 6px; }\r
|
|
288
|
+
\r
|
|
289
|
+
.top-popup-wrapper.p3 > .notch-border { border-bottom-color: rgba(0, 0, 0, 0.05); margin-top: 6px; }\r
|
|
290
|
+
\r
|
|
291
|
+
.top-popup-wrapper.p4 > .notch-border { border-left-color: rgba(0, 0, 0, 0.05); margin-right: 6px; }\r
|
|
292
|
+
\r
|
|
293
|
+
/* common */\r
|
|
294
|
+
.top-popup_header,\r
|
|
295
|
+
.top-popup_content,\r
|
|
296
|
+
.top-popup_footer { font-size: 14px; }\r
|
|
297
|
+
\r
|
|
298
|
+
.top-popup_header,\r
|
|
299
|
+
.top-popup_footer { display: flex; align-items: center; justify-content: space-between; }\r
|
|
300
|
+
\r
|
|
301
|
+
/* header */\r
|
|
302
|
+
.top-popup_header {\r
|
|
303
|
+
color: var(--color-text-1);\r
|
|
304
|
+
border-bottom: 1px solid var(--top-popup-border-color);\r
|
|
305
|
+
padding: var(--top-padding-3);\r
|
|
306
|
+
font-weight: 600;\r
|
|
307
|
+
}\r
|
|
308
|
+
\r
|
|
309
|
+
.top-popup_header > * { font-weight: 400; }\r
|
|
310
|
+
\r
|
|
311
|
+
.top-popup_header > .a { cursor: pointer;}\r
|
|
312
|
+
\r
|
|
313
|
+
.top-popup_header > .a:hover { color: var(--color-text-primary); }\r
|
|
314
|
+
\r
|
|
315
|
+
.top-popup_headerButton { width: 60px; }\r
|
|
316
|
+
\r
|
|
317
|
+
/* widget */\r
|
|
318
|
+
.top-popup_widget {\r
|
|
319
|
+
padding: var(--top-padding-2) var(--top-padding-2) 0 var(--top-padding-2);\r
|
|
320
|
+
}\r
|
|
321
|
+
\r
|
|
322
|
+
/* content */\r
|
|
323
|
+
.top-popup_content {\r
|
|
324
|
+
margin: 0;\r
|
|
325
|
+
flex-grow: 1;\r
|
|
326
|
+
overflow-y: auto;\r
|
|
327
|
+
display: flex;\r
|
|
328
|
+
flex-direction: column;\r
|
|
329
|
+
gap: var(--top-gap-4);\r
|
|
330
|
+
\r
|
|
331
|
+
-webkit-overflow-scrolling: touch;\r
|
|
332
|
+
}\r
|
|
333
|
+
\r
|
|
334
|
+
div.top-popup_content {\r
|
|
335
|
+
color: var(--color-text-1);\r
|
|
336
|
+
padding: var(--top-popup-content-padding);\r
|
|
337
|
+
}\r
|
|
338
|
+
\r
|
|
339
|
+
div.top-popup_content > * { flex-shrink: 0; }\r
|
|
340
|
+
\r
|
|
341
|
+
div.top-popup_content > .top-button { margin: 0; }\r
|
|
342
|
+
\r
|
|
343
|
+
div.top-popup_content .top-unwrap {\r
|
|
344
|
+
--top-unwrap-x: var(--top-popup-content-padding);\r
|
|
345
|
+
}\r
|
|
346
|
+
\r
|
|
347
|
+
ul.top-popup_content {\r
|
|
348
|
+
color: var(--color-text-1);\r
|
|
349
|
+
padding: var(--top-popup-list-padding);\r
|
|
350
|
+
gap: 2px;\r
|
|
351
|
+
}\r
|
|
352
|
+
\r
|
|
353
|
+
ul.top-popup_content .top-unwrap {\r
|
|
354
|
+
--top-unwrap-x: var(--top-popup-list-padding);\r
|
|
355
|
+
}\r
|
|
356
|
+
\r
|
|
357
|
+
.top-popup_listItem {\r
|
|
358
|
+
border-radius: var(--top-popup-listItem-radius);\r
|
|
359
|
+
padding: var(--top-popup-listItem-padding);\r
|
|
360
|
+
line-height: 1 !important;\r
|
|
361
|
+
}\r
|
|
362
|
+
\r
|
|
363
|
+
ul.top-popup_content li { margin: 0; list-style: none; display: flex; position: relative }\r
|
|
364
|
+
\r
|
|
365
|
+
ul.top-popup_content li > * { flex-grow: 1; }\r
|
|
366
|
+
\r
|
|
367
|
+
ul.top-popup_content li > a:not(.top-button),\r
|
|
368
|
+
ul.top-popup_content li > .a {\r
|
|
369
|
+
cursor: pointer;\r
|
|
370
|
+
box-sizing: border-box;\r
|
|
371
|
+
border-radius: var(--top-popup-listItem-radius);\r
|
|
372
|
+
background: var(--top-popup-background-color);\r
|
|
373
|
+
padding: var(--top-popup-listItem-padding);\r
|
|
374
|
+
color: var(--color-text-1) !important; font-size: 14px; font-weight: normal !important; text-decoration: none !important; font-style: normal;\r
|
|
375
|
+
line-height: 1 !important;\r
|
|
376
|
+
display: flex; flex: 1 1 100%; align-items: center;\r
|
|
377
|
+
transition: background-color 0.1s ease-in-out;\r
|
|
378
|
+
}\r
|
|
379
|
+
\r
|
|
380
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button),\r
|
|
381
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > .a { transition: none; }\r
|
|
382
|
+
\r
|
|
383
|
+
ul.top-popup_content li > a:not(.top-button):hover,\r
|
|
384
|
+
ul.top-popup_content li > .a:hover { background: var(--top-popup-background-color-hover); }\r
|
|
385
|
+
\r
|
|
386
|
+
ul.top-popup_content li > a:not(.top-button).top-active,\r
|
|
387
|
+
ul.top-popup_content li > .a.top-active {\r
|
|
388
|
+
--top-icon-color: var(--color-text-primary) !important;\r
|
|
389
|
+
\r
|
|
390
|
+
background: var(--top-popup-background-color-active);\r
|
|
391
|
+
}\r
|
|
392
|
+
\r
|
|
393
|
+
.top-popup_content + .top-popup_content { padding-top: 0; }\r
|
|
394
|
+
\r
|
|
395
|
+
/* listTitle */\r
|
|
396
|
+
.top-popup_listItem-title {\r
|
|
397
|
+
background: var(--color-layer-1);\r
|
|
398
|
+
color: var(--color-text-1); font-size: 12px;\r
|
|
399
|
+
}\r
|
|
400
|
+
\r
|
|
401
|
+
/* listDelimiter */\r
|
|
402
|
+
.top-popup_listItem-delimiter {\r
|
|
403
|
+
border-radius: 3px;\r
|
|
404
|
+
background: var(--top-popup-border-color);\r
|
|
405
|
+
height: 1px;\r
|
|
406
|
+
padding: 0;\r
|
|
407
|
+
margin: 4px;\r
|
|
408
|
+
}\r
|
|
409
|
+
\r
|
|
410
|
+
/* listMore */\r
|
|
411
|
+
.top-popup_listMore {\r
|
|
412
|
+
font-size: 20px;\r
|
|
413
|
+
margin: calc(0px - var(--top-popup-listItem-padding)) calc(0px - var(--top-popup-listItem-padding) / 2) calc(0px - var(--top-popup-listItem-padding)) 0;\r
|
|
414
|
+
}\r
|
|
415
|
+
\r
|
|
416
|
+
.top-popup_listMore.top-button { margin: 0; }\r
|
|
417
|
+
\r
|
|
418
|
+
ul.top-popup_content li > .a.top-popup_listMore {\r
|
|
419
|
+
text-align: center;\r
|
|
420
|
+
flex-basis: 10px;\r
|
|
421
|
+
}\r
|
|
422
|
+
\r
|
|
423
|
+
ul.top-popup_content li > .a.top-popup_listMore:before { color: var(--color-text-2); }\r
|
|
424
|
+
\r
|
|
425
|
+
ul.top-popup_content li > * > .top-popup_listMore {\r
|
|
426
|
+
margin-left: auto;\r
|
|
427
|
+
color: var(--color-layer-4);\r
|
|
428
|
+
font-size: 14px;\r
|
|
429
|
+
}\r
|
|
430
|
+
\r
|
|
431
|
+
ul.top-popup_content li > * > i.top-popup_listMore:hover,\r
|
|
432
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active { color: var(--color-text-primary); }\r
|
|
433
|
+
\r
|
|
434
|
+
ul.top-popup_content li > * > i.top-popup_listMore:before {\r
|
|
435
|
+
transform: rotate(90deg);\r
|
|
436
|
+
display: block;\r
|
|
437
|
+
}\r
|
|
438
|
+
\r
|
|
439
|
+
ul.top-popup_content li a.close { background: none !important; }\r
|
|
440
|
+
\r
|
|
441
|
+
/* data-top-icon */\r
|
|
442
|
+
.top-popup_content > [data-top-icon]:before {\r
|
|
443
|
+
--top-icon-size: 20px;\r
|
|
444
|
+
}\r
|
|
445
|
+
\r
|
|
446
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button) {\r
|
|
447
|
+
--top-icon-color: var(--color-text-3);\r
|
|
448
|
+
--top-icon-size: 20px;\r
|
|
449
|
+
--top-icon-width: 20px;\r
|
|
450
|
+
}\r
|
|
451
|
+
\r
|
|
452
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button):before {\r
|
|
453
|
+
height: 1rem; margin-right: 8px; transition: color 0.1s;\r
|
|
454
|
+
}\r
|
|
455
|
+
\r
|
|
456
|
+
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button) {\r
|
|
457
|
+
--top-icon-color: var(--color-text-2);\r
|
|
458
|
+
}\r
|
|
459
|
+
\r
|
|
460
|
+
/* footer */\r
|
|
461
|
+
.top-popup_footer {\r
|
|
462
|
+
padding: var(--top-popup-list-padding);\r
|
|
463
|
+
border-top: 1px solid var(--top-popup-border-color);\r
|
|
464
|
+
display: flex;\r
|
|
465
|
+
gap: var(--top-gap-2);\r
|
|
466
|
+
justify-content: flex-end;\r
|
|
467
|
+
}\r
|
|
468
|
+
\r
|
|
469
|
+
/* footerSupportLink */\r
|
|
470
|
+
.top-popup_footerSupportLink {\r
|
|
471
|
+
margin-right: auto;\r
|
|
472
|
+
}\r
|
|
473
|
+
\r
|
|
474
|
+
/* Виджеты */\r
|
|
475
|
+
.top-popup > [data-widget] { padding: 0 var(--top-popup-list-padding); }\r
|
|
476
|
+
\r
|
|
477
|
+
.top-popup > [data-widget] + hr { margin: 0 var(--top-popup-list-padding); }\r
|
|
478
|
+
\r
|
|
479
|
+
.top-popup .placeholder {\r
|
|
480
|
+
border: 1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background: #F9F9F9 !important; margin: -1px 0; z-index: 1;\r
|
|
481
|
+
position: relative;\r
|
|
482
|
+
}\r
|
|
483
|
+
\r
|
|
484
|
+
/* компоненты */\r
|
|
485
|
+
.top-popup-wrapper.simple_list > .top-popup { min-width: 0; white-space: nowrap; }\r
|
|
486
|
+
\r
|
|
487
|
+
.top-popup_content .top-column { display: flex; flex-direction: column; gap: 4px; }\r
|
|
488
|
+
\r
|
|
489
|
+
html .top-popup .top-popup_content li > .top-button {\r
|
|
490
|
+
margin: calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding);\r
|
|
491
|
+
}\r
|
|
492
|
+
\r
|
|
493
|
+
.top-popup li .check_all,\r
|
|
494
|
+
.top-popup li .clear_all { cursor: pointer; color: var(--color-text-primary); padding: 8px; display: inline-block; }\r
|
|
495
|
+
\r
|
|
496
|
+
.top-popup li .check_all:hover,\r
|
|
497
|
+
.top-popup li .clear_all:hover { text-decoration: underline; }\r
|
|
498
|
+
\r
|
|
499
|
+
.top-popup li .clear_all { display: none; }\r
|
|
500
|
+
\r
|
|
501
|
+
/* table */\r
|
|
502
|
+
.top-popup_content table { margin: -9px 0; }\r
|
|
503
|
+
\r
|
|
504
|
+
.top-popup_content table td,\r
|
|
505
|
+
.top-popup_content table th { padding: 9px var(--top-popup-listItem-padding) 9px 0; vertical-align: top; }\r
|
|
506
|
+
\r
|
|
507
|
+
.top-popup_content table th { width: 40%; font-weight: 600; white-space: nowrap; }\r
|
|
508
|
+
\r
|
|
509
|
+
/* формы */\r
|
|
510
|
+
ul.top-popup_content .a > [type="checkbox"],\r
|
|
511
|
+
ul.top-popup_content .a > [type="radio"] { margin: -8px 0 -8px auto; }\r
|
|
512
|
+
\r
|
|
513
|
+
/* deprecated */\r
|
|
514
|
+
ul.top-popup_content a > [class*=icon],\r
|
|
515
|
+
ul.top-popup_content i.a > [class*=icon] {\r
|
|
516
|
+
transition: 0.1s;\r
|
|
517
|
+
}\r
|
|
518
|
+
\r
|
|
519
|
+
.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; }\r
|
|
520
|
+
\r
|
|
521
|
+
.top-popup_footer [class*=btn]:not(.btn-transparent) { min-width: 100px; padding: 5px 14px; margin-left: 10px; }\r
|
|
522
|
+
\r
|
|
523
|
+
.top-popup_footer [class*=btn]:first-child { margin-left: 0; }\r
|
|
524
|
+
\r
|
|
525
|
+
.top-popup_footer .btn.full_width { margin: 0; flex-grow: 1; }\r
|
|
526
|
+
`, _ = `:root {\r
|
|
527
|
+
--top-popup-list-padding: 0px;\r
|
|
528
|
+
\r
|
|
529
|
+
--top-popup-listItem-radius: 0px;\r
|
|
530
|
+
--top-popup-listItem-padding: var(--top-padding-4);\r
|
|
531
|
+
}\r
|
|
532
|
+
\r
|
|
533
|
+
html.with_popup { background: #808080; }\r
|
|
534
|
+
\r
|
|
535
|
+
.top-popup-wrapper {\r
|
|
536
|
+
--top-popup-footer-offset: 25px;\r
|
|
537
|
+
\r
|
|
538
|
+
width: auto !important; height: auto !important;\r
|
|
539
|
+
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden;\r
|
|
540
|
+
transition: background 0.3s;\r
|
|
541
|
+
}\r
|
|
542
|
+
\r
|
|
543
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(1px); }\r
|
|
544
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup { opacity: 1 !important; }\r
|
|
545
|
+
\r
|
|
546
|
+
.top-popup {\r
|
|
547
|
+
border-radius: 8px 8px 0 0; width: auto !important; max-height: calc(100% - var(--header-height, 0px) - var(--toolbar-height, 0px) - 12px); margin: 0 !important;\r
|
|
548
|
+
top: auto !important; right: 0 !important; bottom: var(--toolbar-height, 0px) !important; left: 0 !important;\r
|
|
549
|
+
display: flex; flex-direction: column;\r
|
|
550
|
+
\r
|
|
551
|
+
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%) */\r
|
|
552
|
+
transform: translateY(80%);\r
|
|
553
|
+
\r
|
|
554
|
+
transition: opacity 0.3s, transform 0.3s;\r
|
|
555
|
+
}\r
|
|
556
|
+
\r
|
|
557
|
+
/* from top */\r
|
|
558
|
+
.top-popup-wrapper.p-from-top {\r
|
|
559
|
+
--top-popup-footer-offset: 0px;\r
|
|
560
|
+
\r
|
|
561
|
+
top: var(--header-height, 0px) !important;\r
|
|
562
|
+
}\r
|
|
563
|
+
.with_dialog .top-popup-wrapper.p-from-top { top: 50px !important; }\r
|
|
564
|
+
.top-popup-wrapper.p-from-top > .top-popup {\r
|
|
565
|
+
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important;\r
|
|
566
|
+
transform: translateY(calc(-100% - 24px));\r
|
|
567
|
+
}\r
|
|
568
|
+
\r
|
|
569
|
+
/* widget */\r
|
|
570
|
+
.top-popup_widget { padding: var(--top-padding-2);}\r
|
|
571
|
+
.top-popup_widget:not(.p-from-top) { order: 10; }\r
|
|
572
|
+
\r
|
|
573
|
+
/* content */\r
|
|
574
|
+
ul.top-popup_content {\r
|
|
575
|
+
gap: 0;\r
|
|
576
|
+
}\r
|
|
577
|
+
ul.top-popup_content li:not(:last-child) { border-bottom: 1px solid var(--top-popup-border-color); }\r
|
|
578
|
+
\r
|
|
579
|
+
.top-popup-wrapper.top-style_alt > .top-popup > ul > li { border-bottom: none; }\r
|
|
580
|
+
\r
|
|
581
|
+
/* footer */\r
|
|
582
|
+
.top-popup_footer {\r
|
|
583
|
+
flex-direction: column-reverse;\r
|
|
584
|
+
}\r
|
|
585
|
+
.top-popup_footer > .top-button {\r
|
|
586
|
+
--top-forms-base-height: var(--top-forms-base-height_l);\r
|
|
587
|
+
\r
|
|
588
|
+
width: 100%;\r
|
|
589
|
+
}\r
|
|
590
|
+
\r
|
|
591
|
+
/* listTitle */\r
|
|
592
|
+
ul.top-popup_content .top-popup_listItem-title {\r
|
|
593
|
+
--top-popup-padding-v: 12px;\r
|
|
594
|
+
}\r
|
|
595
|
+
\r
|
|
596
|
+
/* listDelimiter */\r
|
|
597
|
+
ul.top-popup_content .top-popup_listItem-delimiter { background: var(--color-line-1-opacity); height: 4px; margin: 0; }\r
|
|
598
|
+
ul.top-popup_content li:first-child > .top-popup_listItem-delimiter { border-top: 1px solid var(--top-popup-border-color); }\r
|
|
599
|
+
`, L = `html:not(.with_dialog) { margin-right: 0 !important; }\r
|
|
600
|
+
\r
|
|
601
|
+
.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)); }\r
|
|
602
|
+
.top-popup-wrapper.invert-x > .top-popup { max-width: calc(100vw - var(--top-popup-right) - 16px); }\r
|
|
603
|
+
.top-popup-wrapper.invert-y > .top-popup { max-height: calc(100vh - var(--top-popup-bottom) - 16px); }\r
|
|
604
|
+
\r
|
|
605
|
+
/* position */\r
|
|
606
|
+
.top-popup-wrapper.p1 > .top-popup { max-height: calc(var(--top-popup-top) - var(--header-height, 0px) - 16px); }\r
|
|
607
|
+
.top-popup-wrapper.p3 > .top-popup { max-height: calc(var(--top-popup-bottom) - 16px); }\r
|
|
608
|
+
.top-popup-wrapper.p2 > .top-popup { max-width: calc(var(--top-popup-right) - 16px); }\r
|
|
609
|
+
.top-popup-wrapper.p4 > .top-popup { max-width: calc(var(--top-popup-left) - 16px); }\r
|
|
610
|
+
\r
|
|
611
|
+
/* notch */\r
|
|
612
|
+
.top-popup-wrapper.p1.with_notch > .top-popup,\r
|
|
613
|
+
.top-popup-wrapper.p3.with_notch > .top-popup { margin-left: -16px !important; }\r
|
|
614
|
+
.top-popup-wrapper.p1.with_notch > .notch,\r
|
|
615
|
+
.top-popup-wrapper.p3.with_notch > .notch { margin-left: -8px !important; }\r
|
|
616
|
+
\r
|
|
617
|
+
.top-popup-wrapper.p1.with_notch.invert-x,\r
|
|
618
|
+
.top-popup-wrapper.p3.with_notch.invert-x { margin-left: 3px !important; }\r
|
|
619
|
+
.top-popup-wrapper.p1.with_notch.invert-x > .notch,\r
|
|
620
|
+
.top-popup-wrapper.p3.with_notch.invert-x > .notch { margin-left: -9px !important; }\r
|
|
621
|
+
\r
|
|
622
|
+
/* listMore */\r
|
|
623
|
+
ul.top-popup_content li > * > i.top-popup_listMore { visibility: hidden; transition: none; }\r
|
|
624
|
+
ul.top-popup_content li:hover > * > i.top-popup_listMore,\r
|
|
625
|
+
ul.top-popup_content li > *.top-active > i.top-popup_listMore,\r
|
|
626
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active { visibility: visible; }\r
|
|
627
627
|
`;
|
|
628
628
|
f.insertStyleToPage(y);
|
|
629
629
|
f.insertStyleToPage(_, "m");
|
|
630
630
|
f.insertStyleToPage(L, "pc");
|
|
631
|
-
class v extends
|
|
631
|
+
class v extends x {
|
|
632
632
|
static componentName = "TopPopup";
|
|
633
633
|
// элемент, вызвавший открытие Popup
|
|
634
634
|
elActiveByDefault;
|
|
@@ -688,17 +688,17 @@ class v extends b {
|
|
|
688
688
|
super(), this.init(v.componentName, t, p);
|
|
689
689
|
}
|
|
690
690
|
async mount() {
|
|
691
|
-
var e,
|
|
691
|
+
var e, i;
|
|
692
692
|
if (!(this.el instanceof HTMLElement)) return;
|
|
693
693
|
const t = this.vueGetComponent();
|
|
694
|
-
if (this.el.closest(".top-popup-wrapper") && (this.popupParent = s.getPopup(this.el.closest(".top-popup-wrapper"))), await this.mountJQuery(),
|
|
695
|
-
this.type = "vue", this.options.popup = "", this.elPopup =
|
|
694
|
+
if (this.el.closest(".top-popup-wrapper") && (this.popupParent = s.getPopup(this.el.closest(".top-popup-wrapper"))), await this.mountJQuery(), r.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)
|
|
695
|
+
this.type = "vue", this.options.popup = "", this.elPopup = r.genEl("div", {}, this.options.popup);
|
|
696
696
|
else if ((e = this.options.popup) != null && e.match(/^[#.]/))
|
|
697
697
|
this.type = "selector", this.elPopup = document.querySelector(`${this.options.popup}.template`);
|
|
698
698
|
else {
|
|
699
699
|
if (this.type = "html", this.options.useOriginal)
|
|
700
700
|
throw "Option useOriginal not allowed for text templates";
|
|
701
|
-
this.elPopup =
|
|
701
|
+
this.elPopup = r.genEl("div", {}, this.options.popup ?? "");
|
|
702
702
|
}
|
|
703
703
|
if (!this.elPopup || t != null && t.opened) {
|
|
704
704
|
if (this.options.useOriginal || t != null && t.opened) {
|
|
@@ -712,29 +712,29 @@ class v extends b {
|
|
|
712
712
|
}
|
|
713
713
|
if (!this.elPopup)
|
|
714
714
|
return;
|
|
715
|
-
for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition =
|
|
716
|
-
|
|
717
|
-
}),
|
|
715
|
+
for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition = r.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 = r.wrap(this.elPopup, "div")), this.type === "html" && (this.elPopup.querySelector(":scope > .top-popup_content") || (this.elPopup.classList.add("top-popup_content"), this.elPopup = r.wrap(this.elPopup, "div"))), (this.type === "selector" && !this.elPopup.matches(".template") || this.type === "html" || this.type === "vue") && (r.querySelectorAllArray(this.elPopup, "[data-top-popup]").forEach((n) => {
|
|
716
|
+
n instanceof HTMLElement && (n.dataset.topPopupPosBy = "fixed");
|
|
717
|
+
}), r.querySelectorAllArray(this.elPopup, ".top-popup-wrapper").forEach((n) => n.remove()))), s.decoratorBeforeOpen(this), t && (this.options.class = t.classRef.value, t.transitionDurationRef.value !== void 0 && (this.options.transitionDuration = t.transitionDurationRef.value, this.elPopup instanceof HTMLElement && this.elPopup.style.setProperty(
|
|
718
718
|
"--top-popup-transition-delay",
|
|
719
719
|
this.options.transitionDuration + "ms"
|
|
720
720
|
))), this.elPopupInner = document.createElement("div"), this.elPopupInner.classList.add("top-popupPanel", "top-popup"); this.elPopup.firstChild; )
|
|
721
721
|
this.elPopupInner.appendChild(this.elPopup.firstChild);
|
|
722
722
|
if (this.elPopup.append(this.elPopupInner), this.elPopup.classList.add("top-popup-wrapper"), this.options.class) {
|
|
723
|
-
const
|
|
724
|
-
this.elPopup.classList.add(...
|
|
723
|
+
const n = this.options.class.split(" ");
|
|
724
|
+
this.elPopup.classList.add(...n);
|
|
725
725
|
}
|
|
726
726
|
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.elPopupWidget = this.elPopupInner.querySelector(".top-popup_widget"), this.elPopupBody = this.elPopupInner.querySelector(".top-popup_content"), this.elPopupFooter = this.elPopupInner.querySelector(".top-popup_footer");
|
|
727
727
|
const p = !!this.elPopup.querySelector('[data-widget="search"]');
|
|
728
728
|
if (this.options.isFullScreen && !p) {
|
|
729
|
-
const
|
|
730
|
-
!this.elPopupHeader &&
|
|
729
|
+
const n = P();
|
|
730
|
+
!this.elPopupHeader && n.Common.Close && (this.elPopupHeader = r.genEl("i", { class: "top-popup_header" }), this.elPopupInner.prepend(this.elPopupHeader), this.elPopupHeader.prepend(r.genEl("i", { class: "a closer" }, n.Common.Close)), this.elPopupHeader.append(r.genEl("i", { class: "top-popup_headerButton" })));
|
|
731
731
|
}
|
|
732
|
-
|
|
732
|
+
r.storage(this.elPopup, v.componentName, 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 instanceof HTMLElement && (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"), (i = this.el.parentElement) == null || i.insertBefore(this.elPopup, this.el), this.elPopup.classList.remove("template"), this.options.invertX && this.elPopup.classList.add("invert-x");
|
|
733
733
|
let o = !!this.el.closest(".modal-header");
|
|
734
734
|
o || (o = !!this.el.closest("#top_panel")), o || (o = !!this.el.closest("#secondmenu")), o && this.elPopup.classList.add("p-from-top"), setTimeout(() => {
|
|
735
|
-
var
|
|
736
|
-
return (
|
|
737
|
-
}), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top =
|
|
735
|
+
var n;
|
|
736
|
+
return (n = this.elPopup) == null ? void 0 : n.classList.add("top-popup-wrapper-shown");
|
|
737
|
+
}), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top = r.offset(this.el).top - this.el.offsetTop - r.offset(this.elFront).top, this.shift.left = r.offset(this.el).left - this.el.offsetLeft - r.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 instanceof HTMLElement && (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.$ && f.$ && this.$.trigger("aftershow.top-menu-popup", [f.$(this.elPopup)]), this.recalcPosition(), this.elPopup.setAttribute("tabindex", "0"), this.focus(), s.decoratorAfterOpen(this), this.mountEvents();
|
|
738
738
|
}
|
|
739
739
|
async mountJQuery() {
|
|
740
740
|
f.$ && (this.$ = f.$(this.el));
|
|
@@ -744,7 +744,7 @@ class v extends b {
|
|
|
744
744
|
*/
|
|
745
745
|
focus() {
|
|
746
746
|
let t;
|
|
747
|
-
this.elPopup && (t =
|
|
747
|
+
this.elPopup && (t = r.querySelectorVisible(this.elPopup, ".top-popup-autofocus"), t || (t = r.querySelectorVisible(this.elPopup, ":read-write, select:not(:disabled)")), t || (t = r.querySelectorVisible(this.elPopup, ".top-popup_footer .top-button")), t || (t = this.elPopup), t instanceof HTMLElement && t.focus(), setTimeout(() => {
|
|
748
748
|
t instanceof HTMLElement && t.focus();
|
|
749
749
|
}, this.options.transitionDuration));
|
|
750
750
|
}
|
|
@@ -757,8 +757,8 @@ class v extends b {
|
|
|
757
757
|
onMousedown(t) {
|
|
758
758
|
if (!this.elPopup || !(t.target instanceof Element) || !this.isFirstClick || (this.isFirstClick = !1, setTimeout(() => this.isFirstClick = !0), t instanceof MouseEvent && t.button !== 0))
|
|
759
759
|
return;
|
|
760
|
-
let p =
|
|
761
|
-
p && p !== this.elPopup || t.target.closest(".top-popup-front") && (p =
|
|
760
|
+
let p = r.querySelectorVisibleLast(document.body, ":scope > .top-popup-wrapper");
|
|
761
|
+
p && p !== this.elPopup || t.target.closest(".top-popup-front") && (p = r.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") || s.decoratorIsIgnoreOuterClick(t) || s.close(this.elPopup);
|
|
762
762
|
}
|
|
763
763
|
/**
|
|
764
764
|
* Закрыть другие Popup при фокусе на элемент формы в текущем
|
|
@@ -767,8 +767,8 @@ class v extends b {
|
|
|
767
767
|
if (t.target instanceof Element && t.target.matches("input") || this.isClosed)
|
|
768
768
|
return;
|
|
769
769
|
s.getAllVisible().forEach((o) => {
|
|
770
|
-
var e,
|
|
771
|
-
(e = this.elPopup) != null && e.contains(o) || ((
|
|
770
|
+
var e, i, n, u;
|
|
771
|
+
(e = this.elPopup) != null && e.contains(o) || ((i = this.popupParent) == null ? void 0 : i.elPopup) === o || ((u = (n = this.popupParent) == null ? void 0 : n.popupParent) == null ? void 0 : u.elPopup) === o || s.close(o);
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
774
|
/**
|
|
@@ -783,7 +783,7 @@ class v extends b {
|
|
|
783
783
|
* Контроль положения Popup при fixed позиционировании
|
|
784
784
|
*/
|
|
785
785
|
onResize() {
|
|
786
|
-
this.elPopup && this.elPopup.parentElement !== document.body && document.body.append(this.elPopup), this.elPopup instanceof HTMLElement && (this.elPopup.style.top =
|
|
786
|
+
this.elPopup && this.elPopup.parentElement !== document.body && document.body.append(this.elPopup), this.elPopup instanceof HTMLElement && (this.elPopup.style.top = r.offset(this.el).top + "px", this.elPopup.style.left = r.offset(this.el).left + "px");
|
|
787
787
|
}
|
|
788
788
|
unmount() {
|
|
789
789
|
super.unmount(), this.el instanceof HTMLElement && (this.el.dataset.topPopupOpened = ""), this.elActiveByDefault || this.el.classList.remove("top-active");
|
|
@@ -792,7 +792,7 @@ class v extends b {
|
|
|
792
792
|
}
|
|
793
793
|
// контроль за положением Popup, чтобы оно не вылезало за пределы документа
|
|
794
794
|
recalcPosition() {
|
|
795
|
-
var m,
|
|
795
|
+
var m, b;
|
|
796
796
|
if (!(this.elPopup instanceof HTMLElement)) return;
|
|
797
797
|
let t = this.options.p, p;
|
|
798
798
|
if (this.el instanceof HTMLElement)
|
|
@@ -812,16 +812,16 @@ class v extends b {
|
|
|
812
812
|
}
|
|
813
813
|
const o = this.elPopup.getBoundingClientRect();
|
|
814
814
|
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 instanceof HTMLElement && (this.elPopupInner.style.maxWidth = "unset", this.elPopupInner.style.maxHeight = "unset");
|
|
815
|
-
let e = !1,
|
|
815
|
+
let e = !1, i = !1, n = !1, u = !1, l = o.left > window.innerWidth / 2, d = o.top > window.innerHeight / 2;
|
|
816
816
|
t === 4 && (l = !l), t === 1 && (d = !d);
|
|
817
|
-
const h = (
|
|
817
|
+
const h = (b = this.elPopupInner) == null ? void 0 : b.getBoundingClientRect();
|
|
818
818
|
let a, c;
|
|
819
819
|
if (h) {
|
|
820
820
|
a = window.innerWidth - h.right, c = window.innerHeight - h.bottom;
|
|
821
821
|
const g = 8;
|
|
822
|
-
h.top < g && (e = !0), a < g && (
|
|
822
|
+
h.top < g && (e = !0), a < g && (i = !0), c < g && (n = !0), h.left < g && (u = !0);
|
|
823
823
|
}
|
|
824
|
-
e && (t === 0 || t === 1) && d && (t = 3),
|
|
824
|
+
e && (t === 0 || t === 1) && d && (t = 3), n && t === 3 && d && (t = 1), i && t === 2 && l && (t = 4), u && t === 4 && l && (t = 2), i && (t === 0 || t === 1 || t === 3) && this.elPopup.classList.add("invert-x"), n && (t === 2 || t === 4) && d && (t === 2 && !l && this.elPopup.classList.add("invert-y"), t === 4 && !l && 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 instanceof HTMLElement && (this.elPopupInner.style.maxWidth = "", this.elPopupInner.style.maxHeight = ""), s.scrollToActive(this.elPopup);
|
|
825
825
|
}
|
|
826
826
|
onTouchmove(t) {
|
|
827
827
|
var p, o, e;
|
|
@@ -834,9 +834,9 @@ class v extends b {
|
|
|
834
834
|
close() {
|
|
835
835
|
var t;
|
|
836
836
|
this.isClosed || (this.isClosed = !0, this.$ && f.$ && this.elPopup && this.$.trigger("afterclose.top-menu-popup", [f.$(this.elPopup)]), !s.noClose && (this.unmount(), (t = this.elPopup) == null || t.classList.add("top-popup-wrapper-closed"), setTimeout(() => {
|
|
837
|
-
var e,
|
|
837
|
+
var e, i, n, u, l;
|
|
838
838
|
if (this.vueClose(), !this.elPopup) return;
|
|
839
|
-
this.options.useOriginal ? (this.elPopup.removeAttribute("style"), this.elPopup.classList.remove("top-popup-wrapper-shown", "top-popup-wrapper-closed"), this.elPopup.classList.add("template"), (e = this.elStartPosition) == null || e.append(this.elPopup), (
|
|
839
|
+
this.options.useOriginal ? (this.elPopup.removeAttribute("style"), this.elPopup.classList.remove("top-popup-wrapper-shown", "top-popup-wrapper-closed"), this.elPopup.classList.add("template"), (e = this.elStartPosition) == null || e.append(this.elPopup), (i = this.elPopup.querySelector("div.top-popup_content.top-column")) == null || i.classList.remove("top-column"), (n = this.elPopup.querySelector(".notch-border")) == null || n.remove(), (u = this.elPopup.querySelector(".notch")) == null || u.remove(), (l = this.elPopupInner) == null || l.replaceWith(...this.elPopupInner.childNodes), r.storageClear(this.elPopup)) : (r.storageClear(this.elPopup), this.elPopup.remove(), delete this.elPopup);
|
|
840
840
|
const p = s.getAllVisible(), o = p.length && p[p.length - 1];
|
|
841
841
|
o ? s.getPopup(o).focus() : document.documentElement.classList.remove("with_popup");
|
|
842
842
|
}, this.options.transitionDuration)));
|
|
@@ -859,4 +859,4 @@ export {
|
|
|
859
859
|
v as Popup,
|
|
860
860
|
v as default
|
|
861
861
|
};
|
|
862
|
-
//# sourceMappingURL=popup-
|
|
862
|
+
//# sourceMappingURL=popup-Coq_61yv.es.js.map
|