@seta-labs/nuxt-foundation 0.3.0 → 0.4.0
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.
package/app/assets/shell.css
CHANGED
|
@@ -21,6 +21,24 @@ body {
|
|
|
21
21
|
.sf-shell__marchio {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: center;
|
|
24
|
+
gap: var(--s-3);
|
|
25
|
+
padding: 0 var(--s-2);
|
|
26
|
+
color: var(--fg);
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.sf-shell__simbolo {
|
|
31
|
+
height: 22px;
|
|
32
|
+
width: auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.sf-shell__nome {
|
|
36
|
+
font-family: var(--font-display);
|
|
37
|
+
font-variation-settings: 'wdth' 118;
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
letter-spacing: 0.22em;
|
|
41
|
+
text-transform: uppercase;
|
|
24
42
|
}
|
|
25
43
|
|
|
26
44
|
.sf-shell__corpo {
|
|
@@ -179,7 +197,7 @@ body {
|
|
|
179
197
|
}
|
|
180
198
|
|
|
181
199
|
@media (max-width: 640px) {
|
|
182
|
-
.sf-
|
|
200
|
+
.sf-shell__nome,
|
|
183
201
|
.sf-shell__sep {
|
|
184
202
|
display: none;
|
|
185
203
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import logoNotte from '../../design-system/assets/Marchio/logo-dark-stretto.png';
|
|
3
|
-
import logoGiorno from '../../design-system/assets/Marchio/logo-light-stretto.png';
|
|
4
|
-
|
|
5
2
|
defineProps<{ menuOpen: boolean }>();
|
|
6
3
|
defineEmits<{ toggleMenu: [] }>();
|
|
7
4
|
|
|
@@ -13,9 +10,9 @@ const dev = import.meta.dev;
|
|
|
13
10
|
<template>
|
|
14
11
|
<header class="sf-barra sf-shell__barra">
|
|
15
12
|
<FoundationLauncher />
|
|
16
|
-
<NuxtLink to="/" class="sf-shell__marchio" aria-label="Seta
|
|
17
|
-
<
|
|
18
|
-
<
|
|
13
|
+
<NuxtLink to="/" class="sf-shell__marchio" aria-label="Seta Foundation, torna all'inizio">
|
|
14
|
+
<SfSimbolo class="sf-shell__simbolo" />
|
|
15
|
+
<span class="sf-shell__nome" aria-hidden="true">Foundation</span>
|
|
19
16
|
</NuxtLink>
|
|
20
17
|
<template v-if="app">
|
|
21
18
|
<span class="sf-barra__sep sf-shell__sep" />
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
defineProps<{ open: boolean }>();
|
|
3
3
|
|
|
4
4
|
const nav = useFoundationNav();
|
|
5
|
+
// Consecutive items sharing a `gruppo` render under one title, in the order
|
|
6
|
+
// the host declares them; items without a group get an untitled block.
|
|
7
|
+
const gruppi = computed(() => {
|
|
8
|
+
const blocchi: { titolo?: string; voci: typeof nav }[] = [];
|
|
9
|
+
for (const voce of nav) {
|
|
10
|
+
const ultimo = blocchi.at(-1);
|
|
11
|
+
if (ultimo && ultimo.titolo === voce.gruppo) ultimo.voci.push(voce);
|
|
12
|
+
else blocchi.push({ titolo: voce.gruppo, voci: [voce] });
|
|
13
|
+
}
|
|
14
|
+
return blocchi;
|
|
15
|
+
});
|
|
5
16
|
const app = useFoundationApp();
|
|
6
17
|
const active = useActiveNav();
|
|
7
18
|
</script>
|
|
@@ -15,9 +26,10 @@ const active = useActiveNav();
|
|
|
15
26
|
:class="{ 'sf-shell__menu--aperto': open }"
|
|
16
27
|
:aria-label="app?.name ?? 'Menu'"
|
|
17
28
|
>
|
|
18
|
-
<div class="sf-menu__gruppo">
|
|
29
|
+
<div v-for="(gruppo, n) in gruppi" :key="gruppo.titolo ?? n" class="sf-menu__gruppo">
|
|
30
|
+
<div v-if="gruppo.titolo" class="sf-menu__titolo">{{ gruppo.titolo }}</div>
|
|
19
31
|
<NuxtLink
|
|
20
|
-
v-for="item in
|
|
32
|
+
v-for="item in gruppo.voci"
|
|
21
33
|
:key="item.to"
|
|
22
34
|
:to="item.to"
|
|
23
35
|
class="sf-menu__voce"
|
package/app.config.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface FoundationNavItem {
|
|
|
4
4
|
label: string;
|
|
5
5
|
to: string;
|
|
6
6
|
icon: IconName;
|
|
7
|
+
/** Title of the side-menu block the item belongs to; consecutive items share it. */
|
|
8
|
+
gruppo?: string;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
// Types the host's `defineAppConfig` input: a wrong icon name fails its typecheck.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// The two circles of the brand symbol (geometry of favicon.svg), drawn in
|
|
3
|
+
// vector so they follow the theme: blue plus the text color, no baked
|
|
4
|
+
// background like the PNG files of the Marchio group.
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<svg class="sf-simbolo" viewBox="7 13 50 38" aria-hidden="true">
|
|
9
|
+
<circle class="sf-simbolo__blu" cx="26" cy="32" r="17" />
|
|
10
|
+
<circle class="sf-simbolo__seta" cx="38" cy="32" r="17" />
|
|
11
|
+
</svg>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<style scoped>
|
|
15
|
+
circle {
|
|
16
|
+
fill: none;
|
|
17
|
+
stroke-width: 3;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.sf-simbolo__blu {
|
|
21
|
+
stroke: var(--seta-blu);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sf-simbolo__seta {
|
|
25
|
+
stroke: var(--fg);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:global([data-theme='giorno']) .sf-simbolo__blu {
|
|
29
|
+
stroke: var(--seta-blu-chiaro);
|
|
30
|
+
}
|
|
31
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seta-labs/nuxt-foundation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Seta Foundation: the Nuxt layer every internal Seta panel extends — design system mirror (tokens, sf- components, icons, brand) plus the shared shell (bar, app launcher, side menu, status bar)",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|