vgapp 1.5.7 → 1.5.8
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/app/langs/en/buttons.json +17 -17
- package/app/langs/en/messages.json +36 -36
- package/app/langs/ru/buttons.json +17 -17
- package/app/langs/ru/messages.json +1 -1
- package/app/modules/vgalert/js/vgalert.js +7 -7
- package/app/modules/vgalert/scss/_variables.scss +16 -16
- package/app/modules/vgcollapse/scss/_variables.scss +7 -7
- package/app/modules/vgcollapse/scss/vgcollapse.scss +5 -5
- package/app/modules/vgdropdown/scss/_variables.scss +14 -14
- package/app/modules/vgdropdown/scss/vgdropdown.scss +5 -5
- package/app/modules/vgfilepreview/js/i18n.js +56 -56
- package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
- package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
- package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
- package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
- package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
- package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
- package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
- package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
- package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
- package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
- package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
- package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
- package/app/modules/vgfilepreview/readme.md +68 -68
- package/app/modules/vgfiles/js/base.js +198 -198
- package/app/modules/vgfiles/js/droppable.js +17 -17
- package/app/modules/vgfiles/js/render.js +153 -153
- package/app/modules/vgfiles/js/sortable.js +52 -52
- package/app/modules/vgfiles/js/vgfiles.js +43 -43
- package/app/modules/vgfiles/readme.md +123 -123
- package/app/modules/vgfiles/scss/_mixins.scss +13 -13
- package/app/modules/vgfiles/scss/_variables.scss +10 -10
- package/app/modules/vgfiles/scss/vgfiles.scss +28 -28
- package/app/modules/vgformsender/js/hideshowpass.js +22 -22
- package/app/modules/vgformsender/readme.md +1 -1
- package/app/modules/vgformsender/scss/_variables.scss +5 -5
- package/app/modules/vgformsender/scss/vgformsender.scss +42 -42
- package/app/modules/vglawcookie/js/vglawcookie.js +19 -19
- package/app/modules/vglawcookie/scss/_variables.scss +13 -13
- package/app/modules/vglawcookie/scss/vglawcookie.scss +5 -5
- package/app/modules/vgmodal/js/vgmodal.interaction.js +216 -216
- package/app/modules/vgmodal/js/vgmodal.js +9 -9
- package/app/modules/vgmodal/js/vgmodal.minimized.js +227 -227
- package/app/modules/vgmodal/scss/_variables.scss +17 -17
- package/app/modules/vgmodal/scss/vgmodal.scss +77 -77
- package/app/modules/vgnav/js/vgnav.js +62 -62
- package/app/modules/vgnav/scss/_breakpoints.scss +36 -36
- package/app/modules/vgnav/scss/_hamburger.scss +5 -5
- package/app/modules/vgnav/scss/_placement.scss +5 -5
- package/app/modules/vgnav/scss/_toggle.scss +5 -5
- package/app/modules/vgnav/scss/_variables.scss +26 -26
- package/app/modules/vgnav/scss/vgnav.scss +41 -41
- package/app/modules/vgnestable/README.md +39 -39
- package/app/modules/vgrangeslider/js/skins.js +8 -8
- package/app/modules/vgrangeslider/js/vgrangeslider.js +29 -29
- package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
- package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
- package/app/modules/vgrollup/js/vgrollup.js +15 -15
- package/app/modules/vgrollup/scss/_variables.scss +15 -15
- package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
- package/app/modules/vgselect/js/handlers.js +6 -6
- package/app/modules/vgselect/js/vgselect.js +167 -123
- package/app/modules/vgselect/readme.md +11 -11
- package/app/modules/vgselect/scss/_variables.scss +51 -51
- package/app/modules/vgselect/scss/vgselect.scss +1 -1
- package/app/modules/vgsidebar/js/vgsidebar.js +21 -21
- package/app/modules/vgsidebar/scss/_variables.scss +10 -10
- package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
- package/app/modules/vgspy/js/vgspy.js +43 -43
- package/app/modules/vgtable/js/_filters.js +10 -6
- package/app/modules/vgtable/js/_options.js +16 -16
- package/app/modules/vgtable/js/_pagination.js +118 -118
- package/app/modules/vgtable/js/_responsive.js +79 -79
- package/app/modules/vgtable/js/_sticky-header.js +349 -280
- package/app/modules/vgtable/js/vgtable.js +98 -98
- package/app/modules/vgtable/scss/_sorting.scss +6 -6
- package/app/modules/vgtable/scss/_sticky-header.scss +31 -31
- package/app/modules/vgtable/scss/_variables.scss +6 -4
- package/app/modules/vgtable/scss/vgtable.scss +8 -4
- package/app/modules/vgtabs/js/vgtabs.js +91 -91
- package/app/modules/vgtabs/scss/_variables.scss +23 -23
- package/app/modules/vgtabs/scss/vgtabs.scss +5 -5
- package/app/modules/vgtoast/js/vgtoast.js +4 -4
- package/app/modules/vgtoast/scss/_variables.scss +13 -13
- package/app/modules/vgtoast/scss/vgtoast.scss +5 -5
- package/app/modules/vgtooltip/js/vgtooltip.js +127 -127
- package/app/modules/vgtooltip/scss/_variables.scss +10 -10
- package/app/modules/vgtooltip/scss/vgtooltip.scss +5 -5
- package/app/utils/js/components/audio-metadata.js +240 -240
- package/app/utils/js/components/backdrop.js +116 -116
- package/app/utils/js/components/file-icon.js +7 -7
- package/app/utils/js/components/file-preview.js +304 -304
- package/app/utils/js/components/responsive.js +165 -165
- package/app/utils/js/components/sanitize.js +150 -150
- package/app/utils/js/components/video-metadata.js +140 -140
- package/app/utils/scss/_backdrop.scss +5 -5
- package/app/utils/scss/_theme-default.scss +12 -12
- package/app/utils/scss/_theme.scss +7 -7
- package/app/utils/scss/default.scss +9 -9
- package/app/utils/scss/functions.scss +21 -21
- package/app/utils/scss/index.scss +4 -4
- package/app/utils/scss/mixin.scss +16 -16
- package/app/utils/scss/variables.scss +147 -147
- package/build/vgapp.css +1 -1
- package/build/vgapp.css.map +1 -1
- package/build/vgapp.js +1 -1
- package/build/vgapp.js.map +1 -1
- package/index.js +7 -7
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Описание: вкладки VGTabs с декларативной и ручной инициализацией.
|
|
3
|
-
* Возможности: клавиатура, начальный hash, AJAX, отменяемые события и адаптивный индикатор.
|
|
4
|
-
*/
|
|
5
|
-
import BaseModule from "../../base-module";
|
|
1
|
+
/**
|
|
2
|
+
* Описание: вкладки VGTabs с декларативной и ручной инициализацией.
|
|
3
|
+
* Возможности: клавиатура, начальный hash, AJAX, отменяемые события и адаптивный индикатор.
|
|
4
|
+
*/
|
|
5
|
+
import BaseModule from "../../base-module";
|
|
6
6
|
import Selectors from "../../../utils/js/dom/selectors";
|
|
7
7
|
import EventHandler from "../../../utils/js/dom/event";
|
|
8
8
|
import {getNextActiveElement, isDisabled, mergeDeepObject} from "../../../utils/js/functions";
|
|
@@ -136,7 +136,7 @@ class VGTabs extends BaseModule {
|
|
|
136
136
|
once: true,
|
|
137
137
|
output: true,
|
|
138
138
|
},
|
|
139
|
-
}, params || {});
|
|
139
|
+
}, params || {});
|
|
140
140
|
|
|
141
141
|
this._parent = this._element.closest(SELECTOR.TAB_PANEL);
|
|
142
142
|
this._main_parent = this._parent?.closest(SELECTOR.TAB_CLASS) || null;
|
|
@@ -177,19 +177,19 @@ class VGTabs extends BaseModule {
|
|
|
177
177
|
show() {
|
|
178
178
|
const innerElem = this._element;
|
|
179
179
|
|
|
180
|
-
if (!innerElem || isDisabled(innerElem) || this._elemIsActive(innerElem)) return;
|
|
180
|
+
if (!innerElem || isDisabled(innerElem) || this._elemIsActive(innerElem)) return;
|
|
181
181
|
|
|
182
182
|
const activeElem = this._getActiveElem();
|
|
183
183
|
|
|
184
184
|
// События hide и show
|
|
185
|
-
const hideEvent = activeElem ? EventHandler.trigger(activeElem, EVENT_HIDE, {relatedTarget: innerElem}) : null;
|
|
186
|
-
const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW, {relatedTarget: activeElem});
|
|
185
|
+
const hideEvent = activeElem ? EventHandler.trigger(activeElem, EVENT_HIDE, {relatedTarget: innerElem}) : null;
|
|
186
|
+
const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW, {relatedTarget: activeElem});
|
|
187
187
|
|
|
188
188
|
if (showEvent.defaultPrevented || (hideEvent && hideEvent.defaultPrevented)) return;
|
|
189
189
|
|
|
190
190
|
this._deactivate(activeElem, innerElem);
|
|
191
|
-
this._activate(innerElem, activeElem);
|
|
192
|
-
this._updateSlider(innerElem);
|
|
191
|
+
this._activate(innerElem, activeElem);
|
|
192
|
+
this._updateSlider(innerElem);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
/**
|
|
@@ -222,28 +222,28 @@ class VGTabs extends BaseModule {
|
|
|
222
222
|
const target = Selectors.getElementFromSelector(element);
|
|
223
223
|
if (target) this._activate(target, relatedTarget);
|
|
224
224
|
|
|
225
|
-
const complete = () => {
|
|
226
|
-
if (!this._element || !element.classList.contains(CLASS_NAME.ACTIVE)) return;
|
|
225
|
+
const complete = () => {
|
|
226
|
+
if (!this._element || !element.classList.contains(CLASS_NAME.ACTIVE)) return;
|
|
227
227
|
if (element.getAttribute('role') !== 'tab') {
|
|
228
228
|
element.classList.add(CLASS_NAME.SHOW);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
if (this._params.ajax.route && !this._isLoaded && !this._isLoading) {
|
|
233
|
-
this._isLoading = true;
|
|
234
|
-
const loaded = (status, data) => {
|
|
235
|
-
if (!this._element) return;
|
|
236
|
-
this._isLoading = false;
|
|
237
|
-
EventHandler.trigger(this._element, EVENT_LOADED, { stats: status, data });
|
|
238
|
-
};
|
|
239
|
-
this._route(loaded, error => loaded('error', error));
|
|
240
|
-
}
|
|
232
|
+
if (this._params.ajax.route && !this._isLoaded && !this._isLoading) {
|
|
233
|
+
this._isLoading = true;
|
|
234
|
+
const loaded = (status, data) => {
|
|
235
|
+
if (!this._element) return;
|
|
236
|
+
this._isLoading = false;
|
|
237
|
+
EventHandler.trigger(this._element, EVENT_LOADED, { stats: status, data });
|
|
238
|
+
};
|
|
239
|
+
this._route(loaded, error => loaded('error', error));
|
|
240
|
+
}
|
|
241
241
|
|
|
242
242
|
element.removeAttribute('tabindex');
|
|
243
243
|
element.setAttribute('aria-selected', 'true');
|
|
244
244
|
this._toggleDropDown(element, true);
|
|
245
245
|
|
|
246
|
-
EventHandler.trigger(element, EVENT_SHOWN, { relatedTarget });
|
|
246
|
+
EventHandler.trigger(element, EVENT_SHOWN, { relatedTarget });
|
|
247
247
|
};
|
|
248
248
|
|
|
249
249
|
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME.FADE));
|
|
@@ -263,8 +263,8 @@ class VGTabs extends BaseModule {
|
|
|
263
263
|
const target = Selectors.getElementFromSelector(element);
|
|
264
264
|
if (target) this._deactivate(target, relatedTarget);
|
|
265
265
|
|
|
266
|
-
const complete = () => {
|
|
267
|
-
if (!this._element || element.classList.contains(CLASS_NAME.ACTIVE)) return;
|
|
266
|
+
const complete = () => {
|
|
267
|
+
if (!this._element || element.classList.contains(CLASS_NAME.ACTIVE)) return;
|
|
268
268
|
if (element.getAttribute('role') !== 'tab') {
|
|
269
269
|
element.classList.remove(CLASS_NAME.SHOW);
|
|
270
270
|
return;
|
|
@@ -312,12 +312,12 @@ class VGTabs extends BaseModule {
|
|
|
312
312
|
_setTabHash() {
|
|
313
313
|
if (!this._params.hash) return;
|
|
314
314
|
|
|
315
|
-
let hash = document.location.hash;
|
|
316
|
-
if (!hash) return;
|
|
317
|
-
try { hash = decodeURIComponent(hash); } catch { return; }
|
|
318
|
-
const element = this._getChildren().find(child =>
|
|
319
|
-
!isDisabled(child) && (child.getAttribute('href') === hash || child.getAttribute('data-vg-target') === hash)
|
|
320
|
-
);
|
|
315
|
+
let hash = document.location.hash;
|
|
316
|
+
if (!hash) return;
|
|
317
|
+
try { hash = decodeURIComponent(hash); } catch { return; }
|
|
318
|
+
const element = this._getChildren().find(child =>
|
|
319
|
+
!isDisabled(child) && (child.getAttribute('href') === hash || child.getAttribute('data-vg-target') === hash)
|
|
320
|
+
);
|
|
321
321
|
|
|
322
322
|
if (element) {
|
|
323
323
|
VGTabs.getOrCreateInstance(element).show();
|
|
@@ -327,8 +327,8 @@ class VGTabs extends BaseModule {
|
|
|
327
327
|
/**
|
|
328
328
|
* Инициализация слайдера-индикатора под вкладками
|
|
329
329
|
*/
|
|
330
|
-
_setInitialSlider() {
|
|
331
|
-
if (!this._params.slide || !this._main_parent) return;
|
|
330
|
+
_setInitialSlider() {
|
|
331
|
+
if (!this._params.slide || !this._main_parent) return;
|
|
332
332
|
|
|
333
333
|
let slider = Selectors.find(`.${CLASS_NAME.SLIDER}`, this._main_parent);
|
|
334
334
|
if (!slider) {
|
|
@@ -339,58 +339,58 @@ class VGTabs extends BaseModule {
|
|
|
339
339
|
|
|
340
340
|
this._main_parent.classList.add(CLASS_NAME.WITH_SLIDER);
|
|
341
341
|
|
|
342
|
-
this._updateSlider(this._getActiveElem());
|
|
343
|
-
this._sliderOver = event => {
|
|
344
|
-
const target = event.delegateTarget;
|
|
345
|
-
if (target.closest(SELECTOR.TAB_PANEL) === this._parent && !isDisabled(target)) this._updateSlider(target);
|
|
346
|
-
};
|
|
347
|
-
this._sliderOut = () => this._updateSlider(this._getActiveElem());
|
|
348
|
-
// Только один владелец общих обработчиков на группу вкладок.
|
|
349
|
-
const owner = this._getChildren().some(child => VGTabs.getInstance(child)?._sliderOver && child !== this._element);
|
|
350
|
-
if (owner) {
|
|
351
|
-
this._sliderOver = null;
|
|
352
|
-
this._sliderOut = null;
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
EventHandler.on(this._main_parent, EVENT_MOUSEOVER_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOver);
|
|
356
|
-
EventHandler.on(this._main_parent, EVENT_MOUSEOUT_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOut);
|
|
357
|
-
this._sliderResize = () => this._updateSlider(this._getActiveElem());
|
|
358
|
-
window.addEventListener('resize', this._sliderResize);
|
|
359
|
-
if (typeof ResizeObserver !== 'undefined') {
|
|
360
|
-
this._sliderObserver = new ResizeObserver(this._sliderResize);
|
|
361
|
-
this._sliderObserver.observe(this._parent);
|
|
362
|
-
this._getChildren().forEach(child => this._sliderObserver.observe(child));
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
_updateSlider(target) {
|
|
367
|
-
if (!target || !this._main_parent) return;
|
|
368
|
-
const slider = this._main_parent.querySelector(`.${CLASS_NAME.SLIDER}`);
|
|
369
|
-
if (!slider) return;
|
|
370
|
-
this._getChildren().forEach(child => child.classList.toggle(CLASS_NAME.HOVER, child === target));
|
|
371
|
-
const {width, height} = window.getComputedStyle(target);
|
|
372
|
-
Object.assign(slider.style, {width, height, left: `${target.offsetLeft}px`, top: `${target.offsetTop}px`});
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
dispose() {
|
|
376
|
-
if (!this._element) return;
|
|
377
|
-
const parent = this._main_parent;
|
|
378
|
-
const successor = this._sliderOver && this._getChildren()
|
|
379
|
-
.map(child => VGTabs.getInstance(child))
|
|
380
|
-
.find(instance => instance && instance !== this && instance._params.slide);
|
|
381
|
-
if (this._sliderOver) {
|
|
382
|
-
EventHandler.off(parent, EVENT_MOUSEOVER_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOver);
|
|
383
|
-
EventHandler.off(parent, EVENT_MOUSEOUT_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOut);
|
|
384
|
-
window.removeEventListener('resize', this._sliderResize);
|
|
385
|
-
this._sliderObserver?.disconnect();
|
|
386
|
-
}
|
|
387
|
-
super.dispose();
|
|
388
|
-
if (successor) successor._setInitialSlider();
|
|
389
|
-
else if (parent && !Selectors.findAll(SELECTOR.DATA_TOGGLE, parent).some(child => VGTabs.getInstance(child)?._params.slide)) {
|
|
390
|
-
parent.querySelector(`.${CLASS_NAME.SLIDER}`)?.remove();
|
|
391
|
-
parent.classList.remove(CLASS_NAME.WITH_SLIDER);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
342
|
+
this._updateSlider(this._getActiveElem());
|
|
343
|
+
this._sliderOver = event => {
|
|
344
|
+
const target = event.delegateTarget;
|
|
345
|
+
if (target.closest(SELECTOR.TAB_PANEL) === this._parent && !isDisabled(target)) this._updateSlider(target);
|
|
346
|
+
};
|
|
347
|
+
this._sliderOut = () => this._updateSlider(this._getActiveElem());
|
|
348
|
+
// Только один владелец общих обработчиков на группу вкладок.
|
|
349
|
+
const owner = this._getChildren().some(child => VGTabs.getInstance(child)?._sliderOver && child !== this._element);
|
|
350
|
+
if (owner) {
|
|
351
|
+
this._sliderOver = null;
|
|
352
|
+
this._sliderOut = null;
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
EventHandler.on(this._main_parent, EVENT_MOUSEOVER_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOver);
|
|
356
|
+
EventHandler.on(this._main_parent, EVENT_MOUSEOUT_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOut);
|
|
357
|
+
this._sliderResize = () => this._updateSlider(this._getActiveElem());
|
|
358
|
+
window.addEventListener('resize', this._sliderResize);
|
|
359
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
360
|
+
this._sliderObserver = new ResizeObserver(this._sliderResize);
|
|
361
|
+
this._sliderObserver.observe(this._parent);
|
|
362
|
+
this._getChildren().forEach(child => this._sliderObserver.observe(child));
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
_updateSlider(target) {
|
|
367
|
+
if (!target || !this._main_parent) return;
|
|
368
|
+
const slider = this._main_parent.querySelector(`.${CLASS_NAME.SLIDER}`);
|
|
369
|
+
if (!slider) return;
|
|
370
|
+
this._getChildren().forEach(child => child.classList.toggle(CLASS_NAME.HOVER, child === target));
|
|
371
|
+
const {width, height} = window.getComputedStyle(target);
|
|
372
|
+
Object.assign(slider.style, {width, height, left: `${target.offsetLeft}px`, top: `${target.offsetTop}px`});
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
dispose() {
|
|
376
|
+
if (!this._element) return;
|
|
377
|
+
const parent = this._main_parent;
|
|
378
|
+
const successor = this._sliderOver && this._getChildren()
|
|
379
|
+
.map(child => VGTabs.getInstance(child))
|
|
380
|
+
.find(instance => instance && instance !== this && instance._params.slide);
|
|
381
|
+
if (this._sliderOver) {
|
|
382
|
+
EventHandler.off(parent, EVENT_MOUSEOVER_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOver);
|
|
383
|
+
EventHandler.off(parent, EVENT_MOUSEOUT_DATA_API, SELECTOR.DATA_TOGGLE, this._sliderOut);
|
|
384
|
+
window.removeEventListener('resize', this._sliderResize);
|
|
385
|
+
this._sliderObserver?.disconnect();
|
|
386
|
+
}
|
|
387
|
+
super.dispose();
|
|
388
|
+
if (successor) successor._setInitialSlider();
|
|
389
|
+
else if (parent && !Selectors.findAll(SELECTOR.DATA_TOGGLE, parent).some(child => VGTabs.getInstance(child)?._params.slide)) {
|
|
390
|
+
parent.querySelector(`.${CLASS_NAME.SLIDER}`)?.remove();
|
|
391
|
+
parent.classList.remove(CLASS_NAME.WITH_SLIDER);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* Устанавливает базовые ARIA-атрибуты родителю
|
|
@@ -415,9 +415,9 @@ class VGTabs extends BaseModule {
|
|
|
415
415
|
if (outerElem !== child) {
|
|
416
416
|
this._setAttributeIfNotExists(outerElem, 'role', 'presentation');
|
|
417
417
|
}
|
|
418
|
-
if (!isActive) {
|
|
419
|
-
child.setAttribute('tabindex', '-1');
|
|
420
|
-
} else child.removeAttribute('tabindex');
|
|
418
|
+
if (!isActive) {
|
|
419
|
+
child.setAttribute('tabindex', '-1');
|
|
420
|
+
} else child.removeAttribute('tabindex');
|
|
421
421
|
this._setAttributeIfNotExists(child, 'role', 'tab');
|
|
422
422
|
this._setInitialAttributesOnTargetPanel(child);
|
|
423
423
|
}
|
|
@@ -453,8 +453,8 @@ class VGTabs extends BaseModule {
|
|
|
453
453
|
* @returns {HTMLElement[]}
|
|
454
454
|
*/
|
|
455
455
|
_getChildren() {
|
|
456
|
-
return Selectors.findAll(SELECTOR.INNER_ELEM, this._parent)
|
|
457
|
-
.filter(child => child.closest(SELECTOR.TAB_PANEL) === this._parent);
|
|
456
|
+
return Selectors.findAll(SELECTOR.INNER_ELEM, this._parent)
|
|
457
|
+
.filter(child => child.closest(SELECTOR.TAB_PANEL) === this._parent);
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
/**
|
|
@@ -515,4 +515,4 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
|
|
|
515
515
|
});
|
|
516
516
|
});
|
|
517
517
|
|
|
518
|
-
export default VGTabs;
|
|
518
|
+
export default VGTabs;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
@use "../../../utils/scss" as vg;
|
|
2
|
-
|
|
3
|
-
$tabs-map: (
|
|
4
|
-
panel-gap: 10px,
|
|
5
|
-
panel-margin-bottom: 1.5rem,
|
|
6
|
-
link-border-radius: vg.$border-radius,
|
|
7
|
-
link-border-style: vg.$border-style,
|
|
8
|
-
link-border-width: vg.$border-width,
|
|
9
|
-
link-border-color: var(--vg-border-color, #{vg.$border-color}),
|
|
10
|
-
link-border-active-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
11
|
-
link-border-focus-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
12
|
-
link-border-disabled-color: var(--vg-border-disabled-color, #{vg.$border-color-disabled}),
|
|
13
|
-
link-color: var(--vg-text-color, #{vg.$color}),
|
|
14
|
-
link-active-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
15
|
-
link-focus-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
16
|
-
link-disabled-color: var(--vg-text-disabled-color, #{vg.$color-disabled}),
|
|
1
|
+
@use "../../../utils/scss" as vg;
|
|
2
|
+
|
|
3
|
+
$tabs-map: (
|
|
4
|
+
panel-gap: 10px,
|
|
5
|
+
panel-margin-bottom: 1.5rem,
|
|
6
|
+
link-border-radius: vg.$border-radius,
|
|
7
|
+
link-border-style: vg.$border-style,
|
|
8
|
+
link-border-width: vg.$border-width,
|
|
9
|
+
link-border-color: var(--vg-border-color, #{vg.$border-color}),
|
|
10
|
+
link-border-active-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
11
|
+
link-border-focus-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
12
|
+
link-border-disabled-color: var(--vg-border-disabled-color, #{vg.$border-color-disabled}),
|
|
13
|
+
link-color: var(--vg-text-color, #{vg.$color}),
|
|
14
|
+
link-active-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
15
|
+
link-focus-color: var(--vg-primary-color, #{vg.$color-active}),
|
|
16
|
+
link-disabled-color: var(--vg-text-disabled-color, #{vg.$color-disabled}),
|
|
17
17
|
link-bg: transparent,
|
|
18
18
|
link-active-bg: transparent,
|
|
19
19
|
link-focus-bg: transparent,
|
|
20
20
|
link-disabled-bg: transparent,
|
|
21
21
|
link-padding-x: 16px,
|
|
22
22
|
link-padding-y: 8px,
|
|
23
|
-
link-transition: vg.$transition-base,
|
|
24
|
-
slider-bg: var(--vg-primary-color, #{vg.$color-active}),
|
|
25
|
-
slider-link-color: var(--vg-primary-contrast-color, #{vg.$color-inverse}),
|
|
26
|
-
slider-border-radius: vg.$border-radius,
|
|
27
|
-
slider-transition: vg.$transition-base,
|
|
23
|
+
link-transition: vg.$transition-base,
|
|
24
|
+
slider-bg: var(--vg-primary-color, #{vg.$color-active}),
|
|
25
|
+
slider-link-color: var(--vg-primary-contrast-color, #{vg.$color-inverse}),
|
|
26
|
+
slider-border-radius: vg.$border-radius,
|
|
27
|
+
slider-transition: vg.$transition-base,
|
|
28
28
|
track-slider-padding-x: 6px,
|
|
29
29
|
track-slider-padding-y: 6px,
|
|
30
30
|
track-slider-border-radius: 6px,
|
|
31
|
-
track-slider-bg: var(--vg-border-disabled-color, rgba(255, 255, 255, .1)),
|
|
32
|
-
) !default;
|
|
31
|
+
track-slider-bg: var(--vg-border-disabled-color, rgba(255, 255, 255, .1)),
|
|
32
|
+
) !default;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*--------------------------------------------------------------------------
|
|
7
7
|
**/
|
|
8
8
|
|
|
9
|
-
@forward "variables";
|
|
10
|
-
@use "../../../utils/scss" as vg;
|
|
11
|
-
@use "variables" as vars;
|
|
9
|
+
@forward "variables";
|
|
10
|
+
@use "../../../utils/scss" as vg;
|
|
11
|
+
@use "variables" as vars;
|
|
12
12
|
|
|
13
13
|
.vg-tabs {
|
|
14
|
-
@include vg.mix-vars('tabs', vars.$tabs-map);
|
|
14
|
+
@include vg.mix-vars('tabs', vars.$tabs-map);
|
|
15
15
|
|
|
16
16
|
&-panel {
|
|
17
17
|
display: flex;
|
|
@@ -108,4 +108,4 @@
|
|
|
108
108
|
> .active {
|
|
109
109
|
display: block;
|
|
110
110
|
}
|
|
111
|
-
}
|
|
111
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Описание: уведомления VGToast через Data API и JavaScript.
|
|
3
|
-
* Возможности: стек, AJAX, анимации, автоскрытие, перетаскивание и изменение размера.
|
|
4
|
-
*/
|
|
1
|
+
/**
|
|
2
|
+
* Описание: уведомления VGToast через Data API и JavaScript.
|
|
3
|
+
* Возможности: стек, AJAX, анимации, автоскрытие, перетаскивание и изменение размера.
|
|
4
|
+
*/
|
|
5
5
|
import BaseModule from "../../base-module";
|
|
6
6
|
import EventHandler from "../../../utils/js/dom/event";
|
|
7
7
|
import {dismissTrigger, getSVG} from "../../module-fn";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
@use "../../../utils/scss" as vg;
|
|
2
|
-
|
|
3
|
-
$toast-map: (
|
|
1
|
+
@use "../../../utils/scss" as vg;
|
|
2
|
+
|
|
3
|
+
$toast-map: (
|
|
4
4
|
indent: 1rem,
|
|
5
5
|
height: auto,
|
|
6
6
|
width: auto,
|
|
7
|
-
z-index: vg.$toast-index,
|
|
7
|
+
z-index: vg.$toast-index,
|
|
8
8
|
transition: all .3s ease-in-out,
|
|
9
9
|
padding: 8px 22px,
|
|
10
10
|
font-size: 1.125rem,
|
|
11
|
-
background-color: var(--vg-surface-bg, #{vg.$surface-bg}),
|
|
12
|
-
color: var(--vg-text-color, #{vg.$color}),
|
|
13
|
-
border-width: vg.$border-width,
|
|
14
|
-
border-color: transparent,
|
|
15
|
-
border-style: vg.$border-style,
|
|
16
|
-
border-radius: 20px,
|
|
17
|
-
box-shadow: var(--vg-box-shadow, #{vg.$box-shadow}),
|
|
11
|
+
background-color: var(--vg-surface-bg, #{vg.$surface-bg}),
|
|
12
|
+
color: var(--vg-text-color, #{vg.$color}),
|
|
13
|
+
border-width: vg.$border-width,
|
|
14
|
+
border-color: transparent,
|
|
15
|
+
border-style: vg.$border-style,
|
|
16
|
+
border-radius: 20px,
|
|
17
|
+
box-shadow: var(--vg-box-shadow, #{vg.$box-shadow}),
|
|
18
18
|
header-font-weight: 500,
|
|
19
19
|
header-font-size: .975rem,
|
|
20
20
|
body-font-size: 1rem,
|
|
21
|
-
body-font-weight: 400,
|
|
22
|
-
) !default;
|
|
21
|
+
body-font-weight: 400,
|
|
22
|
+
) !default;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*--------------------------------------------------------------------------
|
|
7
7
|
**/
|
|
8
8
|
|
|
9
|
-
@forward "variables";
|
|
10
|
-
@use "../../../utils/scss" as vg;
|
|
11
|
-
@use "variables" as vars;
|
|
9
|
+
@forward "variables";
|
|
10
|
+
@use "../../../utils/scss" as vg;
|
|
11
|
+
@use "variables" as vars;
|
|
12
12
|
|
|
13
13
|
.vg-toast {
|
|
14
|
-
@include vg.mix-vars('toast', vars.$toast-map);
|
|
15
|
-
@include vg.mix-alert-color-mode($class: vg-toast);
|
|
14
|
+
@include vg.mix-vars('toast', vars.$toast-map);
|
|
15
|
+
@include vg.mix-alert-color-mode($class: vg-toast);
|
|
16
16
|
position: fixed;
|
|
17
17
|
width: var(--vg-toast-width);
|
|
18
18
|
height: var(--vg-toast-height);
|