From 10ee44f09b3496fbaaf32342e19fb7f3f2494e47 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:30:55 +0000 Subject: [PATCH] feat(MobileNavigation): add support for navigation subitems - Implement accordion-style expansion for items with children - Update isActive logic to recursively check subitems for active state - Fix activeItem prop default value to prevent TypeError - Add styles for subitems in both dark and light modes - Update documentation and unit tests to include subitem examples Co-authored-by: IhGori <73910233+IhGori@users.noreply.github.com> --- docs/.docgen/components-metadata.json | 4 +- .../mobile-navigation.md" | 20 ++- src/components/MobileNavigation.vue | 144 ++++++++++++++++-- src/tests/MobileNavigationSubitems.spec.ts | 91 +++++++++++ .../MobileNavigation.spec.ts.snap | 15 +- 5 files changed, 249 insertions(+), 25 deletions(-) create mode 100644 src/tests/MobileNavigationSubitems.spec.ts diff --git a/docs/.docgen/components-metadata.json b/docs/.docgen/components-metadata.json index 5ef1b1c20..b56ed82f0 100644 --- a/docs/.docgen/components-metadata.json +++ b/docs/.docgen/components-metadata.json @@ -7325,8 +7325,8 @@ "name": "object" }, "defaultValue": { - "func": true, - "value": "() => {}" + "func": false, + "value": "{}" } }, { diff --git "a/docs/components/navega\303\247\303\243o/mobile-navigation.md" "b/docs/components/navega\303\247\303\243o/mobile-navigation.md" index 56eef9234..33d8e90d2 100644 --- "a/docs/components/navega\303\247\303\243o/mobile-navigation.md" +++ "b/docs/components/navega\303\247\303\243o/mobile-navigation.md" @@ -104,10 +104,22 @@ const items = [ label: 'Vigilância sanitária', icon: 'shield-outline', type: 'route', - route: { - path: '/visa', - name: 'visa' - }, + items: [ + { + label: 'Categorias', + route: { + path: '/categories', + name: 'index-categories', + }, + }, + { + label: 'Processos', + route: { + path: '/processes', + name: 'index-processes', + }, + }, + ], }, { label: 'Central de marcação', diff --git a/src/components/MobileNavigation.vue b/src/components/MobileNavigation.vue index 0a689d858..f3f85a04e 100644 --- a/src/components/MobileNavigation.vue +++ b/src/components/MobileNavigation.vue @@ -42,24 +42,73 @@