From a8ee4cdb4ad6ec5204ff93b19ba731f9d382854d Mon Sep 17 00:00:00 2001 From: Stavros Tomas <55188371+stavros-tomas@users.noreply.github.com> Date: Fri, 14 Jun 2024 07:23:21 +0100 Subject: [PATCH] [CHUX-467] ec-navigation mobile view (#1976) * chux-467:feat:mobile-view * chux-467:chore:mobile-view more updates * chux-467:chore:mobile-view more updates * CHUX-467:test:unit * CHUX-467:test: more unit tests * CHUX-467:chore:export letter icon * CHUX-467:chore: adjust width of images and make menu close on navigation link clicked * CHUX-467:chore:update snapshots * CHUX-467:chore:update styles --- .../__snapshots__/ec-menu.spec.ts.snap | 47 ++ src/components/ec-menu/ec-menu.spec.ts | 17 + src/components/ec-menu/ec-menu.vue | 5 + .../ec-mobile-header.spec.ts.snap | 3 +- .../ec-mobile-header/ec-mobile-header.spec.ts | 9 + .../ec-mobile-header/ec-mobile-header.vue | 25 +- .../ec-navigation-link/ec-navigation-link.vue | 5 + .../__snapshots__/ec-navigation.spec.ts.snap | 505 ++++++++++++++---- .../ec-navigation/ec-navigation.spec.ts | 56 +- .../ec-navigation/ec-navigation.vue | 105 +++- src/main.ts | 2 + 11 files changed, 648 insertions(+), 131 deletions(-) diff --git a/src/components/ec-menu/__snapshots__/ec-menu.spec.ts.snap b/src/components/ec-menu/__snapshots__/ec-menu.spec.ts.snap index 065f8888c..a2bdc76f4 100644 --- a/src/components/ec-menu/__snapshots__/ec-menu.spec.ts.snap +++ b/src/components/ec-menu/__snapshots__/ec-menu.spec.ts.snap @@ -1,5 +1,52 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`EcMenu > @events > should propagate the event from the navigation link 1`] = ` +
+`; + exports[`EcMenu > should attach custom listeners passed in the link definition 1`] = ` @@ -37,6 +38,10 @@ import { computed } from 'vue'; import EcNavigationLink from '../ec-navigation-link'; import type { MenuLink, MenuProps } from './types'; +const emit = defineEmits<{ + 'navigation-link-clicked': [], +}>(); + const props = withDefaults(defineProps