@scalio-cloud/ui 0.107.0 → 0.108.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/README.md +17 -0
- package/favicons/atrium.svg +1 -0
- package/favicons/beacon.svg +1 -0
- package/favicons/citadel.svg +1 -0
- package/favicons/folio.svg +1 -0
- package/favicons/foundry.svg +1 -0
- package/favicons/nexus.svg +1 -0
- package/favicons/pulse.svg +1 -0
- package/favicons/rosetta.svg +1 -0
- package/package.json +3 -1
- package/react/app_marks.d.ts +13 -0
- package/react/app_marks.js +60 -0
- package/react/app_marks_data.d.ts +10 -0
- package/react/app_marks_data.js +13 -0
- package/react/auth.js +3 -0
- package/react/index.d.ts +3 -0
- package/react/index.js +11 -1
- package/react/nav.js +10 -8
- package/react/types.d.ts +2 -0
- package/shell.css +12 -0
package/README.md
CHANGED
|
@@ -181,6 +181,23 @@ import { reportClientErrors } from "@scalio-cloud/ui/react";
|
|
|
181
181
|
reportClientErrors({ post: (body) => api.post("/client-errors", body) }); // einmal in main.jsx
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
+
## App icons and favicons (React, from 0.108.0)
|
|
185
|
+
|
|
186
|
+
Each suite app has its own icon (master: scalio-docs `business/marketing/assets/logos/<app>.svg`), which replaces the
|
|
187
|
+
one-letter tile. `AppHeader`, `AuthLayout` and `ProductSwitcher` show it on their own: the key comes from
|
|
188
|
+
`brand.app` or from `brand.name` («Scalio Nexus» → `nexus`). `brand.app: false` keeps the letter. Kontor and Compass
|
|
189
|
+
have no icon yet and keep the tile. Colours: brand blues in light mode, lighter blues in dark mode and on the sign-in
|
|
190
|
+
panel (`.scalio-app-mark` in `shell.css`).
|
|
191
|
+
|
|
192
|
+
```jsx
|
|
193
|
+
import { AppMark } from "@scalio-cloud/ui/react";
|
|
194
|
+
<AppMark app="citadel" className="h-6 w-6" />
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Favicon: copy `node_modules/@scalio-cloud/ui/favicons/<app>.svg` to `public/favicon.svg` (light and dark via
|
|
198
|
+
`prefers-color-scheme`; Safari shows the light one). The drawing data in `react/app_marks_data.js` and the favicons
|
|
199
|
+
are generated by scalio-docs `tools/app_icons.py`; do not edit them by hand.
|
|
200
|
+
|
|
184
201
|
## App header (React)
|
|
185
202
|
|
|
186
203
|
Every app shows the same header on the right, always in this order: (app actions), status, language, theme,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><rect x="4.5" y="6.5" width="23" height="16" rx="3" stroke-width="3.2" class="m-ps"/><rect x="9" y="11" width="14" height="7" rx="1.5" class="m-sf"/><path d="M12 26.5H20" stroke-width="3.2" stroke-linecap="round" class="m-ps"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><circle cx="16" cy="14" r="4.5" class="m-pf"/><path d="M9.5 14C9.5 10.41 12.41 7.5 16 7.5C19.59 7.5 22.5 10.41 22.5 14" stroke-width="3" stroke-linecap="round" class="m-ss"/><path d="M5.5 14C5.5 8.2 10.2 3.5 16 3.5C21.8 3.5 26.5 8.2 26.5 14" stroke-opacity="0.55" stroke-width="2.6" stroke-linecap="round" class="m-ss"/><path d="M16 19V27.5" stroke-width="3.4" stroke-linecap="round" class="m-ps"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><path d="M16 4L26 8V15.5C26 21.5 21.7 26.2 16 28C10.3 26.2 6 21.5 6 15.5V8L16 4Z" stroke-width="3.2" stroke-linejoin="round" class="m-ps"/><path d="M12 16L14.8 18.8L20.5 13" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round" class="m-ss"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><path d="M6 7.5C6 6.12 7.12 5 8.5 5H15.5V26H8.5C7.12 26 6 24.88 6 23.5V7.5Z" stroke-width="3" class="m-ps"/><path d="M26 7.5C26 6.12 24.88 5 23.5 5H16.5V26H23.5C24.88 26 26 24.88 26 23.5V7.5Z" stroke-width="3" class="m-ss"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><rect x="5" y="5" width="10" height="10" rx="2.5" class="m-pf"/><rect x="17" y="5" width="10" height="10" rx="2.5" class="m-sf"/><rect x="5" y="17" width="10" height="10" rx="2.5" class="m-sf"/><path d="M22 17V27M17 22H27" stroke-width="3.2" stroke-linecap="round" class="m-ps"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><circle cx="9.5" cy="10" r="4" class="m-pf"/><circle cx="22.5" cy="22" r="4" class="m-sf"/><path d="M13 12.5L19 19.5" stroke-width="3.2" stroke-linecap="round" class="m-ps"/><circle cx="22.5" cy="10" r="3" stroke-width="2.6" class="m-ss"/><circle cx="9.5" cy="22" r="3" stroke-width="2.6" class="m-ps"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><path d="M4 17H9.5L13 8L18.5 24L22 15H28" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round" class="m-ps"/><circle cx="26.5" cy="15" r="2.5" class="m-sf"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"><style>.m-ps{stroke:#1D6FEF}.m-pf{fill:#1D6FEF}.m-ss{stroke:#4A8EF7}.m-sf{fill:#4A8EF7}@media (prefers-color-scheme:dark){.m-ps{stroke:#4A8EF7}.m-pf{fill:#4A8EF7}.m-ss{stroke:#93BBFB}.m-sf{fill:#93BBFB}}</style><rect x="6.5" y="4.5" width="19" height="23" rx="3" stroke-width="3.2" class="m-ps"/><path d="M11 11.5H21M11 16.5H21M11 21.5H16.5" stroke-width="3" stroke-linecap="round" class="m-ss"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.0",
|
|
4
4
|
"description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"private": false,
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"./fonts.css": "./fonts.css",
|
|
30
30
|
"./base.css": "./base.css",
|
|
31
31
|
"./fonts/*": "./fonts/*",
|
|
32
|
+
"./favicons/*": "./favicons/*",
|
|
32
33
|
"./package.json": "./package.json",
|
|
33
34
|
"./react": {
|
|
34
35
|
"types": "./react/index.d.ts",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"shadcn/",
|
|
61
62
|
"nginx/",
|
|
62
63
|
"licenses/",
|
|
64
|
+
"favicons/",
|
|
63
65
|
"fonts/",
|
|
64
66
|
"README.md"
|
|
65
67
|
],
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { ScalioComponent } from "./types";
|
|
3
|
+
|
|
4
|
+
/** Apps with their own icon (Kontor and Compass keep the letter tile for now). */
|
|
5
|
+
export type AppKey = "nexus" | "rosetta" | "foundry" | "citadel" | "pulse" | "atrium" | "beacon" | "folio";
|
|
6
|
+
export declare const APP_KEYS: readonly AppKey[];
|
|
7
|
+
/** The app icon as inline SVG; colours from shell.css, lighter in dark mode. Renders nothing for an unknown app. */
|
|
8
|
+
export declare const AppMark: ScalioComponent<{ app: AppKey | string; className?: string; title?: string; testId?: string }>;
|
|
9
|
+
/** Key from brand.app or brand.name ("Scalio Nexus" -> "nexus"); null when the app has no icon or brand.app is false. */
|
|
10
|
+
export declare function appKeyOf(brand: unknown): AppKey | null;
|
|
11
|
+
/** Icon component (className prop) for PRODUCTS and sidebar lists. */
|
|
12
|
+
export declare function appMarkIcon(app: AppKey | string): (props?: { className?: string }) => React.ReactElement | null;
|
|
13
|
+
export declare function hasAppMark(app: unknown): boolean;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// App icons of the Scalio suite (Markus 2026-12-05): replace the one-letter tile in the header, on the sign-in page
|
|
3
|
+
// and in the product switcher. Colours come from shell.css (.scalio-app-mark), lighter in dark mode.
|
|
4
|
+
// Favicons with the same drawing: favicons/<app>.svg (light and dark via prefers-color-scheme).
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const h = React.createElement;
|
|
7
|
+
const DATA = require("./app_marks_data");
|
|
8
|
+
|
|
9
|
+
const APP_KEYS = Object.freeze(Object.keys(DATA));
|
|
10
|
+
|
|
11
|
+
function camel(k) {
|
|
12
|
+
return k === "class" ? "className" : k.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function hasAppMark(app) {
|
|
16
|
+
return typeof app === "string" && Object.prototype.hasOwnProperty.call(DATA, app);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// "Scalio Nexus" or "nexus" -> "nexus"; brand.app wins. Unknown apps (Kontor, Compass) -> null: letter stays.
|
|
20
|
+
function appKeyOf(brand) {
|
|
21
|
+
if (!brand || typeof brand !== "object") return null;
|
|
22
|
+
if (hasAppMark(brand.app)) return brand.app;
|
|
23
|
+
if (brand.app === false) return null;
|
|
24
|
+
const name = typeof brand.name === "string" ? brand.name.trim().toLowerCase().replace(/^scalio\s+/, "") : "";
|
|
25
|
+
return hasAppMark(name) ? name : null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function AppMark({ app, className, title, testId }) {
|
|
29
|
+
if (!hasAppMark(app)) return null;
|
|
30
|
+
const children = DATA[app].map(([tag, attrs], i) => {
|
|
31
|
+
const props = { key: i };
|
|
32
|
+
Object.keys(attrs).forEach((k) => { props[camel(k)] = attrs[k]; });
|
|
33
|
+
return h(tag, props);
|
|
34
|
+
});
|
|
35
|
+
return h(
|
|
36
|
+
"svg",
|
|
37
|
+
{
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
viewBox: "0 0 32 32",
|
|
40
|
+
fill: "none",
|
|
41
|
+
className: ["scalio-app-mark", className].filter(Boolean).join(" "),
|
|
42
|
+
role: title ? "img" : undefined,
|
|
43
|
+
"aria-label": title || undefined,
|
|
44
|
+
"aria-hidden": title ? undefined : "true",
|
|
45
|
+
focusable: "false",
|
|
46
|
+
"data-app": app,
|
|
47
|
+
"data-testid": testId,
|
|
48
|
+
},
|
|
49
|
+
children
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Icon component for lists that expect one (PRODUCTS[].icon, sidebar entries).
|
|
54
|
+
function appMarkIcon(app) {
|
|
55
|
+
const Icon = (props) => h(AppMark, { app, className: props && props.className });
|
|
56
|
+
Icon.displayName = `AppMark(${app})`;
|
|
57
|
+
return Icon;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module.exports = { AppMark, APP_KEYS, appKeyOf, appMarkIcon, hasAppMark };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Generated drawing of each app icon: [tag, attributes] per shape (see app_marks.js). */
|
|
2
|
+
type MarkData = ReadonlyArray<[string, Record<string, string>]>;
|
|
3
|
+
export declare const nexus: MarkData;
|
|
4
|
+
export declare const rosetta: MarkData;
|
|
5
|
+
export declare const foundry: MarkData;
|
|
6
|
+
export declare const citadel: MarkData;
|
|
7
|
+
export declare const pulse: MarkData;
|
|
8
|
+
export declare const atrium: MarkData;
|
|
9
|
+
export declare const beacon: MarkData;
|
|
10
|
+
export declare const folio: MarkData;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated from scalio-docs business/marketing/assets/logos/<app>.svg (Markus 2026-12-05). Do not edit by hand:
|
|
3
|
+
// change the master SVG and run scalio-docs tools/app_icons.py. Classes: m-ps/m-pf = primary stroke/fill, m-ss/m-sf = secondary.
|
|
4
|
+
module.exports = {
|
|
5
|
+
nexus: [["circle",{"cx":"9.5","cy":"10","r":"4","class":"m-pf"}],["circle",{"cx":"22.5","cy":"22","r":"4","class":"m-sf"}],["path",{"d":"M13 12.5L19 19.5","stroke-width":"3.2","stroke-linecap":"round","class":"m-ps"}],["circle",{"cx":"22.5","cy":"10","r":"3","stroke-width":"2.6","class":"m-ss"}],["circle",{"cx":"9.5","cy":"22","r":"3","stroke-width":"2.6","class":"m-ps"}]],
|
|
6
|
+
rosetta: [["rect",{"x":"6.5","y":"4.5","width":"19","height":"23","rx":"3","stroke-width":"3.2","class":"m-ps"}],["path",{"d":"M11 11.5H21M11 16.5H21M11 21.5H16.5","stroke-width":"3","stroke-linecap":"round","class":"m-ss"}]],
|
|
7
|
+
foundry: [["rect",{"x":"5","y":"5","width":"10","height":"10","rx":"2.5","class":"m-pf"}],["rect",{"x":"17","y":"5","width":"10","height":"10","rx":"2.5","class":"m-sf"}],["rect",{"x":"5","y":"17","width":"10","height":"10","rx":"2.5","class":"m-sf"}],["path",{"d":"M22 17V27M17 22H27","stroke-width":"3.2","stroke-linecap":"round","class":"m-ps"}]],
|
|
8
|
+
citadel: [["path",{"d":"M16 4L26 8V15.5C26 21.5 21.7 26.2 16 28C10.3 26.2 6 21.5 6 15.5V8L16 4Z","stroke-width":"3.2","stroke-linejoin":"round","class":"m-ps"}],["path",{"d":"M12 16L14.8 18.8L20.5 13","stroke-width":"3.2","stroke-linecap":"round","stroke-linejoin":"round","class":"m-ss"}]],
|
|
9
|
+
pulse: [["path",{"d":"M4 17H9.5L13 8L18.5 24L22 15H28","stroke-width":"3.4","stroke-linecap":"round","stroke-linejoin":"round","class":"m-ps"}],["circle",{"cx":"26.5","cy":"15","r":"2.5","class":"m-sf"}]],
|
|
10
|
+
atrium: [["rect",{"x":"4.5","y":"6.5","width":"23","height":"16","rx":"3","stroke-width":"3.2","class":"m-ps"}],["rect",{"x":"9","y":"11","width":"14","height":"7","rx":"1.5","class":"m-sf"}],["path",{"d":"M12 26.5H20","stroke-width":"3.2","stroke-linecap":"round","class":"m-ps"}]],
|
|
11
|
+
beacon: [["circle",{"cx":"16","cy":"14","r":"4.5","class":"m-pf"}],["path",{"d":"M9.5 14C9.5 10.41 12.41 7.5 16 7.5C19.59 7.5 22.5 10.41 22.5 14","stroke-width":"3","stroke-linecap":"round","class":"m-ss"}],["path",{"d":"M5.5 14C5.5 8.2 10.2 3.5 16 3.5C21.8 3.5 26.5 8.2 26.5 14","stroke-opacity":"0.55","stroke-width":"2.6","stroke-linecap":"round","class":"m-ss"}],["path",{"d":"M16 19V27.5","stroke-width":"3.4","stroke-linecap":"round","class":"m-ps"}]],
|
|
12
|
+
folio: [["path",{"d":"M6 7.5C6 6.12 7.12 5 8.5 5H15.5V26H8.5C7.12 26 6 24.88 6 23.5V7.5Z","stroke-width":"3","class":"m-ps"}],["path",{"d":"M26 7.5C26 6.12 24.88 5 23.5 5H16.5V26H23.5C24.88 26 26 24.88 26 23.5V7.5Z","stroke-width":"3","class":"m-ss"}]],
|
|
13
|
+
};
|
package/react/auth.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const h = React.createElement;
|
|
8
8
|
const { labelsFor } = require("./labels");
|
|
9
|
+
const { AppMark, appKeyOf } = require("./app_marks");
|
|
9
10
|
const { LegalLink, legalUrl: legalHref } = require("./legal");
|
|
10
11
|
|
|
11
12
|
function cx() {
|
|
@@ -13,6 +14,8 @@ function cx() {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
function BrandMark({ brand, className }) {
|
|
17
|
+
const app = appKeyOf(brand);
|
|
18
|
+
if (app) return h("span", { className: cx("scalio-auth-mark", "is-app", className), "aria-hidden": "true" }, h(AppMark, { app }));
|
|
16
19
|
return h(
|
|
17
20
|
"span",
|
|
18
21
|
{ className: cx("scalio-auth-mark", className), style: brand.color ? { background: brand.color } : undefined, "aria-hidden": "true" },
|
package/react/index.d.ts
CHANGED
|
@@ -31,9 +31,12 @@ export declare const DOCS_DOMAINS: { readonly nexus: string; readonly citadel: s
|
|
|
31
31
|
export declare const PageHeader: ScalioComponent<{ eyebrow?: React.ReactNode; title: React.ReactNode; subtitle?: React.ReactNode; actions?: React.ReactNode; children?: React.ReactNode; back?: React.ReactNode; testId?: string; }>;
|
|
32
32
|
export declare const TEST_IDS: { readonly menu: string; readonly language: string; readonly theme: string; readonly docs: string; readonly support: string; readonly avatar: string; readonly userName: string; readonly userEmail: string; readonly userRole: string; readonly logout: string; };
|
|
33
33
|
export declare const initials: (user?: any) => any;
|
|
34
|
+
/** Brand mark of header and sign-in: app icon when the app has one, else the letter tile. */
|
|
35
|
+
export declare const BrandMarkSlot: ScalioComponent<{ brand: any; className?: string; testId?: string }>;
|
|
34
36
|
export declare const Icons: typeof IconSet;
|
|
35
37
|
export { LABELS, labelsFor } from "./labels";
|
|
36
38
|
|
|
39
|
+
export * from "./app_marks";
|
|
37
40
|
export * from "./actions";
|
|
38
41
|
export * from "./nav";
|
|
39
42
|
export * from "./blocks";
|
package/react/index.js
CHANGED
|
@@ -6,6 +6,7 @@ const h = React.createElement;
|
|
|
6
6
|
const Icons = require("./icons");
|
|
7
7
|
const { LABELS, labelsFor } = require("./labels");
|
|
8
8
|
const { useDesktop, useNavCollapsed, toggleNavCollapsed } = require("./actions");
|
|
9
|
+
const { AppMark, appKeyOf } = require("./app_marks");
|
|
9
10
|
|
|
10
11
|
const TEST_IDS = {
|
|
11
12
|
menu: "mobile-menu-btn",
|
|
@@ -281,11 +282,18 @@ function BetaBadge({ lang, labels, testId, className }) {
|
|
|
281
282
|
return h("span", { className: cx("scalio-beta", className), title: L.betaHint, "data-testid": testId || "scalio-beta-badge" }, L.beta);
|
|
282
283
|
}
|
|
283
284
|
|
|
285
|
+
// App icon (app_marks.js) when the app has one, otherwise the letter tile (brand.mark). Markus 2026-12-05.
|
|
286
|
+
function BrandMarkSlot({ brand, className, testId }) {
|
|
287
|
+
const app = appKeyOf(brand);
|
|
288
|
+
if (app) return h("span", { className: cx(className, "is-app"), "aria-hidden": "true", "data-testid": testId }, h(AppMark, { app }));
|
|
289
|
+
return h("span", { className, style: brand.color ? { background: brand.color } : undefined, "aria-hidden": "true", "data-testid": testId }, brand.mark);
|
|
290
|
+
}
|
|
291
|
+
|
|
284
292
|
function Brand({ brand, lang, labels }) {
|
|
285
293
|
if (!brand) return null;
|
|
286
294
|
if (React.isValidElement(brand)) return brand;
|
|
287
295
|
const inner = [
|
|
288
|
-
h(
|
|
296
|
+
h(BrandMarkSlot, { key: "m", brand, className: "scalio-brand-mark" }),
|
|
289
297
|
h(
|
|
290
298
|
"span",
|
|
291
299
|
{ key: "t", className: "scalio-brand-text" },
|
|
@@ -403,7 +411,9 @@ module.exports = {
|
|
|
403
411
|
labelsFor,
|
|
404
412
|
TEST_IDS,
|
|
405
413
|
initials,
|
|
414
|
+
BrandMarkSlot,
|
|
406
415
|
};
|
|
416
|
+
Object.assign(module.exports, require("./app_marks"));
|
|
407
417
|
Object.assign(module.exports, Nav, Blocks, require("./settings"), require("./support"), require("./beacon"), require("./security"), require("./license"), require("./limited_mode"), require("./access_limit"), require("./palette"), require("./unify"), require("./profile"), require("./actions"), require("./selftest"), require("./users"), require("./customers"), require("./roles"), require("./wizard"), require("./maintenance"), require("./backup"), require("./audit"), require("./mail"), require("./saas_updates"), require("./pages"), require("./tenant"), require("./fields"), require("./dialog"), require("./keyboard"), require("./agents"), require("./agent_scripts"), require("./ai"), require("./markdown"), require("./tenancy"), require("./legal"), require("./suite_context"));
|
|
408
418
|
// After the exports above: auth.js uses LanguageToggle and ThemeToggle from this module.
|
|
409
419
|
Object.assign(module.exports, require("./auth"), require("./session"), require("./setup"), require("./login"), require("./theme"), require("./clientErrors"));
|
package/react/nav.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const h = React.createElement;
|
|
7
7
|
const Icons = require("./icons");
|
|
8
|
+
const { appMarkIcon } = require("./app_marks");
|
|
8
9
|
const { useMainAction, useSidebarHost, useNavCollapsed, useNavShortcut } = require("./actions");
|
|
9
10
|
const { labelsFor } = require("./labels");
|
|
10
11
|
const { LegalLink, legalUrl: legalHref } = require("./legal");
|
|
@@ -316,17 +317,18 @@ function ContextSelect({ label, value, options, onChange, hint, after, testId, i
|
|
|
316
317
|
}
|
|
317
318
|
|
|
318
319
|
// --- Product switcher -------------------------------------------------------------------------
|
|
320
|
+
// Each entry shows its app icon (app_marks.js, Markus 2026-12-05; before: Lucide symbols).
|
|
319
321
|
// Display order of the app group, in groups (Markus 2026-11-12): identity | M365 governance | devices and
|
|
320
322
|
// desktops | work. A thin divider separates the groups. Compass is not part of it (decided 2026-10-26).
|
|
321
323
|
const PRODUCTS = [
|
|
322
|
-
{ key: "nexus", name: "Nexus", icon:
|
|
323
|
-
{ key: "rosetta", name: "Rosetta", icon:
|
|
324
|
-
{ key: "foundry", name: "Foundry", icon:
|
|
325
|
-
{ key: "citadel", name: "Citadel", icon:
|
|
326
|
-
{ key: "pulse", name: "Pulse", icon:
|
|
327
|
-
{ key: "atrium", name: "Atrium", icon:
|
|
328
|
-
{ key: "beacon", name: "Beacon", icon:
|
|
329
|
-
{ key: "folio", name: "Folio", icon:
|
|
324
|
+
{ key: "nexus", name: "Nexus", icon: appMarkIcon("nexus"), group: "identity" },
|
|
325
|
+
{ key: "rosetta", name: "Rosetta", icon: appMarkIcon("rosetta"), group: "governance" },
|
|
326
|
+
{ key: "foundry", name: "Foundry", icon: appMarkIcon("foundry"), group: "governance" },
|
|
327
|
+
{ key: "citadel", name: "Citadel", icon: appMarkIcon("citadel"), group: "governance" },
|
|
328
|
+
{ key: "pulse", name: "Pulse", icon: appMarkIcon("pulse"), group: "devices" },
|
|
329
|
+
{ key: "atrium", name: "Atrium", icon: appMarkIcon("atrium"), group: "devices" },
|
|
330
|
+
{ key: "beacon", name: "Beacon", icon: appMarkIcon("beacon"), group: "work" },
|
|
331
|
+
{ key: "folio", name: "Folio", icon: appMarkIcon("folio"), group: "work" },
|
|
330
332
|
];
|
|
331
333
|
|
|
332
334
|
// Each app opens in its own tab, named after the app: a second click finds that tab again instead of opening
|
package/react/types.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export type ShellUser = { name?: string; email?: string; role?: string; [key: st
|
|
|
26
26
|
/** Brand of the header: an element, or { mark, name, ... }. */
|
|
27
27
|
export type HeaderBrand = React.ReactElement | {
|
|
28
28
|
mark?: React.ReactNode; name?: React.ReactNode; sub?: React.ReactNode; color?: string; beta?: boolean;
|
|
29
|
+
/** App icon key ("nexus" …); without it the icon follows from name «Scalio Nexus». false keeps the letter tile. */
|
|
30
|
+
app?: string | false;
|
|
29
31
|
badges?: React.ReactNode; href?: string; onClick?: (event: React.MouseEvent) => void;
|
|
30
32
|
};
|
|
31
33
|
|
package/shell.css
CHANGED
|
@@ -117,3 +117,15 @@ a.scalio-btn { text-decoration: none; }
|
|
|
117
117
|
text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground));
|
|
118
118
|
}
|
|
119
119
|
.scalio-version-commit { opacity: 0.7; text-transform: none; }
|
|
120
|
+
|
|
121
|
+
/* App icons (app_marks.js, Markus 2026-12-05) instead of the letter tile. Light: brand blues; dark mode, the sign-in
|
|
122
|
+
panel and the switcher bar: lighter blues so thin lines stay readable on black; on the active (blue) switcher entry: white. */
|
|
123
|
+
.scalio-app-mark { --scalio-mark-p: #1D6FEF; --scalio-mark-s: #4A8EF7; display: block; width: 100%; height: 100%; flex-shrink: 0; }
|
|
124
|
+
.dark .scalio-app-mark, .scalio-auth-brand .scalio-app-mark, .scalio-switcher .scalio-app-mark { --scalio-mark-p: #4A8EF7; --scalio-mark-s: #93BBFB; }
|
|
125
|
+
.scalio-switcher-item.is-active .scalio-app-mark { --scalio-mark-p: #fff; --scalio-mark-s: #BFD4FF; }
|
|
126
|
+
.scalio-app-mark .m-ps { stroke: var(--scalio-mark-p); }
|
|
127
|
+
.scalio-app-mark .m-pf { fill: var(--scalio-mark-p); }
|
|
128
|
+
.scalio-app-mark .m-ss { stroke: var(--scalio-mark-s); }
|
|
129
|
+
.scalio-app-mark .m-sf { fill: var(--scalio-mark-s); }
|
|
130
|
+
.scalio-brand-mark.is-app, .scalio-auth-mark.is-app { background: none; padding: 0; }
|
|
131
|
+
.scalio-switcher-item.is-soon .scalio-app-mark, .scalio-switcher-item.is-off .scalio-app-mark { opacity: 0.55; }
|