vgapp 1.5.7 → 1.5.9

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.
Files changed (111) hide show
  1. package/app/langs/en/buttons.json +17 -17
  2. package/app/langs/en/messages.json +36 -36
  3. package/app/langs/ru/buttons.json +17 -17
  4. package/app/langs/ru/messages.json +1 -1
  5. package/app/modules/vgalert/js/vgalert.js +15 -12
  6. package/app/modules/vgalert/scss/_variables.scss +16 -16
  7. package/app/modules/vgalert/scss/vgalert.scss +13 -6
  8. package/app/modules/vgcollapse/scss/_variables.scss +7 -7
  9. package/app/modules/vgcollapse/scss/vgcollapse.scss +5 -5
  10. package/app/modules/vgdropdown/scss/_variables.scss +14 -14
  11. package/app/modules/vgdropdown/scss/vgdropdown.scss +5 -5
  12. package/app/modules/vgfilepreview/js/i18n.js +56 -56
  13. package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
  14. package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
  15. package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
  16. package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
  17. package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
  18. package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
  19. package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
  20. package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
  21. package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
  22. package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
  23. package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
  24. package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
  25. package/app/modules/vgfilepreview/readme.md +68 -68
  26. package/app/modules/vgfiles/js/base.js +198 -198
  27. package/app/modules/vgfiles/js/droppable.js +17 -17
  28. package/app/modules/vgfiles/js/render.js +153 -153
  29. package/app/modules/vgfiles/js/sortable.js +52 -52
  30. package/app/modules/vgfiles/js/vgfiles.js +43 -43
  31. package/app/modules/vgfiles/readme.md +123 -123
  32. package/app/modules/vgfiles/scss/_mixins.scss +13 -13
  33. package/app/modules/vgfiles/scss/_variables.scss +10 -10
  34. package/app/modules/vgfiles/scss/vgfiles.scss +28 -28
  35. package/app/modules/vgformsender/js/hideshowpass.js +22 -22
  36. package/app/modules/vgformsender/readme.md +1 -1
  37. package/app/modules/vgformsender/scss/_variables.scss +5 -5
  38. package/app/modules/vgformsender/scss/vgformsender.scss +42 -42
  39. package/app/modules/vglawcookie/js/vglawcookie.js +19 -19
  40. package/app/modules/vglawcookie/scss/_variables.scss +13 -13
  41. package/app/modules/vglawcookie/scss/vglawcookie.scss +5 -5
  42. package/app/modules/vgmodal/js/vgmodal.interaction.js +216 -216
  43. package/app/modules/vgmodal/js/vgmodal.js +9 -9
  44. package/app/modules/vgmodal/js/vgmodal.minimized.js +227 -227
  45. package/app/modules/vgmodal/scss/_variables.scss +17 -17
  46. package/app/modules/vgmodal/scss/vgmodal.scss +77 -77
  47. package/app/modules/vgnav/js/vgnav.js +137 -84
  48. package/app/modules/vgnav/scss/_breakpoints.scss +36 -36
  49. package/app/modules/vgnav/scss/_hamburger.scss +5 -5
  50. package/app/modules/vgnav/scss/_placement.scss +5 -5
  51. package/app/modules/vgnav/scss/_toggle.scss +5 -5
  52. package/app/modules/vgnav/scss/_variables.scss +26 -26
  53. package/app/modules/vgnav/scss/vgnav.scss +41 -41
  54. package/app/modules/vgnestable/README.md +39 -39
  55. package/app/modules/vgrangeslider/js/skins.js +8 -8
  56. package/app/modules/vgrangeslider/js/vgrangeslider.js +29 -29
  57. package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
  58. package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
  59. package/app/modules/vgrollup/js/vgrollup.js +15 -15
  60. package/app/modules/vgrollup/scss/_variables.scss +15 -15
  61. package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
  62. package/app/modules/vgselect/js/handlers.js +6 -6
  63. package/app/modules/vgselect/js/vgselect.js +167 -123
  64. package/app/modules/vgselect/readme.md +11 -11
  65. package/app/modules/vgselect/scss/_variables.scss +51 -51
  66. package/app/modules/vgselect/scss/vgselect.scss +1 -1
  67. package/app/modules/vgsidebar/js/vgsidebar.js +21 -21
  68. package/app/modules/vgsidebar/scss/_variables.scss +10 -10
  69. package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
  70. package/app/modules/vgspy/js/vgspy.js +43 -43
  71. package/app/modules/vgtable/js/_filters.js +10 -6
  72. package/app/modules/vgtable/js/_options.js +16 -16
  73. package/app/modules/vgtable/js/_pagination.js +118 -118
  74. package/app/modules/vgtable/js/_responsive.js +79 -79
  75. package/app/modules/vgtable/js/_sticky-header.js +349 -280
  76. package/app/modules/vgtable/js/vgtable.js +98 -98
  77. package/app/modules/vgtable/scss/_fixed-columns.scss +23 -25
  78. package/app/modules/vgtable/scss/_sorting.scss +6 -6
  79. package/app/modules/vgtable/scss/_sticky-header.scss +31 -31
  80. package/app/modules/vgtable/scss/_variables.scss +6 -4
  81. package/app/modules/vgtable/scss/vgtable.scss +8 -4
  82. package/app/modules/vgtabs/js/vgtabs.js +91 -91
  83. package/app/modules/vgtabs/scss/_variables.scss +23 -23
  84. package/app/modules/vgtabs/scss/vgtabs.scss +5 -5
  85. package/app/modules/vgtoast/js/vgtoast.js +4 -4
  86. package/app/modules/vgtoast/scss/_variables.scss +13 -13
  87. package/app/modules/vgtoast/scss/vgtoast.scss +5 -5
  88. package/app/modules/vgtooltip/js/vgtooltip.js +127 -127
  89. package/app/modules/vgtooltip/scss/_variables.scss +10 -10
  90. package/app/modules/vgtooltip/scss/vgtooltip.scss +5 -5
  91. package/app/utils/js/components/audio-metadata.js +240 -240
  92. package/app/utils/js/components/backdrop.js +116 -116
  93. package/app/utils/js/components/file-icon.js +7 -7
  94. package/app/utils/js/components/file-preview.js +304 -304
  95. package/app/utils/js/components/responsive.js +165 -165
  96. package/app/utils/js/components/sanitize.js +150 -150
  97. package/app/utils/js/components/video-metadata.js +140 -140
  98. package/app/utils/scss/_backdrop.scss +5 -5
  99. package/app/utils/scss/_theme-default.scss +12 -12
  100. package/app/utils/scss/_theme.scss +7 -7
  101. package/app/utils/scss/default.scss +9 -9
  102. package/app/utils/scss/functions.scss +21 -21
  103. package/app/utils/scss/index.scss +4 -4
  104. package/app/utils/scss/mixin.scss +16 -16
  105. package/app/utils/scss/variables.scss +147 -147
  106. package/build/vgapp.css +1 -1
  107. package/build/vgapp.css.map +1 -1
  108. package/build/vgapp.js +1 -1
  109. package/build/vgapp.js.map +1 -1
  110. package/index.js +7 -7
  111. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
- /**
2
- * Описание: адаптивная навигация VGNav с выпадающими пунктами и гамбургером.
3
- * Возможности: click/hover, вложенные меню, позиционирование, события и интеграция с VGSidebar.
4
- */
5
- import BaseModule from "../../base-module";
1
+ /**
2
+ * Описание: адаптивная навигация VGNav с выпадающими пунктами и гамбургером.
3
+ * Возможности: click/hover, вложенные меню, позиционирование, события и интеграция с VGSidebar.
4
+ */
5
+ import BaseModule from "../../base-module";
6
6
  import Selectors from "../../../utils/js/dom/selectors";
7
7
  import {
8
- execute,
9
- isDisabled,
8
+ execute,
9
+ getTransitionDurationFromElement,
10
+ isDisabled,
10
11
  isMobileDevice,
11
12
  isVisible,
12
13
  mergeDeepObject,
@@ -33,7 +34,7 @@ const CLASS_NAME_ACTIVE = 'active';
33
34
  /**
34
35
  * Constants toggle
35
36
  */
36
- const SELECTOR_DATA_TOGGLE = '.' + CLASS_NAME + ' .dropdown > a';
37
+ const SELECTOR_DATA_TOGGLE = '.' + CLASS_NAME + ' .dropdown > a';
37
38
 
38
39
  /**
39
40
  * Constants Events
@@ -127,8 +128,9 @@ class VGNav extends BaseModule {
127
128
  this._params.animation.timeout = 10;
128
129
  }
129
130
 
130
- this._openDrops = new Map();
131
- this._pointerPosition = null;
131
+ this._openDrops = new Map();
132
+ this._pointerPosition = null;
133
+ this._smoothSwitch = null;
132
134
  this._handleScroll = this._handleScroll.bind(this);
133
135
  this._handleResize = this._handleResize.bind(this);
134
136
  }
@@ -219,43 +221,43 @@ class VGNav extends BaseModule {
219
221
  }
220
222
  }
221
223
 
222
- show(relatedTarget) {
223
- let target = relatedTarget.relatedTarget;
224
-
225
- if (!target || isDisabled(target)) return;
226
- const drop = Selectors.find(':scope > .dropdown-content', target);
227
- if (!drop) return;
228
-
229
- const showEvent = EventHandler.trigger(target, EVENT_KEY_SHOW, { relatedTarget });
230
- if (showEvent.defaultPrevented) return;
231
-
232
- if (!target.closest('.dropdown-content')) {
233
- target.classList.add('first');
234
- }
235
-
236
- const link = target.firstElementChild;
224
+ show(relatedTarget) {
225
+ let target = relatedTarget.relatedTarget;
226
+
227
+ if (!target || isDisabled(target)) return;
228
+ const drop = Selectors.find(':scope > .dropdown-content', target);
229
+ if (!drop) return;
230
+
231
+ const showEvent = EventHandler.trigger(target, EVENT_KEY_SHOW, { relatedTarget });
232
+ if (showEvent.defaultPrevented) return;
233
+
234
+ if (!target.closest('.dropdown-content')) {
235
+ target.classList.add('first');
236
+ }
237
+
238
+ const link = target.firstElementChild;
237
239
 
238
240
  if (link) link.setAttribute('aria-expanded', 'true');
239
- drop.classList.add(CLASS_NAME_SHOW);
240
- target.classList.add(CLASS_NAME_ACTIVE);
241
- // Координаты Placement имеют приоритет над старой CSS-схемой top/bottom/right.
242
- drop.style.bottom = 'auto';
243
- drop.style.right = 'auto';
244
- const openToSide = !!target.closest('.dropdown-content') || this._params.placement === 'vertical';
245
-
246
- const $placement = new Placement({
247
- reference: target,
248
- drop: drop,
249
- placement: openToSide ? 'right-start' : 'bottom-start',
250
- fallbackPlacements: openToSide
251
- ? ['left-start', 'right-end', 'left-end', 'bottom-start', 'top-start']
252
- : ['top-start', 'bottom-end', 'top-end'],
253
- offset: openToSide ? [6, 0] : [0, 6],
254
- boundary: 'clippingParents',
255
- autoFlip: true,
256
- overflowProtection: true,
257
- clamp: true,
258
- isMerge: false
241
+ drop.classList.add(CLASS_NAME_SHOW);
242
+ target.classList.add(CLASS_NAME_ACTIVE);
243
+ // Координаты Placement имеют приоритет над старой CSS-схемой top/bottom/right.
244
+ drop.style.bottom = 'auto';
245
+ drop.style.right = 'auto';
246
+ const openToSide = !!target.closest('.dropdown-content') || this._params.placement === 'vertical';
247
+
248
+ const $placement = new Placement({
249
+ reference: target,
250
+ drop: drop,
251
+ placement: openToSide ? 'right-start' : 'bottom-start',
252
+ fallbackPlacements: openToSide
253
+ ? ['left-start', 'right-end', 'left-end', 'bottom-start', 'top-start']
254
+ : ['top-start', 'bottom-end', 'top-end'],
255
+ offset: openToSide ? [6, 0] : [0, 6],
256
+ boundary: 'clippingParents',
257
+ autoFlip: true,
258
+ overflowProtection: true,
259
+ clamp: true,
260
+ isMerge: false
259
261
  });
260
262
 
261
263
  $placement._setPlacement();
@@ -277,8 +279,8 @@ class VGNav extends BaseModule {
277
279
  this._queueCallback(completeCallBack, drop, true, 10);
278
280
  }
279
281
 
280
- hide(relatedTarget) {
281
- const _this = this;
282
+ hide(relatedTarget) {
283
+ const _this = this;
282
284
 
283
285
  let element = relatedTarget.relatedTarget;
284
286
 
@@ -296,7 +298,7 @@ class VGNav extends BaseModule {
296
298
  element.classList.remove('first');
297
299
  }
298
300
 
299
- [...Selectors.findAll('.dropdown-content.' + CLASS_NAME_SHOW, element)].forEach(function (el) {
301
+ [...Selectors.findAll('.dropdown-content.' + CLASS_NAME_SHOW, element)].forEach(function (el) {
300
302
  el.classList.remove(CLASS_NAME_FADE);
301
303
 
302
304
  let parent = el.closest('.dropdown');
@@ -307,14 +309,14 @@ class VGNav extends BaseModule {
307
309
  let link = el.previousElementSibling;
308
310
  if (link) link.setAttribute('aria-expanded', 'false');
309
311
 
310
- const completeCallback = () => {
311
- if (parent.classList.contains(CLASS_NAME_ACTIVE)) return;
312
- el.classList.remove(CLASS_NAME_SHOW);
313
- EventHandler.trigger(el, EVENT_KEY_HIDDEN, relatedTarget);
314
- };
315
-
316
- _this._queueCallback(completeCallback, el, true, 500);
317
- _this._cleanupDrop(el);
312
+ const completeCallback = () => {
313
+ if (parent.classList.contains(CLASS_NAME_ACTIVE)) return;
314
+ el.classList.remove(CLASS_NAME_SHOW);
315
+ EventHandler.trigger(el, EVENT_KEY_HIDDEN, relatedTarget);
316
+ };
317
+
318
+ _this._queueCallback(completeCallback, el, true, 500);
319
+ _this._cleanupDrop(el);
318
320
  });
319
321
  }
320
322
  }
@@ -342,16 +344,16 @@ class VGNav extends BaseModule {
342
344
  }
343
345
  }
344
346
 
345
- _cleanupDrop(drop) {
346
- const dropData = this._openDrops.get(drop);
347
- if (dropData) {
348
- this._openDrops.delete(drop);
349
- // Обработчики общие для экземпляра: другие открытые уровни ещё нуждаются в них.
350
- if (!this._openDrops.size) {
351
- window.removeEventListener('scroll', dropData.scrollHandler, { capture: true });
352
- window.removeEventListener('resize', dropData.resizeHandler);
353
- }
354
- }
347
+ _cleanupDrop(drop) {
348
+ const dropData = this._openDrops.get(drop);
349
+ if (dropData) {
350
+ this._openDrops.delete(drop);
351
+ // Обработчики общие для экземпляра: другие открытые уровни ещё нуждаются в них.
352
+ if (!this._openDrops.size) {
353
+ window.removeEventListener('scroll', dropData.scrollHandler, { capture: true });
354
+ window.removeEventListener('resize', dropData.resizeHandler);
355
+ }
356
+ }
355
357
  }
356
358
 
357
359
  _isElementInViewport(el) {
@@ -397,7 +399,7 @@ class VGNav extends BaseModule {
397
399
  return drop.previousElementSibling === relatedDrop || drop.nextElementSibling === relatedDrop;
398
400
  }
399
401
 
400
- _canSmoothSwitchFirstLevel(event, currentDrop, relatedDrop) {
402
+ _canSmoothSwitchFirstLevel(event, currentDrop, relatedDrop) {
401
403
  const smoothParams = this._params.hoversmoothfirstlevel || {};
402
404
  if (!smoothParams.enable) return false;
403
405
  if (!currentDrop || !relatedDrop || currentDrop === relatedDrop) return false;
@@ -406,8 +408,52 @@ class VGNav extends BaseModule {
406
408
  if (!this._isAdjacentDropdown(currentDrop, relatedDrop)) return false;
407
409
  if (smoothParams.horizontalOnly && !this._isHorizontalPointerMove(event)) return false;
408
410
 
409
- return true;
410
- }
411
+ return true;
412
+ }
413
+
414
+ _scheduleSmoothSwitchCompletion(dropContent, callback) {
415
+ const duration = getTransitionDurationFromElement(dropContent);
416
+ if (!duration) {
417
+ callback();
418
+ return;
419
+ }
420
+
421
+ window.setTimeout(callback, duration);
422
+ }
423
+
424
+ _startSmoothSwitch(currentDrop, previousDrop, dropContent) {
425
+ const staleSwitch = this._smoothSwitch;
426
+ const transfer = { currentDrop, previousDrop };
427
+ this._smoothSwitch = transfer;
428
+
429
+ if (
430
+ staleSwitch?.previousDrop
431
+ && staleSwitch.previousDrop !== currentDrop
432
+ && staleSwitch.previousDrop !== previousDrop
433
+ && staleSwitch.previousDrop.classList.contains(CLASS_NAME_ACTIVE)
434
+ ) {
435
+ this.hide({ relatedTarget: staleSwitch.previousDrop });
436
+ }
437
+
438
+ this._scheduleSmoothSwitchCompletion(dropContent, () => {
439
+ if (this._smoothSwitch !== transfer) return;
440
+ this._smoothSwitch = null;
441
+ if (!currentDrop.isConnected || !previousDrop.isConnected) return;
442
+ if (!currentDrop.classList.contains(CLASS_NAME_ACTIVE)) return;
443
+ if (previousDrop.classList.contains(CLASS_NAME_ACTIVE)) {
444
+ this.hide({ relatedTarget: previousDrop });
445
+ }
446
+ });
447
+ }
448
+
449
+ _cancelSmoothSwitch(exceptDrop = null) {
450
+ const transfer = this._smoothSwitch;
451
+ this._smoothSwitch = null;
452
+ if (!transfer?.previousDrop || transfer.previousDrop === exceptDrop) return;
453
+ if (transfer.previousDrop.classList.contains(CLASS_NAME_ACTIVE)) {
454
+ this.hide({ relatedTarget: transfer.previousDrop });
455
+ }
456
+ }
411
457
 
412
458
  static init(element, params = {}) {
413
459
  const instance = VGNav.getOrCreateInstance(element, params);
@@ -435,19 +481,24 @@ class VGNav extends BaseModule {
435
481
  const previousDrop = event.relatedTarget?.closest('.dropdown');
436
482
  const useSmoothSwitch = instance._canSmoothSwitchFirstLevel(event, target, previousDrop);
437
483
 
438
- if (!useSmoothSwitch) {
439
- VGNav.hideOpenDrops(event);
484
+ if (!useSmoothSwitch) {
485
+ instance._cancelSmoothSwitch(target);
486
+ VGNav.hideOpenDrops(event);
440
487
  }
441
488
 
442
489
  let relatedTarget = {
443
490
  relatedTarget: target
444
491
  };
445
492
 
446
- instance.show(relatedTarget);
447
-
448
- if (useSmoothSwitch && previousDrop && previousDrop.classList.contains(CLASS_NAME_ACTIVE)) {
449
- instance.hide({ relatedTarget: previousDrop });
450
- }
493
+ instance.show(relatedTarget);
494
+
495
+ if (useSmoothSwitch && previousDrop && previousDrop.classList.contains(CLASS_NAME_ACTIVE)) {
496
+ const nextDropContent = Selectors.find(':scope > .dropdown-content', target);
497
+ if (nextDropContent) {
498
+ nextDropContent.classList.add(CLASS_NAME_FADE);
499
+ instance._startSmoothSwitch(target, previousDrop, nextDropContent);
500
+ }
501
+ }
451
502
 
452
503
  instance._updatePointerPosition(event);
453
504
  });
@@ -464,14 +515,16 @@ class VGNav extends BaseModule {
464
515
  relatedTarget = relatedTarget.parentNode;
465
516
  }
466
517
 
467
- if (instance._canSmoothSwitchFirstLevel(event, elm, nextDrop)) {
468
- currentElem = null;
469
- instance._updatePointerPosition(event);
470
- return;
471
- }
472
-
473
- currentElem = null;
474
- instance.hide({ relatedTarget: relatedTarget, elm: elm });
518
+ if (instance._canSmoothSwitchFirstLevel(event, elm, nextDrop)) {
519
+ currentElem = null;
520
+ // Сохраняем предыдущую точку до mouseover соседнего пункта:
521
+ // она нужна повторной проверке направления и передаче открытого состояния.
522
+ return;
523
+ }
524
+
525
+ currentElem = null;
526
+ instance._cancelSmoothSwitch(elm);
527
+ instance.hide({ relatedTarget: relatedTarget, elm: elm });
475
528
  instance._updatePointerPosition(event);
476
529
  });
477
530
  });
@@ -1,8 +1,8 @@
1
- @use "sass:list";
2
- @use "sass:map";
3
- @use "variables" as vars;
4
-
5
- // Breakpoint viewport sizes and media queries.
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+ @use "variables" as vars;
4
+
5
+ // Breakpoint viewport sizes and media queries.
6
6
  //
7
7
  // Breakpoints are defined as a map of (name: minimum width), order from small to large:
8
8
  //
@@ -18,27 +18,27 @@
18
18
  // md
19
19
  // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))
20
20
  // md
21
- @function breakpoint-next($name, $breakpoints: vars.$grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) {
22
- $n: list.index($breakpoint-names, $name);
23
- @if not $n {
24
- @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
25
- }
26
- @if $n < list.length($breakpoint-names) {
27
- @return list.nth($breakpoint-names, $n + 1);
28
- }
29
- @return null;
21
+ @function breakpoint-next($name, $breakpoints: vars.$grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) {
22
+ $n: list.index($breakpoint-names, $name);
23
+ @if not $n {
24
+ @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
25
+ }
26
+ @if $n < list.length($breakpoint-names) {
27
+ @return list.nth($breakpoint-names, $n + 1);
28
+ }
29
+ @return null;
30
30
  }
31
31
 
32
32
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
33
33
  //
34
34
  // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
35
35
  // 576px
36
- @function breakpoint-min($name, $breakpoints: vars.$grid-breakpoints) {
37
- $min: map.get($breakpoints, $name);
38
- @if $min != 0 {
39
- @return $min;
40
- }
41
- @return null;
36
+ @function breakpoint-min($name, $breakpoints: vars.$grid-breakpoints) {
37
+ $min: map.get($breakpoints, $name);
38
+ @if $min != 0 {
39
+ @return $min;
40
+ }
41
+ @return null;
42
42
  }
43
43
 
44
44
  // Maximum breakpoint width.
@@ -50,12 +50,12 @@
50
50
  //
51
51
  // >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
52
52
  // 767.98px
53
- @function breakpoint-max($name, $breakpoints: vars.$grid-breakpoints) {
54
- $max: map.get($breakpoints, $name);
55
- @if $max and $max > 0 {
56
- @return $max - .02;
57
- }
58
- @return null;
53
+ @function breakpoint-max($name, $breakpoints: vars.$grid-breakpoints) {
54
+ $max: map.get($breakpoints, $name);
55
+ @if $max and $max > 0 {
56
+ @return $max - .02;
57
+ }
58
+ @return null;
59
59
  }
60
60
 
61
61
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
@@ -65,16 +65,16 @@
65
65
  // "" (Returns a blank string)
66
66
  // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
67
67
  // "-sm"
68
- @function breakpoint-infix($name, $breakpoints: vars.$grid-breakpoints) {
69
- @if breakpoint-min($name, $breakpoints) == null {
70
- @return "";
71
- }
72
- @return "-#{$name}";
68
+ @function breakpoint-infix($name, $breakpoints: vars.$grid-breakpoints) {
69
+ @if breakpoint-min($name, $breakpoints) == null {
70
+ @return "";
71
+ }
72
+ @return "-#{$name}";
73
73
  }
74
74
 
75
75
  // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
76
76
  // Makes the @content apply to the given breakpoint and wider.
77
- @mixin media-breakpoint-up($name, $breakpoints: vars.$grid-breakpoints) {
77
+ @mixin media-breakpoint-up($name, $breakpoints: vars.$grid-breakpoints) {
78
78
  $min: breakpoint-min($name, $breakpoints);
79
79
  @if $min {
80
80
  @media (min-width: $min) {
@@ -87,7 +87,7 @@
87
87
 
88
88
  // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
89
89
  // Makes the @content apply to the given breakpoint and narrower.
90
- @mixin media-breakpoint-down($name, $breakpoints: vars.$grid-breakpoints) {
90
+ @mixin media-breakpoint-down($name, $breakpoints: vars.$grid-breakpoints) {
91
91
  $max: breakpoint-max($name, $breakpoints);
92
92
  @if $max {
93
93
  @media (max-width: $max) {
@@ -100,7 +100,7 @@
100
100
 
101
101
  // Media that spans multiple breakpoint widths.
102
102
  // Makes the @content apply between the min and max breakpoints
103
- @mixin media-breakpoint-between($lower, $upper, $breakpoints: vars.$grid-breakpoints) {
103
+ @mixin media-breakpoint-between($lower, $upper, $breakpoints: vars.$grid-breakpoints) {
104
104
  $min: breakpoint-min($lower, $breakpoints);
105
105
  $max: breakpoint-max($upper, $breakpoints);
106
106
 
@@ -122,7 +122,7 @@
122
122
  // Media between the breakpoint's minimum and maximum widths.
123
123
  // No minimum for the smallest breakpoint, and no maximum for the largest one.
124
124
  // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
125
- @mixin media-breakpoint-only($name, $breakpoints: vars.$grid-breakpoints) {
125
+ @mixin media-breakpoint-only($name, $breakpoints: vars.$grid-breakpoints) {
126
126
  $min: breakpoint-min($name, $breakpoints);
127
127
  $next: breakpoint-next($name, $breakpoints);
128
128
  $max: breakpoint-max($next, $breakpoints);
@@ -140,4 +140,4 @@
140
140
  @content;
141
141
  }
142
142
  }
143
- }
143
+ }
@@ -1,5 +1,5 @@
1
- @mixin hamburger() {
2
- .vg-nav-hamburger {
1
+ @mixin hamburger() {
2
+ .vg-nav-hamburger {
3
3
  display: none;
4
4
  align-items: flex-start;
5
5
 
@@ -60,6 +60,6 @@
60
60
  }
61
61
  }
62
62
  }
63
- }
64
-
65
- }
63
+ }
64
+
65
+ }
@@ -1,5 +1,5 @@
1
- @mixin placement() {
2
- &.vg-nav-horizontal {
1
+ @mixin placement() {
2
+ &.vg-nav-horizontal {
3
3
  .vg-nav-wrapper {
4
4
  flex-direction: row;
5
5
  }
@@ -23,6 +23,6 @@
23
23
  }
24
24
  }
25
25
  }
26
- }
27
-
28
- }
26
+ }
27
+
28
+ }
@@ -1,5 +1,5 @@
1
- @mixin toggle() {
2
- .toggle {
1
+ @mixin toggle() {
2
+ .toggle {
3
3
  transition: var(--vg-nav-transition);
4
4
  transform: rotate(0);
5
5
 
@@ -18,6 +18,6 @@
18
18
  vertical-align: .255em;
19
19
  }
20
20
  }
21
- }
22
-
23
- }
21
+ }
22
+
23
+ }
@@ -1,9 +1,9 @@
1
- @use "sass:map";
2
- @use "../../../utils/scss" as vg;
3
-
4
- $nav-map: (
5
- transition: all .2s ease-in-out,
6
- ) !default;
1
+ @use "sass:map";
2
+ @use "../../../utils/scss" as vg;
3
+
4
+ $nav-map: (
5
+ transition: all .2s ease-in-out,
6
+ ) !default;
7
7
 
8
8
  $nav-item-map: (
9
9
  margin: 0,
@@ -11,39 +11,39 @@ $nav-item-map: (
11
11
  font-size: 1rem,
12
12
  font-weight: 400,
13
13
  line-height: 1.4,
14
- color: var(--vg-text-color, #212529),
14
+ color: var(--vg-text-color, #212529),
15
15
  decoration: none,
16
16
  display: inline-block,
17
17
  border: none,
18
18
  border-radius: 0,
19
19
  white-space: nowrap,
20
- position: relative,
21
- ) !default;
20
+ position: relative,
21
+ ) !default;
22
22
 
23
23
  $nav-drop-map: (
24
24
  z-index: 10,
25
- transition: map.get($nav-map, transition),
25
+ transition: map.get($nav-map, transition),
26
26
  width: 200px,
27
27
  max-height: 650px,
28
- border-color: var(--vg-border-color, #{vg.$border-color}),
28
+ border-color: var(--vg-border-color, #{vg.$border-color}),
29
29
  border-radius: 0,
30
30
  padding: 0,
31
- bg: var(--vg-surface-bg, #{vg.$surface-bg}),
31
+ bg: var(--vg-surface-bg, #{vg.$surface-bg}),
32
32
  overflow-y: auto,
33
- overflow-x: visible,
34
- ) !default;
33
+ overflow-x: visible,
34
+ ) !default;
35
35
 
36
36
  $nav-drop-mega-map: (
37
37
  width: 100%,
38
38
  min-height: 300px,
39
- bg: var(--vg-surface-bg, #{vg.$surface-bg}),
40
- border-color: var(--vg-border-color, #{vg.$border-color}),
39
+ bg: var(--vg-surface-bg, #{vg.$surface-bg}),
40
+ border-color: var(--vg-border-color, #{vg.$border-color}),
41
41
  border-radius: 0,
42
42
  padding: 1rem,
43
43
  z-index: 10,
44
- transition: map.get($nav-map, transition),
45
- max-height: 600px,
46
- ) !default;
44
+ transition: map.get($nav-map, transition),
45
+ max-height: 600px,
46
+ ) !default;
47
47
 
48
48
  $nav-drop-item-map: (
49
49
  padding: .75rem 1rem,
@@ -53,16 +53,16 @@ $nav-drop-item-map: (
53
53
  bg-hover: transparent,
54
54
  color: inherit,
55
55
  color-hover: inherit,
56
- transition: map.get($nav-map, transition),
57
- ) !default;
56
+ transition: map.get($nav-map, transition),
57
+ ) !default;
58
58
 
59
59
  $hamburger-map: (
60
60
  height: 27px,
61
61
  line-width: 35px,
62
- line-color: var(--vg-text-emphasis-color, #333333),
62
+ line-color: var(--vg-text-emphasis-color, #333333),
63
63
  line-height: 3px,
64
- line-indent-top: 7px
65
- ) !default;
64
+ line-indent-top: 7px
65
+ ) !default;
66
66
 
67
67
  $grid-breakpoints: (
68
68
  xs: 576px,
@@ -71,5 +71,5 @@ $grid-breakpoints: (
71
71
  lg: 1200px,
72
72
  xl: 1400px,
73
73
  xxl: 1600px,
74
- xxxl: 1800px
75
- ) !default;
74
+ xxxl: 1800px
75
+ ) !default;