@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.
- package/dist/styles/theme.css +1 -1
- package/dist/styles/theme.spec.ts +21 -0
- package/package.json +1 -1
- package/ui-system.md +2 -2
package/dist/styles/theme.css
CHANGED
|
@@ -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
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
|
|