@scalio-cloud/ui 0.73.0 → 0.74.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 CHANGED
@@ -149,6 +149,10 @@ Texts are built in for `lang` `de` and `en` and can be overridden with `labels`.
149
149
  `TEST_IDS`. The components are plain CommonJS with `React.createElement`, so CRA, Vite and Jest need no extra config.
150
150
  Icons are inline (Lucide, ISC, see `licenses/`).
151
151
 
152
+ **Beta (ADR 0117 in scalio-docs):** apps sold as public beta (version 0.x) set `beta: true` in the brand object, in
153
+ the header (`AppHeader`) and on every sign-in page (`AuthLayout`). Both then show «Beta» next to the product name
154
+ (`BetaBadge`, hint on hover). Keep one brand object per app, so no page is missed, and remove the flag with 1.0.
155
+
152
156
  ## Sidebar, switcher and page blocks (React)
153
157
 
154
158
  Every app has the same frame (UISPEC "Navigation"): switcher, header with the context select on the left, then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalio-cloud/ui",
3
- "version": "0.73.0",
3
+ "version": "0.74.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,
package/react/auth.js CHANGED
@@ -91,13 +91,13 @@ function DemoAccounts({ accounts, onPick, lang, labels, className, testId }) {
91
91
  );
92
92
  }
93
93
 
94
- // brand: { mark: "N", name: "Scalio Nexus", claim, eyebrow, features: [..], color }
94
+ // brand: { mark: "N", name: "Scalio Nexus", claim, eyebrow, features: [..], color, beta }
95
95
  // version: shown small bottom left; left out = read from /version.json, false = hidden.
96
96
  function AuthLayout(props) {
97
97
  const brand = props.brand || {};
98
98
  const L = labelsFor(props.lang, props.labels);
99
99
  const words = String(brand.name || "").split(/\s+/).filter(Boolean);
100
- const { LanguageToggle, ThemeToggle } = require("./index");
100
+ const { LanguageToggle, ThemeToggle, BetaBadge } = require("./index");
101
101
  return h(
102
102
  "div",
103
103
  { className: cx("scalio-auth", props.className), "data-testid": props.testId || "auth-layout" },
@@ -111,6 +111,7 @@ function AuthLayout(props) {
111
111
  { className: "scalio-auth-hero" },
112
112
  h(BrandMark, { brand, className: "scalio-auth-mark-lg" }),
113
113
  h("h1", { className: "scalio-auth-title" }, words.map((w, i) => h(React.Fragment, { key: i }, i ? h("br") : null, w))),
114
+ brand.beta ? h(BetaBadge, { lang: props.lang, labels: props.labels, className: "scalio-beta-lg", testId: "auth-beta-badge" }) : null,
114
115
  brand.claim ? h("p", { className: "scalio-auth-claim" }, brand.claim) : null
115
116
  ),
116
117
  brand.features && brand.features.length
@@ -140,7 +141,8 @@ function AuthLayout(props) {
140
141
  "div",
141
142
  { className: "scalio-auth-mobile-brand" },
142
143
  h(BrandMark, { brand }),
143
- h("span", { className: "scalio-auth-mobile-name" }, brand.name)
144
+ h("span", { className: "scalio-auth-mobile-name" }, brand.name),
145
+ brand.beta ? h(BetaBadge, { lang: props.lang, labels: props.labels, testId: "auth-beta-badge-mobile" }) : null
144
146
  ),
145
147
  props.children
146
148
  )
package/react/index.js CHANGED
@@ -274,7 +274,13 @@ function DocsButton({ href, lang, labels, testId }) {
274
274
  );
275
275
  }
276
276
 
277
- function Brand({ brand }) {
277
+ // «Beta» next to the product name (ADR 0117): apps on 0.x set brand.beta, AppHeader and AuthLayout show it.
278
+ function BetaBadge({ lang, labels, testId, className }) {
279
+ const L = labelsFor(lang, labels);
280
+ return h("span", { className: cx("scalio-beta", className), title: L.betaHint, "data-testid": testId || "scalio-beta-badge" }, L.beta);
281
+ }
282
+
283
+ function Brand({ brand, lang, labels }) {
278
284
  if (!brand) return null;
279
285
  if (React.isValidElement(brand)) return brand;
280
286
  const inner = [
@@ -282,7 +288,7 @@ function Brand({ brand }) {
282
288
  h(
283
289
  "span",
284
290
  { key: "t", className: "scalio-brand-text" },
285
- h("span", { className: "scalio-brand-line" }, h("span", { className: "scalio-brand-name" }, brand.name), brand.badges || null),
291
+ h("span", { className: "scalio-brand-line" }, h("span", { className: "scalio-brand-name" }, brand.name), brand.beta ? h(BetaBadge, { lang, labels }) : null, brand.badges || null),
286
292
  brand.sub ? h("span", { className: "scalio-brand-sub" }, brand.sub) : null
287
293
  ),
288
294
  ];
@@ -311,7 +317,7 @@ function AppHeader(props) {
311
317
  h(Icons.Menu, { className: "scalio-icon" })
312
318
  )
313
319
  : null,
314
- h(Brand, { brand: props.brand }),
320
+ h(Brand, { brand: props.brand, lang: props.lang, labels: props.labels }),
315
321
  props.left ? h("div", { className: "scalio-header-left" }, props.left) : null,
316
322
  h("div", { className: "scalio-header-spacer" }),
317
323
  props.actions ? h("div", { className: "scalio-header-actions" }, props.actions) : null,
@@ -364,6 +370,7 @@ const VersionTag = Nav.VersionTag;
364
370
 
365
371
  module.exports = {
366
372
  AppHeader,
373
+ BetaBadge,
367
374
  UserMenu,
368
375
  LanguageToggle,
369
376
  ThemeToggle,
package/react/labels.js CHANGED
@@ -129,6 +129,8 @@ const LABELS = {
129
129
  comingSoon: "Bald verfügbar",
130
130
  notSetUp: "Für diese Installation nicht eingerichtet",
131
131
  stageHint: "Umgebung dieser Installation",
132
+ beta: "Beta",
133
+ betaHint: "Öffentliche Beta: Funktionen und Oberfläche können sich bis Version 1.0 noch ändern.",
132
134
  // Support request
133
135
  supportTitle: "Support-Anfrage",
134
136
  subject: "Betreff",
@@ -700,6 +702,8 @@ const LABELS = {
700
702
  comingSoon: "Coming soon",
701
703
  notSetUp: "Not set up for this installation",
702
704
  stageHint: "Environment of this installation",
705
+ beta: "Beta",
706
+ betaHint: "Public beta: features and screens may still change until version 1.0.",
703
707
  supportTitle: "Support request",
704
708
  subject: "Subject",
705
709
  description: "Description",
package/shell.css CHANGED
@@ -31,6 +31,15 @@
31
31
  @media (min-width: 1024px) { .scalio-brand-text { display: flex; } }
32
32
  /* Product name and its edition badges on one line (ADR 0042 A1). */
33
33
  .scalio-brand-line { display: flex; align-items: center; gap: 0.375rem; }
34
+ /* «Beta» next to the product name (ADR 0117); the large one sits under the title on the sign-in page. */
35
+ .scalio-beta {
36
+ display: inline-flex; align-items: center; padding: 0 0.3125rem; border-radius: 2px;
37
+ font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; line-height: 1rem;
38
+ text-transform: uppercase; letter-spacing: 0.1em;
39
+ background: rgb(139 92 246 / 0.12); color: #7c3aed; box-shadow: inset 0 0 0 1px rgb(139 92 246 / 0.45);
40
+ }
41
+ .dark .scalio-beta, .scalio-auth-brand .scalio-beta { color: #c4b5fd; }
42
+ .scalio-beta-lg { margin-top: 1rem; font-size: 0.75rem; line-height: 1.5rem; padding: 0 0.625rem; }
34
43
  .scalio-edition-badges { display: inline-flex; align-items: center; gap: 0.25rem; }
35
44
  .scalio-edition-badge { font-size: 9px; padding: 0.0625rem 0.3125rem; }
36
45
  .scalio-api-status { gap: 0.25rem; }