@tutti-os/ui-system 0.0.95 → 0.0.96

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.
@@ -128,7 +128,7 @@
128
128
  --z-popover: 100200;
129
129
  --z-panel: 100500;
130
130
  --z-panel-popover: 100550;
131
- --z-toast: 100560;
131
+ --z-toast: 100650;
132
132
  --z-dialog-overlay: 100600;
133
133
  --z-dialog: 100610;
134
134
  --z-dialog-popover: 100620;
@@ -0,0 +1,21 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ const themeCss = readFileSync("src/styles/theme.css", "utf8");
5
+
6
+ function zIndexToken(name: string): number {
7
+ const match = themeCss.match(new RegExp(`--${name}:\\s*(\\d+);`));
8
+ if (!match?.[1]) {
9
+ throw new Error(`Missing z-index token: --${name}`);
10
+ }
11
+ return Number(match[1]);
12
+ }
13
+
14
+ describe("global overlay layers", () => {
15
+ it("keeps toast notifications above dialogs and below tooltips", () => {
16
+ expect(zIndexToken("z-toast")).toBeGreaterThan(
17
+ zIndexToken("z-dialog-popover")
18
+ );
19
+ expect(zIndexToken("z-toast")).toBeLessThan(zIndexToken("z-tooltip"));
20
+ });
21
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutti-os/ui-system",
3
- "version": "0.0.95",
3
+ "version": "0.0.96",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
package/ui-system.md CHANGED
@@ -301,8 +301,6 @@ The current shared global `z-index` tokens are:
301
301
  The genie animation layer that must stay above ordinary workbench chrome.
302
302
  - `--z-popover`
303
303
  Cross-feature floating UI such as menus, switchers, and layout popovers.
304
- - `--z-toast`
305
- Toast notifications that should stay above popovers.
306
304
  - `--z-panel`
307
305
  Full-panel overlays such as workspace settings surfaces.
308
306
  - `--z-panel-popover`
@@ -313,6 +311,8 @@ The current shared global `z-index` tokens are:
313
311
  Dialog content rendered above dialog backdrops.
314
312
  - `--z-dialog-popover`
315
313
  Floating controls or host-owned preview windows that must stay above dialog content and backdrop while remaining below tooltips.
314
+ - `--z-toast`
315
+ Toast notifications that must remain visible above dialogs and their portaled controls while staying below tooltips.
316
316
  - `--z-tooltip`
317
317
  Short hover/focus guidance that should stay above panels, drawers, and their popovers so clipped text can be inspected across overlay boundaries.
318
318