@topvisor/ui 0.0.36 → 0.0.37
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-6d57a408.es.js +275 -0
- package/.chunks/datepicker-6d57a408.es.js.map +1 -0
- package/.chunks/datepicker-a0840577.amd.js +234 -0
- package/.chunks/datepicker-a0840577.amd.js.map +1 -0
- package/.chunks/{forms-2891e074.amd.js → forms-1aa30229.amd.js} +3 -3
- package/.chunks/forms-1aa30229.amd.js.map +1 -0
- package/.chunks/{forms-db4cb24d.es.js → forms-7be951a7.es.js} +217 -201
- package/.chunks/forms-7be951a7.es.js.map +1 -0
- package/.chunks/{popup-e49a9bab.amd.js → popup-604c0a49.amd.js} +341 -341
- package/.chunks/popup-604c0a49.amd.js.map +1 -0
- package/.chunks/{popup-0f540839.es.js → popup-b9517276.es.js} +383 -383
- package/.chunks/popup-b9517276.es.js.map +1 -0
- package/README.md +62 -62
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +10 -9
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js.map +1 -1
- package/forms.css +1 -1
- package/formsExt/formsExt.amd.js +2 -2
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +97 -84
- package/formsExt/formsExt.js.map +1 -1
- package/formsExt.css +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2945
- package/icomoon/fonts/Topvisor-2.svg +232 -232
- package/icomoon/style.css +647 -647
- package/package.json +19 -19
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +1 -1
- 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/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +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 +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/.chunks/datepicker-1e725859.amd.js +0 -234
- package/.chunks/datepicker-1e725859.amd.js.map +0 -1
- package/.chunks/datepicker-ad465c48.es.js +0 -275
- package/.chunks/datepicker-ad465c48.es.js.map +0 -1
- package/.chunks/forms-2891e074.amd.js.map +0 -1
- package/.chunks/forms-db4cb24d.es.js.map +0 -1
- package/.chunks/popup-0f540839.es.js.map +0 -1
- package/.chunks/popup-e49a9bab.amd.js.map +0 -1
|
@@ -1,341 +1,341 @@
|
|
|
1
|
-
define(["exports","./forms-
|
|
2
|
-
--top-popup-background-color: var(--color-bg-3)
|
|
3
|
-
--top-popup-background-color-hover: var(--color-steel-150)
|
|
4
|
-
--top-popup-background-color-active: var(--color-steel-200)
|
|
5
|
-
--top-popup-border-color: var(--color-theme-100)
|
|
6
|
-
--top-popup-title-background-color: var(--color-steel-100)
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.top-theme-dark{
|
|
10
|
-
--top-popup-background-color-hover: var(--color-gray-800)
|
|
11
|
-
--top-popup-background-color-active: var(--color-gray-750)
|
|
12
|
-
--top-popup-title-background-color: var(--color-gray-900)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.top-popup-front{ position: relative; }
|
|
16
|
-
|
|
17
|
-
.top-popup-wrapper{
|
|
18
|
-
--top-popup-padding-h: 8px
|
|
19
|
-
--top-popup-padding-v: 8px
|
|
20
|
-
|
|
21
|
-
/* см. recalcPosition()
|
|
22
|
-
--top-popup-height: 0px
|
|
23
|
-
--top-popup-right-bounding: 0px
|
|
24
|
-
--top-popup-bottom-bounding: 0px
|
|
25
|
-
--top-popup-top: 0px
|
|
26
|
-
--top-popup-right: calc(100vw - var(--top-popup-right-bounding))
|
|
27
|
-
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding))
|
|
28
|
-
--top-popup-left: 0px
|
|
29
|
-
|
|
30
|
-
text-align: initial; white-space: normal; word-break: normal
|
|
31
|
-
position: absolute; z-index: 200000
|
|
32
|
-
}
|
|
33
|
-
.top-popup-wrapper:not(.top-popup-wrapper-shown){ overflow: hidden; }
|
|
34
|
-
|
|
35
|
-
/* top-popupPanel
|
|
36
|
-
.top-popupPanel {
|
|
37
|
-
cursor: default
|
|
38
|
-
box-shadow: var(--top-shadow-b)
|
|
39
|
-
border-radius: 8px
|
|
40
|
-
background: var(--top-popup-background-color)
|
|
41
|
-
position: absolute; overflow: hidden
|
|
42
|
-
display: flex; flex-direction: column
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* position
|
|
46
|
-
.top-popup-wrapper > *{ opacity: 0; transition: opacity 100ms linear, transform 100ms linear; }
|
|
47
|
-
.top-popup-wrapper.p0 > *{ transform: translateY(-8px); }
|
|
48
|
-
.top-popup-wrapper.p1 > *{ transform: translateY(8px); }
|
|
49
|
-
.top-popup-wrapper.p2 > *{ transform: translateX(8px); }
|
|
50
|
-
.top-popup-wrapper.p3 > *{ transform: translateY(8px); }
|
|
51
|
-
.top-popup-wrapper.p4 > *{ transform: translateX(-8px); }
|
|
52
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > *{opacity: 1;transform: translate(0, 0) !important;}
|
|
53
|
-
|
|
54
|
-
.top-popup-wrapper.p0 > .top-popup{ top: calc(-16px); left: calc(0px - var(--top-popup-padding-h)); }
|
|
55
|
-
.top-popup-wrapper.p1 > .top-popup{ bottom: calc(100% + 8px); }
|
|
56
|
-
.top-popup-wrapper.p2 > .top-popup{ left: calc(100% + 8px); }
|
|
57
|
-
.top-popup-wrapper.p3 > .top-popup{ top: calc(100% + 8px); }
|
|
58
|
-
.top-popup-wrapper.p4 > .top-popup{ right: calc(100% + 8px); }
|
|
59
|
-
.top-popup-wrapper.p2 > .top-popup
|
|
60
|
-
.top-popup-wrapper.p4 > .top-popup{ margin-top: -10px; }
|
|
61
|
-
|
|
62
|
-
.top-popup-wrapper.p1.with_notch > .top-popup{ margin-bottom: 5px; }
|
|
63
|
-
.top-popup-wrapper.p2.with_notch > .top-popup{ margin-left: 5px; }
|
|
64
|
-
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-top: 5px; }
|
|
65
|
-
.top-popup-wrapper.p4.with_notch > .top-popup{ margin-right: 5px; }
|
|
66
|
-
|
|
67
|
-
.top-popup-wrapper.invert-x > .top-popup{ right: 0; }
|
|
68
|
-
.top-popup-wrapper.invert-y > .top-popup{ bottom: 0; }
|
|
69
|
-
|
|
70
|
-
/* notch
|
|
71
|
-
.top-popup-wrapper > .notch{ border: 7.4px solid transparent; position: absolute; display: block; }
|
|
72
|
-
|
|
73
|
-
.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% }
|
|
74
|
-
.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%; }
|
|
75
|
-
.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%; }
|
|
76
|
-
.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%; }
|
|
77
|
-
|
|
78
|
-
.top-popup-wrapper.p1 > .notch-border{ border-top-color: rgba(0,0,0,0.05); margin-bottom: 6px; }
|
|
79
|
-
.top-popup-wrapper.p2 > .notch-border{ border-right-color: rgba(0,0,0,0.05); margin-left: 6px; }
|
|
80
|
-
.top-popup-wrapper.p3 > .notch-border{ border-bottom-color: rgba(0,0,0,0.05); margin-top: 6px; }
|
|
81
|
-
.top-popup-wrapper.p4 > .notch-border{ border-left-color: rgba(0,0,0,0.05); margin-right: 6px; }
|
|
82
|
-
|
|
83
|
-
/* common
|
|
84
|
-
.top-popup_header
|
|
85
|
-
.top-popup_content
|
|
86
|
-
.top-popup_footer{ padding: var(--top-popup-padding-h) var(--top-popup-padding-h); font-size: 14px; }
|
|
87
|
-
.top-popup_header
|
|
88
|
-
.top-popup_footer{ display: flex; align-items: center; justify-content: space-between; }
|
|
89
|
-
|
|
90
|
-
/* header
|
|
91
|
-
.top-popup_header{ border-bottom: 1px solid var(--top-popup-border-color); font-weight: 600; }
|
|
92
|
-
.top-popup_header > *{ font-weight: 400; }
|
|
93
|
-
.top-popup_header > .a{ cursor: pointer; color: var(--color-blue-450); }
|
|
94
|
-
.top-popup_header > .a:hover{ color: var(--color-blue-350); }
|
|
95
|
-
|
|
96
|
-
.top-popup_headerButton{ width: 60px; }
|
|
97
|
-
|
|
98
|
-
/* content
|
|
99
|
-
.top-popup .top-popup_content{
|
|
100
|
-
/* has_scroll
|
|
101
|
-
--scroll-padding-top: var(--top-popup-padding-v)
|
|
102
|
-
--scroll-padding-bottom: var(--top-popup-padding-v)
|
|
103
|
-
|
|
104
|
-
padding-top: var(--top-popup-padding-v); padding-bottom: var(--top-popup-padding-v); margin: 0; line-height:1.3 !important
|
|
105
|
-
flex-grow: 1; overflow-y: auto
|
|
106
|
-
-webkit-overflow-scrolling: touch
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.top-popup .top-popup_content .top-unwrap{
|
|
110
|
-
--top-unwrap-x: var(--top-popup-padding-h)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.top-popup div.top-popup_content{ display: flex; flex-direction: column; gap: 4px; }
|
|
114
|
-
.top-popup div.top-popup_content > *{ flex-shrink: 0; }
|
|
115
|
-
.top-popup div.top-popup_content > .top-button{ margin: 0; }
|
|
116
|
-
|
|
117
|
-
.top-popup ul.top-popup_content{
|
|
118
|
-
--scroll-padding-top: 4px
|
|
119
|
-
--scroll-padding-bottom: var(--scroll-padding-top)
|
|
120
|
-
|
|
121
|
-
padding: var(--scroll-padding-top) 0
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
ul.top-popup_content li{ margin: 0; list-style:none; display: flex; position: relative }
|
|
125
|
-
ul.top-popup_content li > *{ flex-grow: 1; }
|
|
126
|
-
ul.top-popup_content li > a:not(.top-button)
|
|
127
|
-
ul.top-popup_content li > i.a{
|
|
128
|
-
cursor: pointer
|
|
129
|
-
box-sizing: border-box
|
|
130
|
-
background: var(--top-popup-background-color); padding:var(--top-popup-padding-v) var(--top-popup-padding-h)
|
|
131
|
-
color:var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration:none !important; font-style: normal
|
|
132
|
-
display:flex; flex: 1 1 100%; align-items: center
|
|
133
|
-
transition: background-color 0.1s ease-in-out
|
|
134
|
-
}
|
|
135
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button)
|
|
136
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > i.a{ transition: none; }
|
|
137
|
-
|
|
138
|
-
ul.top-popup_content li > a:not(.top-button):hover
|
|
139
|
-
ul.top-popup_content li > i.a:hover{ background: var(--top-popup-background-color-hover); }
|
|
140
|
-
ul.top-popup_content li > a:not(.top-button).top-active
|
|
141
|
-
ul.top-popup_content li > i.a.top-active{ background: var(--top-popup-background-color-active); }
|
|
142
|
-
|
|
143
|
-
/* listTitle
|
|
144
|
-
li.top-popup_listTitle{
|
|
145
|
-
background: var(--top-popup-title-background-color); padding: var(--top-popup-padding-v) var(--top-popup-padding-h)
|
|
146
|
-
color: var(--color-text-3); font-size: 12px; font-weight: 400
|
|
147
|
-
}
|
|
148
|
-
li.top-popup_listTitle:first-child{
|
|
149
|
-
padding-top: calc(var(--top-popup-padding-v) + var(--scroll-padding-top))
|
|
150
|
-
margin-top: calc(0px - var(--scroll-padding-top))
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* listDelimiter
|
|
154
|
-
ul.top-popup_content li.top-popup_listDelimiter{
|
|
155
|
-
border-radius: 3px
|
|
156
|
-
background: var(--top-popup-border-color)
|
|
157
|
-
height: 2px
|
|
158
|
-
margin: calc(var(--top-popup-padding-h) / 2) var(--top-popup-padding-h)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* listMore
|
|
162
|
-
ul.top-popup_content li > i.a.top-popup_listMore{
|
|
163
|
-
height: auto; padding-right: 4px; padding-left: 4px
|
|
164
|
-
font-size: 24px; line-height: 17px; text-align: center
|
|
165
|
-
flex-basis: 10px
|
|
166
|
-
}
|
|
167
|
-
ul.top-popup_content li > i.a.top-popup_listMore:before{ color: var(--color-gray-500); }
|
|
168
|
-
ul.top-popup_content li > * > i.top-popup_listMore{
|
|
169
|
-
padding: 0 var(--top-popup-padding-h); margin: 0 0 0 auto
|
|
170
|
-
color: var(--color-gray-500)
|
|
171
|
-
font-size: 14px
|
|
172
|
-
}
|
|
173
|
-
ul.top-popup_content li > * > i.top-popup_listMore:hover
|
|
174
|
-
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ color: var(--color-blue-500); }
|
|
175
|
-
ul.top-popup_content li > * > i.top-popup_listMore:before{ transform: rotate(90deg); }
|
|
176
|
-
|
|
177
|
-
ul.top-popup_content li a.close{ background: none !important; }
|
|
178
|
-
|
|
179
|
-
/* data-top-icon
|
|
180
|
-
.top-popup_content > [data-top-icon]:before{ --top-icon-size: 20px; }
|
|
181
|
-
|
|
182
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button):before{
|
|
183
|
-
--top-icon-color: var(--color-text-3)
|
|
184
|
-
--top-icon-size: 20px
|
|
185
|
-
--top-icon-width: 20px
|
|
186
|
-
|
|
187
|
-
height: 1rem; margin-right: 8px; transition: color 0.1s
|
|
188
|
-
}
|
|
189
|
-
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button):before
|
|
190
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button).top-active:before{
|
|
191
|
-
--top-icon-color: #378DC6
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/* footer
|
|
195
|
-
.top-popup_footer{
|
|
196
|
-
padding: var(--top-popup-padding-h) var(--top-popup-padding-h); display: flex; gap:8px; justify-content: flex-end
|
|
197
|
-
}
|
|
198
|
-
.top-popup_footer > .top-button{ margin: 0; }
|
|
199
|
-
|
|
200
|
-
/* Виджеты
|
|
201
|
-
.top-popup > [data-widget]{ padding: 0 var(--top-popup-padding-h); }
|
|
202
|
-
.top-popup > [data-widget] + hr{ margin: 0 var(--top-popup-padding-h); }
|
|
203
|
-
|
|
204
|
-
.top-popup .placeholder{
|
|
205
|
-
border:1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background:#F9F9F9 !important; margin: -1px 0; z-index: 1
|
|
206
|
-
position: relative
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/* компоненты
|
|
210
|
-
.top-popup-wrapper.simple_list > .top-popup{ min-width: 0; white-space: nowrap; }
|
|
211
|
-
|
|
212
|
-
.top-popup_content .top-column{ display: flex; flex-direction: column; gap: 4px; }
|
|
213
|
-
.top-popup_content li > :not(a):not(.a){ margin:0 var(--top-popup-padding-h); }
|
|
214
|
-
html .top-popup .top-popup_content li > .top-button{ margin:calc(var(--top-popup-padding-v) / 2) var(--top-popup-padding-h); }
|
|
215
|
-
|
|
216
|
-
.top-popup li .check_all
|
|
217
|
-
.top-popup li .clear_all{ cursor: pointer; color: var(--color-cyan); padding: 8px; display: inline-block; }
|
|
218
|
-
.top-popup li .check_all:hover
|
|
219
|
-
.top-popup li .clear_all:hover{ text-decoration: underline; }
|
|
220
|
-
.top-popup li .clear_all{ display: none; }
|
|
221
|
-
|
|
222
|
-
/* table
|
|
223
|
-
.top-popup_content table{ margin: -9px 0; }
|
|
224
|
-
.top-popup_content table td
|
|
225
|
-
.top-popup_content table th{ padding: 9px var(--top-popup-padding-h) 9px 0; vertical-align: top; }
|
|
226
|
-
.top-popup_content table th{ width: 40%; font-weight: 600; white-space: nowrap; }
|
|
227
|
-
|
|
228
|
-
/* формы
|
|
229
|
-
ul.top-popup_content .a > [type="checkbox"]
|
|
230
|
-
ul.top-popup_content .a > [type="radio"]{ margin: -8px 0 -8px auto; }
|
|
231
|
-
|
|
232
|
-
/* deprecated
|
|
233
|
-
ul.top-popup_content a > [class*=icon]
|
|
234
|
-
ul.top-popup_content i.a > [class*=icon]{
|
|
235
|
-
margin-right: 14px; text-align: center
|
|
236
|
-
width: auto; height: 16px; font-size: 16px; vertical-align: top
|
|
237
|
-
transition: 0.1s
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.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; }
|
|
241
|
-
.top-popup_footer [class*=btn]:not(.btn-transparent){ min-width: 100px; padding: 5px 14px; margin-left: 10px; }
|
|
242
|
-
.top-popup_footer [class*=btn]:first-child{ margin-left: 0; }
|
|
243
|
-
.top-popup_footer .btn.full_width{ margin: 0; flex-grow: 1; }`,P=`html.with_popup{ background: #808080; }
|
|
244
|
-
|
|
245
|
-
.top-popup-wrapper{
|
|
246
|
-
--top-popup-padding-h: 19px
|
|
247
|
-
--top-popup-padding-v: 16px
|
|
248
|
-
--top-popup-footer-offset: 25px
|
|
249
|
-
|
|
250
|
-
width: auto !important; height: auto !important
|
|
251
|
-
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden
|
|
252
|
-
transition: background 0.3s
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){ background: rgba(0,0,0,0.5); backdrop-filter: blur(1px); }
|
|
256
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup{ opacity: 1 !important; }
|
|
257
|
-
|
|
258
|
-
.top-popup{
|
|
259
|
-
border-radius: 8px 8px 0 0; width: auto !important; max-height: calc(100% - var(--header-height) - 12px)
|
|
260
|
-
top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important
|
|
261
|
-
display: flex; flex-direction: column
|
|
262
|
-
|
|
263
|
-
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%)
|
|
264
|
-
transform: translateY(80%)
|
|
265
|
-
|
|
266
|
-
transition: opacity 0.3s, transform 0.3s
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/* from top
|
|
270
|
-
.top-popup-wrapper.p-from-top{
|
|
271
|
-
--top-popup-footer-offset: 0px
|
|
272
|
-
|
|
273
|
-
top: var(--header-height) !important
|
|
274
|
-
}
|
|
275
|
-
.with_dialog .top-popup-wrapper.p-from-top{ top: 50px !important; }
|
|
276
|
-
.top-popup-wrapper.p-from-top > .top-popup{
|
|
277
|
-
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important
|
|
278
|
-
transform: translateY(calc(-100% - 24px))
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.top-popup_content:last-child
|
|
282
|
-
.top-popup_footer{
|
|
283
|
-
--scroll-padding-bottom: calc(var(--top-popup-padding-v) + var(--top-popup-footer-offset))
|
|
284
|
-
|
|
285
|
-
padding-bottom: var(--scroll-padding-bottom)
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/* content
|
|
289
|
-
ul.top-popup_content{
|
|
290
|
-
--scroll-padding-top: 0px
|
|
291
|
-
--scroll-padding-bottom: var(--scroll-padding-top)
|
|
292
|
-
|
|
293
|
-
display: flex; flex-direction: column
|
|
294
|
-
}
|
|
295
|
-
ul.top-popup_content li:not(:last-child){ border-bottom: 1px solid var(--top-popup-border-color); }
|
|
296
|
-
|
|
297
|
-
.top-popup-wrapper.top-style_alt > .top-popup > ul > li{ border-bottom: none; }
|
|
298
|
-
|
|
299
|
-
/* footer
|
|
300
|
-
.top-popup_footer{ flex-wrap: wrap; }
|
|
301
|
-
.top-popup_footer > .top-button{
|
|
302
|
-
--top-forms-base-height: var(--top-forms-base-height_xl)
|
|
303
|
-
|
|
304
|
-
flex-grow: 1
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/* listTitle
|
|
308
|
-
ul.top-popup_content li.top-popup_listTitle{
|
|
309
|
-
--top-popup-padding-v: 12px
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/* listDelimiter
|
|
313
|
-
ul.top-popup_content li.top-popup_listDelimiter{ border-radius: 0; border-bottom: none; height: 2px; margin: 0; }`,w=`html:not(.with_dialog){ margin-right: 0 !important; }
|
|
314
|
-
|
|
315
|
-
.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)); }
|
|
316
|
-
.top-popup-wrapper.invert-x > .top-popup{ max-width: calc(100vw - var(--top-popup-right) - 16px); }
|
|
317
|
-
.top-popup-wrapper.invert-y > .top-popup{ max-height: calc(100vh - var(--top-popup-bottom) - 16px); }
|
|
318
|
-
|
|
319
|
-
/* position
|
|
320
|
-
.top-popup-wrapper.p1 > .top-popup{ max-height: calc(var(--top-popup-top) - var(--header-height) - 16px); }
|
|
321
|
-
.top-popup-wrapper.p3 > .top-popup{ max-height: calc(var(--top-popup-bottom) - 16px); }
|
|
322
|
-
.top-popup-wrapper.p2 > .top-popup{ max-width: calc(var(--top-popup-right) - 16px); }
|
|
323
|
-
.top-popup-wrapper.p4 > .top-popup{ max-width: calc(var(--top-popup-left) - 16px); }
|
|
324
|
-
|
|
325
|
-
/* notch
|
|
326
|
-
.top-popup-wrapper.p1.with_notch > .top-popup
|
|
327
|
-
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-left: -16px !important; }
|
|
328
|
-
.top-popup-wrapper.p1.with_notch > .notch
|
|
329
|
-
.top-popup-wrapper.p3.with_notch > .notch{ margin-left: -8px !important; }
|
|
330
|
-
|
|
331
|
-
.top-popup-wrapper.p1.with_notch.invert-x
|
|
332
|
-
.top-popup-wrapper.p3.with_notch.invert-x{ margin-left: 3px !important; }
|
|
333
|
-
.top-popup-wrapper.p1.with_notch.invert-x > .notch
|
|
334
|
-
.top-popup-wrapper.p3.with_notch.invert-x > .notch{ margin-left: -9px !important; }
|
|
335
|
-
|
|
336
|
-
/* listMore
|
|
337
|
-
ul.top-popup_content li > * > i.top-popup_listMore{ visibility: hidden; transition: none; }
|
|
338
|
-
ul.top-popup_content li:hover > * > i.top-popup_listMore
|
|
339
|
-
ul.top-popup_content li > *.top-active > i.top-popup_listMore
|
|
340
|
-
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ visibility: visible; }`;f.Core.appendStyle(x),f.Core.appendStyle(P,"m"),f.Core.appendStyle(w,"pc");class m extends g{static componentName="Popup";el;elActiveByDefault;elPopup;elPopupInner;elPopupHeader;elPopupBody;elPopupFooter;elFront;popupParent;$;elStartPosition;shift={top:0,left:0};isClosed=!1;isFirstClick=!0;type;options={popup:"",p:0,notch:!1,class:"",posBy:"left",frontSelector:"",invertX:!1,openByHover:!1,useOriginal:!1,isFullScreen:!1,i18n:{}};events={};constructor(t,p){return super(),this.init(m.componentName,t,p)}async mount(){const t=this.vueGetComponent();if(this.popupParent=i.getPopup(this.el.closest(".top-popup-wrapper")),await this.mountJQuery(),n.css(this.el,"position")!=="absolute"&&(this.el.style.position="relative"),this.el.dataset.topPopupOpened="opened",this.elActiveByDefault=this.el.classList.contains("top-active"),this.el.classList.add("top-active"),t)this.type="vue",this.options.popup="",this.elPopup=n.genEl("div",{},this.options.popup);else if(this.options.popup.match(/^[#.]/))this.type="selector",this.elPopup=document.querySelector(`${this.options.popup}.template`);else{if(this.type="html",this.options.useOriginal)throw"Option useOriginal not allowed for text templates";this.elPopup=n.genEl("div",{},this.options.popup)}if(!this.elPopup||t!=null&&t.opened){if(this.options.useOriginal||t!=null&&t.opened){if(t!=null&&t.opened?this.elPopup=t.popup.elPopup:this.elPopup=document.querySelector(`${this.options.popup}.top-popup-wrapper-shown`),this.elPopup){this.el.dataset.topPopupOpened="",this.elActiveByDefault||this.el.classList.remove("top-active"),i.close(this.elPopup),setTimeout(()=>this.mount(),300);return}throw"Option useOriginal state allowed only elements .template"}this.elPopup=document.querySelector(`${this.options.popup}:not(.top-popup-wrapper)`)}if(!this.elPopup)return;for(this.options.useOriginal?(this.elStartPosition=this.elPopup.closest(".top-popup-el-start-position"),this.elStartPosition||(this.elStartPosition=n.wrap(this.elPopup,"i"),this.elStartPosition.classList.add("top-popup-el-start-position","hidden"))):(this.elPopup=this.elPopup.cloneNode(!0),this.type==="selector"&&!this.elPopup.matches(".template")&&(this.elPopup.classList.remove("hidden"),this.elPopup.querySelector(":scope > .top-popup_content")||this.elPopup.classList.add("top-popup_content"),this.elPopup=n.wrap(this.elPopup,"div")),this.type==="html"&&(this.elPopup.querySelector(":scope > .top-popup_content")||(this.elPopup.classList.add("top-popup_content"),this.elPopup=n.wrap(this.elPopup,"div"))),(this.type==="selector"&&!this.elPopup.matches(".template")||this.type==="html"||this.type==="vue")&&(n.querySelectorAllArray(this.elPopup,"[data-top-popup]").forEach(e=>e.dataset.topPopupPosBy="fixed"),n.querySelectorAllArray(this.elPopup,".top-popup-wrapper").forEach(e=>e.remove()))),i.decoratorBeforeOpen(this),t&&(this.options.class=t.classRef.value),this.elPopupInner=document.createElement("div"),this.elPopupInner.classList.add("top-popupPanel","top-popup");this.elPopup.firstChild;)this.elPopupInner.appendChild(this.elPopup.firstChild);if(this.elPopup.append(this.elPopupInner),this.elPopup.classList.add("top-popup-wrapper"),this.options.class){const e=this.options.class.split(" ");this.elPopup.classList.add(...e)}this.options.notch&&(this.elPopup.classList.add("with_notch"),this.elPopup.insertAdjacentHTML("beforeend",'<i class="notch notch-border"></i><i class="notch"></i>')),await this.vueOpen(),this.elPopupHeader=this.elPopupInner.querySelector(".top-popup_header"),this.elPopupBody=this.elPopupInner.querySelector(".top-popup_content"),this.elPopupFooter=this.elPopupInner.querySelector(".top-popup_footer");const p=!!this.elPopup.querySelector('[data-widget="search"]');this.options.isFullScreen&&!p&&(this.elPopupHeader||(this.elPopupHeader=n.genEl("i",{class:"top-popup_header"}),this.elPopupInner.prepend(this.elPopupHeader),this.elPopupHeader.prepend(n.genEl("i",{class:"a closer"},this.options.i18n.Close)),this.elPopupHeader.append(n.genEl("i",{class:"top-popup_headerButton"})))),n.storage(this.elPopup,"Popup",this),this.options.frontSelector&&(this.elFront=document.querySelector(this.options.frontSelector)),this.elFront||(this.elFront=this.el.closest(".top-popup-front")),this.elFront||(this.elFront=document.body),this.elPopup.style.width=this.el.offsetWidth+"px",this.elPopup.style.height=this.el.offsetHeight+"px",this.elPopup.style.top=this.el.offsetTop+"px",this.elPopup.style.right=parseInt(this.el.style.right||0)+"px",this.elPopup.style.bottom=parseInt(this.el.style.bottom||0)+"px",this.el.parentElement.insertBefore(this.elPopup,this.el),this.elPopup.classList.remove("template"),this.options.invertX&&this.elPopup.classList.add("invert-x");let o=!!this.el.closest(".modal-header");o||(o=!!this.el.closest("#top_panel")),o||(o=!!this.el.closest("#secondmenu")),o&&this.elPopup.classList.add("p-from-top"),setTimeout(()=>this.elPopup.classList.add("top-popup-wrapper-shown")),this.elFront&&!this.elFront.matches("body")&&(this.elFront.append(this.elPopup),this.shift.top=n.offset(this.el).top-this.el.offsetTop-n.offset(this.elFront).top,this.shift.left=n.offset(this.el).left-this.el.offsetLeft-n.offset(this.elFront).left,this.shift.top-=parseInt(this.el.style["margin-top"]||0),this.shift.left-=parseInt(this.el.style["margin-left"]||0),this.elPopup.style.top=parseInt(this.elPopup.style.top||"0")+this.shift.top+"px",this.elPopup.style.left=parseInt(this.elPopup.style.left||"0")+this.shift.left+"px"),this.$&&this.$.trigger("aftershow.top-menu-popup",[jQuery(this.elPopup)]),this.recalcPosition(),this.elPopup.setAttribute("tabindex",0),this.focus(),i.decoratorAfterOpen(this),this.mountEvents()}async mountJQuery(){typeof jQuery=="function"&&(this.$=jQuery(this.el))}focus(){let 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.focus()}mountEvents(){this.addEventListenerWithUnmount(document,"mousedown",t=>this.onMousedown(t)),this.addEventListenerWithUnmount(this.elPopup,"focus",t=>this.onFocus(t)),this.options.openByHover&&(this.addEventListenerWithUnmount(this.elPopup,"mouseleave",t=>this.onMouseleave(t)),this.addEventListenerWithUnmount(this.elPopupInner,"mouseleave",t=>this.onMouseleave(t))),this.options.isFullScreen&&this.addEventListenerWithUnmount(this.elPopupBody,"touchmove",t=>this.onTouchmove(t))}onMousedown(t){if(!this.elPopup||!this.isFirstClick||(this.isFirstClick=!1,setTimeout(()=>this.isFirstClick=!0),t.button!==0))return;let p=n.querySelectorVisibleLast(document.body,":scope > .top-popup-wrapper");p&&p!==this.elPopup||(p=n.querySelectorVisibleLast(t.target.closest(".top-popup-front"),":scope > .top-popup-wrapper"),!(p&&p!==this.elPopup)&&(this.elPopup.contains(t.target)||this.elPopup.closest(".ui-dialog")&&!t.target.closest(".ui-dialog")||i.decoratorIsIgnoreOuterClick(t)||i.close(this.elPopup)))}onFocus(t){if(t.target.matches("input")||this.isClosed)return;i.getAllVisible().forEach(o=>{var e,r,l;this.elPopup.contains(o)||((e=this.popupParent)==null?void 0:e.elPopup)===o||((l=(r=this.popupParent)==null?void 0:r.popupParent)==null?void 0:l.elPopup)===o||i.close(o)})}onMouseleave(t){setTimeout(()=>{this.elPopupInner.matches(":hover")||i.close(this.elPopup)},100)}onResize(){this.elPopup.parentElement!==document.body&&document.body.append(this.elPopup),this.elPopup.style.top=n.offset(this.el).top+"px",this.elPopup.style.left=n.offset(this.el).left+"px"}unmount(){super.unmount(),this.el.dataset.topPopupOpened="",this.elActiveByDefault||this.el.classList.remove("top-active");let t=this.el.getAttribute("style");t&&(t=t.replace(/position:[^;]*;?/g,""),this.el.setAttribute("style",t))}recalcPosition(){let t=this.options.p,p;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){case"left":p=this.el.offsetLeft+parseInt(this.el.style["margin-left"]||0),p+=this.shift.left,this.elPopup.style.left=p+"px";break;case"right":p=this.el.offsetLeft+parseInt(this.el.style["margin-left"]||0),this.elPopup.style.right=this.el.offsetParent.offsetWidth-this.el.offsetWidth-p+"px";break;case"fixed":this.addEventListenerWithUnmount(window,"resize",()=>this.onResize()),this.onResize();break;default:this.options.posBy.append(this.elPopup)}const o=this.elPopup.getBoundingClientRect();this.elPopup.style.setProperty("--top-popup-height",this.elPopup.offsetHeight+"px"),this.elPopup.style.setProperty("--top-popup-right-bounding",o.right+"px"),this.elPopup.style.setProperty("--top-popup-bottom-bounding",o.bottom+"px"),this.elPopup.style.setProperty("--top-popup-top",o.top+"px"),this.elPopup.style.setProperty("--top-popup-left",o.left+"px"),this.elPopupInner.style.maxWidth="unset",this.elPopupInner.style.maxHeight="unset";let e=!1,r=!1,l=!1,h=!1,a=o.left>window.innerWidth/2,c=o.top>window.innerHeight/2;t===4&&(a=!a),t===1&&(c=!c);const s=this.elPopupInner.getBoundingClientRect(),u=window.innerWidth-s.right,y=window.innerHeight-s.bottom,d=8;s.top<d&&(e=!0),u<d&&(r=!0),y<d&&(l=!0),s.left<d&&(h=!0),e&&(t===0||t===1)&&c&&(t=3),l&&t===3&&c&&(t=1),r&&t===2&&a&&(t=4),h&&t===4&&a&&(t=2),r&&(t===0||t===1||t===3)&&this.elPopup.classList.add("invert-x"),l&&(t===2||t===4)&&c&&(t===2&&!a&&this.elPopup.classList.add("invert-y"),t===4&&!a&&this.elPopup.classList.add("invert-x"),this.elPopup.matches(".invert-y")||(t=1)),this.elPopup.classList.remove("p0","p1","p2","p3","p4"),this.elPopup.classList.add("p"+t),this.elPopupInner.style.maxWidth="",this.elPopupInner.style.maxHeight="",i.scrollToActive(this.elPopup)}onTouchmove(t){t.currentTarget.scrollWidth>t.currentTarget.offsetWidth||t.target.parentElement.scrollWidth>t.target.parentElement.offsetWidth||t.currentTarget.matches(".has_scroll")||t.preventDefault()}close(){this.isClosed||(this.isClosed=!0,this.$&&this.$.trigger("afterclose.top-menu-popup",[jQuery(this.elPopup)]),!i.noClose&&(this.unmount(),this.elPopup.classList.add("top-popup-wrapper-closed"),setTimeout(()=>{var o,e,r;this.vueClose(),this.options.useOriginal?(this.elPopup.removeAttribute("style"),this.elPopup.classList.remove("top-popup-wrapper-shown","top-popup-wrapper-closed"),this.elPopup.classList.add("template"),this.elStartPosition.append(this.elPopup),(o=this.elPopup.querySelector("div.top-popup_content.top-column"))==null||o.classList.remove("top-column"),(e=this.elPopup.querySelector(".notch-border"))==null||e.remove(),(r=this.elPopup.querySelector(".notch"))==null||r.remove(),this.elPopupInner.replaceWith(...this.elPopupInner.childNodes),n.storageClear(this.elPopup)):(n.storageClear(this.elPopup),this.elPopup.remove(),delete this.elPopup);const t=i.getAllVisible(),p=t.length&&t[t.length-1];p?i.getPopup(p).focus():document.documentElement.classList.remove("with_popup")},300)))}async vueOpen(){var t;await((t=this.vueGetComponent())==null?void 0:t.onOpen(this))}vueClose(){var t;(t=this.vueGetComponent())==null||t.onClose(this)}vueGetComponent(){return i.vueConnectors.get(this.el.dataset.topPopupId)}}b.init(),v.default=m,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
341
|
-
//# sourceMappingURL=popup-
|
|
1
|
+
define(["exports","./forms-1aa30229.amd","../utils/dom.amd","../popup/worker.amd","vue"],function(v,f,r,n,_){"use strict";class g{static componentName="Top";componentName;className;uid;el;options={};unmountEls=[];unmountEvents=[];init(t,p,o){if(!p)throw t+": el is undefined";const e=g.getComponent(p,t);if(e)return e.reInit(o),e;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()}static getComponent(t,p){return r.storage(t,"#"+p)}_setComponent(t){r.storage(t,"#"+this.componentName,this)}mount(){throw"Please, add method mount() to component: "+this.componentName}unmount(){r.storage(this.el,"#"+this.componentName,null),this.unmountEls.forEach(t=>{t.remove()}),this.unmountEls=[],this.unmountEvents.forEach(t=>{t.el.removeEventListener(t.type,t.listener,t.options)}),this.unmountEvents=[]}registerElForUnmount(t){this.unmountEls.push(t)}addEventListenerWithUnmount(t,p,o,e){t.addEventListener(p,o,e),this.registerEventForUnmount(t,p,o,e)}registerEventForUnmount(t,p,o,e){const i={el:t,type:p,listener:o,options:e};this.unmountEvents.push(i)}reInit(t){throw"Please, add method reInit() to component: "+this.componentName}static detach(t){var p;if(t.forEach)t.forEach(o=>{var e;return(e=o.parentElement)==null?void 0:e.removeChild(o)});else{const o=t;(p=o.parentElement)==null||p.removeChild(o)}}}class b{static init(){document.addEventListener("click",this.onclick),document.addEventListener("keydown",this.onkeydown)}static onclick(t){var o;const p=t.target.closest(".closer, a, .a, .top-button");if(p){const e=t.target.closest(".top-popup-wrapper");if(!e||p.matches(".top-popup-noCloser"))return;if(p.getAttribute("href")==="."&&t.preventDefault(),t.target.matches("[data-top-popup]")){const i=t.target.closest("ul"),l=t.target.closest("a, .a");i&&((o=i.querySelector("a.top-active, .a.top-active"))==null||o.classList.remove("top-active")),l&&l.classList.add("top-active");return}n.close(e)}if(t.target.matches(".top-popup-wrapper")){const e=t.target;n.close(e)}}static onkeydown(t){var e;const p=t.target.closest(".top-popup-wrapper");if(!p)return;const o=p.querySelector("ul.top-popup_content");switch(t.key){case"Escape":break;case"Enter":if(!o){if(r.querySelectorVisible(p,".preloader"))break;const u=p.querySelector(".top-popup_footer .go, .top-popup_footer [data-action]");u&&u.click();break}const i=r.querySelectorVisible(p,"li > a.top-active");i&&(t.preventDefault(),location.href=i.getAttribute("href"));const l=p.querySelector("li > .top-active");l&&l.click();break;case"ArrowUp":case"ArrowRight":case"ArrowDown":case"ArrowLeft":if(!o)break;t.key==="ArrowRight"||t.key==="ArrowLeft"?r.querySelectorVisible(p,"ul.top-popup_content > li:not(.top-popup_listTitle):not(.top-popup_listDelimiter) > .top-active > .top-popup_listMore")&&t.preventDefault():t.preventDefault();const h=(e=p.querySelector("ul.top-popup_content > li:not(.top-popup_listTitle):not(.top-popup_listDelimiter) > .top-active"))==null?void 0:e.parentElement;if(t.key==="ArrowRight"&&h){const u=h.querySelector(".top-active > .top-popup_listMore");if(u)return u.click()}const a=r.querySelectorAllVisible(p,"ul.top-popup_content > li:not(.top-popup_listTitle):not(.top-popup_listDelimiter)"),c=a.length;let s=a.indexOf(h);if(t.key==="ArrowUp"||t.key==="ArrowLeft"?s--:s++,t.key==="ArrowLeft"&&s===-1)return t.target.matches("input")?void 0:n.close(p);if(t.key==="ArrowRight"&&s===c)return;s<0&&(s=c-1),s>c-1&&(s=0),p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach(u=>u.classList.remove("top-active")),a[s].querySelector(":scope > a, :scope > .a").classList.add("top-active"),n.scrollToActive(p);break}}}const x=`:root{\r
|
|
2
|
+
--top-popup-background-color: var(--color-bg-3);\r
|
|
3
|
+
--top-popup-background-color-hover: var(--color-steel-150);\r
|
|
4
|
+
--top-popup-background-color-active: var(--color-steel-200);\r
|
|
5
|
+
--top-popup-border-color: var(--color-theme-100);\r
|
|
6
|
+
--top-popup-title-background-color: var(--color-steel-100);\r
|
|
7
|
+
}\r
|
|
8
|
+
\r
|
|
9
|
+
.top-theme-dark{\r
|
|
10
|
+
--top-popup-background-color-hover: var(--color-gray-800);\r
|
|
11
|
+
--top-popup-background-color-active: var(--color-gray-750);\r
|
|
12
|
+
--top-popup-title-background-color: var(--color-gray-900);\r
|
|
13
|
+
}\r
|
|
14
|
+
\r
|
|
15
|
+
.top-popup-front{ position: relative; }\r
|
|
16
|
+
\r
|
|
17
|
+
.top-popup-wrapper{\r
|
|
18
|
+
--top-popup-padding-h: 8px;\r
|
|
19
|
+
--top-popup-padding-v: 8px;\r
|
|
20
|
+
\r
|
|
21
|
+
/* см. recalcPosition() */\r
|
|
22
|
+
--top-popup-height: 0px;\r
|
|
23
|
+
--top-popup-right-bounding: 0px;\r
|
|
24
|
+
--top-popup-bottom-bounding: 0px;\r
|
|
25
|
+
--top-popup-top: 0px;\r
|
|
26
|
+
--top-popup-right: calc(100vw - var(--top-popup-right-bounding));\r
|
|
27
|
+
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));\r
|
|
28
|
+
--top-popup-left: 0px;\r
|
|
29
|
+
\r
|
|
30
|
+
text-align: initial; white-space: normal; word-break: normal;\r
|
|
31
|
+
position: absolute; z-index: 200000;\r
|
|
32
|
+
}\r
|
|
33
|
+
.top-popup-wrapper:not(.top-popup-wrapper-shown){ overflow: hidden; }\r
|
|
34
|
+
\r
|
|
35
|
+
/* top-popupPanel */\r
|
|
36
|
+
.top-popupPanel {\r
|
|
37
|
+
cursor: default;\r
|
|
38
|
+
box-shadow: var(--top-shadow-b);\r
|
|
39
|
+
border-radius: 8px;\r
|
|
40
|
+
background: var(--top-popup-background-color);\r
|
|
41
|
+
position: absolute; overflow: hidden;\r
|
|
42
|
+
display: flex; flex-direction: column;\r
|
|
43
|
+
}\r
|
|
44
|
+
\r
|
|
45
|
+
/* position */\r
|
|
46
|
+
.top-popup-wrapper > *{ opacity: 0; transition: opacity 100ms linear, transform 100ms linear; }\r
|
|
47
|
+
.top-popup-wrapper.p0 > *{ transform: translateY(-8px); }\r
|
|
48
|
+
.top-popup-wrapper.p1 > *{ transform: translateY(8px); }\r
|
|
49
|
+
.top-popup-wrapper.p2 > *{ transform: translateX(8px); }\r
|
|
50
|
+
.top-popup-wrapper.p3 > *{ transform: translateY(8px); }\r
|
|
51
|
+
.top-popup-wrapper.p4 > *{ transform: translateX(-8px); }\r
|
|
52
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > *{opacity: 1;transform: translate(0, 0) !important;}\r
|
|
53
|
+
\r
|
|
54
|
+
.top-popup-wrapper.p0 > .top-popup{ top: calc(-16px); left: calc(0px - var(--top-popup-padding-h)); }\r
|
|
55
|
+
.top-popup-wrapper.p1 > .top-popup{ bottom: calc(100% + 8px); }\r
|
|
56
|
+
.top-popup-wrapper.p2 > .top-popup{ left: calc(100% + 8px); }\r
|
|
57
|
+
.top-popup-wrapper.p3 > .top-popup{ top: calc(100% + 8px); }\r
|
|
58
|
+
.top-popup-wrapper.p4 > .top-popup{ right: calc(100% + 8px); }\r
|
|
59
|
+
.top-popup-wrapper.p2 > .top-popup,\r
|
|
60
|
+
.top-popup-wrapper.p4 > .top-popup{ margin-top: -10px; }\r
|
|
61
|
+
\r
|
|
62
|
+
.top-popup-wrapper.p1.with_notch > .top-popup{ margin-bottom: 5px; }\r
|
|
63
|
+
.top-popup-wrapper.p2.with_notch > .top-popup{ margin-left: 5px; }\r
|
|
64
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-top: 5px; }\r
|
|
65
|
+
.top-popup-wrapper.p4.with_notch > .top-popup{ margin-right: 5px; }\r
|
|
66
|
+
\r
|
|
67
|
+
.top-popup-wrapper.invert-x > .top-popup{ right: 0; }\r
|
|
68
|
+
.top-popup-wrapper.invert-y > .top-popup{ bottom: 0; }\r
|
|
69
|
+
\r
|
|
70
|
+
/* notch */\r
|
|
71
|
+
.top-popup-wrapper > .notch{ border: 7.4px solid transparent; position: absolute; display: block; }\r
|
|
72
|
+
\r
|
|
73
|
+
.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% }\r
|
|
74
|
+
.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%; }\r
|
|
75
|
+
.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%; }\r
|
|
76
|
+
.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%; }\r
|
|
77
|
+
\r
|
|
78
|
+
.top-popup-wrapper.p1 > .notch-border{ border-top-color: rgba(0,0,0,0.05); margin-bottom: 6px; }\r
|
|
79
|
+
.top-popup-wrapper.p2 > .notch-border{ border-right-color: rgba(0,0,0,0.05); margin-left: 6px; }\r
|
|
80
|
+
.top-popup-wrapper.p3 > .notch-border{ border-bottom-color: rgba(0,0,0,0.05); margin-top: 6px; }\r
|
|
81
|
+
.top-popup-wrapper.p4 > .notch-border{ border-left-color: rgba(0,0,0,0.05); margin-right: 6px; }\r
|
|
82
|
+
\r
|
|
83
|
+
/* common */\r
|
|
84
|
+
.top-popup_header,\r
|
|
85
|
+
.top-popup_content,\r
|
|
86
|
+
.top-popup_footer{ padding: var(--top-popup-padding-h) var(--top-popup-padding-h); font-size: 14px; }\r
|
|
87
|
+
.top-popup_header,\r
|
|
88
|
+
.top-popup_footer{ display: flex; align-items: center; justify-content: space-between; }\r
|
|
89
|
+
\r
|
|
90
|
+
/* header */\r
|
|
91
|
+
.top-popup_header{ border-bottom: 1px solid var(--top-popup-border-color); font-weight: 600; }\r
|
|
92
|
+
.top-popup_header > *{ font-weight: 400; }\r
|
|
93
|
+
.top-popup_header > .a{ cursor: pointer; color: var(--color-blue-450); }\r
|
|
94
|
+
.top-popup_header > .a:hover{ color: var(--color-blue-350); }\r
|
|
95
|
+
\r
|
|
96
|
+
.top-popup_headerButton{ width: 60px; }\r
|
|
97
|
+
\r
|
|
98
|
+
/* content */\r
|
|
99
|
+
.top-popup .top-popup_content{\r
|
|
100
|
+
/* has_scroll */\r
|
|
101
|
+
--scroll-padding-top: var(--top-popup-padding-v);\r
|
|
102
|
+
--scroll-padding-bottom: var(--top-popup-padding-v);\r
|
|
103
|
+
\r
|
|
104
|
+
padding-top: var(--top-popup-padding-v); padding-bottom: var(--top-popup-padding-v); margin: 0; line-height:1.3 !important;\r
|
|
105
|
+
flex-grow: 1; overflow-y: auto;\r
|
|
106
|
+
-webkit-overflow-scrolling: touch;\r
|
|
107
|
+
}\r
|
|
108
|
+
\r
|
|
109
|
+
.top-popup .top-popup_content .top-unwrap{\r
|
|
110
|
+
--top-unwrap-x: var(--top-popup-padding-h);\r
|
|
111
|
+
}\r
|
|
112
|
+
\r
|
|
113
|
+
.top-popup div.top-popup_content{ display: flex; flex-direction: column; gap: 4px; }\r
|
|
114
|
+
.top-popup div.top-popup_content > *{ flex-shrink: 0; }\r
|
|
115
|
+
.top-popup div.top-popup_content > .top-button{ margin: 0; }\r
|
|
116
|
+
\r
|
|
117
|
+
.top-popup ul.top-popup_content{\r
|
|
118
|
+
--scroll-padding-top: 4px;\r
|
|
119
|
+
--scroll-padding-bottom: var(--scroll-padding-top);\r
|
|
120
|
+
\r
|
|
121
|
+
padding: var(--scroll-padding-top) 0;\r
|
|
122
|
+
}\r
|
|
123
|
+
\r
|
|
124
|
+
ul.top-popup_content li{ margin: 0; list-style:none; display: flex; position: relative }\r
|
|
125
|
+
ul.top-popup_content li > *{ flex-grow: 1; }\r
|
|
126
|
+
ul.top-popup_content li > a:not(.top-button),\r
|
|
127
|
+
ul.top-popup_content li > i.a{\r
|
|
128
|
+
cursor: pointer;\r
|
|
129
|
+
box-sizing: border-box;\r
|
|
130
|
+
background: var(--top-popup-background-color); padding:var(--top-popup-padding-v) var(--top-popup-padding-h);\r
|
|
131
|
+
color:var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration:none !important; font-style: normal;\r
|
|
132
|
+
display:flex; flex: 1 1 100%; align-items: center;\r
|
|
133
|
+
transition: background-color 0.1s ease-in-out;\r
|
|
134
|
+
}\r
|
|
135
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button),\r
|
|
136
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > i.a{ transition: none; }\r
|
|
137
|
+
\r
|
|
138
|
+
ul.top-popup_content li > a:not(.top-button):hover,\r
|
|
139
|
+
ul.top-popup_content li > i.a:hover{ background: var(--top-popup-background-color-hover); }\r
|
|
140
|
+
ul.top-popup_content li > a:not(.top-button).top-active,\r
|
|
141
|
+
ul.top-popup_content li > i.a.top-active{ background: var(--top-popup-background-color-active); }\r
|
|
142
|
+
\r
|
|
143
|
+
/* listTitle */\r
|
|
144
|
+
li.top-popup_listTitle{\r
|
|
145
|
+
background: var(--top-popup-title-background-color); padding: var(--top-popup-padding-v) var(--top-popup-padding-h);\r
|
|
146
|
+
color: var(--color-text-3); font-size: 12px; font-weight: 400;\r
|
|
147
|
+
}\r
|
|
148
|
+
li.top-popup_listTitle:first-child{\r
|
|
149
|
+
padding-top: calc(var(--top-popup-padding-v) + var(--scroll-padding-top));\r
|
|
150
|
+
margin-top: calc(0px - var(--scroll-padding-top));\r
|
|
151
|
+
}\r
|
|
152
|
+
\r
|
|
153
|
+
/* listDelimiter */\r
|
|
154
|
+
ul.top-popup_content li.top-popup_listDelimiter{\r
|
|
155
|
+
border-radius: 3px;\r
|
|
156
|
+
background: var(--top-popup-border-color);\r
|
|
157
|
+
height: 2px;\r
|
|
158
|
+
margin: calc(var(--top-popup-padding-h) / 2) var(--top-popup-padding-h);\r
|
|
159
|
+
}\r
|
|
160
|
+
\r
|
|
161
|
+
/* listMore */\r
|
|
162
|
+
ul.top-popup_content li > i.a.top-popup_listMore{\r
|
|
163
|
+
height: auto; padding-right: 4px; padding-left: 4px;\r
|
|
164
|
+
font-size: 24px; line-height: 17px; text-align: center;\r
|
|
165
|
+
flex-basis: 10px;\r
|
|
166
|
+
}\r
|
|
167
|
+
ul.top-popup_content li > i.a.top-popup_listMore:before{ color: var(--color-gray-500); }\r
|
|
168
|
+
ul.top-popup_content li > * > i.top-popup_listMore{\r
|
|
169
|
+
padding: 0 var(--top-popup-padding-h); margin: 0 0 0 auto;\r
|
|
170
|
+
color: var(--color-gray-500);\r
|
|
171
|
+
font-size: 14px;\r
|
|
172
|
+
}\r
|
|
173
|
+
ul.top-popup_content li > * > i.top-popup_listMore:hover,\r
|
|
174
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ color: var(--color-blue-500); }\r
|
|
175
|
+
ul.top-popup_content li > * > i.top-popup_listMore:before{ transform: rotate(90deg); }\r
|
|
176
|
+
\r
|
|
177
|
+
ul.top-popup_content li a.close{ background: none !important; }\r
|
|
178
|
+
\r
|
|
179
|
+
/* data-top-icon */\r
|
|
180
|
+
.top-popup_content > [data-top-icon]:before{ --top-icon-size: 20px; }\r
|
|
181
|
+
\r
|
|
182
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button):before{\r
|
|
183
|
+
--top-icon-color: var(--color-text-3);\r
|
|
184
|
+
--top-icon-size: 20px;\r
|
|
185
|
+
--top-icon-width: 20px;\r
|
|
186
|
+
\r
|
|
187
|
+
height: 1rem; margin-right: 8px; transition: color 0.1s;\r
|
|
188
|
+
}\r
|
|
189
|
+
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button):before,\r
|
|
190
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button).top-active:before{\r
|
|
191
|
+
--top-icon-color: #378DC6;\r
|
|
192
|
+
}\r
|
|
193
|
+
\r
|
|
194
|
+
/* footer */\r
|
|
195
|
+
.top-popup_footer{\r
|
|
196
|
+
padding: var(--top-popup-padding-h) var(--top-popup-padding-h); display: flex; gap:8px; justify-content: flex-end;\r
|
|
197
|
+
}\r
|
|
198
|
+
.top-popup_footer > .top-button{ margin: 0; }\r
|
|
199
|
+
\r
|
|
200
|
+
/* Виджеты */\r
|
|
201
|
+
.top-popup > [data-widget]{ padding: 0 var(--top-popup-padding-h); }\r
|
|
202
|
+
.top-popup > [data-widget] + hr{ margin: 0 var(--top-popup-padding-h); }\r
|
|
203
|
+
\r
|
|
204
|
+
.top-popup .placeholder{\r
|
|
205
|
+
border:1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background:#F9F9F9 !important; margin: -1px 0; z-index: 1;\r
|
|
206
|
+
position: relative;\r
|
|
207
|
+
}\r
|
|
208
|
+
\r
|
|
209
|
+
/* компоненты */\r
|
|
210
|
+
.top-popup-wrapper.simple_list > .top-popup{ min-width: 0; white-space: nowrap; }\r
|
|
211
|
+
\r
|
|
212
|
+
.top-popup_content .top-column{ display: flex; flex-direction: column; gap: 4px; }\r
|
|
213
|
+
.top-popup_content li > :not(a):not(.a){ margin:0 var(--top-popup-padding-h); }\r
|
|
214
|
+
html .top-popup .top-popup_content li > .top-button{ margin:calc(var(--top-popup-padding-v) / 2) var(--top-popup-padding-h); }\r
|
|
215
|
+
\r
|
|
216
|
+
.top-popup li .check_all,\r
|
|
217
|
+
.top-popup li .clear_all{ cursor: pointer; color: var(--color-cyan); padding: 8px; display: inline-block; }\r
|
|
218
|
+
.top-popup li .check_all:hover,\r
|
|
219
|
+
.top-popup li .clear_all:hover{ text-decoration: underline; }\r
|
|
220
|
+
.top-popup li .clear_all{ display: none; }\r
|
|
221
|
+
\r
|
|
222
|
+
/* table */\r
|
|
223
|
+
.top-popup_content table{ margin: -9px 0; }\r
|
|
224
|
+
.top-popup_content table td,\r
|
|
225
|
+
.top-popup_content table th{ padding: 9px var(--top-popup-padding-h) 9px 0; vertical-align: top; }\r
|
|
226
|
+
.top-popup_content table th{ width: 40%; font-weight: 600; white-space: nowrap; }\r
|
|
227
|
+
\r
|
|
228
|
+
/* формы */\r
|
|
229
|
+
ul.top-popup_content .a > [type="checkbox"],\r
|
|
230
|
+
ul.top-popup_content .a > [type="radio"]{ margin: -8px 0 -8px auto; }\r
|
|
231
|
+
\r
|
|
232
|
+
/* deprecated */\r
|
|
233
|
+
ul.top-popup_content a > [class*=icon],\r
|
|
234
|
+
ul.top-popup_content i.a > [class*=icon]{\r
|
|
235
|
+
margin-right: 14px; text-align: center;\r
|
|
236
|
+
width: auto; height: 16px; font-size: 16px; vertical-align: top;\r
|
|
237
|
+
transition: 0.1s;\r
|
|
238
|
+
}\r
|
|
239
|
+
\r
|
|
240
|
+
.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
|
|
241
|
+
.top-popup_footer [class*=btn]:not(.btn-transparent){ min-width: 100px; padding: 5px 14px; margin-left: 10px; }\r
|
|
242
|
+
.top-popup_footer [class*=btn]:first-child{ margin-left: 0; }\r
|
|
243
|
+
.top-popup_footer .btn.full_width{ margin: 0; flex-grow: 1; }`,P=`html.with_popup{ background: #808080; }\r
|
|
244
|
+
\r
|
|
245
|
+
.top-popup-wrapper{\r
|
|
246
|
+
--top-popup-padding-h: 19px;\r
|
|
247
|
+
--top-popup-padding-v: 16px;\r
|
|
248
|
+
--top-popup-footer-offset: 25px;\r
|
|
249
|
+
\r
|
|
250
|
+
width: auto !important; height: auto !important;\r
|
|
251
|
+
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden;\r
|
|
252
|
+
transition: background 0.3s;\r
|
|
253
|
+
}\r
|
|
254
|
+
\r
|
|
255
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){ background: rgba(0,0,0,0.5); backdrop-filter: blur(1px); }\r
|
|
256
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup{ opacity: 1 !important; }\r
|
|
257
|
+
\r
|
|
258
|
+
.top-popup{\r
|
|
259
|
+
border-radius: 8px 8px 0 0; width: auto !important; max-height: calc(100% - var(--header-height) - 12px);\r
|
|
260
|
+
top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important;\r
|
|
261
|
+
display: flex; flex-direction: column;\r
|
|
262
|
+
\r
|
|
263
|
+
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%) */\r
|
|
264
|
+
transform: translateY(80%);\r
|
|
265
|
+
\r
|
|
266
|
+
transition: opacity 0.3s, transform 0.3s;\r
|
|
267
|
+
}\r
|
|
268
|
+
\r
|
|
269
|
+
/* from top */\r
|
|
270
|
+
.top-popup-wrapper.p-from-top{\r
|
|
271
|
+
--top-popup-footer-offset: 0px;\r
|
|
272
|
+
\r
|
|
273
|
+
top: var(--header-height) !important;\r
|
|
274
|
+
}\r
|
|
275
|
+
.with_dialog .top-popup-wrapper.p-from-top{ top: 50px !important; }\r
|
|
276
|
+
.top-popup-wrapper.p-from-top > .top-popup{\r
|
|
277
|
+
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important;\r
|
|
278
|
+
transform: translateY(calc(-100% - 24px));\r
|
|
279
|
+
}\r
|
|
280
|
+
\r
|
|
281
|
+
.top-popup_content:last-child,\r
|
|
282
|
+
.top-popup_footer{\r
|
|
283
|
+
--scroll-padding-bottom: calc(var(--top-popup-padding-v) + var(--top-popup-footer-offset));\r
|
|
284
|
+
\r
|
|
285
|
+
padding-bottom: var(--scroll-padding-bottom);\r
|
|
286
|
+
}\r
|
|
287
|
+
\r
|
|
288
|
+
/* content */\r
|
|
289
|
+
ul.top-popup_content{\r
|
|
290
|
+
--scroll-padding-top: 0px;\r
|
|
291
|
+
--scroll-padding-bottom: var(--scroll-padding-top);\r
|
|
292
|
+
\r
|
|
293
|
+
display: flex; flex-direction: column;\r
|
|
294
|
+
}\r
|
|
295
|
+
ul.top-popup_content li:not(:last-child){ border-bottom: 1px solid var(--top-popup-border-color); }\r
|
|
296
|
+
\r
|
|
297
|
+
.top-popup-wrapper.top-style_alt > .top-popup > ul > li{ border-bottom: none; }\r
|
|
298
|
+
\r
|
|
299
|
+
/* footer */\r
|
|
300
|
+
.top-popup_footer{ flex-wrap: wrap; }\r
|
|
301
|
+
.top-popup_footer > .top-button{\r
|
|
302
|
+
--top-forms-base-height: var(--top-forms-base-height_xl);\r
|
|
303
|
+
\r
|
|
304
|
+
flex-grow: 1;\r
|
|
305
|
+
}\r
|
|
306
|
+
\r
|
|
307
|
+
/* listTitle */\r
|
|
308
|
+
ul.top-popup_content li.top-popup_listTitle{\r
|
|
309
|
+
--top-popup-padding-v: 12px;\r
|
|
310
|
+
}\r
|
|
311
|
+
\r
|
|
312
|
+
/* listDelimiter */\r
|
|
313
|
+
ul.top-popup_content li.top-popup_listDelimiter{ border-radius: 0; border-bottom: none; height: 2px; margin: 0; }`,w=`html:not(.with_dialog){ margin-right: 0 !important; }\r
|
|
314
|
+
\r
|
|
315
|
+
.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
|
|
316
|
+
.top-popup-wrapper.invert-x > .top-popup{ max-width: calc(100vw - var(--top-popup-right) - 16px); }\r
|
|
317
|
+
.top-popup-wrapper.invert-y > .top-popup{ max-height: calc(100vh - var(--top-popup-bottom) - 16px); }\r
|
|
318
|
+
\r
|
|
319
|
+
/* position */\r
|
|
320
|
+
.top-popup-wrapper.p1 > .top-popup{ max-height: calc(var(--top-popup-top) - var(--header-height) - 16px); }\r
|
|
321
|
+
.top-popup-wrapper.p3 > .top-popup{ max-height: calc(var(--top-popup-bottom) - 16px); }\r
|
|
322
|
+
.top-popup-wrapper.p2 > .top-popup{ max-width: calc(var(--top-popup-right) - 16px); }\r
|
|
323
|
+
.top-popup-wrapper.p4 > .top-popup{ max-width: calc(var(--top-popup-left) - 16px); }\r
|
|
324
|
+
\r
|
|
325
|
+
/* notch */\r
|
|
326
|
+
.top-popup-wrapper.p1.with_notch > .top-popup,\r
|
|
327
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-left: -16px !important; }\r
|
|
328
|
+
.top-popup-wrapper.p1.with_notch > .notch,\r
|
|
329
|
+
.top-popup-wrapper.p3.with_notch > .notch{ margin-left: -8px !important; }\r
|
|
330
|
+
\r
|
|
331
|
+
.top-popup-wrapper.p1.with_notch.invert-x,\r
|
|
332
|
+
.top-popup-wrapper.p3.with_notch.invert-x{ margin-left: 3px !important; }\r
|
|
333
|
+
.top-popup-wrapper.p1.with_notch.invert-x > .notch,\r
|
|
334
|
+
.top-popup-wrapper.p3.with_notch.invert-x > .notch{ margin-left: -9px !important; }\r
|
|
335
|
+
\r
|
|
336
|
+
/* listMore */\r
|
|
337
|
+
ul.top-popup_content li > * > i.top-popup_listMore{ visibility: hidden; transition: none; }\r
|
|
338
|
+
ul.top-popup_content li:hover > * > i.top-popup_listMore,\r
|
|
339
|
+
ul.top-popup_content li > *.top-active > i.top-popup_listMore,\r
|
|
340
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ visibility: visible; }`;f.Core.appendStyle(x),f.Core.appendStyle(P,"m"),f.Core.appendStyle(w,"pc");class m extends g{static componentName="Popup";el;elActiveByDefault;elPopup;elPopupInner;elPopupHeader;elPopupBody;elPopupFooter;elFront;popupParent;$;elStartPosition;shift={top:0,left:0};isClosed=!1;isFirstClick=!0;type;options={popup:"",p:0,notch:!1,class:"",posBy:"left",frontSelector:"",invertX:!1,openByHover:!1,useOriginal:!1,isFullScreen:!1,i18n:{}};events={};constructor(t,p){return super(),this.init(m.componentName,t,p)}async mount(){const t=this.vueGetComponent();if(this.popupParent=n.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)this.type="vue",this.options.popup="",this.elPopup=r.genEl("div",{},this.options.popup);else if(this.options.popup.match(/^[#.]/))this.type="selector",this.elPopup=document.querySelector(`${this.options.popup}.template`);else{if(this.type="html",this.options.useOriginal)throw"Option useOriginal not allowed for text templates";this.elPopup=r.genEl("div",{},this.options.popup)}if(!this.elPopup||t!=null&&t.opened){if(this.options.useOriginal||t!=null&&t.opened){if(t!=null&&t.opened?this.elPopup=t.popup.elPopup:this.elPopup=document.querySelector(`${this.options.popup}.top-popup-wrapper-shown`),this.elPopup){this.el.dataset.topPopupOpened="",this.elActiveByDefault||this.el.classList.remove("top-active"),n.close(this.elPopup),setTimeout(()=>this.mount(),300);return}throw"Option useOriginal state allowed only elements .template"}this.elPopup=document.querySelector(`${this.options.popup}:not(.top-popup-wrapper)`)}if(!this.elPopup)return;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(e=>e.dataset.topPopupPosBy="fixed"),r.querySelectorAllArray(this.elPopup,".top-popup-wrapper").forEach(e=>e.remove()))),n.decoratorBeforeOpen(this),t&&(this.options.class=t.classRef.value),this.elPopupInner=document.createElement("div"),this.elPopupInner.classList.add("top-popupPanel","top-popup");this.elPopup.firstChild;)this.elPopupInner.appendChild(this.elPopup.firstChild);if(this.elPopup.append(this.elPopupInner),this.elPopup.classList.add("top-popup-wrapper"),this.options.class){const e=this.options.class.split(" ");this.elPopup.classList.add(...e)}this.options.notch&&(this.elPopup.classList.add("with_notch"),this.elPopup.insertAdjacentHTML("beforeend",'<i class="notch notch-border"></i><i class="notch"></i>')),await this.vueOpen(),this.elPopupHeader=this.elPopupInner.querySelector(".top-popup_header"),this.elPopupBody=this.elPopupInner.querySelector(".top-popup_content"),this.elPopupFooter=this.elPopupInner.querySelector(".top-popup_footer");const p=!!this.elPopup.querySelector('[data-widget="search"]');this.options.isFullScreen&&!p&&(this.elPopupHeader||(this.elPopupHeader=r.genEl("i",{class:"top-popup_header"}),this.elPopupInner.prepend(this.elPopupHeader),this.elPopupHeader.prepend(r.genEl("i",{class:"a closer"},this.options.i18n.Close)),this.elPopupHeader.append(r.genEl("i",{class:"top-popup_headerButton"})))),r.storage(this.elPopup,"Popup",this),this.options.frontSelector&&(this.elFront=document.querySelector(this.options.frontSelector)),this.elFront||(this.elFront=this.el.closest(".top-popup-front")),this.elFront||(this.elFront=document.body),this.elPopup.style.width=this.el.offsetWidth+"px",this.elPopup.style.height=this.el.offsetHeight+"px",this.elPopup.style.top=this.el.offsetTop+"px",this.elPopup.style.right=parseInt(this.el.style.right||0)+"px",this.elPopup.style.bottom=parseInt(this.el.style.bottom||0)+"px",this.el.parentElement.insertBefore(this.elPopup,this.el),this.elPopup.classList.remove("template"),this.options.invertX&&this.elPopup.classList.add("invert-x");let o=!!this.el.closest(".modal-header");o||(o=!!this.el.closest("#top_panel")),o||(o=!!this.el.closest("#secondmenu")),o&&this.elPopup.classList.add("p-from-top"),setTimeout(()=>this.elPopup.classList.add("top-popup-wrapper-shown")),this.elFront&&!this.elFront.matches("body")&&(this.elFront.append(this.elPopup),this.shift.top=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.style.top=parseInt(this.elPopup.style.top||"0")+this.shift.top+"px",this.elPopup.style.left=parseInt(this.elPopup.style.left||"0")+this.shift.left+"px"),this.$&&this.$.trigger("aftershow.top-menu-popup",[jQuery(this.elPopup)]),this.recalcPosition(),this.elPopup.setAttribute("tabindex",0),this.focus(),n.decoratorAfterOpen(this),this.mountEvents()}async mountJQuery(){typeof jQuery=="function"&&(this.$=jQuery(this.el))}focus(){let 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.focus()}mountEvents(){this.addEventListenerWithUnmount(document,"mousedown",t=>this.onMousedown(t)),this.addEventListenerWithUnmount(this.elPopup,"focus",t=>this.onFocus(t)),this.options.openByHover&&(this.addEventListenerWithUnmount(this.elPopup,"mouseleave",t=>this.onMouseleave(t)),this.addEventListenerWithUnmount(this.elPopupInner,"mouseleave",t=>this.onMouseleave(t))),this.options.isFullScreen&&this.addEventListenerWithUnmount(this.elPopupBody,"touchmove",t=>this.onTouchmove(t))}onMousedown(t){if(!this.elPopup||!this.isFirstClick||(this.isFirstClick=!1,setTimeout(()=>this.isFirstClick=!0),t.button!==0))return;let p=r.querySelectorVisibleLast(document.body,":scope > .top-popup-wrapper");p&&p!==this.elPopup||(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")||n.decoratorIsIgnoreOuterClick(t)||n.close(this.elPopup)))}onFocus(t){if(t.target.matches("input")||this.isClosed)return;n.getAllVisible().forEach(o=>{var e,i,l;this.elPopup.contains(o)||((e=this.popupParent)==null?void 0:e.elPopup)===o||((l=(i=this.popupParent)==null?void 0:i.popupParent)==null?void 0:l.elPopup)===o||n.close(o)})}onMouseleave(t){setTimeout(()=>{this.elPopupInner.matches(":hover")||n.close(this.elPopup)},100)}onResize(){this.elPopup.parentElement!==document.body&&document.body.append(this.elPopup),this.elPopup.style.top=r.offset(this.el).top+"px",this.elPopup.style.left=r.offset(this.el).left+"px"}unmount(){super.unmount(),this.el.dataset.topPopupOpened="",this.elActiveByDefault||this.el.classList.remove("top-active");let t=this.el.getAttribute("style");t&&(t=t.replace(/position:[^;]*;?/g,""),this.el.setAttribute("style",t))}recalcPosition(){let t=this.options.p,p;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){case"left":p=this.el.offsetLeft+parseInt(this.el.style["margin-left"]||0),p+=this.shift.left,this.elPopup.style.left=p+"px";break;case"right":p=this.el.offsetLeft+parseInt(this.el.style["margin-left"]||0),this.elPopup.style.right=this.el.offsetParent.offsetWidth-this.el.offsetWidth-p+"px";break;case"fixed":this.addEventListenerWithUnmount(window,"resize",()=>this.onResize()),this.onResize();break;default:this.options.posBy.append(this.elPopup)}const o=this.elPopup.getBoundingClientRect();this.elPopup.style.setProperty("--top-popup-height",this.elPopup.offsetHeight+"px"),this.elPopup.style.setProperty("--top-popup-right-bounding",o.right+"px"),this.elPopup.style.setProperty("--top-popup-bottom-bounding",o.bottom+"px"),this.elPopup.style.setProperty("--top-popup-top",o.top+"px"),this.elPopup.style.setProperty("--top-popup-left",o.left+"px"),this.elPopupInner.style.maxWidth="unset",this.elPopupInner.style.maxHeight="unset";let e=!1,i=!1,l=!1,h=!1,a=o.left>window.innerWidth/2,c=o.top>window.innerHeight/2;t===4&&(a=!a),t===1&&(c=!c);const s=this.elPopupInner.getBoundingClientRect(),u=window.innerWidth-s.right,y=window.innerHeight-s.bottom,d=8;s.top<d&&(e=!0),u<d&&(i=!0),y<d&&(l=!0),s.left<d&&(h=!0),e&&(t===0||t===1)&&c&&(t=3),l&&t===3&&c&&(t=1),i&&t===2&&a&&(t=4),h&&t===4&&a&&(t=2),i&&(t===0||t===1||t===3)&&this.elPopup.classList.add("invert-x"),l&&(t===2||t===4)&&c&&(t===2&&!a&&this.elPopup.classList.add("invert-y"),t===4&&!a&&this.elPopup.classList.add("invert-x"),this.elPopup.matches(".invert-y")||(t=1)),this.elPopup.classList.remove("p0","p1","p2","p3","p4"),this.elPopup.classList.add("p"+t),this.elPopupInner.style.maxWidth="",this.elPopupInner.style.maxHeight="",n.scrollToActive(this.elPopup)}onTouchmove(t){t.currentTarget.scrollWidth>t.currentTarget.offsetWidth||t.target.parentElement.scrollWidth>t.target.parentElement.offsetWidth||t.currentTarget.matches(".has_scroll")||t.preventDefault()}close(){this.isClosed||(this.isClosed=!0,this.$&&this.$.trigger("afterclose.top-menu-popup",[jQuery(this.elPopup)]),!n.noClose&&(this.unmount(),this.elPopup.classList.add("top-popup-wrapper-closed"),setTimeout(()=>{var o,e,i;this.vueClose(),this.options.useOriginal?(this.elPopup.removeAttribute("style"),this.elPopup.classList.remove("top-popup-wrapper-shown","top-popup-wrapper-closed"),this.elPopup.classList.add("template"),this.elStartPosition.append(this.elPopup),(o=this.elPopup.querySelector("div.top-popup_content.top-column"))==null||o.classList.remove("top-column"),(e=this.elPopup.querySelector(".notch-border"))==null||e.remove(),(i=this.elPopup.querySelector(".notch"))==null||i.remove(),this.elPopupInner.replaceWith(...this.elPopupInner.childNodes),r.storageClear(this.elPopup)):(r.storageClear(this.elPopup),this.elPopup.remove(),delete this.elPopup);const t=n.getAllVisible(),p=t.length&&t[t.length-1];p?n.getPopup(p).focus():document.documentElement.classList.remove("with_popup")},300)))}async vueOpen(){var t;await((t=this.vueGetComponent())==null?void 0:t.onOpen(this))}vueClose(){var t;(t=this.vueGetComponent())==null||t.onClose(this)}vueGetComponent(){return n.vueConnectors.get(this.el.dataset.topPopupId)}}b.init(),v.default=m,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
341
|
+
//# sourceMappingURL=popup-604c0a49.amd.js.map
|