@seta-labs/nuxt-foundation 0.5.2 → 0.6.1
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 +21 -0
- package/app/components/FoundationBarra.vue +16 -12
- package/design-system/assets/Icone/README.md +1 -1
- package/design-system/assets/Icone/i-menu.svg +1 -0
- package/design-system/design-system.json +9 -2
- package/design-system/vue/icons.ts +1 -0
- package/nuxt.config.ts +31 -2
- package/package.json +2 -1
package/app/assets/shell.css
CHANGED
|
@@ -101,6 +101,14 @@ body {
|
|
|
101
101
|
font-weight: 400;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/* Release of the app on screen; the shell's own version is in the status bar. */
|
|
105
|
+
.sf-shell__versione {
|
|
106
|
+
color: var(--muted);
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
font-variant-numeric: tabular-nums;
|
|
110
|
+
}
|
|
111
|
+
|
|
104
112
|
.sf-shell__corpo {
|
|
105
113
|
display: flex;
|
|
106
114
|
min-height: 0;
|
|
@@ -223,6 +231,19 @@ body {
|
|
|
223
231
|
display: inline-flex;
|
|
224
232
|
}
|
|
225
233
|
|
|
234
|
+
/* The menu button takes the left edge the drawer slides from; the app
|
|
235
|
+
launcher, a rarer action, moves to the right edge, past the user. */
|
|
236
|
+
.sf-launcher-ancora {
|
|
237
|
+
order: 1;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.sf-launcher-ancora .sf-launcher {
|
|
241
|
+
position: fixed;
|
|
242
|
+
top: calc(var(--shell-barra) + var(--s-2));
|
|
243
|
+
left: auto;
|
|
244
|
+
right: var(--s-2);
|
|
245
|
+
}
|
|
246
|
+
|
|
226
247
|
.sf-shell__menu {
|
|
227
248
|
position: fixed;
|
|
228
249
|
top: var(--shell-barra);
|
|
@@ -3,12 +3,25 @@ defineProps<{ menuOpen: boolean }>();
|
|
|
3
3
|
defineEmits<{ toggleMenu: [] }>();
|
|
4
4
|
|
|
5
5
|
const app = useFoundationApp();
|
|
6
|
+
const { foundationAppVersion } = useRuntimeConfig().public;
|
|
6
7
|
const hasNav = useFoundationNav().length > 0;
|
|
7
8
|
const dev = import.meta.dev;
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<template>
|
|
11
12
|
<header class="sf-barra sf-shell__barra">
|
|
13
|
+
<button
|
|
14
|
+
v-if="hasNav"
|
|
15
|
+
class="sf-btn sf-btn--icona sf-shell__apri-menu"
|
|
16
|
+
data-tour="menu-mobile"
|
|
17
|
+
type="button"
|
|
18
|
+
aria-controls="sf-menu"
|
|
19
|
+
:aria-expanded="menuOpen"
|
|
20
|
+
:aria-label="menuOpen ? 'Chiudi il menu' : 'Apri il menu'"
|
|
21
|
+
@click="$emit('toggleMenu')"
|
|
22
|
+
>
|
|
23
|
+
<SfIcona :name="menuOpen ? 'chiudi' : 'menu'" />
|
|
24
|
+
</button>
|
|
12
25
|
<FoundationLauncher />
|
|
13
26
|
<NuxtLink to="/" class="sf-shell__marchio" aria-label="Seta Foundation, torna all'inizio">
|
|
14
27
|
<SfSimbolo class="sf-shell__simbolo" />
|
|
@@ -21,22 +34,13 @@ const dev = import.meta.dev;
|
|
|
21
34
|
<NuxtLink to="/" class="sf-barra__app" data-tour="app">
|
|
22
35
|
<SfTessera :app="app.id" :size="32" />
|
|
23
36
|
{{ app.name }}
|
|
37
|
+
<span v-if="foundationAppVersion" class="sf-shell__versione"
|
|
38
|
+
>v{{ foundationAppVersion }}</span
|
|
39
|
+
>
|
|
24
40
|
</NuxtLink>
|
|
25
41
|
</template>
|
|
26
42
|
<span class="sf-barra__spazio" />
|
|
27
43
|
<span v-if="dev" class="sf-ambiente sf-ambiente--staging">DEV</span>
|
|
28
44
|
<FoundationUtente />
|
|
29
|
-
<button
|
|
30
|
-
v-if="hasNav"
|
|
31
|
-
class="sf-btn sf-btn--icona sf-shell__apri-menu"
|
|
32
|
-
data-tour="menu-mobile"
|
|
33
|
-
type="button"
|
|
34
|
-
aria-controls="sf-menu"
|
|
35
|
-
:aria-expanded="menuOpen"
|
|
36
|
-
:aria-label="menuOpen ? 'Chiudi il menu' : 'Apri il menu'"
|
|
37
|
-
@click="$emit('toggleMenu')"
|
|
38
|
-
>
|
|
39
|
-
<SfIcona :name="menuOpen ? 'chiudi' : 'altro'" />
|
|
40
|
-
</button>
|
|
41
45
|
</header>
|
|
42
46
|
</template>
|
|
@@ -2,5 +2,5 @@ Icone monolineari della landing Seta Labs più le icone di servizio della shell.
|
|
|
2
2
|
|
|
3
3
|
- Inchiostro dei file: `#767D8A` (leggibile su notte e su giorno). Nel codice usa i tracciati in linea con `stroke="currentColor"` e la classe `sf-icona`.
|
|
4
4
|
- Dalla landing: sviluppo, direzione, automazione, sito, crescita, ia, documento, mail, check, attenzione, info, freccia.
|
|
5
|
-
- Shell: app (launcher), cerca, notifiche, guida, impostazioni, aggiungi, chiudi, filtro, altro.
|
|
5
|
+
- Shell: app (launcher), cerca, notifiche, guida, impostazioni, aggiungi, chiudi, filtro, altro, menu (apre il menu laterale su mobile).
|
|
6
6
|
- Glifi delle app: `i-app-agency`, `i-app-proxy`, `i-app-geo`, `i-app-immo`, `i-app-spid`, `i-app-infra`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="#767D8A" stroke-width="1.25" stroke-linecap="butt" stroke-linejoin="miter"><path d="M4 7h16M4 12h16M4 17h16"></path></svg>
|
|
@@ -197,6 +197,12 @@
|
|
|
197
197
|
"size": 251,
|
|
198
198
|
"type": "image/svg+xml"
|
|
199
199
|
},
|
|
200
|
+
"i-menu.svg": {
|
|
201
|
+
"blob": "cfbb2c4d45920e328e39956f1fc1a277",
|
|
202
|
+
"name": "i-menu.svg",
|
|
203
|
+
"size": 225,
|
|
204
|
+
"type": "image/svg+xml"
|
|
205
|
+
},
|
|
200
206
|
"i-notifiche.svg": {
|
|
201
207
|
"blob": "3eb2e82804336498193534010459e723",
|
|
202
208
|
"name": "i-notifiche.svg",
|
|
@@ -239,6 +245,7 @@
|
|
|
239
245
|
"i-chiudi.svg",
|
|
240
246
|
"i-filtro.svg",
|
|
241
247
|
"i-altro.svg",
|
|
248
|
+
"i-menu.svg",
|
|
242
249
|
"i-app-agency.svg",
|
|
243
250
|
"i-app-proxy.svg",
|
|
244
251
|
"i-app-geo.svg",
|
|
@@ -348,10 +355,10 @@
|
|
|
348
355
|
"Icone"
|
|
349
356
|
],
|
|
350
357
|
"lastChange": {
|
|
351
|
-
"at": "2026-09-
|
|
358
|
+
"at": "2026-09-26T16:30:00Z",
|
|
352
359
|
"by": "Andrea Moraglia",
|
|
353
360
|
"via": "Claude Code",
|
|
354
|
-
"note": "
|
|
361
|
+
"note": "Nuova icona di servizio menu (tre tratti orizzontali): apre il menu laterale della shell su mobile."
|
|
355
362
|
},
|
|
356
363
|
"layout": "files",
|
|
357
364
|
"libraries": [],
|
|
@@ -24,6 +24,7 @@ export const icons = {
|
|
|
24
24
|
'impostazioni': '<path d="M4 7h10M18 7h2M4 17h4M12 17h8"/><rect x="14" y="5" width="4" height="4"/><rect x="8" y="15" width="4" height="4"/>',
|
|
25
25
|
'info': '<circle cx="12" cy="12" r="8"/><path d="M12 11v6"/><rect x="11.4" y="7.4" width="1.2" height="1.2"/>',
|
|
26
26
|
'mail': '<rect x="3" y="5" width="18" height="14"/><path d="m3 6 9 7 9-7"/>',
|
|
27
|
+
'menu': '<path d="M4 7h16M4 12h16M4 17h16"/>',
|
|
27
28
|
'notifiche': '<path d="M6 17V11a6 6 0 0 1 12 0v6"/><path d="M4 17h16"/><path d="M10 20h4"/>',
|
|
28
29
|
'sito': '<rect x="3" y="5" width="18" height="14"/><path d="M3 9h18"/><path d="M6 7h1M8.5 7h1M11 7h1"/><path d="M7 12h6M7 15h10"/>',
|
|
29
30
|
'sviluppo': '<path d="M9 7 4 12l5 5M15 7l5 5-5 5"/><path d="M13.5 5.5 10.5 18.5"/>',
|
package/nuxt.config.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
2
3
|
import { fileURLToPath } from 'node:url';
|
|
3
4
|
|
|
4
5
|
const here = (path: string): string => fileURLToPath(new URL(path, import.meta.url));
|
|
@@ -8,9 +9,27 @@ const favicon = `data:image/svg+xml,${encodeURIComponent(
|
|
|
8
9
|
readFileSync(here('./design-system/assets/Marchio/favicon.svg'), 'utf8'),
|
|
9
10
|
)}`;
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Release version of the host app: the first `package.json` among `dirs` with
|
|
14
|
+
* a real version. Monorepo apps keep their own package at 0.0.0 and bump the
|
|
15
|
+
* workspace root on release, so the root comes first.
|
|
16
|
+
*/
|
|
17
|
+
function hostVersion(dirs: string[]): string {
|
|
18
|
+
for (const dir of dirs) {
|
|
19
|
+
const file = join(dir, 'package.json');
|
|
20
|
+
const version = existsSync(file)
|
|
21
|
+
? (JSON.parse(readFileSync(file, 'utf8')) as { version?: string }).version
|
|
22
|
+
: undefined;
|
|
23
|
+
if (version && version !== '0.0.0') return version;
|
|
24
|
+
}
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
|
|
11
28
|
// The layer: design system (tokens + sf- CSS + Vue primitives) and the shell.
|
|
12
29
|
// The host app sets `runtimeConfig.public.foundationApp` to its registry id;
|
|
13
|
-
// NUXT_PUBLIC_FOUNDATION_APP overrides it at runtime.
|
|
30
|
+
// NUXT_PUBLIC_FOUNDATION_APP overrides it at runtime. `foundationAppVersion`
|
|
31
|
+
// is read from the host's package.json at build time (the bar shows it next to
|
|
32
|
+
// the app name); a host value or NUXT_PUBLIC_FOUNDATION_APP_VERSION wins.
|
|
14
33
|
export default defineNuxtConfig({
|
|
15
34
|
app: {
|
|
16
35
|
head: {
|
|
@@ -21,6 +40,15 @@ export default defineNuxtConfig({
|
|
|
21
40
|
{ path: here('./design-system/vue'), pathPrefix: false },
|
|
22
41
|
{ path: here('./app/components'), pathPrefix: false },
|
|
23
42
|
],
|
|
43
|
+
modules: [
|
|
44
|
+
(_, nuxt) => {
|
|
45
|
+
const config = nuxt.options.runtimeConfig.public;
|
|
46
|
+
config.foundationAppVersion ||= hostVersion([
|
|
47
|
+
nuxt.options.workspaceDir,
|
|
48
|
+
nuxt.options.rootDir,
|
|
49
|
+
]);
|
|
50
|
+
},
|
|
51
|
+
],
|
|
24
52
|
css: [
|
|
25
53
|
here('./design-system/tokens.css'),
|
|
26
54
|
here('./design-system/components/bundle.css'),
|
|
@@ -29,6 +57,7 @@ export default defineNuxtConfig({
|
|
|
29
57
|
runtimeConfig: {
|
|
30
58
|
public: {
|
|
31
59
|
foundationApp: '',
|
|
60
|
+
foundationAppVersion: '',
|
|
32
61
|
foundationVersion: version,
|
|
33
62
|
},
|
|
34
63
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seta-labs/nuxt-foundation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
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": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
+
"dev": "nuxi dev .playground --port 3800",
|
|
28
29
|
"prepare": "nuxi prepare .playground",
|
|
29
30
|
"sync:design-system": "node scripts/sync-design-system.mjs",
|
|
30
31
|
"test": "vitest run",
|