@topvisor/ui 0.0.43 → 0.9.2
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-32bc8bd9.es.js +275 -0
- package/.chunks/datepicker-32bc8bd9.es.js.map +1 -0
- package/.chunks/datepicker-8a42d8a6.amd.js +234 -0
- package/.chunks/datepicker-8a42d8a6.amd.js.map +1 -0
- package/.chunks/forms-30d68077.amd.js +3 -0
- package/.chunks/forms-30d68077.amd.js.map +1 -0
- package/.chunks/forms-64632f73.es.js +1091 -0
- package/.chunks/forms-64632f73.es.js.map +1 -0
- package/.chunks/{popup-de28e508.amd.js → popup-14ca85cf.amd.js} +378 -377
- package/.chunks/popup-14ca85cf.amd.js.map +1 -0
- package/.chunks/{popup-a622fe31.es.js → popup-b2fe3094.es.js} +439 -429
- package/.chunks/popup-b2fe3094.es.js.map +1 -0
- package/README.md +80 -80
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/tabsView.css +1 -0
- package/core/core.amd.js +1 -1
- package/core/core.d.ts +2 -2
- 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 +1 -1
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2945
- package/icomoon/fonts/Topvisor-2.svg +232 -232
- package/icomoon/style.css +647 -647
- package/package.json +19 -19
- package/popup/popup.amd.js +1 -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 +13 -10
- package/popup/worker.js.map +1 -1
- package/src/components/tabsView/tabsView/_MenuItem.stories.d.ts +361 -0
- package/src/components/tabsView/tabsView/_MenuTitle.stories.d.ts +280 -0
- package/src/components/tabsView/tabsView/content.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/menu.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +2 -0
- package/src/components/tabsView/tabsView/menuItem.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/state.d.ts +14 -0
- package/src/components/tabsView/tabsView/tabsView.d.ts +69 -0
- package/src/components/tabsView/tabsView/tabsView.stories.d.ts +529 -0
- package/src/components/tabsView/tabsView/tabsView.vue.d.ts +38 -0
- package/src/components/tabsView/tabsView.d.ts +4 -0
- package/src/core/utils/date.d.ts +25 -27
- package/src/core/utils/device.d.ts +10 -13
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +1 -1
- package/tabsView/tabsView.amd.js +2 -0
- package/tabsView/tabsView.amd.js.map +1 -0
- package/tabsView/tabsView.d.ts +1 -0
- package/tabsView/tabsView.js +271 -0
- package/tabsView/tabsView.js.map +1 -0
- package/utils/date.amd.js +1 -1
- package/utils/date.d.ts +0 -2
- package/utils/date.js +5 -2
- package/utils/device.amd.js +1 -1
- package/utils/device.d.ts +0 -2
- package/utils/device.js +7 -2
- package/utils/dom.amd.js +1 -1
- package/utils/dom.d.ts +2 -2
- package/utils/dom.js +1 -1
- package/.chunks/datepicker-92744062.es.js +0 -275
- package/.chunks/datepicker-92744062.es.js.map +0 -1
- package/.chunks/datepicker-a9226b0f.amd.js +0 -234
- package/.chunks/datepicker-a9226b0f.amd.js.map +0 -1
- package/.chunks/forms-727cc6aa.es.js +0 -1112
- package/.chunks/forms-727cc6aa.es.js.map +0 -1
- package/.chunks/forms-771091d4.amd.js +0 -3
- package/.chunks/forms-771091d4.amd.js.map +0 -1
- package/.chunks/popup-a622fe31.es.js.map +0 -1
- package/.chunks/popup-de28e508.amd.js.map +0 -1
- package/build/cssModules.d.ts +0 -13
- package/build/plugin/amdFix.d.ts +0 -8
- package/build/plugin/autoloadCSS.d.ts +0 -19
- package/build/rollup.config.d.ts +0 -15
- package/src/components/component.d.ts +0 -25
- package/src/components/helpersStories.d.ts +0 -28
- package/src/core/base/Colors.stories.d.ts +0 -19
- package/src/core/base/Layout.stories.d.ts +0 -19
- package/src/core/base/Properties.stories.d.ts +0 -19
- package/src/core/directives/tooltip.d.ts +0 -7
- package/src/core/theme/Colors.stories.d.ts +0 -19
- package/src/core/theme/Properties.stories.d.ts +0 -19
- package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.stories.d.ts" +0 -6
- package/src/d.d.ts +0 -4
- package/src/resources/styles/core/core.d.ts +0 -0
- package/src/resources/styles/themes/dark.d.ts +0 -0
- package/src/resources/styles/themes/light.d.ts +0 -0
- package/src/storybook/components/icomoon.d.ts +0 -2
|
@@ -1,377 +1,378 @@
|
|
|
1
|
-
define(["require","exports","./forms-
|
|
2
|
-
--top-popup-background-color: var(--color-bg-3)
|
|
3
|
-
--top-popup-background-color-hover: var(--color-theme-75)
|
|
4
|
-
--top-popup-background-color-active: var(--color-theme-100)
|
|
5
|
-
|
|
6
|
-
--top-popup-border-color: var(--color-line-2-opacity)
|
|
7
|
-
--top-popup-title-background-color: var(--color-theme-50)
|
|
8
|
-
|
|
9
|
-
/* суммарный отсуп от каря popup до элемента
|
|
10
|
-
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding))
|
|
11
|
-
|
|
12
|
-
/* списки
|
|
13
|
-
--top-popup-list-padding: var(--top-padding-2)
|
|
14
|
-
|
|
15
|
-
--top-popup-listItem-radius: var(--top-radius-2)
|
|
16
|
-
--top-popup-listItem-padding: var(--top-padding-2)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.top-popup-front{ position: relative; }
|
|
20
|
-
|
|
21
|
-
.top-popup-wrapper{
|
|
22
|
-
/* см. recalcPosition()
|
|
23
|
-
--top-popup-height: 0px
|
|
24
|
-
--top-popup-right-bounding: 0px
|
|
25
|
-
--top-popup-bottom-bounding: 0px
|
|
26
|
-
--top-popup-top: 0px
|
|
27
|
-
--top-popup-right: calc(100vw - var(--top-popup-right-bounding))
|
|
28
|
-
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding))
|
|
29
|
-
--top-popup-left: 0px
|
|
30
|
-
|
|
31
|
-
text-align: initial; white-space: normal; word-break: normal
|
|
32
|
-
position: absolute; z-index: 200000
|
|
33
|
-
}
|
|
34
|
-
.top-popup-wrapper:not(.top-popup-wrapper-shown){ overflow: hidden; }
|
|
35
|
-
|
|
36
|
-
/* top-popupPanel
|
|
37
|
-
.top-popupPanel {
|
|
38
|
-
cursor: default
|
|
39
|
-
box-shadow: var(--top-shadow-b)
|
|
40
|
-
border-radius: 8px
|
|
41
|
-
background: var(--top-popup-background-color)
|
|
42
|
-
position: absolute; overflow: hidden
|
|
43
|
-
display: flex; flex-direction: column
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* position
|
|
47
|
-
.top-popup-wrapper > *{ opacity: 0; transition: opacity 100ms linear, transform 100ms linear; }
|
|
48
|
-
.top-popup-wrapper.p0 > *{ transform: translateY(-8px); }
|
|
49
|
-
.top-popup-wrapper.p1 > *{ transform: translateY(8px); }
|
|
50
|
-
.top-popup-wrapper.p2 > *{ transform: translateX(8px); }
|
|
51
|
-
.top-popup-wrapper.p3 > *{ transform: translateY(8px); }
|
|
52
|
-
.top-popup-wrapper.p4 > *{ transform: translateX(-8px); }
|
|
53
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > *{opacity: 1;transform: translate(0, 0) !important;}
|
|
54
|
-
|
|
55
|
-
.top-popup-wrapper.p0 > .top-popup{ top: calc(-16px); left: calc(0px - 8px); }
|
|
56
|
-
.top-popup-wrapper.p1 > .top-popup{ bottom: calc(100% + 8px); }
|
|
57
|
-
.top-popup-wrapper.p2 > .top-popup{ left: calc(100% + 8px); }
|
|
58
|
-
.top-popup-wrapper.p3 > .top-popup{ top: calc(100% + 8px); }
|
|
59
|
-
.top-popup-wrapper.p4 > .top-popup{ right: calc(100% + 8px); }
|
|
60
|
-
.top-popup-wrapper.p2 > .top-popup
|
|
61
|
-
.top-popup-wrapper.p4 > .top-popup{ margin-top: -10px; }
|
|
62
|
-
|
|
63
|
-
.top-popup-wrapper.p1.with_notch > .top-popup{ margin-bottom: 5px; }
|
|
64
|
-
.top-popup-wrapper.p2.with_notch > .top-popup{ margin-left: 5px; }
|
|
65
|
-
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-top: 5px; }
|
|
66
|
-
.top-popup-wrapper.p4.with_notch > .top-popup{ margin-right: 5px; }
|
|
67
|
-
|
|
68
|
-
.top-popup-wrapper.invert-x > .top-popup{ right: 0; }
|
|
69
|
-
.top-popup-wrapper.invert-y > .top-popup{ bottom: 0; }
|
|
70
|
-
|
|
71
|
-
/* notch
|
|
72
|
-
.top-popup-wrapper > .notch{ border: 7.4px solid transparent; position: absolute; display: block; }
|
|
73
|
-
|
|
74
|
-
.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% }
|
|
75
|
-
.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%; }
|
|
76
|
-
.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%; }
|
|
77
|
-
.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%; }
|
|
78
|
-
|
|
79
|
-
.top-popup-wrapper.p1 > .notch-border{ border-top-color: rgba(0,0,0,0.05); margin-bottom: 6px; }
|
|
80
|
-
.top-popup-wrapper.p2 > .notch-border{ border-right-color: rgba(0,0,0,0.05); margin-left: 6px; }
|
|
81
|
-
.top-popup-wrapper.p3 > .notch-border{ border-bottom-color: rgba(0,0,0,0.05); margin-top: 6px; }
|
|
82
|
-
.top-popup-wrapper.p4 > .notch-border{ border-left-color: rgba(0,0,0,0.05); margin-right: 6px; }
|
|
83
|
-
|
|
84
|
-
/* common
|
|
85
|
-
.top-popup_header
|
|
86
|
-
.top-popup_content
|
|
87
|
-
.top-popup_footer{ font-size: 14px; }
|
|
88
|
-
.top-popup_header
|
|
89
|
-
.top-popup_footer{ display: flex; align-items: center; justify-content: space-between; }
|
|
90
|
-
|
|
91
|
-
/* header
|
|
92
|
-
.top-popup_header{
|
|
93
|
-
border-bottom: 1px solid var(--top-popup-border-color)
|
|
94
|
-
padding: var(--top-padding-3)
|
|
95
|
-
font-weight: 600
|
|
96
|
-
}
|
|
97
|
-
.top-popup_header > *{ font-weight: 400; }
|
|
98
|
-
.top-popup_header > .a{ cursor: pointer; color: var(--color-blue-450); }
|
|
99
|
-
.top-popup_header > .a:hover{ color: var(--color-blue-350); }
|
|
100
|
-
|
|
101
|
-
.top-popup_headerButton{ width: 60px; }
|
|
102
|
-
|
|
103
|
-
/* content
|
|
104
|
-
.top-popup_content{
|
|
105
|
-
margin: 0
|
|
106
|
-
flex-grow: 1
|
|
107
|
-
overflow-y: auto
|
|
108
|
-
display: flex
|
|
109
|
-
flex-direction: column
|
|
110
|
-
gap: var(--top-gap-4)
|
|
111
|
-
|
|
112
|
-
-webkit-overflow-scrolling: touch
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
div.top-popup_content{
|
|
116
|
-
/* has_scroll
|
|
117
|
-
--scroll-padding-top: var(--top-popup-content-padding)
|
|
118
|
-
--scroll-padding-bottom: var(--top-popup-content-padding)
|
|
119
|
-
|
|
120
|
-
padding: var(--top-popup-content-padding)
|
|
121
|
-
}
|
|
122
|
-
div.top-popup_content > *{ flex-shrink: 0; }
|
|
123
|
-
div.top-popup_content > .top-button{ margin: 0; }
|
|
124
|
-
|
|
125
|
-
div.top-popup_content .top-unwrap{
|
|
126
|
-
--top-unwrap-x: var(--top-popup-content-padding)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
ul.top-popup_content{
|
|
130
|
-
--scroll-padding-top: var(--top-popup-list-padding)
|
|
131
|
-
--scroll-padding-bottom: var(--top-popup-list-padding)
|
|
132
|
-
|
|
133
|
-
padding: var(--top-popup-list-padding)
|
|
134
|
-
gap: 2px
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
ul.top-popup_content .top-unwrap{
|
|
138
|
-
--top-unwrap-x: var(--top-popup-list-padding)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.top-popup_listItem {
|
|
142
|
-
border-radius: var(--top-popup-listItem-radius)
|
|
143
|
-
padding: var(--top-popup-listItem-padding)
|
|
144
|
-
line-height: 1 !important
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
ul.top-popup_content li{ margin: 0; list-style:none; display: flex; position: relative }
|
|
148
|
-
ul.top-popup_content li > *{ flex-grow: 1; }
|
|
149
|
-
ul.top-popup_content li > a:not(.top-button)
|
|
150
|
-
ul.top-popup_content li > .a{
|
|
151
|
-
cursor: pointer
|
|
152
|
-
box-sizing: border-box
|
|
153
|
-
border-radius: var(--top-popup-listItem-radius)
|
|
154
|
-
background: var(--top-popup-background-color)
|
|
155
|
-
padding: var(--top-popup-listItem-padding)
|
|
156
|
-
color: var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration: none !important; font-style: normal
|
|
157
|
-
line-height: 1 !important
|
|
158
|
-
display: flex; flex: 1 1 100%; align-items: center
|
|
159
|
-
transition: background-color 0.1s ease-in-out
|
|
160
|
-
}
|
|
161
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button)
|
|
162
|
-
.top-popup-wrapper-no_animate ul.top-popup_content li > .a{ transition: none; }
|
|
163
|
-
|
|
164
|
-
ul.top-popup_content li > a:not(.top-button):hover
|
|
165
|
-
ul.top-popup_content li > .a:hover{ background: var(--top-popup-background-color-hover); }
|
|
166
|
-
ul.top-popup_content li > a:not(.top-button).top-active
|
|
167
|
-
ul.top-popup_content li > .a.top-active{ background: var(--top-popup-background-color-active); }
|
|
168
|
-
|
|
169
|
-
.top-popup_content + .top-popup_content{ padding-top: 0; }
|
|
170
|
-
|
|
171
|
-
/* listTitle
|
|
172
|
-
.top-popup_listItem-title{
|
|
173
|
-
background: var(--top-popup-title-background-color)
|
|
174
|
-
color: var(--color-text-2); font-size: 12px
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* listDelimiter
|
|
178
|
-
.top-popup_listItem-delimiter{
|
|
179
|
-
border-radius: 3px
|
|
180
|
-
background: var(--top-popup-border-color)
|
|
181
|
-
height: 1px
|
|
182
|
-
padding: 0
|
|
183
|
-
margin: 4px
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* listMore
|
|
187
|
-
.top-popup_listMore{
|
|
188
|
-
font-size: 20px
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
ul.top-popup_content li >
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
ul.top-popup_content li > * > i.top-popup_listMore
|
|
203
|
-
ul.top-popup_content li > * > i.top-popup_listMore:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
--top-icon-
|
|
218
|
-
--top-icon-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
ul.top-popup_content li > [data-top-icon]:not(.top-button)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
.top-popup > [data-widget]
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
.top-popup li .
|
|
255
|
-
.top-popup li .
|
|
256
|
-
.top-popup li .
|
|
257
|
-
.top-popup li .clear_all{
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
.top-popup_content table
|
|
262
|
-
.top-popup_content table
|
|
263
|
-
.top-popup_content table th{
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
ul.top-popup_content .a > [type="
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
ul.top-popup_content
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
.top-
|
|
277
|
-
.top-popup_footer [class*=btn]:
|
|
278
|
-
.top-popup_footer
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
--top-popup-listItem-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed)
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
.top-popup-wrapper.p-from-top
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
--scroll-padding-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
ul.top-popup_content
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
.top-popup-
|
|
353
|
-
.top-popup-wrapper.invert-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
.top-popup-wrapper.
|
|
358
|
-
.top-popup-wrapper.
|
|
359
|
-
.top-popup-wrapper.
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
.top-popup-wrapper.
|
|
364
|
-
.top-popup-wrapper.
|
|
365
|
-
.top-popup-wrapper.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
.top-popup-wrapper.
|
|
369
|
-
.top-popup-wrapper.
|
|
370
|
-
.top-popup-wrapper.
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
ul.top-popup_content li
|
|
375
|
-
ul.top-popup_content li >
|
|
376
|
-
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ visibility: visible; }`;e.Core.appendStyle(P),e.Core.appendStyle(x,"m"),e.Core.appendStyle(w,"pc");class m extends f{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.PopupWorker.getPopup(this.el.closest(".top-popup-wrapper")),await this.mountJQuery(),e.DOM.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=e.DOM.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=e.DOM.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.PopupWorker.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=e.DOM.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=e.DOM.wrap(this.elPopup,"div")),this.type==="html"&&(this.elPopup.querySelector(":scope > .top-popup_content")||(this.elPopup.classList.add("top-popup_content"),this.elPopup=e.DOM.wrap(this.elPopup,"div"))),(this.type==="selector"&&!this.elPopup.matches(".template")||this.type==="html"||this.type==="vue")&&(e.DOM.querySelectorAllArray(this.elPopup,"[data-top-popup]").forEach(r=>r.dataset.topPopupPosBy="fixed"),e.DOM.querySelectorAllArray(this.elPopup,".top-popup-wrapper").forEach(r=>r.remove()))),n.PopupWorker.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 r=this.options.class.split(" ");this.elPopup.classList.add(...r)}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=e.DOM.genEl("i",{class:"top-popup_header"}),this.elPopupInner.prepend(this.elPopupHeader),this.elPopupHeader.prepend(e.DOM.genEl("i",{class:"a closer"},this.options.i18n.Close)),this.elPopupHeader.append(e.DOM.genEl("i",{class:"top-popup_headerButton"})))),e.DOM.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=e.DOM.offset(this.el).top-this.el.offsetTop-e.DOM.offset(this.elFront).top,this.shift.left=e.DOM.offset(this.el).left-this.el.offsetLeft-e.DOM.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.PopupWorker.decoratorAfterOpen(this),this.mountEvents()}async mountJQuery(){typeof jQuery=="function"&&(this.$=jQuery(this.el))}focus(){let t=e.DOM.querySelectorVisible(this.elPopup,".top-popup-autofocus");t||(t=e.DOM.querySelectorVisible(this.elPopup,":read-write, select:not(:disabled)")),t||(t=e.DOM.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=e.DOM.querySelectorVisibleLast(document.body,":scope > .top-popup-wrapper");p&&p!==this.elPopup||(p=e.DOM.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.PopupWorker.decoratorIsIgnoreOuterClick(t)||n.PopupWorker.close(this.elPopup)))}onFocus(t){if(t.target.matches("input")||this.isClosed)return;n.PopupWorker.getAllVisible().forEach(o=>{var r,i,l;this.elPopup.contains(o)||((r=this.popupParent)==null?void 0:r.elPopup)===o||((l=(i=this.popupParent)==null?void 0:i.popupParent)==null?void 0:l.elPopup)===o||n.PopupWorker.close(o)})}onMouseleave(t){setTimeout(()=>{this.elPopupInner.matches(":hover")||n.PopupWorker.close(this.elPopup)},100)}onResize(){this.elPopup.parentElement!==document.body&&document.body.append(this.elPopup),this.elPopup.style.top=e.DOM.offset(this.el).top+"px",this.elPopup.style.left=e.DOM.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 r=!1,i=!1,l=!1,h=!1,a=o.left>window.innerWidth/2,u=o.top>window.innerHeight/2;t===4&&(a=!a),t===1&&(u=!u);const s=this.elPopupInner.getBoundingClientRect(),c=window.innerWidth-s.right,y=window.innerHeight-s.bottom,d=8;s.top<d&&(r=!0),c<d&&(i=!0),y<d&&(l=!0),s.left<d&&(h=!0),r&&(t===0||t===1)&&u&&(t=3),l&&t===3&&u&&(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)&&u&&(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.PopupWorker.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.PopupWorker.noClose&&(this.unmount(),this.elPopup.classList.add("top-popup-wrapper-closed"),setTimeout(()=>{var o,r,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"),(r=this.elPopup.querySelector(".notch-border"))==null||r.remove(),(i=this.elPopup.querySelector(".notch"))==null||i.remove(),this.elPopupInner.replaceWith(...this.elPopupInner.childNodes),e.DOM.storageClear(this.elPopup)):(e.DOM.storageClear(this.elPopup),this.elPopup.remove(),delete this.elPopup);const t=n.PopupWorker.getAllVisible(),p=t.length&&t[t.length-1];p?n.PopupWorker.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.PopupWorker.vueConnectors.get(this.el.dataset.topPopupId)}}b.init(),g.default=m,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
377
|
-
//# sourceMappingURL=popup-de28e508.amd.js.map
|
|
1
|
+
define(["require","exports","./forms-30d68077.amd","../popup/worker.amd","vue"],function(_,v,e,i,b){"use strict";if(typeof b>"u")var b=window.Vue;class m{static componentName="Top";componentName;className;uid;el;options={};unmountEls=[];unmountEvents=[];init(t,p,o){if(!p)throw t+": el is undefined";const n=m.getComponent(p,t);if(n)return n.reInit(o),n;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 e.DOM.storage(t,"#"+p)}_setComponent(t){e.DOM.storage(t,"#"+this.componentName,this)}mount(){throw"Please, add method mount() to component: "+this.componentName}unmount(){e.DOM.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,n){t.addEventListener(p,o,n),this.registerEventForUnmount(t,p,o,n)}registerEventForUnmount(t,p,o,n){const r={el:t,type:p,listener:o,options:n};this.unmountEvents.push(r)}reInit(t){throw"Please, add method reInit() to component: "+this.componentName}static detach(t){var p;if(t.forEach)t.forEach(o=>{var n;return(n=o.parentElement)==null?void 0:n.removeChild(o)});else{const o=t;(p=o.parentElement)==null||p.removeChild(o)}}}class P{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 n=t.target.closest(".top-popup-wrapper");if(!n||p.matches(".top-popup-noCloser"))return;if(p.getAttribute("href")==="."&&t.preventDefault(),t.target.matches("[data-top-popup]")){const r=t.target.closest("ul"),l=t.target.closest("a, .a");r&&((o=r.querySelector("a.top-active, .a.top-active"))==null||o.classList.remove("top-active")),l&&l.classList.add("top-active");return}i.PopupWorker.close(n)}if(t.target.matches(".top-popup-wrapper")){const n=t.target;i.PopupWorker.close(n)}}static onkeydown(t){var n;const p=t.target.closest(".top-popup-wrapper");if(!p)return;const o=p.querySelector("ul.top-popup_content");switch(t.key){case"Escape":i.PopupWorker.close(p);break;case"Enter":if(!o){if(e.DOM.querySelectorVisible(p,".preloader"))break;const c=e.DOM.querySelectorVisible(p,".top-popup_footer .go, .top-popup_footer [data-action]");if(c){c.click();break}const d=e.DOM.querySelectorVisibleLast(p,".top-popup_footer .top-button");d&&d.click();break}const r=e.DOM.querySelectorVisible(p,"li > a.top-active");r&&(t.preventDefault(),location.href=r.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"?e.DOM.querySelectorVisible(p,"ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active > .top-popup_listMore")&&t.preventDefault():t.preventDefault();const h=(n=p.querySelector("ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active"))==null?void 0:n.parentElement;if(t.key==="ArrowRight"&&h){const c=h.querySelector(".top-active > .top-popup_listMore");if(c)return c.click()}const a=e.DOM.querySelectorAllVisible(p,"ul.top-popup_content > li:not(.top-popup_liNoSelectable)"),u=a.length;if(!u)return;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:i.PopupWorker.close(p);if(t.key==="ArrowRight"&&s===u)return;s<0&&(s=u-1),s>u-1&&(s=0),p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach(c=>c.classList.remove("top-active")),a[s].querySelector(":scope > a, :scope > .a").classList.add("top-active"),i.PopupWorker.scrollToActive(p);break}}}const x=`:root{
|
|
2
|
+
--top-popup-background-color: var(--color-bg-3);
|
|
3
|
+
--top-popup-background-color-hover: var(--color-theme-75);
|
|
4
|
+
--top-popup-background-color-active: var(--color-theme-100);
|
|
5
|
+
|
|
6
|
+
--top-popup-border-color: var(--color-line-2-opacity);
|
|
7
|
+
--top-popup-title-background-color: var(--color-theme-50);
|
|
8
|
+
|
|
9
|
+
/* суммарный отсуп от каря popup до элемента */
|
|
10
|
+
--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding));
|
|
11
|
+
|
|
12
|
+
/* списки */
|
|
13
|
+
--top-popup-list-padding: var(--top-padding-2);
|
|
14
|
+
|
|
15
|
+
--top-popup-listItem-radius: var(--top-radius-2);
|
|
16
|
+
--top-popup-listItem-padding: var(--top-padding-2);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.top-popup-front{ position: relative; }
|
|
20
|
+
|
|
21
|
+
.top-popup-wrapper{
|
|
22
|
+
/* см. recalcPosition() */
|
|
23
|
+
--top-popup-height: 0px;
|
|
24
|
+
--top-popup-right-bounding: 0px;
|
|
25
|
+
--top-popup-bottom-bounding: 0px;
|
|
26
|
+
--top-popup-top: 0px;
|
|
27
|
+
--top-popup-right: calc(100vw - var(--top-popup-right-bounding));
|
|
28
|
+
--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));
|
|
29
|
+
--top-popup-left: 0px;
|
|
30
|
+
|
|
31
|
+
text-align: initial; white-space: normal; word-break: normal;
|
|
32
|
+
position: absolute; z-index: 200000;
|
|
33
|
+
}
|
|
34
|
+
.top-popup-wrapper:not(.top-popup-wrapper-shown){ overflow: hidden; }
|
|
35
|
+
|
|
36
|
+
/* top-popupPanel */
|
|
37
|
+
.top-popupPanel {
|
|
38
|
+
cursor: default;
|
|
39
|
+
box-shadow: var(--top-shadow-b);
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
background: var(--top-popup-background-color);
|
|
42
|
+
position: absolute; overflow: hidden;
|
|
43
|
+
display: flex; flex-direction: column;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* position */
|
|
47
|
+
.top-popup-wrapper > *{ opacity: 0; transition: opacity 100ms linear, transform 100ms linear; }
|
|
48
|
+
.top-popup-wrapper.p0 > *{ transform: translateY(-8px); }
|
|
49
|
+
.top-popup-wrapper.p1 > *{ transform: translateY(8px); }
|
|
50
|
+
.top-popup-wrapper.p2 > *{ transform: translateX(8px); }
|
|
51
|
+
.top-popup-wrapper.p3 > *{ transform: translateY(8px); }
|
|
52
|
+
.top-popup-wrapper.p4 > *{ transform: translateX(-8px); }
|
|
53
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > *{opacity: 1;transform: translate(0, 0) !important;}
|
|
54
|
+
|
|
55
|
+
.top-popup-wrapper.p0 > .top-popup{ top: calc(-16px); left: calc(0px - 8px); }
|
|
56
|
+
.top-popup-wrapper.p1 > .top-popup{ bottom: calc(100% + 8px); }
|
|
57
|
+
.top-popup-wrapper.p2 > .top-popup{ left: calc(100% + 8px); }
|
|
58
|
+
.top-popup-wrapper.p3 > .top-popup{ top: calc(100% + 8px); }
|
|
59
|
+
.top-popup-wrapper.p4 > .top-popup{ right: calc(100% + 8px); }
|
|
60
|
+
.top-popup-wrapper.p2 > .top-popup,
|
|
61
|
+
.top-popup-wrapper.p4 > .top-popup{ margin-top: -10px; }
|
|
62
|
+
|
|
63
|
+
.top-popup-wrapper.p1.with_notch > .top-popup{ margin-bottom: 5px; }
|
|
64
|
+
.top-popup-wrapper.p2.with_notch > .top-popup{ margin-left: 5px; }
|
|
65
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-top: 5px; }
|
|
66
|
+
.top-popup-wrapper.p4.with_notch > .top-popup{ margin-right: 5px; }
|
|
67
|
+
|
|
68
|
+
.top-popup-wrapper.invert-x > .top-popup{ right: 0; }
|
|
69
|
+
.top-popup-wrapper.invert-y > .top-popup{ bottom: 0; }
|
|
70
|
+
|
|
71
|
+
/* notch */
|
|
72
|
+
.top-popup-wrapper > .notch{ border: 7.4px solid transparent; position: absolute; display: block; }
|
|
73
|
+
|
|
74
|
+
.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% }
|
|
75
|
+
.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%; }
|
|
76
|
+
.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%; }
|
|
77
|
+
.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%; }
|
|
78
|
+
|
|
79
|
+
.top-popup-wrapper.p1 > .notch-border{ border-top-color: rgba(0,0,0,0.05); margin-bottom: 6px; }
|
|
80
|
+
.top-popup-wrapper.p2 > .notch-border{ border-right-color: rgba(0,0,0,0.05); margin-left: 6px; }
|
|
81
|
+
.top-popup-wrapper.p3 > .notch-border{ border-bottom-color: rgba(0,0,0,0.05); margin-top: 6px; }
|
|
82
|
+
.top-popup-wrapper.p4 > .notch-border{ border-left-color: rgba(0,0,0,0.05); margin-right: 6px; }
|
|
83
|
+
|
|
84
|
+
/* common */
|
|
85
|
+
.top-popup_header,
|
|
86
|
+
.top-popup_content,
|
|
87
|
+
.top-popup_footer{ font-size: 14px; }
|
|
88
|
+
.top-popup_header,
|
|
89
|
+
.top-popup_footer{ display: flex; align-items: center; justify-content: space-between; }
|
|
90
|
+
|
|
91
|
+
/* header */
|
|
92
|
+
.top-popup_header{
|
|
93
|
+
border-bottom: 1px solid var(--top-popup-border-color);
|
|
94
|
+
padding: var(--top-padding-3);
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
}
|
|
97
|
+
.top-popup_header > *{ font-weight: 400; }
|
|
98
|
+
.top-popup_header > .a{ cursor: pointer; color: var(--color-blue-450); }
|
|
99
|
+
.top-popup_header > .a:hover{ color: var(--color-blue-350); }
|
|
100
|
+
|
|
101
|
+
.top-popup_headerButton{ width: 60px; }
|
|
102
|
+
|
|
103
|
+
/* content */
|
|
104
|
+
.top-popup_content{
|
|
105
|
+
margin: 0;
|
|
106
|
+
flex-grow: 1;
|
|
107
|
+
overflow-y: auto;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
gap: var(--top-gap-4);
|
|
111
|
+
|
|
112
|
+
-webkit-overflow-scrolling: touch;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
div.top-popup_content{
|
|
116
|
+
/* has_scroll */
|
|
117
|
+
--scroll-padding-top: var(--top-popup-content-padding);
|
|
118
|
+
--scroll-padding-bottom: var(--top-popup-content-padding);
|
|
119
|
+
|
|
120
|
+
padding: var(--top-popup-content-padding);
|
|
121
|
+
}
|
|
122
|
+
div.top-popup_content > *{ flex-shrink: 0; }
|
|
123
|
+
div.top-popup_content > .top-button{ margin: 0; }
|
|
124
|
+
|
|
125
|
+
div.top-popup_content .top-unwrap{
|
|
126
|
+
--top-unwrap-x: var(--top-popup-content-padding);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
ul.top-popup_content{
|
|
130
|
+
--scroll-padding-top: var(--top-popup-list-padding);
|
|
131
|
+
--scroll-padding-bottom: var(--top-popup-list-padding);
|
|
132
|
+
|
|
133
|
+
padding: var(--top-popup-list-padding);
|
|
134
|
+
gap: 2px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
ul.top-popup_content .top-unwrap{
|
|
138
|
+
--top-unwrap-x: var(--top-popup-list-padding);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.top-popup_listItem {
|
|
142
|
+
border-radius: var(--top-popup-listItem-radius);
|
|
143
|
+
padding: var(--top-popup-listItem-padding);
|
|
144
|
+
line-height: 1 !important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
ul.top-popup_content li{ margin: 0; list-style:none; display: flex; position: relative }
|
|
148
|
+
ul.top-popup_content li > *{ flex-grow: 1; }
|
|
149
|
+
ul.top-popup_content li > a:not(.top-button),
|
|
150
|
+
ul.top-popup_content li > .a{
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
border-radius: var(--top-popup-listItem-radius);
|
|
154
|
+
background: var(--top-popup-background-color);
|
|
155
|
+
padding: var(--top-popup-listItem-padding);
|
|
156
|
+
color: var(--color-text) !important; font-size: 14px; font-weight: normal !important; text-decoration: none !important; font-style: normal;
|
|
157
|
+
line-height: 1 !important;
|
|
158
|
+
display: flex; flex: 1 1 100%; align-items: center;
|
|
159
|
+
transition: background-color 0.1s ease-in-out;
|
|
160
|
+
}
|
|
161
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > a:not(.top-button),
|
|
162
|
+
.top-popup-wrapper-no_animate ul.top-popup_content li > .a{ transition: none; }
|
|
163
|
+
|
|
164
|
+
ul.top-popup_content li > a:not(.top-button):hover,
|
|
165
|
+
ul.top-popup_content li > .a:hover{ background: var(--top-popup-background-color-hover); }
|
|
166
|
+
ul.top-popup_content li > a:not(.top-button).top-active,
|
|
167
|
+
ul.top-popup_content li > .a.top-active{ background: var(--top-popup-background-color-active); }
|
|
168
|
+
|
|
169
|
+
.top-popup_content + .top-popup_content{ padding-top: 0; }
|
|
170
|
+
|
|
171
|
+
/* listTitle */
|
|
172
|
+
.top-popup_listItem-title{
|
|
173
|
+
background: var(--top-popup-title-background-color);
|
|
174
|
+
color: var(--color-text-2); font-size: 12px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* listDelimiter */
|
|
178
|
+
.top-popup_listItem-delimiter{
|
|
179
|
+
border-radius: 3px;
|
|
180
|
+
background: var(--top-popup-border-color);
|
|
181
|
+
height: 1px;
|
|
182
|
+
padding: 0;
|
|
183
|
+
margin: 4px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* listMore */
|
|
187
|
+
.top-popup_listMore{
|
|
188
|
+
font-size: 20px;
|
|
189
|
+
margin: calc(0px - var(--top-popup-listItem-padding)) 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
ul.top-popup_content li > .a.top-popup_listMore{
|
|
193
|
+
text-align: center;
|
|
194
|
+
flex-basis: 10px;
|
|
195
|
+
}
|
|
196
|
+
ul.top-popup_content li > .a.top-popup_listMore:before{ color: var(--color-gray-500); }
|
|
197
|
+
ul.top-popup_content li > * > .top-popup_listMore{
|
|
198
|
+
margin-left: auto;
|
|
199
|
+
color: var(--color-gray-500);
|
|
200
|
+
font-size: 14px;
|
|
201
|
+
}
|
|
202
|
+
ul.top-popup_content li > * > i.top-popup_listMore:hover,
|
|
203
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ color: var(--color-blue-500); }
|
|
204
|
+
ul.top-popup_content li > * > i.top-popup_listMore:before{
|
|
205
|
+
transform: rotate(90deg);
|
|
206
|
+
display: block;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
ul.top-popup_content li a.close{ background: none !important; }
|
|
210
|
+
|
|
211
|
+
/* data-top-icon */
|
|
212
|
+
.top-popup_content > [data-top-icon]:before{
|
|
213
|
+
--top-icon-size: 20px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button):before{
|
|
217
|
+
--top-icon-color: var(--color-text-3);
|
|
218
|
+
--top-icon-size: 20px;
|
|
219
|
+
--top-icon-width: 20px;
|
|
220
|
+
|
|
221
|
+
height: 1rem; margin-right: 8px; transition: color 0.1s;
|
|
222
|
+
}
|
|
223
|
+
ul.top-popup_content li:hover > [data-top-icon]:not(.top-button):before,
|
|
224
|
+
ul.top-popup_content li > [data-top-icon]:not(.top-button).top-active:before{
|
|
225
|
+
--top-icon-color: var(--color-text-2);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* footer */
|
|
229
|
+
.top-popup_footer{
|
|
230
|
+
padding: var(--top-popup-list-padding);
|
|
231
|
+
border-top: 1px solid var(--top-popup-border-color);
|
|
232
|
+
display: flex;
|
|
233
|
+
gap:var(--top-gap-2);
|
|
234
|
+
justify-content: flex-end;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Виджеты */
|
|
238
|
+
.top-popup > [data-widget]{ padding: 0 var(--top-popup-list-padding); }
|
|
239
|
+
.top-popup > [data-widget] + hr{ margin: 0 var(--top-popup-list-padding); }
|
|
240
|
+
|
|
241
|
+
.top-popup .placeholder{
|
|
242
|
+
border:1px solid #E0D9D9 !important; border-right: none !important; border-left: none !important; background:#F9F9F9 !important; margin: -1px 0; z-index: 1;
|
|
243
|
+
position: relative;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* компоненты */
|
|
247
|
+
.top-popup-wrapper.simple_list > .top-popup{ min-width: 0; white-space: nowrap; }
|
|
248
|
+
|
|
249
|
+
.top-popup_content .top-column{ display: flex; flex-direction: column; gap: 4px; }
|
|
250
|
+
html .top-popup .top-popup_content li > .top-button{
|
|
251
|
+
margin:calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.top-popup li .check_all,
|
|
255
|
+
.top-popup li .clear_all{ cursor: pointer; color: var(--color-cyan); padding: 8px; display: inline-block; }
|
|
256
|
+
.top-popup li .check_all:hover,
|
|
257
|
+
.top-popup li .clear_all:hover{ text-decoration: underline; }
|
|
258
|
+
.top-popup li .clear_all{ display: none; }
|
|
259
|
+
|
|
260
|
+
/* table */
|
|
261
|
+
.top-popup_content table{ margin: -9px 0; }
|
|
262
|
+
.top-popup_content table td,
|
|
263
|
+
.top-popup_content table th{ padding: 9px var(--top-popup-listItem-padding) 9px 0; vertical-align: top; }
|
|
264
|
+
.top-popup_content table th{ width: 40%; font-weight: 600; white-space: nowrap; }
|
|
265
|
+
|
|
266
|
+
/* формы */
|
|
267
|
+
ul.top-popup_content .a > [type="checkbox"],
|
|
268
|
+
ul.top-popup_content .a > [type="radio"]{ margin: -8px 0 -8px auto; }
|
|
269
|
+
|
|
270
|
+
/* deprecated */
|
|
271
|
+
ul.top-popup_content a > [class*=icon],
|
|
272
|
+
ul.top-popup_content i.a > [class*=icon]{
|
|
273
|
+
transition: 0.1s;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.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; }
|
|
277
|
+
.top-popup_footer [class*=btn]:not(.btn-transparent){ min-width: 100px; padding: 5px 14px; margin-left: 10px; }
|
|
278
|
+
.top-popup_footer [class*=btn]:first-child{ margin-left: 0; }
|
|
279
|
+
.top-popup_footer .btn.full_width{ margin: 0; flex-grow: 1; }`,w=`:root{
|
|
280
|
+
--top-popup-list-padding: 0px;
|
|
281
|
+
|
|
282
|
+
--top-popup-listItem-radius: 0px;
|
|
283
|
+
--top-popup-listItem-padding: var(--top-padding-4);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
html.with_popup{ background: #808080; }
|
|
287
|
+
|
|
288
|
+
.top-popup-wrapper{
|
|
289
|
+
--top-popup-footer-offset: 25px;
|
|
290
|
+
|
|
291
|
+
width: auto !important; height: auto !important;
|
|
292
|
+
position: fixed; top: 0 !important; right: 0 !important; left: 0 !important; overflow: hidden;
|
|
293
|
+
transition: background 0.3s;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){ background: rgba(0,0,0,0.5); backdrop-filter: blur(1px); }
|
|
297
|
+
.top-popup-wrapper-shown:not(.top-popup-wrapper-closed) > .top-popup{ opacity: 1 !important; }
|
|
298
|
+
|
|
299
|
+
.top-popup{
|
|
300
|
+
border-radius: 8px 8px 0 0; width: auto !important; max-height: calc(100% - var(--header-height) - 12px); margin: 0 !important;
|
|
301
|
+
top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
|
|
302
|
+
display: flex; flex-direction: column;
|
|
303
|
+
|
|
304
|
+
/* невозможно опустить элемент вниз за экран на 100%, fix: opacity и translateY(80%) */
|
|
305
|
+
transform: translateY(80%);
|
|
306
|
+
|
|
307
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* from top */
|
|
311
|
+
.top-popup-wrapper.p-from-top{
|
|
312
|
+
--top-popup-footer-offset: 0px;
|
|
313
|
+
|
|
314
|
+
top: var(--header-height) !important;
|
|
315
|
+
}
|
|
316
|
+
.with_dialog .top-popup-wrapper.p-from-top{ top: 50px !important; }
|
|
317
|
+
.top-popup-wrapper.p-from-top > .top-popup{
|
|
318
|
+
border-radius: 0 0 8px 8px; max-height: calc(100% - 24px); top: 0 !important; bottom: auto !important;
|
|
319
|
+
transform: translateY(calc(-100% - 24px));
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* content */
|
|
323
|
+
ul.top-popup_content{
|
|
324
|
+
--scroll-padding-top: 0px;
|
|
325
|
+
--scroll-padding-bottom: var(--scroll-padding-top);
|
|
326
|
+
|
|
327
|
+
gap: 0;
|
|
328
|
+
}
|
|
329
|
+
ul.top-popup_content li:not(:last-child){ border-bottom: 1px solid var(--top-popup-border-color); }
|
|
330
|
+
|
|
331
|
+
.top-popup-wrapper.top-style_alt > .top-popup > ul > li{ border-bottom: none; }
|
|
332
|
+
|
|
333
|
+
/* footer */
|
|
334
|
+
.top-popup_footer{
|
|
335
|
+
flex-direction: column-reverse;
|
|
336
|
+
}
|
|
337
|
+
.top-popup_footer > .top-button{
|
|
338
|
+
--top-forms-base-height: var(--top-forms-base-height_xl);
|
|
339
|
+
|
|
340
|
+
width: 100%;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* listTitle */
|
|
344
|
+
ul.top-popup_content .top-popup_listItem-title{
|
|
345
|
+
--top-popup-padding-v: 12px;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* listDelimiter */
|
|
349
|
+
ul.top-popup_content .top-popup_listItem-delimiter{ background: var(--color-line-1-opacity); height: 4px; margin: 0; }
|
|
350
|
+
ul.top-popup_content li:first-child > .top-popup_listItem-delimiter{ border-top: 1px solid var(--top-popup-border-color); }`,y=`html:not(.with_dialog){ margin-right: 0 !important; }
|
|
351
|
+
|
|
352
|
+
.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)); }
|
|
353
|
+
.top-popup-wrapper.invert-x > .top-popup{ max-width: calc(100vw - var(--top-popup-right) - 16px); }
|
|
354
|
+
.top-popup-wrapper.invert-y > .top-popup{ max-height: calc(100vh - var(--top-popup-bottom) - 16px); }
|
|
355
|
+
|
|
356
|
+
/* position */
|
|
357
|
+
.top-popup-wrapper.p1 > .top-popup{ max-height: calc(var(--top-popup-top) - var(--header-height) - 16px); }
|
|
358
|
+
.top-popup-wrapper.p3 > .top-popup{ max-height: calc(var(--top-popup-bottom) - 16px); }
|
|
359
|
+
.top-popup-wrapper.p2 > .top-popup{ max-width: calc(var(--top-popup-right) - 16px); }
|
|
360
|
+
.top-popup-wrapper.p4 > .top-popup{ max-width: calc(var(--top-popup-left) - 16px); }
|
|
361
|
+
|
|
362
|
+
/* notch */
|
|
363
|
+
.top-popup-wrapper.p1.with_notch > .top-popup,
|
|
364
|
+
.top-popup-wrapper.p3.with_notch > .top-popup{ margin-left: -16px !important; }
|
|
365
|
+
.top-popup-wrapper.p1.with_notch > .notch,
|
|
366
|
+
.top-popup-wrapper.p3.with_notch > .notch{ margin-left: -8px !important; }
|
|
367
|
+
|
|
368
|
+
.top-popup-wrapper.p1.with_notch.invert-x,
|
|
369
|
+
.top-popup-wrapper.p3.with_notch.invert-x{ margin-left: 3px !important; }
|
|
370
|
+
.top-popup-wrapper.p1.with_notch.invert-x > .notch,
|
|
371
|
+
.top-popup-wrapper.p3.with_notch.invert-x > .notch{ margin-left: -9px !important; }
|
|
372
|
+
|
|
373
|
+
/* listMore */
|
|
374
|
+
ul.top-popup_content li > * > i.top-popup_listMore{ visibility: hidden; transition: none; }
|
|
375
|
+
ul.top-popup_content li:hover > * > i.top-popup_listMore,
|
|
376
|
+
ul.top-popup_content li > *.top-active > i.top-popup_listMore,
|
|
377
|
+
ul.top-popup_content li > * > i.top-popup_listMore.top-active{ visibility: visible; }`;e.Core.appendStyle(x),e.Core.appendStyle(w,"m"),e.Core.appendStyle(y,"pc");class g extends m{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(g.componentName,t,p)}async mount(){const t=this.vueGetComponent();if(this.popupParent=i.PopupWorker.getPopup(this.el.closest(".top-popup-wrapper")),await this.mountJQuery(),e.DOM.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=e.DOM.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=e.DOM.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.PopupWorker.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=e.DOM.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=e.DOM.wrap(this.elPopup,"div")),this.type==="html"&&(this.elPopup.querySelector(":scope > .top-popup_content")||(this.elPopup.classList.add("top-popup_content"),this.elPopup=e.DOM.wrap(this.elPopup,"div"))),(this.type==="selector"&&!this.elPopup.matches(".template")||this.type==="html"||this.type==="vue")&&(e.DOM.querySelectorAllArray(this.elPopup,"[data-top-popup]").forEach(n=>n.dataset.topPopupPosBy="fixed"),e.DOM.querySelectorAllArray(this.elPopup,".top-popup-wrapper").forEach(n=>n.remove()))),i.PopupWorker.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 n=this.options.class.split(" ");this.elPopup.classList.add(...n)}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=e.DOM.genEl("i",{class:"top-popup_header"}),this.elPopupInner.prepend(this.elPopupHeader),this.elPopupHeader.prepend(e.DOM.genEl("i",{class:"a closer"},this.options.i18n.Close)),this.elPopupHeader.append(e.DOM.genEl("i",{class:"top-popup_headerButton"})))),e.DOM.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=e.DOM.offset(this.el).top-this.el.offsetTop-e.DOM.offset(this.elFront).top,this.shift.left=e.DOM.offset(this.el).left-this.el.offsetLeft-e.DOM.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.PopupWorker.decoratorAfterOpen(this),this.mountEvents()}async mountJQuery(){typeof jQuery=="function"&&(this.$=jQuery(this.el))}focus(){let t=e.DOM.querySelectorVisible(this.elPopup,".top-popup-autofocus");t||(t=e.DOM.querySelectorVisible(this.elPopup,":read-write, select:not(:disabled)")),t||(t=e.DOM.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=e.DOM.querySelectorVisibleLast(document.body,":scope > .top-popup-wrapper");p&&p!==this.elPopup||(p=e.DOM.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.PopupWorker.decoratorIsIgnoreOuterClick(t)||i.PopupWorker.close(this.elPopup)))}onFocus(t){if(t.target.matches("input")||this.isClosed)return;i.PopupWorker.getAllVisible().forEach(o=>{var n,r,l;this.elPopup.contains(o)||((n=this.popupParent)==null?void 0:n.elPopup)===o||((l=(r=this.popupParent)==null?void 0:r.popupParent)==null?void 0:l.elPopup)===o||i.PopupWorker.close(o)})}onMouseleave(t){setTimeout(()=>{this.elPopupInner.matches(":hover")||i.PopupWorker.close(this.elPopup)},100)}onResize(){this.elPopup.parentElement!==document.body&&document.body.append(this.elPopup),this.elPopup.style.top=e.DOM.offset(this.el).top+"px",this.elPopup.style.left=e.DOM.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 n=!1,r=!1,l=!1,h=!1,a=o.left>window.innerWidth/2,u=o.top>window.innerHeight/2;t===4&&(a=!a),t===1&&(u=!u);const s=this.elPopupInner.getBoundingClientRect(),c=window.innerWidth-s.right,d=window.innerHeight-s.bottom,f=8;s.top<f&&(n=!0),c<f&&(r=!0),d<f&&(l=!0),s.left<f&&(h=!0),n&&(t===0||t===1)&&u&&(t=3),l&&t===3&&u&&(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)&&u&&(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.PopupWorker.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.PopupWorker.noClose&&(this.unmount(),this.elPopup.classList.add("top-popup-wrapper-closed"),setTimeout(()=>{var o,n,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"),(n=this.elPopup.querySelector(".notch-border"))==null||n.remove(),(r=this.elPopup.querySelector(".notch"))==null||r.remove(),this.elPopupInner.replaceWith(...this.elPopupInner.childNodes),e.DOM.storageClear(this.elPopup)):(e.DOM.storageClear(this.elPopup),this.elPopup.remove(),delete this.elPopup);const t=i.PopupWorker.getAllVisible(),p=t.length&&t[t.length-1];p?i.PopupWorker.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.PopupWorker.vueConnectors.get(this.el.dataset.topPopupId)}}P.init(),v.default=g,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
378
|
+
//# sourceMappingURL=popup-14ca85cf.amd.js.map
|