srcdev-nuxt-components 9.1.11 → 9.1.12

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.
@@ -5,7 +5,7 @@
5
5
  :class="[
6
6
  elementClasses,
7
7
  `site-navigation--${navAlign}`,
8
- { 'is-collapsed': isCollapsed, 'is-loaded': isLoaded, 'menu-open': isMenuOpen },
8
+ { 'is-collapsed': isCollapsed, 'is-loaded': isLoaded, 'menu-open': isMenuOpen, 'is-animated': isAnimated },
9
9
  ]"
10
10
  aria-label="Site navigation"
11
11
  >
@@ -113,6 +113,10 @@ const props = withDefaults(defineProps<Props>(), {
113
113
  styleClassPassthrough: () => [],
114
114
  });
115
115
 
116
+ // ─── Animation gate — prevents indicator from transitioning on first paint ───
117
+
118
+ const isAnimated = ref(false);
119
+
116
120
  // ─── Nav decorators (active / hover indicators) ─────────────────────────────
117
121
 
118
122
  const NAV_DECORATOR_DURATION = 200;
@@ -336,12 +340,19 @@ const { navRef, navListRef, isCollapsed, isLoaded, isMenuOpen, activeHref, isAct
336
340
  }
337
341
  },
338
342
  onRouteChange: () => {
343
+ isAnimated.value = false;
339
344
  requestAnimationFrame(() => {
340
345
  initNavDecorators();
346
+ nextTick(() => {
347
+ isAnimated.value = true;
348
+ });
341
349
  });
342
350
  },
343
351
  onMounted: () => {
344
352
  initNavDecorators();
353
+ nextTick(() => {
354
+ isAnimated.value = true;
355
+ });
345
356
  },
346
357
  });
347
358
 
@@ -473,10 +484,15 @@ watch(
473
484
  scale: var(--_width-hovered, 0.001) 1;
474
485
  translate: var(--_x-hovered, 0) 0;
475
486
  transform-origin: left;
487
+ pointer-events: none;
488
+ }
489
+
490
+ .site-navigation.is-animated & .nav__hovered,
491
+ .site-navigation.is-animated & .nav__active,
492
+ .site-navigation.is-animated & .nav__active-indicator {
476
493
  transition:
477
494
  scale var(--_transition-duration, 200ms),
478
495
  translate var(--_transition-duration, 200ms);
479
- pointer-events: none;
480
496
  }
481
497
 
482
498
  .nav__active {
@@ -661,10 +677,15 @@ watch(
661
677
  scale: 1 var(--_panel-height-hovered, 0.001);
662
678
  translate: 0 var(--_panel-y-hovered, 0);
663
679
  transform-origin: top;
680
+ pointer-events: none;
681
+ }
682
+
683
+ .site-navigation.is-animated & .nav__hovered,
684
+ .site-navigation.is-animated & .nav__active,
685
+ .site-navigation.is-animated & .nav__active-indicator {
664
686
  transition:
665
687
  scale var(--_panel-transition-duration, 200ms),
666
688
  translate var(--_panel-transition-duration, 200ms);
667
- pointer-events: none;
668
689
  }
669
690
 
670
691
  .nav__active {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "9.1.11",
4
+ "version": "9.1.12",
5
5
  "main": "nuxt.config.ts",
6
6
  "types": "types.d.ts",
7
7
  "license": "MIT",