From 2cdcc5a57d8a6d59afceba68bab66dd45ff0c569 Mon Sep 17 00:00:00 2001 From: Alex Rock Ancelet Date: Wed, 22 Nov 2023 16:48:40 +0100 Subject: [PATCH] Finish top menu for now --- package.json | 3 +- .../material3/Dashboard/Dashboard.svelte | 2 +- .../material3/Layout/AdminLayout.svelte | 4 +- .../material3/Menu/InternalSubmenu.svelte | 111 +++++++++--------- .../themes/material3/Menu/TopLeftMenu.svelte | 76 ++++++++---- src/lib/themes/material3/Menu/TopMenu.svelte | 12 +- src/testApp/Dashboard.ts | 4 +- 7 files changed, 122 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 9b938dd8..2c38776e 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@smui/menu": "^7.0.0", "@smui/paper": "^7.0.0", "@smui/ripple": "^7.0.0", + "@smui/tooltip": "^7.0.0", "@smui/top-app-bar": "^7.0.0", "@sveltejs/adapter-auto": "^2.1.1", "@sveltejs/adapter-static": "^2.0.3", @@ -87,7 +88,7 @@ "prettier-plugin-svelte": "^3.2.6", "publint": "^0.2.10", "sass": "^1.78.0", - "smui-theme": "^7.0.0-beta.15", + "smui-theme": "^7.0.0", "svelte-check": "^3.8.6", "svelte-material-ui": "^7.0.0", "tslib": "^2.7.0", diff --git a/src/lib/themes/material3/Dashboard/Dashboard.svelte b/src/lib/themes/material3/Dashboard/Dashboard.svelte index 99d3f579..d36f6ce9 100644 --- a/src/lib/themes/material3/Dashboard/Dashboard.svelte +++ b/src/lib/themes/material3/Dashboard/Dashboard.svelte @@ -1,6 +1,6 @@ - - - + diff --git a/src/lib/themes/material3/Menu/InternalSubmenu.svelte b/src/lib/themes/material3/Menu/InternalSubmenu.svelte index 2975df22..ae9bf81a 100644 --- a/src/lib/themes/material3/Menu/InternalSubmenu.svelte +++ b/src/lib/themes/material3/Menu/InternalSubmenu.svelte @@ -1,64 +1,63 @@ -
- menu - - {#if link.icon} - - {/if} - - {#each link.links as submenuLink} - {#if submenuLink instanceof Divider} -
- {:else if submenuLink instanceof UrlAction} -
- - {#if submenuLink.icon} - - {/if} - {submenuLink.label ? $_(submenuLink.label) : ''} - -
- {:else if submenuLink instanceof CallbackAction} -
- -
- {:else} -
- {#if submenuLink.icon} - - {/if} - -
- {/if} - {/each} -
-
+{icon} + + {#if link.icon} + + {/if} + + {#each link.links as submenuLink} + {#if submenuLink instanceof Divider} + + {:else if submenuLink instanceof UrlAction} + + + {#if submenuLink.icon} + + {/if} + {submenuLink.label ? $_(submenuLink.label) : ''} + + + {:else if submenuLink instanceof CallbackAction} + + + + {:else} + + {#if submenuLink.icon} + + {/if} + + + {/if} + {/each} + + -