@topvisor/ui 0.9.26 → 0.9.27-dev
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-34kJtztn.amd.js +234 -0
- package/.chunks/datepicker-34kJtztn.amd.js.map +1 -0
- package/.chunks/datepicker-DwZTG-k0.es.js +276 -0
- package/.chunks/datepicker-DwZTG-k0.es.js.map +1 -0
- package/.chunks/forms-1ZAO_mt8.es.js +1179 -0
- package/.chunks/forms-1ZAO_mt8.es.js.map +1 -0
- package/.chunks/forms-D_IeAEJM.amd.js +3 -0
- package/.chunks/forms-D_IeAEJM.amd.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Caw4oFU-.es.js → listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js} +38 -38
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js.map +1 -0
- package/.chunks/menu-C-SkDk9B.amd.js +2 -0
- package/.chunks/menu-C-SkDk9B.amd.js.map +1 -0
- package/.chunks/menu-CBKYqQZZ.es.js +120 -0
- package/.chunks/menu-CBKYqQZZ.es.js.map +1 -0
- package/.chunks/{popup-Dfz5hkrQ.amd.js → popup-7Bt5JEDW.amd.js} +386 -386
- package/.chunks/popup-7Bt5JEDW.amd.js.map +1 -0
- package/.chunks/{popup-ZmdXZkvb.es.js → popup-D0tRWEp2.es.js} +438 -445
- package/.chunks/popup-D0tRWEp2.es.js.map +1 -0
- package/.chunks/store-Bl79G7T_.amd.js.map +1 -1
- package/.chunks/store-PoMCiuBr.es.js.map +1 -1
- package/.chunks/{widgetInput-BxO9y9L7.amd.js → widgetInput-CeUAGCKd.amd.js} +2 -2
- package/.chunks/widgetInput-CeUAGCKd.amd.js.map +1 -0
- package/.chunks/{widgetInput-DPOH_qya.es.js → widgetInput-CmVe9G3z.es.js} +2 -2
- package/.chunks/widgetInput-CmVe9G3z.es.js.map +1 -0
- package/README.md +86 -86
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/assets/menu.css +1 -0
- package/assets/project.css +1 -0
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +8 -8
- 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 +297 -390
- 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 +3239 -3225
- package/icomoon/fonts/Topvisor-2.svg +253 -252
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +710 -707
- package/package.json +20 -20
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +2 -2
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.d.ts +2 -0
- package/popup/worker.js +4 -6
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +2 -0
- package/project/project.amd.js.map +1 -0
- package/project/project.d.ts +1 -0
- package/project/project.js +93 -0
- package/project/project.js.map +1 -0
- package/require/css.amd.js +11 -11
- package/src/components/forms/avatar/avatar.d.ts +9 -0
- package/src/components/forms/avatar/avatar.stories.d.ts +38 -13
- package/src/components/forms/avatar/avatar.vue.d.ts +17 -4
- package/src/components/forms/button/button.d.ts +2 -2
- package/src/components/forms/button/button.stories.d.ts +59 -58
- package/src/components/forms/button/button.vue.d.ts +7 -6
- package/src/components/forms/checkbox/checkbox.stories.d.ts +35 -34
- package/src/components/forms/checkbox/checkbox.vue.d.ts +16 -16
- package/src/components/forms/controlLabel/controlLabel.stories.d.ts +13 -13
- package/src/components/forms/controlLabel/controlLabel.vue.d.ts +3 -2
- package/src/components/forms/hint/hint.stories.d.ts +44 -44
- package/src/components/forms/hint/hint.vue.d.ts +3 -2
- package/src/components/forms/input/input.d.ts +2 -2
- package/src/components/forms/input/input.stories.d.ts +64 -63
- package/src/components/forms/input/input.vue.d.ts +7 -6
- package/src/components/forms/inputDate/inputDate.d.ts +2 -1
- package/src/components/forms/inputDate/inputDate.stories.d.ts +31 -30
- package/src/components/forms/inputDate/inputDate.vue.d.ts +5 -4
- package/src/components/forms/inputRange/inputRange.stories.d.ts +93 -92
- package/src/components/forms/inputRange/inputRange.vue.d.ts +1 -1
- package/src/components/forms/loadbar/loadbar.stories.d.ts +1 -1
- package/src/components/forms/loadbar/loadbar.vue.d.ts +1 -1
- package/src/components/forms/radio/radio.stories.d.ts +33 -32
- package/src/components/forms/radio/radio.vue.d.ts +4 -3
- package/src/components/forms/select/select.d.ts +2 -2
- package/src/components/forms/select/select.stories.d.ts +24 -23
- package/src/components/forms/select/select.vue.d.ts +22 -22
- package/src/components/forms/select/stories/exampleOptions.d.ts +2 -1
- package/src/components/forms/switcher/switcher.stories.d.ts +33 -32
- package/src/components/forms/switcher/switcher.vue.d.ts +4 -3
- package/src/components/forms/textarea/textarea.stories.d.ts +25 -24
- package/src/components/forms/textarea/textarea.vue.d.ts +5 -4
- package/src/components/formsExt/editArea/editArea.d.ts +18 -4
- package/src/components/formsExt/editArea/editArea.stories.d.ts +69 -52
- package/src/components/formsExt/editArea/editArea.vue.d.ts +17 -8
- package/src/components/formsExt/editInput/editInput.d.ts +3 -2
- package/src/components/formsExt/editInput/editInput.stories.d.ts +21 -20
- package/src/components/formsExt/editInput/editInput.vue.d.ts +4 -3
- package/src/components/formsExt/menu/menu.d.ts +2 -1
- package/src/components/formsExt/menu/menu.stories.d.ts +16 -15
- package/src/components/formsExt/menu/menu.vue.d.ts +16 -15
- package/src/components/formsExt/menu/stories/items.d.ts +2 -1
- package/src/components/formsExt/radioGroup/radioGroup.d.ts +2 -2
- package/src/components/formsExt/radioGroup/radioGroup.stories.d.ts +16 -15
- package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +14 -14
- package/src/components/formsExt/selector2/api.d.ts +3 -2
- package/src/components/formsExt/selector2/itemMulti.vue.d.ts +4 -3
- package/src/components/formsExt/selector2/selector2.d.ts +2 -2
- package/src/components/formsExt/selector2/selector2.stories.d.ts +67 -66
- package/src/components/formsExt/selector2/selector2.vue.d.ts +33 -32
- package/src/components/popup/lib/popup.d.ts +2 -4
- package/src/components/popup/lib/worker.d.ts +2 -1
- package/src/components/popup/popup/listItem.vue.d.ts +4 -3
- package/src/components/popup/popup/opener.vue.d.ts +6 -5
- package/src/components/popup/popup/popup.stories.d.ts +219 -218
- package/src/components/popup/popup/popup.vue.d.ts +8 -7
- package/src/components/popup/popup/widgetInput.vue.d.ts +28 -28
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.d.ts +20 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +42 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +24 -0
- package/src/components/project/selectorCompetitors/stories/items.d.ts +4 -0
- package/src/components/tabs/tabs/content.vue.d.ts +3 -2
- package/src/components/tabs/tabs/tab.vue.d.ts +3 -2
- package/src/components/tabs/tabs/tabs.stories.d.ts +184 -184
- package/src/components/tabs/tabs/tabs.vue.d.ts +3 -2
- package/src/components/tabsView/tabsView/menu.vue.d.ts +6 -6
- package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +1 -1
- package/src/components/tabsView/tabsView/menuItem.vue.d.ts +5 -4
- package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +3 -2
- package/src/components/tabsView/tabsView/store.d.ts +23 -22
- package/src/components/tabsView/tabsView/tabsView.d.ts +2 -1
- package/src/components/tabsView/tabsView/tabsView.stories.d.ts +94 -94
- package/src/components/tabsView/tabsView/tabsView.vue.d.ts +12 -12
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.d.ts +92 -92
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.d.ts +44 -44
- package/src/core/core/core.d.ts +3 -3
- package/src/core/core/page.d.ts +4 -0
- package/src/core/core/state.d.ts +4 -0
- package/src/core/utils/check.d.ts +22 -0
- package/src/core/utils/date.d.ts +30 -12
- package/src/core/utils/device.d.ts +34 -1
- package/src/core/utils/dom.d.ts +23 -27
- package/src/core/utils/image.d.ts +6 -0
- package/src/core/utils/keyboard.d.ts +3 -0
- package/src/core/utils/number.d.ts +7 -0
- package/src/core/utils/price.d.ts +8 -0
- package/src/core/utils/scroll.d.ts +4 -0
- package/src/core/utils/store/localStorage.d.ts +2 -1
- package/src/core/utils/store/plugin.d.ts +3 -2
- package/src/core/utils/store/store.d.ts +3 -11
- package/src/core/utils/string.d.ts +80 -0
- package/src/core/utils/url.d.ts +32 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +6 -10
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js +2 -0
- package/utils/check.amd.js.map +1 -0
- package/utils/check.d.ts +1 -0
- package/utils/check.js +26 -0
- package/utils/check.js.map +1 -0
- package/utils/css.amd.js.map +1 -1
- package/utils/css.js +1 -2
- package/utils/css.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +8 -5
- package/utils/device.amd.js +1 -1
- package/utils/device.js +11 -7
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +2 -0
- package/utils/image.amd.js.map +1 -0
- package/utils/image.d.ts +1 -0
- package/utils/image.js +8 -0
- package/utils/image.js.map +1 -0
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/number.amd.js +2 -0
- package/utils/number.amd.js.map +1 -0
- package/utils/number.d.ts +1 -0
- package/utils/number.js +9 -0
- package/utils/number.js.map +1 -0
- package/utils/price.amd.js +2 -0
- package/utils/price.amd.js.map +1 -0
- package/utils/price.d.ts +1 -0
- package/utils/price.js +10 -0
- package/utils/price.js.map +1 -0
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js +21 -15
- package/utils/scroll.js.map +1 -1
- package/utils/string.amd.js +2 -0
- package/utils/string.amd.js.map +1 -0
- package/utils/string.d.ts +1 -0
- package/utils/string.js +138 -0
- package/utils/string.js.map +1 -0
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js +3 -0
- package/utils/url.amd.js.map +1 -0
- package/utils/url.d.ts +1 -0
- package/utils/url.js +176 -0
- package/utils/url.js.map +1 -0
- package/utils/window.amd.js +1 -1
- package/utils/window.js +1 -1
- package/.chunks/datepicker-B9eprAyk.amd.js +0 -234
- package/.chunks/datepicker-B9eprAyk.amd.js.map +0 -1
- package/.chunks/datepicker-C86O1mQq.es.js +0 -277
- package/.chunks/datepicker-C86O1mQq.es.js.map +0 -1
- package/.chunks/forms-DkNAMd-D.amd.js +0 -3
- package/.chunks/forms-DkNAMd-D.amd.js.map +0 -1
- package/.chunks/forms-gb7uf2K8.es.js +0 -1026
- package/.chunks/forms-gb7uf2K8.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-2TAzIZZA.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-2TAzIZZA.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Caw4oFU-.es.js.map +0 -1
- package/.chunks/popup-Dfz5hkrQ.amd.js.map +0 -1
- package/.chunks/popup-ZmdXZkvb.es.js.map +0 -1
- package/.chunks/widgetInput-BxO9y9L7.amd.js.map +0 -1
- package/.chunks/widgetInput-DPOH_qya.es.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as f } from "./forms-
|
|
2
|
-
import
|
|
1
|
+
import { C as f } from "./forms-1ZAO_mt8.es.js";
|
|
2
|
+
import n from "../utils/dom.js";
|
|
3
3
|
import { PopupWorker as l } from "../popup/worker.js";
|
|
4
4
|
class v {
|
|
5
5
|
static componentName = "Top";
|
|
@@ -28,11 +28,11 @@ class v {
|
|
|
28
28
|
}
|
|
29
29
|
// получить инициированный компонент
|
|
30
30
|
static getComponent(t, p) {
|
|
31
|
-
return
|
|
31
|
+
return n.storage(t, "#" + p);
|
|
32
32
|
}
|
|
33
33
|
// устанвоить компонент
|
|
34
34
|
_setComponent(t) {
|
|
35
|
-
|
|
35
|
+
n.storage(t, "#" + this.componentName, this);
|
|
36
36
|
}
|
|
37
37
|
// функция подключения компонента
|
|
38
38
|
mount() {
|
|
@@ -40,7 +40,7 @@ class v {
|
|
|
40
40
|
}
|
|
41
41
|
// функция отключения компонента
|
|
42
42
|
unmount() {
|
|
43
|
-
|
|
43
|
+
n.storage(this.el, "#" + this.componentName, null), this.unmountEls.forEach((t) => {
|
|
44
44
|
t.remove();
|
|
45
45
|
}), this.unmountEls = [], this.unmountEvents.forEach((t) => {
|
|
46
46
|
t.el.removeEventListener(t.type, t.listener, t.options);
|
|
@@ -56,13 +56,13 @@ class v {
|
|
|
56
56
|
}
|
|
57
57
|
// указание новые события, которые должны будут удалиться после unmount
|
|
58
58
|
registerEventForUnmount(t, p, o, e) {
|
|
59
|
-
const
|
|
59
|
+
const r = {
|
|
60
60
|
el: t,
|
|
61
61
|
type: p,
|
|
62
62
|
listener: o,
|
|
63
63
|
options: e
|
|
64
64
|
};
|
|
65
|
-
this.unmountEvents.push(
|
|
65
|
+
this.unmountEvents.push(r);
|
|
66
66
|
}
|
|
67
67
|
// функция перенастройки уже подключенного компонента
|
|
68
68
|
reInit(t) {
|
|
@@ -92,16 +92,15 @@ class P {
|
|
|
92
92
|
*/
|
|
93
93
|
static onclick(t) {
|
|
94
94
|
var o;
|
|
95
|
-
if (!(t.target instanceof Element))
|
|
96
|
-
return;
|
|
95
|
+
if (!(t.target instanceof Element)) return;
|
|
97
96
|
const p = t.target.closest(".closer, a, .a, .top-button");
|
|
98
97
|
if (p) {
|
|
99
98
|
const e = t.target.closest(".top-popup-wrapper");
|
|
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"), s = t.target.closest("a, .a");
|
|
103
|
+
r && ((o = r.querySelector("a.top-active, .a.top-active")) == null || o.classList.remove("top-active")), s && s.classList.add("top-active");
|
|
105
104
|
return;
|
|
106
105
|
}
|
|
107
106
|
l.close(e);
|
|
@@ -115,9 +114,8 @@ class P {
|
|
|
115
114
|
* Глобальный обработчик нажатия кнопки на клавиатуре
|
|
116
115
|
*/
|
|
117
116
|
static onkeydown(t) {
|
|
118
|
-
var e,
|
|
119
|
-
if (!(t.target instanceof Element))
|
|
120
|
-
return;
|
|
117
|
+
var e, r;
|
|
118
|
+
if (!(t.target instanceof Element)) return;
|
|
121
119
|
const p = t.target.closest(".top-popup-wrapper");
|
|
122
120
|
if (!p)
|
|
123
121
|
return;
|
|
@@ -128,18 +126,18 @@ class P {
|
|
|
128
126
|
break;
|
|
129
127
|
case "Enter":
|
|
130
128
|
if (!o) {
|
|
131
|
-
if (
|
|
129
|
+
if (n.querySelectorVisible(p, ".preloader"))
|
|
132
130
|
break;
|
|
133
|
-
const c =
|
|
131
|
+
const c = n.querySelectorVisible(p, ".top-popup_footer .go, .top-popup_footer [data-action]");
|
|
134
132
|
if (c instanceof HTMLElement) {
|
|
135
133
|
c.click();
|
|
136
134
|
break;
|
|
137
135
|
}
|
|
138
|
-
const m =
|
|
136
|
+
const m = n.querySelectorVisibleLast(p, ".top-popup_footer .top-button");
|
|
139
137
|
m instanceof HTMLElement && m.click();
|
|
140
138
|
break;
|
|
141
139
|
}
|
|
142
|
-
const s =
|
|
140
|
+
const s = n.querySelectorVisible(p, "li > a.top-active");
|
|
143
141
|
s && s.getAttribute("href") && (t.preventDefault(), location.href = s.getAttribute("href"));
|
|
144
142
|
const a = p.querySelector("li > .top-active");
|
|
145
143
|
a instanceof HTMLElement && a.click();
|
|
@@ -150,413 +148,413 @@ class P {
|
|
|
150
148
|
case "ArrowLeft":
|
|
151
149
|
if (!o)
|
|
152
150
|
break;
|
|
153
|
-
t.key === "ArrowRight" || t.key === "ArrowLeft" ?
|
|
151
|
+
t.key === "ArrowRight" || t.key === "ArrowLeft" ? n.querySelectorVisible(
|
|
154
152
|
p,
|
|
155
153
|
"ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active > .top-popup_listMore"
|
|
156
154
|
) && t.preventDefault() : t.preventDefault();
|
|
157
|
-
const
|
|
158
|
-
if (t.key === "ArrowRight" &&
|
|
159
|
-
const c =
|
|
155
|
+
const i = (e = p.querySelector("ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active")) == null ? void 0 : e.parentElement;
|
|
156
|
+
if (t.key === "ArrowRight" && i) {
|
|
157
|
+
const c = i.querySelector(".top-active > .top-popup_listMore");
|
|
160
158
|
if (c instanceof HTMLElement)
|
|
161
159
|
return c.click();
|
|
162
160
|
}
|
|
163
|
-
const d =
|
|
161
|
+
const d = n.querySelectorAllVisible(p, "ul.top-popup_content > li:not(.top-popup_liNoSelectable)"), h = d.length;
|
|
164
162
|
if (!h)
|
|
165
163
|
return;
|
|
166
164
|
let u = -1;
|
|
167
|
-
if (
|
|
165
|
+
if (i && (u = d.indexOf(i)), t.key === "ArrowUp" || t.key === "ArrowLeft" ? u-- : u++, t.key === "ArrowLeft" && u === -1)
|
|
168
166
|
return t.target.matches("input") ? void 0 : l.close(p);
|
|
169
167
|
if (t.key === "ArrowRight" && u === h)
|
|
170
168
|
return;
|
|
171
|
-
u < 0 && (u = h - 1), u > h - 1 && (u = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((c) => c.classList.remove("top-active")), (
|
|
169
|
+
u < 0 && (u = h - 1), u > h - 1 && (u = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((c) => c.classList.remove("top-active")), (r = d[u].querySelector(":scope > a, :scope > .a")) == null || r.classList.add("top-active"), l.scrollToActive(p);
|
|
172
170
|
break;
|
|
173
171
|
}
|
|
174
172
|
}
|
|
175
173
|
}
|
|
176
|
-
const w = `:root {
|
|
177
|
-
--top-popup-z-index: 200000
|
|
178
|
-
--top-popup-transition-delay: 100ms
|
|
179
|
-
|
|
180
|
-
--top-popup-background-color: var(--color-bg-3)
|
|
181
|
-
--top-popup-background-color-hover: var(--color-theme-75)
|
|
182
|
-
--top-popup-background-color-active: var(--color-theme-100)
|
|
183
|
-
|
|
184
|
-
--top-popup-border-color: var(--color-line-2-opacity)
|
|
185
|
-
--top-popup-title-background-color: var(--color-theme-50)
|
|
186
|
-
|
|
187
|
-
/* суммарный отсуп от каря popup до элемента
|
|
188
|
-
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding))
|
|
189
|
-
|
|
190
|
-
/* списки
|
|
191
|
-
--top-popup-list-padding: var(--top-padding-2)
|
|
192
|
-
|
|
193
|
-
--top-popup-listItem-radius: var(--top-radius-2)
|
|
194
|
-
--top-popup-listItem-padding: var(--top-padding-2)
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.top-popup-front { position: relative; }
|
|
198
|
-
|
|
199
|
-
.top-popup-wrapper {
|
|
200
|
-
/* см. recalcPosition()
|
|
201
|
-
--top-popup-height: 0px
|
|
202
|
-
--top-popup-right-bounding: 0px
|
|
203
|
-
--top-popup-bottom-bounding: 0px
|
|
204
|
-
--top-popup-top: 0px
|
|
205
|
-
--top-popup-right: calc(100vw - var(--top-popup-right-bounding))
|
|
206
|
-
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding))
|
|
207
|
-
--top-popup-left: 0px
|
|
208
|
-
|
|
209
|
-
text-align: initial; white-space: normal; word-break: normal
|
|
210
|
-
position: absolute; z-index: 200000
|
|
211
|
-
}
|
|
212
|
-
.top-popup-wrapper:not(.top-popup-wrapper-shown) { overflow: hidden; }
|
|
213
|
-
|
|
214
|
-
/* top-popupPanel
|
|
215
|
-
.top-popupPanel {
|
|
216
|
-
cursor: default
|
|
217
|
-
box-shadow: var(--top-shadow-b)
|
|
218
|
-
border-radius: 8px
|
|
219
|
-
background: var(--top-popup-background-color)
|
|
220
|
-
position: absolute; overflow: hidden
|
|
221
|
-
display: flex; flex-direction: column
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/* position
|
|
225
|
-
.top-popup-wrapper > * {
|
|
226
|
-
opacity: 0
|
|
227
|
-
transition: opacity var(--top-popup-transition-delay) linear, transform var(--top-popup-transition-delay) linear
|
|
228
|
-
}
|
|
229
|
-
.top-popup-wrapper.p0 > * { transform: translateY(-8px); }
|
|
230
|
-
.top-popup-wrapper.p1 > * { transform: translateY(8px); }
|
|
231
|
-
.top-popup-wrapper.p2 > * { transform: translateX(8px); }
|
|
232
|
-
.top-popup-wrapper.p3 > * { transform: translateY(8px); }
|
|
233
|
-
.top-popup-wrapper.p4 > * { transform: translateX(-8px); }
|
|
234
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > * {opacity: 1;transform: translate(0, 0) !important;}
|
|
235
|
-
|
|
236
|
-
.top-popup-wrapper.p0 > .top-popup { top: calc(-16px); left: calc(0px - 8px); }
|
|
237
|
-
.top-popup-wrapper.p1 > .top-popup { bottom: calc(100% + 8px); }
|
|
238
|
-
.top-popup-wrapper.p2 > .top-popup { left: calc(100% + 8px); }
|
|
239
|
-
.top-popup-wrapper.p3 > .top-popup { top: calc(100% + 8px); }
|
|
240
|
-
.top-popup-wrapper.p4 > .top-popup { right: calc(100% + 8px); }
|
|
241
|
-
.top-popup-wrapper.p2 > .top-popup
|
|
242
|
-
.top-popup-wrapper.p4 > .top-popup { margin-top: -10px; }
|
|
243
|
-
|
|
244
|
-
.top-popup-wrapper.p1.with_notch > .top-popup { margin-bottom: 5px; }
|
|
245
|
-
.top-popup-wrapper.p2.with_notch > .top-popup { margin-left: 5px; }
|
|
246
|
-
.top-popup-wrapper.p3.with_notch > .top-popup { margin-top: 5px; }
|
|
247
|
-
.top-popup-wrapper.p4.with_notch > .top-popup { margin-right: 5px; }
|
|
248
|
-
|
|
249
|
-
.top-popup-wrapper.invert-x > .top-popup { right: 0; }
|
|
250
|
-
.top-popup-wrapper.invert-y > .top-popup { bottom: 0; }
|
|
251
|
-
|
|
252
|
-
/* notch
|
|
253
|
-
.top-popup-wrapper > .notch { border: 7.4px solid transparent; position: absolute; display: block; }
|
|
254
|
-
|
|
255
|
-
.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% }
|
|
256
|
-
.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%; }
|
|
257
|
-
.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%; }
|
|
258
|
-
.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%; }
|
|
259
|
-
|
|
260
|
-
.top-popup-wrapper.p1 > .notch-border { border-top-color: rgba(0, 0, 0, 0.05); margin-bottom: 6px; }
|
|
261
|
-
.top-popup-wrapper.p2 > .notch-border { border-right-color: rgba(0, 0, 0, 0.05); margin-left: 6px; }
|
|
262
|
-
.top-popup-wrapper.p3 > .notch-border { border-bottom-color: rgba(0, 0, 0, 0.05); margin-top: 6px; }
|
|
263
|
-
.top-popup-wrapper.p4 > .notch-border { border-left-color: rgba(0, 0, 0, 0.05); margin-right: 6px; }
|
|
264
|
-
|
|
265
|
-
/* common
|
|
266
|
-
.top-popup_header
|
|
267
|
-
.top-popup_content
|
|
268
|
-
.top-popup_footer { font-size: 14px; }
|
|
269
|
-
.top-popup_header
|
|
270
|
-
.top-popup_footer { display: flex; align-items: center; justify-content: space-between; }
|
|
271
|
-
|
|
272
|
-
/* header
|
|
273
|
-
.top-popup_header {
|
|
274
|
-
border-bottom: 1px solid var(--top-popup-border-color)
|
|
275
|
-
padding: var(--top-padding-3)
|
|
276
|
-
font-weight: 600
|
|
277
|
-
}
|
|
278
|
-
.top-popup_header > * { font-weight: 400; }
|
|
279
|
-
.top-popup_header > .a { cursor: pointer; color: var(--color-blue-450); }
|
|
280
|
-
.top-popup_header > .a:hover { color: var(--color-blue-350); }
|
|
281
|
-
|
|
282
|
-
.top-popup_headerButton { width: 60px; }
|
|
283
|
-
|
|
284
|
-
/* widget
|
|
285
|
-
.top-popup_widget {
|
|
286
|
-
padding: var(--top-padding-2) var(--top-padding-2) 0 var(--top-padding-2)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/* content
|
|
290
|
-
.top-popup_content {
|
|
291
|
-
margin: 0
|
|
292
|
-
flex-grow: 1
|
|
293
|
-
overflow-y: auto
|
|
294
|
-
display: flex
|
|
295
|
-
flex-direction: column
|
|
296
|
-
gap: var(--top-gap-4)
|
|
297
|
-
|
|
298
|
-
-webkit-overflow-scrolling: touch
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
div.top-popup_content {
|
|
302
|
-
padding: var(--top-popup-content-padding)
|
|
303
|
-
}
|
|
304
|
-
div.top-popup_content > * { flex-shrink: 0; }
|
|
305
|
-
div.top-popup_content > .top-button { margin: 0; }
|
|
306
|
-
|
|
307
|
-
div.top-popup_content .top-unwrap {
|
|
308
|
-
--top-unwrap-x: var(--top-popup-content-padding)
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
ul.top-popup_content {
|
|
312
|
-
padding: var(--top-popup-list-padding)
|
|
313
|
-
gap: 2px
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
ul.top-popup_content .top-unwrap {
|
|
317
|
-
--top-unwrap-x: var(--top-popup-list-padding)
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.top-popup_listItem {
|
|
321
|
-
border-radius: var(--top-popup-listItem-radius)
|
|
322
|
-
padding: var(--top-popup-listItem-padding)
|
|
323
|
-
line-height: 1 !important
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
ul.top-popup_content li { margin: 0; list-style: none; display: flex; position: relative }
|
|
327
|
-
ul.top-popup_content li > * { flex-grow: 1; }
|
|
328
|
-
ul.top-popup_content li > a:not(.top-button)
|
|
329
|
-
ul.top-popup_content li > .a {
|
|
330
|
-
cursor: pointer
|
|
331
|
-
box-sizing: border-box
|
|
332
|
-
border-radius: var(--top-popup-listItem-radius)
|
|
333
|
-
background: var(--top-popup-background-color)
|
|
334
|
-
padding: var(--top-popup-listItem-padding)
|
|
335
|
-
color: var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration: none !important; font-style: normal
|
|
336
|
-
line-height: 1 !important
|
|
337
|
-
display: flex; flex: 1 1 100%; align-items: center
|
|
338
|
-
transition: background-color 0.1s ease-in-out
|
|
339
|
-
}
|
|
340
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button)
|
|
341
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > .a { transition: none; }
|
|
342
|
-
|
|
343
|
-
ul.top-popup_content li > a:not(.top-button):hover
|
|
344
|
-
ul.top-popup_content li > .a:hover { background: var(--top-popup-background-color-hover); }
|
|
345
|
-
ul.top-popup_content li > a:not(.top-button).top-active
|
|
346
|
-
ul.top-popup_content li > .a.top-active { background: var(--top-popup-background-color-active); }
|
|
347
|
-
|
|
348
|
-
.top-popup_content + .top-popup_content { padding-top: 0; }
|
|
349
|
-
|
|
350
|
-
/* listTitle
|
|
351
|
-
.top-popup_listItem-title {
|
|
352
|
-
background: var(--top-popup-title-background-color)
|
|
353
|
-
color: var(--color-text-2); font-size: 12px
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/* listDelimiter
|
|
357
|
-
.top-popup_listItem-delimiter {
|
|
358
|
-
border-radius: 3px
|
|
359
|
-
background: var(--top-popup-border-color)
|
|
360
|
-
height: 1px
|
|
361
|
-
padding: 0
|
|
362
|
-
margin: 4px
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* listMore
|
|
366
|
-
.top-popup_listMore {
|
|
367
|
-
font-size: 20px
|
|
368
|
-
margin: calc(0px - var(--top-popup-listItem-padding)) calc(0px - var(--top-popup-listItem-padding) / 2) calc(0px - var(--top-popup-listItem-padding)) 0
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.top-popup_listMore.top-button{ margin: 0; }
|
|
372
|
-
|
|
373
|
-
ul.top-popup_content li > .a.top-popup_listMore {
|
|
374
|
-
text-align: center
|
|
375
|
-
flex-basis: 10px
|
|
376
|
-
}
|
|
377
|
-
ul.top-popup_content li > .a.top-popup_listMore:before { color: var(--color-gray-500); }
|
|
378
|
-
ul.top-popup_content li > * > .top-popup_listMore {
|
|
379
|
-
margin-left: auto
|
|
380
|
-
color: var(--color-gray-500)
|
|
381
|
-
font-size: 14px
|
|
382
|
-
}
|
|
383
|
-
ul.top-popup_content li > * > i.top-popup_listMore:hover
|
|
384
|
-
ul.top-popup_content li > * > i.top-popup_listMore.top-active { color: var(--color-blue-500); }
|
|
385
|
-
ul.top-popup_content li > * > i.top-popup_listMore:before {
|
|
386
|
-
transform: rotate(90deg)
|
|
387
|
-
display: block
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
ul.top-popup_content li a.close { background: none !important; }
|
|
391
|
-
|
|
392
|
-
/* data-top-icon
|
|
393
|
-
.top-popup_content > [data-top-icon]:before {
|
|
394
|
-
--top-icon-size: 20px
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button):before {
|
|
398
|
-
--top-icon-color: var(--color-text-3)
|
|
399
|
-
--top-icon-size: 20px
|
|
400
|
-
--top-icon-width: 20px
|
|
401
|
-
|
|
402
|
-
height: 1rem; margin-right: 8px; transition: color 0.1s
|
|
403
|
-
}
|
|
404
|
-
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button):before
|
|
405
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button).top-active:before {
|
|
406
|
-
--top-icon-color: var(--color-text-2)
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/* footer
|
|
410
|
-
.top-popup_footer {
|
|
411
|
-
padding: var(--top-popup-list-padding)
|
|
412
|
-
border-top: 1px solid var(--top-popup-border-color)
|
|
413
|
-
display: flex
|
|
414
|
-
gap: var(--top-gap-2)
|
|
415
|
-
justify-content: flex-end
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/* Виджеты
|
|
419
|
-
.top-popup > [data-widget] { padding: 0 var(--top-popup-list-padding); }
|
|
420
|
-
.top-popup > [data-widget] + hr { margin: 0 var(--top-popup-list-padding); }
|
|
421
|
-
|
|
422
|
-
.top-popup .placeholder {
|
|
423
|
-
border: 1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background: #F9F9F9 !important; margin: -1px 0; z-index: 1
|
|
424
|
-
position: relative
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/* компоненты
|
|
428
|
-
.top-popup-wrapper.simple_list > .top-popup { min-width: 0; white-space: nowrap; }
|
|
429
|
-
|
|
430
|
-
.top-popup_content .top-column { display: flex; flex-direction: column; gap: 4px; }
|
|
431
|
-
html .top-popup .top-popup_content li > .top-button {
|
|
432
|
-
margin: calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding)
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.top-popup li .check_all
|
|
436
|
-
.top-popup li .clear_all { cursor: pointer; color: var(--color-cyan); padding: 8px; display: inline-block; }
|
|
437
|
-
.top-popup li .check_all:hover
|
|
438
|
-
.top-popup li .clear_all:hover { text-decoration: underline; }
|
|
439
|
-
.top-popup li .clear_all { display: none; }
|
|
440
|
-
|
|
441
|
-
/* table
|
|
442
|
-
.top-popup_content table { margin: -9px 0; }
|
|
443
|
-
.top-popup_content table td
|
|
444
|
-
.top-popup_content table th { padding: 9px var(--top-popup-listItem-padding) 9px 0; vertical-align: top; }
|
|
445
|
-
.top-popup_content table th { width: 40%; font-weight: 600; white-space: nowrap; }
|
|
446
|
-
|
|
447
|
-
/* формы
|
|
448
|
-
ul.top-popup_content .a > [type="checkbox"]
|
|
449
|
-
ul.top-popup_content .a > [type="radio"] { margin: -8px 0 -8px auto; }
|
|
450
|
-
|
|
451
|
-
/* deprecated
|
|
452
|
-
ul.top-popup_content a > [class*=icon]
|
|
453
|
-
ul.top-popup_content i.a > [class*=icon] {
|
|
454
|
-
transition: 0.1s
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.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; }
|
|
458
|
-
.top-popup_footer [class*=btn]:not(.btn-transparent) { min-width: 100px; padding: 5px 14px; margin-left: 10px; }
|
|
459
|
-
.top-popup_footer [class*=btn]:first-child { margin-left: 0; }
|
|
460
|
-
.top-popup_footer .btn.full_width { margin: 0; flex-grow: 1; }`, y = `:root{
|
|
461
|
-
--top-popup-list-padding: 0px
|
|
462
|
-
|
|
463
|
-
--top-popup-listItem-radius: 0px
|
|
464
|
-
--top-popup-listItem-padding: var(--top-padding-4)
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
html.with_popup{ background: #808080; }
|
|
468
|
-
|
|
469
|
-
.top-popup-wrapper{
|
|
470
|
-
--top-popup-footer-offset: 25px
|
|
471
|
-
|
|
472
|
-
width: auto !important; height: auto !important
|
|
473
|
-
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden
|
|
474
|
-
transition: background 0.3s
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){ background: rgba(0,0,0,0.5); backdrop-filter: blur(1px); }
|
|
478
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup{ opacity: 1 !important; }
|
|
479
|
-
|
|
480
|
-
.top-popup{
|
|
481
|
-
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
|
|
482
|
-
top: auto !important; right: 0 !important; bottom: var(--toolbar-height, 0px) !important; left: 0 !important
|
|
483
|
-
display: flex; flex-direction: column
|
|
484
|
-
|
|
485
|
-
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%)
|
|
486
|
-
transform: translateY(80%)
|
|
487
|
-
|
|
488
|
-
transition: opacity 0.3s, transform 0.3s
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
/* from top
|
|
493
|
-
.top-popup-wrapper.p-from-top{
|
|
494
|
-
--top-popup-footer-offset: 0px
|
|
495
|
-
|
|
496
|
-
top: var(--header-height, 0px) !important
|
|
497
|
-
}
|
|
498
|
-
.with_dialog .top-popup-wrapper.p-from-top{ top: 50px !important; }
|
|
499
|
-
.top-popup-wrapper.p-from-top > .top-popup{
|
|
500
|
-
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important
|
|
501
|
-
transform: translateY(calc(-100% - 24px))
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/* widget
|
|
505
|
-
.top-popup_widget{ padding: var(--top-padding-2);}
|
|
506
|
-
.top-popup_widget:not(.p-from-top){ order: 10; }
|
|
507
|
-
|
|
508
|
-
/* content
|
|
509
|
-
ul.top-popup_content{
|
|
510
|
-
gap: 0
|
|
511
|
-
}
|
|
512
|
-
ul.top-popup_content li:not(:last-child){ border-bottom: 1px solid var(--top-popup-border-color); }
|
|
513
|
-
|
|
514
|
-
.top-popup-wrapper.top-style_alt > .top-popup > ul > li{ border-bottom: none; }
|
|
515
|
-
|
|
516
|
-
/* footer
|
|
517
|
-
.top-popup_footer{
|
|
518
|
-
flex-direction: column-reverse
|
|
519
|
-
}
|
|
520
|
-
.top-popup_footer > .top-button{
|
|
521
|
-
--top-forms-base-height: var(--top-forms-base-height_l)
|
|
522
|
-
|
|
523
|
-
width: 100
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/* listTitle
|
|
527
|
-
ul.top-popup_content .top-popup_listItem-title{
|
|
528
|
-
--top-popup-padding-v: 12px
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/* listDelimiter
|
|
532
|
-
ul.top-popup_content .top-popup_listItem-delimiter{ background: var(--color-line-1-opacity); height: 4px; margin: 0; }
|
|
533
|
-
ul.top-popup_content li:first-child > .top-popup_listItem-delimiter{ border-top: 1px solid var(--top-popup-border-color); }`, _ = `html:not(.with_dialog){ margin-right: 0 !important; }
|
|
534
|
-
|
|
535
|
-
.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)); }
|
|
536
|
-
.top-popup-wrapper.invert-x > .top-popup{ max-width: calc(100vw - var(--top-popup-right) - 16px); }
|
|
537
|
-
.top-popup-wrapper.invert-y > .top-popup{ max-height: calc(100vh - var(--top-popup-bottom) - 16px); }
|
|
538
|
-
|
|
539
|
-
/* position
|
|
540
|
-
.top-popup-wrapper.p1 > .top-popup{ max-height: calc(var(--top-popup-top) - var(--header-height, 0px) - 16px); }
|
|
541
|
-
.top-popup-wrapper.p3 > .top-popup{ max-height: calc(var(--top-popup-bottom) - 16px); }
|
|
542
|
-
.top-popup-wrapper.p2 > .top-popup{ max-width: calc(var(--top-popup-right) - 16px); }
|
|
543
|
-
.top-popup-wrapper.p4 > .top-popup{ max-width: calc(var(--top-popup-left) - 16px); }
|
|
544
|
-
|
|
545
|
-
/* notch
|
|
546
|
-
.top-popup-wrapper.p1.with_notch > .top-popup
|
|
547
|
-
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-left: -16px !important; }
|
|
548
|
-
.top-popup-wrapper.p1.with_notch > .notch
|
|
549
|
-
.top-popup-wrapper.p3.with_notch > .notch{ margin-left: -8px !important; }
|
|
550
|
-
|
|
551
|
-
.top-popup-wrapper.p1.with_notch.invert-x
|
|
552
|
-
.top-popup-wrapper.p3.with_notch.invert-x{ margin-left: 3px !important; }
|
|
553
|
-
.top-popup-wrapper.p1.with_notch.invert-x > .notch
|
|
554
|
-
.top-popup-wrapper.p3.with_notch.invert-x > .notch{ margin-left: -9px !important; }
|
|
555
|
-
|
|
556
|
-
/* listMore
|
|
557
|
-
ul.top-popup_content li > * > i.top-popup_listMore{ visibility: hidden; transition: none; }
|
|
558
|
-
ul.top-popup_content li:hover > * > i.top-popup_listMore
|
|
559
|
-
ul.top-popup_content li > *.top-active > i.top-popup_listMore
|
|
174
|
+
const w = `:root {
|
|
175
|
+
--top-popup-z-index: 200000;
|
|
176
|
+
--top-popup-transition-delay: 100ms;
|
|
177
|
+
|
|
178
|
+
--top-popup-background-color: var(--color-bg-3);
|
|
179
|
+
--top-popup-background-color-hover: var(--color-theme-75);
|
|
180
|
+
--top-popup-background-color-active: var(--color-theme-100);
|
|
181
|
+
|
|
182
|
+
--top-popup-border-color: var(--color-line-2-opacity);
|
|
183
|
+
--top-popup-title-background-color: var(--color-theme-50);
|
|
184
|
+
|
|
185
|
+
/* суммарный отсуп от каря popup до элемента */
|
|
186
|
+
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding));
|
|
187
|
+
|
|
188
|
+
/* списки */
|
|
189
|
+
--top-popup-list-padding: var(--top-padding-2);
|
|
190
|
+
|
|
191
|
+
--top-popup-listItem-radius: var(--top-radius-2);
|
|
192
|
+
--top-popup-listItem-padding: var(--top-padding-2);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.top-popup-front { position: relative; }
|
|
196
|
+
|
|
197
|
+
.top-popup-wrapper {
|
|
198
|
+
/* см. recalcPosition() */
|
|
199
|
+
--top-popup-height: 0px;
|
|
200
|
+
--top-popup-right-bounding: 0px;
|
|
201
|
+
--top-popup-bottom-bounding: 0px;
|
|
202
|
+
--top-popup-top: 0px;
|
|
203
|
+
--top-popup-right: calc(100vw - var(--top-popup-right-bounding));
|
|
204
|
+
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));
|
|
205
|
+
--top-popup-left: 0px;
|
|
206
|
+
|
|
207
|
+
text-align: initial; white-space: normal; word-break: normal;
|
|
208
|
+
position: absolute; z-index: 200000;
|
|
209
|
+
}
|
|
210
|
+
.top-popup-wrapper:not(.top-popup-wrapper-shown) { overflow: hidden; }
|
|
211
|
+
|
|
212
|
+
/* top-popupPanel */
|
|
213
|
+
.top-popupPanel {
|
|
214
|
+
cursor: default;
|
|
215
|
+
box-shadow: var(--top-shadow-b);
|
|
216
|
+
border-radius: 8px;
|
|
217
|
+
background: var(--top-popup-background-color);
|
|
218
|
+
position: absolute; overflow: hidden;
|
|
219
|
+
display: flex; flex-direction: column;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* position */
|
|
223
|
+
.top-popup-wrapper > * {
|
|
224
|
+
opacity: 0;
|
|
225
|
+
transition: opacity var(--top-popup-transition-delay) linear, transform var(--top-popup-transition-delay) linear;
|
|
226
|
+
}
|
|
227
|
+
.top-popup-wrapper.p0 > * { transform: translateY(-8px); }
|
|
228
|
+
.top-popup-wrapper.p1 > * { transform: translateY(8px); }
|
|
229
|
+
.top-popup-wrapper.p2 > * { transform: translateX(8px); }
|
|
230
|
+
.top-popup-wrapper.p3 > * { transform: translateY(8px); }
|
|
231
|
+
.top-popup-wrapper.p4 > * { transform: translateX(-8px); }
|
|
232
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > * {opacity: 1;transform: translate(0, 0) !important;}
|
|
233
|
+
|
|
234
|
+
.top-popup-wrapper.p0 > .top-popup { top: calc(-16px); left: calc(0px - 8px); }
|
|
235
|
+
.top-popup-wrapper.p1 > .top-popup { bottom: calc(100% + 8px); }
|
|
236
|
+
.top-popup-wrapper.p2 > .top-popup { left: calc(100% + 8px); }
|
|
237
|
+
.top-popup-wrapper.p3 > .top-popup { top: calc(100% + 8px); }
|
|
238
|
+
.top-popup-wrapper.p4 > .top-popup { right: calc(100% + 8px); }
|
|
239
|
+
.top-popup-wrapper.p2 > .top-popup,
|
|
240
|
+
.top-popup-wrapper.p4 > .top-popup { margin-top: -10px; }
|
|
241
|
+
|
|
242
|
+
.top-popup-wrapper.p1.with_notch > .top-popup { margin-bottom: 5px; }
|
|
243
|
+
.top-popup-wrapper.p2.with_notch > .top-popup { margin-left: 5px; }
|
|
244
|
+
.top-popup-wrapper.p3.with_notch > .top-popup { margin-top: 5px; }
|
|
245
|
+
.top-popup-wrapper.p4.with_notch > .top-popup { margin-right: 5px; }
|
|
246
|
+
|
|
247
|
+
.top-popup-wrapper.invert-x > .top-popup { right: 0; }
|
|
248
|
+
.top-popup-wrapper.invert-y > .top-popup { bottom: 0; }
|
|
249
|
+
|
|
250
|
+
/* notch */
|
|
251
|
+
.top-popup-wrapper > .notch { border: 7.4px solid transparent; position: absolute; display: block; }
|
|
252
|
+
|
|
253
|
+
.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% }
|
|
254
|
+
.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%; }
|
|
255
|
+
.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%; }
|
|
256
|
+
.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%; }
|
|
257
|
+
|
|
258
|
+
.top-popup-wrapper.p1 > .notch-border { border-top-color: rgba(0, 0, 0, 0.05); margin-bottom: 6px; }
|
|
259
|
+
.top-popup-wrapper.p2 > .notch-border { border-right-color: rgba(0, 0, 0, 0.05); margin-left: 6px; }
|
|
260
|
+
.top-popup-wrapper.p3 > .notch-border { border-bottom-color: rgba(0, 0, 0, 0.05); margin-top: 6px; }
|
|
261
|
+
.top-popup-wrapper.p4 > .notch-border { border-left-color: rgba(0, 0, 0, 0.05); margin-right: 6px; }
|
|
262
|
+
|
|
263
|
+
/* common */
|
|
264
|
+
.top-popup_header,
|
|
265
|
+
.top-popup_content,
|
|
266
|
+
.top-popup_footer { font-size: 14px; }
|
|
267
|
+
.top-popup_header,
|
|
268
|
+
.top-popup_footer { display: flex; align-items: center; justify-content: space-between; }
|
|
269
|
+
|
|
270
|
+
/* header */
|
|
271
|
+
.top-popup_header {
|
|
272
|
+
border-bottom: 1px solid var(--top-popup-border-color);
|
|
273
|
+
padding: var(--top-padding-3);
|
|
274
|
+
font-weight: 600;
|
|
275
|
+
}
|
|
276
|
+
.top-popup_header > * { font-weight: 400; }
|
|
277
|
+
.top-popup_header > .a { cursor: pointer; color: var(--color-blue-450); }
|
|
278
|
+
.top-popup_header > .a:hover { color: var(--color-blue-350); }
|
|
279
|
+
|
|
280
|
+
.top-popup_headerButton { width: 60px; }
|
|
281
|
+
|
|
282
|
+
/* widget */
|
|
283
|
+
.top-popup_widget {
|
|
284
|
+
padding: var(--top-padding-2) var(--top-padding-2) 0 var(--top-padding-2);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* content */
|
|
288
|
+
.top-popup_content {
|
|
289
|
+
margin: 0;
|
|
290
|
+
flex-grow: 1;
|
|
291
|
+
overflow-y: auto;
|
|
292
|
+
display: flex;
|
|
293
|
+
flex-direction: column;
|
|
294
|
+
gap: var(--top-gap-4);
|
|
295
|
+
|
|
296
|
+
-webkit-overflow-scrolling: touch;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
div.top-popup_content {
|
|
300
|
+
padding: var(--top-popup-content-padding);
|
|
301
|
+
}
|
|
302
|
+
div.top-popup_content > * { flex-shrink: 0; }
|
|
303
|
+
div.top-popup_content > .top-button { margin: 0; }
|
|
304
|
+
|
|
305
|
+
div.top-popup_content .top-unwrap {
|
|
306
|
+
--top-unwrap-x: var(--top-popup-content-padding);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
ul.top-popup_content {
|
|
310
|
+
padding: var(--top-popup-list-padding);
|
|
311
|
+
gap: 2px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
ul.top-popup_content .top-unwrap {
|
|
315
|
+
--top-unwrap-x: var(--top-popup-list-padding);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.top-popup_listItem {
|
|
319
|
+
border-radius: var(--top-popup-listItem-radius);
|
|
320
|
+
padding: var(--top-popup-listItem-padding);
|
|
321
|
+
line-height: 1 !important;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
ul.top-popup_content li { margin: 0; list-style: none; display: flex; position: relative }
|
|
325
|
+
ul.top-popup_content li > * { flex-grow: 1; }
|
|
326
|
+
ul.top-popup_content li > a:not(.top-button),
|
|
327
|
+
ul.top-popup_content li > .a {
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
box-sizing: border-box;
|
|
330
|
+
border-radius: var(--top-popup-listItem-radius);
|
|
331
|
+
background: var(--top-popup-background-color);
|
|
332
|
+
padding: var(--top-popup-listItem-padding);
|
|
333
|
+
color: var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration: none !important; font-style: normal;
|
|
334
|
+
line-height: 1 !important;
|
|
335
|
+
display: flex; flex: 1 1 100%; align-items: center;
|
|
336
|
+
transition: background-color 0.1s ease-in-out;
|
|
337
|
+
}
|
|
338
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button),
|
|
339
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > .a { transition: none; }
|
|
340
|
+
|
|
341
|
+
ul.top-popup_content li > a:not(.top-button):hover,
|
|
342
|
+
ul.top-popup_content li > .a:hover { background: var(--top-popup-background-color-hover); }
|
|
343
|
+
ul.top-popup_content li > a:not(.top-button).top-active,
|
|
344
|
+
ul.top-popup_content li > .a.top-active { background: var(--top-popup-background-color-active); }
|
|
345
|
+
|
|
346
|
+
.top-popup_content + .top-popup_content { padding-top: 0; }
|
|
347
|
+
|
|
348
|
+
/* listTitle */
|
|
349
|
+
.top-popup_listItem-title {
|
|
350
|
+
background: var(--top-popup-title-background-color);
|
|
351
|
+
color: var(--color-text-2); font-size: 12px;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* listDelimiter */
|
|
355
|
+
.top-popup_listItem-delimiter {
|
|
356
|
+
border-radius: 3px;
|
|
357
|
+
background: var(--top-popup-border-color);
|
|
358
|
+
height: 1px;
|
|
359
|
+
padding: 0;
|
|
360
|
+
margin: 4px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* listMore */
|
|
364
|
+
.top-popup_listMore {
|
|
365
|
+
font-size: 20px;
|
|
366
|
+
margin: calc(0px - var(--top-popup-listItem-padding)) calc(0px - var(--top-popup-listItem-padding) / 2) calc(0px - var(--top-popup-listItem-padding)) 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.top-popup_listMore.top-button{ margin: 0; }
|
|
370
|
+
|
|
371
|
+
ul.top-popup_content li > .a.top-popup_listMore {
|
|
372
|
+
text-align: center;
|
|
373
|
+
flex-basis: 10px;
|
|
374
|
+
}
|
|
375
|
+
ul.top-popup_content li > .a.top-popup_listMore:before { color: var(--color-gray-500); }
|
|
376
|
+
ul.top-popup_content li > * > .top-popup_listMore {
|
|
377
|
+
margin-left: auto;
|
|
378
|
+
color: var(--color-gray-500);
|
|
379
|
+
font-size: 14px;
|
|
380
|
+
}
|
|
381
|
+
ul.top-popup_content li > * > i.top-popup_listMore:hover,
|
|
382
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active { color: var(--color-blue-500); }
|
|
383
|
+
ul.top-popup_content li > * > i.top-popup_listMore:before {
|
|
384
|
+
transform: rotate(90deg);
|
|
385
|
+
display: block;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
ul.top-popup_content li a.close { background: none !important; }
|
|
389
|
+
|
|
390
|
+
/* data-top-icon */
|
|
391
|
+
.top-popup_content > [data-top-icon]:before {
|
|
392
|
+
--top-icon-size: 20px;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button):before {
|
|
396
|
+
--top-icon-color: var(--color-text-3);
|
|
397
|
+
--top-icon-size: 20px;
|
|
398
|
+
--top-icon-width: 20px;
|
|
399
|
+
|
|
400
|
+
height: 1rem; margin-right: 8px; transition: color 0.1s;
|
|
401
|
+
}
|
|
402
|
+
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button):before,
|
|
403
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button).top-active:before {
|
|
404
|
+
--top-icon-color: var(--color-text-2);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* footer */
|
|
408
|
+
.top-popup_footer {
|
|
409
|
+
padding: var(--top-popup-list-padding);
|
|
410
|
+
border-top: 1px solid var(--top-popup-border-color);
|
|
411
|
+
display: flex;
|
|
412
|
+
gap: var(--top-gap-2);
|
|
413
|
+
justify-content: flex-end;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/* Виджеты */
|
|
417
|
+
.top-popup > [data-widget] { padding: 0 var(--top-popup-list-padding); }
|
|
418
|
+
.top-popup > [data-widget] + hr { margin: 0 var(--top-popup-list-padding); }
|
|
419
|
+
|
|
420
|
+
.top-popup .placeholder {
|
|
421
|
+
border: 1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background: #F9F9F9 !important; margin: -1px 0; z-index: 1;
|
|
422
|
+
position: relative;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* компоненты */
|
|
426
|
+
.top-popup-wrapper.simple_list > .top-popup { min-width: 0; white-space: nowrap; }
|
|
427
|
+
|
|
428
|
+
.top-popup_content .top-column { display: flex; flex-direction: column; gap: 4px; }
|
|
429
|
+
html .top-popup .top-popup_content li > .top-button {
|
|
430
|
+
margin: calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.top-popup li .check_all,
|
|
434
|
+
.top-popup li .clear_all { cursor: pointer; color: var(--color-cyan); padding: 8px; display: inline-block; }
|
|
435
|
+
.top-popup li .check_all:hover,
|
|
436
|
+
.top-popup li .clear_all:hover { text-decoration: underline; }
|
|
437
|
+
.top-popup li .clear_all { display: none; }
|
|
438
|
+
|
|
439
|
+
/* table */
|
|
440
|
+
.top-popup_content table { margin: -9px 0; }
|
|
441
|
+
.top-popup_content table td,
|
|
442
|
+
.top-popup_content table th { padding: 9px var(--top-popup-listItem-padding) 9px 0; vertical-align: top; }
|
|
443
|
+
.top-popup_content table th { width: 40%; font-weight: 600; white-space: nowrap; }
|
|
444
|
+
|
|
445
|
+
/* формы */
|
|
446
|
+
ul.top-popup_content .a > [type="checkbox"],
|
|
447
|
+
ul.top-popup_content .a > [type="radio"] { margin: -8px 0 -8px auto; }
|
|
448
|
+
|
|
449
|
+
/* deprecated */
|
|
450
|
+
ul.top-popup_content a > [class*=icon],
|
|
451
|
+
ul.top-popup_content i.a > [class*=icon] {
|
|
452
|
+
transition: 0.1s;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.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; }
|
|
456
|
+
.top-popup_footer [class*=btn]:not(.btn-transparent) { min-width: 100px; padding: 5px 14px; margin-left: 10px; }
|
|
457
|
+
.top-popup_footer [class*=btn]:first-child { margin-left: 0; }
|
|
458
|
+
.top-popup_footer .btn.full_width { margin: 0; flex-grow: 1; }`, y = `:root{
|
|
459
|
+
--top-popup-list-padding: 0px;
|
|
460
|
+
|
|
461
|
+
--top-popup-listItem-radius: 0px;
|
|
462
|
+
--top-popup-listItem-padding: var(--top-padding-4);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
html.with_popup{ background: #808080; }
|
|
466
|
+
|
|
467
|
+
.top-popup-wrapper{
|
|
468
|
+
--top-popup-footer-offset: 25px;
|
|
469
|
+
|
|
470
|
+
width: auto !important; height: auto !important;
|
|
471
|
+
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden;
|
|
472
|
+
transition: background 0.3s;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){ background: rgba(0,0,0,0.5); backdrop-filter: blur(1px); }
|
|
476
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup{ opacity: 1 !important; }
|
|
477
|
+
|
|
478
|
+
.top-popup{
|
|
479
|
+
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;
|
|
480
|
+
top: auto !important; right: 0 !important; bottom: var(--toolbar-height, 0px) !important; left: 0 !important;
|
|
481
|
+
display: flex; flex-direction: column;
|
|
482
|
+
|
|
483
|
+
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%) */
|
|
484
|
+
transform: translateY(80%);
|
|
485
|
+
|
|
486
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
/* from top */
|
|
491
|
+
.top-popup-wrapper.p-from-top{
|
|
492
|
+
--top-popup-footer-offset: 0px;
|
|
493
|
+
|
|
494
|
+
top: var(--header-height, 0px) !important;
|
|
495
|
+
}
|
|
496
|
+
.with_dialog .top-popup-wrapper.p-from-top{ top: 50px !important; }
|
|
497
|
+
.top-popup-wrapper.p-from-top > .top-popup{
|
|
498
|
+
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important;
|
|
499
|
+
transform: translateY(calc(-100% - 24px));
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* widget */
|
|
503
|
+
.top-popup_widget{ padding: var(--top-padding-2);}
|
|
504
|
+
.top-popup_widget:not(.p-from-top){ order: 10; }
|
|
505
|
+
|
|
506
|
+
/* content */
|
|
507
|
+
ul.top-popup_content{
|
|
508
|
+
gap: 0;
|
|
509
|
+
}
|
|
510
|
+
ul.top-popup_content li:not(:last-child){ border-bottom: 1px solid var(--top-popup-border-color); }
|
|
511
|
+
|
|
512
|
+
.top-popup-wrapper.top-style_alt > .top-popup > ul > li{ border-bottom: none; }
|
|
513
|
+
|
|
514
|
+
/* footer */
|
|
515
|
+
.top-popup_footer{
|
|
516
|
+
flex-direction: column-reverse;
|
|
517
|
+
}
|
|
518
|
+
.top-popup_footer > .top-button{
|
|
519
|
+
--top-forms-base-height: var(--top-forms-base-height_l);
|
|
520
|
+
|
|
521
|
+
width: 100%;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* listTitle */
|
|
525
|
+
ul.top-popup_content .top-popup_listItem-title{
|
|
526
|
+
--top-popup-padding-v: 12px;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/* listDelimiter */
|
|
530
|
+
ul.top-popup_content .top-popup_listItem-delimiter{ background: var(--color-line-1-opacity); height: 4px; margin: 0; }
|
|
531
|
+
ul.top-popup_content li:first-child > .top-popup_listItem-delimiter{ border-top: 1px solid var(--top-popup-border-color); }`, _ = `html:not(.with_dialog){ margin-right: 0 !important; }
|
|
532
|
+
|
|
533
|
+
.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)); }
|
|
534
|
+
.top-popup-wrapper.invert-x > .top-popup{ max-width: calc(100vw - var(--top-popup-right) - 16px); }
|
|
535
|
+
.top-popup-wrapper.invert-y > .top-popup{ max-height: calc(100vh - var(--top-popup-bottom) - 16px); }
|
|
536
|
+
|
|
537
|
+
/* position */
|
|
538
|
+
.top-popup-wrapper.p1 > .top-popup{ max-height: calc(var(--top-popup-top) - var(--header-height, 0px) - 16px); }
|
|
539
|
+
.top-popup-wrapper.p3 > .top-popup{ max-height: calc(var(--top-popup-bottom) - 16px); }
|
|
540
|
+
.top-popup-wrapper.p2 > .top-popup{ max-width: calc(var(--top-popup-right) - 16px); }
|
|
541
|
+
.top-popup-wrapper.p4 > .top-popup{ max-width: calc(var(--top-popup-left) - 16px); }
|
|
542
|
+
|
|
543
|
+
/* notch */
|
|
544
|
+
.top-popup-wrapper.p1.with_notch > .top-popup,
|
|
545
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-left: -16px !important; }
|
|
546
|
+
.top-popup-wrapper.p1.with_notch > .notch,
|
|
547
|
+
.top-popup-wrapper.p3.with_notch > .notch{ margin-left: -8px !important; }
|
|
548
|
+
|
|
549
|
+
.top-popup-wrapper.p1.with_notch.invert-x,
|
|
550
|
+
.top-popup-wrapper.p3.with_notch.invert-x{ margin-left: 3px !important; }
|
|
551
|
+
.top-popup-wrapper.p1.with_notch.invert-x > .notch,
|
|
552
|
+
.top-popup-wrapper.p3.with_notch.invert-x > .notch{ margin-left: -9px !important; }
|
|
553
|
+
|
|
554
|
+
/* listMore */
|
|
555
|
+
ul.top-popup_content li > * > i.top-popup_listMore{ visibility: hidden; transition: none; }
|
|
556
|
+
ul.top-popup_content li:hover > * > i.top-popup_listMore,
|
|
557
|
+
ul.top-popup_content li > *.top-active > i.top-popup_listMore,
|
|
560
558
|
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ visibility: visible; }`;
|
|
561
559
|
f.appendStyle(w);
|
|
562
560
|
f.appendStyle(y, "m");
|
|
@@ -618,18 +616,17 @@ class x extends v {
|
|
|
618
616
|
return super(), this.init(x.componentName, t, p);
|
|
619
617
|
}
|
|
620
618
|
async mount() {
|
|
621
|
-
var e,
|
|
622
|
-
if (!(this.el instanceof HTMLElement))
|
|
623
|
-
return;
|
|
619
|
+
var e, r, s, a;
|
|
620
|
+
if (!(this.el instanceof HTMLElement)) return;
|
|
624
621
|
const t = this.vueGetComponent();
|
|
625
|
-
if (this.el.closest(".top-popup-wrapper") && (this.popupParent = l.getPopup(this.el.closest(".top-popup-wrapper"))), await this.mountJQuery(),
|
|
626
|
-
this.type = "vue", this.options.popup = "", this.elPopup =
|
|
622
|
+
if (this.el.closest(".top-popup-wrapper") && (this.popupParent = l.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)
|
|
623
|
+
this.type = "vue", this.options.popup = "", this.elPopup = n.genEl("div", {}, this.options.popup);
|
|
627
624
|
else if ((e = this.options.popup) != null && e.match(/^[#.]/))
|
|
628
625
|
this.type = "selector", this.elPopup = document.querySelector(`${this.options.popup}.template`);
|
|
629
626
|
else {
|
|
630
627
|
if (this.type = "html", this.options.useOriginal)
|
|
631
628
|
throw "Option useOriginal not allowed for text templates";
|
|
632
|
-
this.elPopup =
|
|
629
|
+
this.elPopup = n.genEl("div", {}, this.options.popup ?? "");
|
|
633
630
|
}
|
|
634
631
|
if (!this.elPopup || t != null && t.opened) {
|
|
635
632
|
if (this.options.useOriginal || t != null && t.opened) {
|
|
@@ -643,25 +640,25 @@ class x extends v {
|
|
|
643
640
|
}
|
|
644
641
|
if (!this.elPopup)
|
|
645
642
|
return;
|
|
646
|
-
for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition =
|
|
647
|
-
|
|
648
|
-
}),
|
|
643
|
+
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((i) => {
|
|
644
|
+
i instanceof HTMLElement && (i.dataset.topPopupPosBy = "fixed");
|
|
645
|
+
}), n.querySelectorAllArray(this.elPopup, ".top-popup-wrapper").forEach((i) => i.remove()))), l.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(
|
|
649
646
|
"--top-popup-transition-delay",
|
|
650
647
|
this.options.transitionDuration + "ms"
|
|
651
648
|
))), this.elPopupInner = document.createElement("div"), this.elPopupInner.classList.add("top-popupPanel", "top-popup"); this.elPopup.firstChild; )
|
|
652
649
|
this.elPopupInner.appendChild(this.elPopup.firstChild);
|
|
653
650
|
if (this.elPopup.append(this.elPopupInner), this.elPopup.classList.add("top-popup-wrapper"), this.options.class) {
|
|
654
|
-
const
|
|
655
|
-
this.elPopup.classList.add(...
|
|
651
|
+
const i = this.options.class.split(" ");
|
|
652
|
+
this.elPopup.classList.add(...i);
|
|
656
653
|
}
|
|
657
654
|
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");
|
|
658
655
|
const p = !!this.elPopup.querySelector('[data-widget="search"]');
|
|
659
|
-
this.options.isFullScreen && !p && !this.elPopupHeader && (
|
|
656
|
+
this.options.isFullScreen && !p && !this.elPopupHeader && (r = this.options.i18n) != null && r.Close && (this.elPopupHeader = n.genEl("i", { class: "top-popup_header" }), this.elPopupInner.prepend(this.elPopupHeader), this.elPopupHeader.prepend(n.genEl("i", { class: "a closer" }, (s = this.options.i18n) == null ? void 0 : s.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 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"), (a = this.el.parentElement) == null || a.insertBefore(this.elPopup, this.el), this.elPopup.classList.remove("template"), this.options.invertX && this.elPopup.classList.add("invert-x");
|
|
660
657
|
let o = !!this.el.closest(".modal-header");
|
|
661
658
|
o || (o = !!this.el.closest("#top_panel")), o || (o = !!this.el.closest("#secondmenu")), o && this.elPopup.classList.add("p-from-top"), setTimeout(() => {
|
|
662
|
-
var
|
|
663
|
-
return (
|
|
664
|
-
}), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top =
|
|
659
|
+
var i;
|
|
660
|
+
return (i = this.elPopup) == null ? void 0 : i.classList.add("top-popup-wrapper-shown");
|
|
661
|
+
}), 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 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(), l.decoratorAfterOpen(this), this.mountEvents();
|
|
665
662
|
}
|
|
666
663
|
async mountJQuery() {
|
|
667
664
|
f.$ && (this.$ = f.$(this.el));
|
|
@@ -671,7 +668,7 @@ class x extends v {
|
|
|
671
668
|
*/
|
|
672
669
|
focus() {
|
|
673
670
|
let t;
|
|
674
|
-
this.elPopup && (t =
|
|
671
|
+
this.elPopup && (t = n.querySelectorVisible(this.elPopup, ".top-popup-autofocus"), 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 instanceof HTMLElement && t.focus(), setTimeout(() => {
|
|
675
672
|
t instanceof HTMLElement && t.focus();
|
|
676
673
|
}, this.options.transitionDuration));
|
|
677
674
|
}
|
|
@@ -684,8 +681,8 @@ class x extends v {
|
|
|
684
681
|
onMousedown(t) {
|
|
685
682
|
if (!this.elPopup || !(t.target instanceof Element) || !this.isFirstClick || (this.isFirstClick = !1, setTimeout(() => this.isFirstClick = !0), t instanceof MouseEvent && t.button !== 0))
|
|
686
683
|
return;
|
|
687
|
-
let p =
|
|
688
|
-
p && p !== this.elPopup || t.target.closest(".top-popup-front") && (p =
|
|
684
|
+
let p = n.querySelectorVisibleLast(document.body, ":scope > .top-popup-wrapper");
|
|
685
|
+
p && p !== this.elPopup || t.target.closest(".top-popup-front") && (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") || l.decoratorIsIgnoreOuterClick(t) || l.close(this.elPopup);
|
|
689
686
|
}
|
|
690
687
|
/**
|
|
691
688
|
* Закрыть другие Popup при фокусе на элемент формы в текущем
|
|
@@ -694,8 +691,8 @@ class x extends v {
|
|
|
694
691
|
if (t.target instanceof Element && t.target.matches("input") || this.isClosed)
|
|
695
692
|
return;
|
|
696
693
|
l.getAllVisible().forEach((o) => {
|
|
697
|
-
var e,
|
|
698
|
-
(e = this.elPopup) != null && e.contains(o) || ((
|
|
694
|
+
var e, r, s, a;
|
|
695
|
+
(e = this.elPopup) != null && e.contains(o) || ((r = this.popupParent) == null ? void 0 : r.elPopup) === o || ((a = (s = this.popupParent) == null ? void 0 : s.popupParent) == null ? void 0 : a.elPopup) === o || l.close(o);
|
|
699
696
|
});
|
|
700
697
|
}
|
|
701
698
|
/**
|
|
@@ -710,7 +707,7 @@ class x extends v {
|
|
|
710
707
|
* Контроль положения Popup при fixed позиционировании
|
|
711
708
|
*/
|
|
712
709
|
onResize() {
|
|
713
|
-
this.elPopup && this.elPopup.parentElement !== document.body && document.body.append(this.elPopup), this.elPopup instanceof HTMLElement && (this.elPopup.style.top =
|
|
710
|
+
this.elPopup && this.elPopup.parentElement !== document.body && document.body.append(this.elPopup), this.elPopup instanceof HTMLElement && (this.elPopup.style.top = n.offset(this.el).top + "px", this.elPopup.style.left = n.offset(this.el).left + "px");
|
|
714
711
|
}
|
|
715
712
|
unmount() {
|
|
716
713
|
super.unmount(), this.el instanceof HTMLElement && (this.el.dataset.topPopupOpened = ""), this.elActiveByDefault || this.el.classList.remove("top-active");
|
|
@@ -720,8 +717,7 @@ class x extends v {
|
|
|
720
717
|
// контроль за положением Popup, чтобы оно не вылезало за пределы документа
|
|
721
718
|
recalcPosition() {
|
|
722
719
|
var m, b;
|
|
723
|
-
if (!(this.elPopup instanceof HTMLElement))
|
|
724
|
-
return;
|
|
720
|
+
if (!(this.elPopup instanceof HTMLElement)) return;
|
|
725
721
|
let t = this.options.p, p;
|
|
726
722
|
if (this.el instanceof HTMLElement)
|
|
727
723
|
switch (this.elPopup.style.height = this.el.offsetHeight + "px", this.elPopup.classList.remove("p0", "p1", "p2", "p3", "p4"), this.elPopup.classList.add("p" + t), this.options.posBy) {
|
|
@@ -729,8 +725,7 @@ class x extends v {
|
|
|
729
725
|
p = this.el.offsetLeft + parseInt(this.el.style["margin-left"] || "0"), p += this.shift.left, this.elPopup.style.left = p + "px";
|
|
730
726
|
break;
|
|
731
727
|
case "right":
|
|
732
|
-
if (!(this.el.offsetParent instanceof HTMLElement))
|
|
733
|
-
break;
|
|
728
|
+
if (!(this.el.offsetParent instanceof HTMLElement)) break;
|
|
734
729
|
p = this.el.offsetLeft + parseInt(this.el.style["margin-left"] || "0"), this.elPopup.style.right = this.el.offsetParent.offsetWidth - this.el.offsetWidth - p + "px";
|
|
735
730
|
break;
|
|
736
731
|
case "fixed":
|
|
@@ -741,16 +736,16 @@ class x extends v {
|
|
|
741
736
|
}
|
|
742
737
|
const o = this.elPopup.getBoundingClientRect();
|
|
743
738
|
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");
|
|
744
|
-
let e = !1,
|
|
745
|
-
t === 4 && (
|
|
739
|
+
let e = !1, r = !1, s = !1, a = !1, i = o.left > window.innerWidth / 2, d = o.top > window.innerHeight / 2;
|
|
740
|
+
t === 4 && (i = !i), t === 1 && (d = !d);
|
|
746
741
|
const h = (b = this.elPopupInner) == null ? void 0 : b.getBoundingClientRect();
|
|
747
742
|
let u, c;
|
|
748
743
|
if (h) {
|
|
749
744
|
u = window.innerWidth - h.right, c = window.innerHeight - h.bottom;
|
|
750
745
|
const g = 8;
|
|
751
|
-
h.top < g && (e = !0), u < g && (
|
|
746
|
+
h.top < g && (e = !0), u < g && (r = !0), c < g && (s = !0), h.left < g && (a = !0);
|
|
752
747
|
}
|
|
753
|
-
e && (t === 0 || t === 1) && d && (t = 3), s && t === 3 && d && (t = 1),
|
|
748
|
+
e && (t === 0 || t === 1) && d && (t = 3), s && t === 3 && d && (t = 1), r && t === 2 && i && (t = 4), a && t === 4 && i && (t = 2), r && (t === 0 || t === 1 || t === 3) && this.elPopup.classList.add("invert-x"), s && (t === 2 || t === 4) && d && (t === 2 && !i && this.elPopup.classList.add("invert-y"), t === 4 && !i && 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 = ""), l.scrollToActive(this.elPopup);
|
|
754
749
|
}
|
|
755
750
|
onTouchmove(t) {
|
|
756
751
|
var p, o, e;
|
|
@@ -763,10 +758,9 @@ class x extends v {
|
|
|
763
758
|
close() {
|
|
764
759
|
var t;
|
|
765
760
|
this.isClosed || (this.isClosed = !0, this.$ && f.$ && this.elPopup && this.$.trigger("afterclose.top-menu-popup", [f.$(this.elPopup)]), !l.noClose && (this.unmount(), (t = this.elPopup) == null || t.classList.add("top-popup-wrapper-closed"), setTimeout(() => {
|
|
766
|
-
var e,
|
|
767
|
-
if (this.vueClose(), !this.elPopup)
|
|
768
|
-
|
|
769
|
-
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"), (s = this.elPopup.querySelector(".notch-border")) == null || s.remove(), (a = this.elPopup.querySelector(".notch")) == null || a.remove(), (n = this.elPopupInner) == null || n.replaceWith(...this.elPopupInner.childNodes), r.storageClear(this.elPopup)) : (r.storageClear(this.elPopup), this.elPopup.remove(), delete this.elPopup);
|
|
761
|
+
var e, r, s, a, i;
|
|
762
|
+
if (this.vueClose(), !this.elPopup) return;
|
|
763
|
+
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), (r = this.elPopup.querySelector("div.top-popup_content.top-column")) == null || r.classList.remove("top-column"), (s = this.elPopup.querySelector(".notch-border")) == null || s.remove(), (a = this.elPopup.querySelector(".notch")) == null || a.remove(), (i = this.elPopupInner) == null || i.replaceWith(...this.elPopupInner.childNodes), n.storageClear(this.elPopup)) : (n.storageClear(this.elPopup), this.elPopup.remove(), delete this.elPopup);
|
|
770
764
|
const p = l.getAllVisible(), o = p.length && p[p.length - 1];
|
|
771
765
|
o ? l.getPopup(o).focus() : document.documentElement.classList.remove("with_popup");
|
|
772
766
|
}, this.options.transitionDuration)));
|
|
@@ -781,8 +775,7 @@ class x extends v {
|
|
|
781
775
|
}
|
|
782
776
|
// получить vueConnectors компонента Popup
|
|
783
777
|
vueGetComponent() {
|
|
784
|
-
if (this.el instanceof HTMLElement)
|
|
785
|
-
return l.vueConnectors.get(this.el.dataset.topPopupId);
|
|
778
|
+
if (this.el instanceof HTMLElement) return l.vueConnectors.get(this.el.dataset.topPopupId);
|
|
786
779
|
}
|
|
787
780
|
}
|
|
788
781
|
P.init();
|
|
@@ -790,4 +783,4 @@ export {
|
|
|
790
783
|
x as Popup,
|
|
791
784
|
x as default
|
|
792
785
|
};
|
|
793
|
-
//# sourceMappingURL=popup-
|
|
786
|
+
//# sourceMappingURL=popup-D0tRWEp2.es.js.map
|