@smwb/ui-styles 2.9.0 → 2.10.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
|
@@ -339,6 +339,27 @@ holds the tab stop (`menuitemcheckbox`, `menuitemradio`, `treeitem`, `spinbutton
|
|
|
339
339
|
`scrollbar`) are listed next to the focusable elements. A control the generic list cannot see opts out with
|
|
340
340
|
`.smwb-appbar__no-drag` or `data-no-drag`.
|
|
341
341
|
|
|
342
|
+
#### Overlay layers
|
|
343
|
+
|
|
344
|
+
The surfaces the components portal to `<body>` sit in a z-index scale of Less variables, so an app puts them over its
|
|
345
|
+
own header, sheets and windows from its theme, with no rule on the `.smwb-*` classes:
|
|
346
|
+
|
|
347
|
+
| Variable | Default | Layer |
|
|
348
|
+
| ----------- | ------- | -------------------------------------------------------------------------------------- |
|
|
349
|
+
| `@menuZ` | 1300 | the floating `Menu` (`OverflowMenu`, `SelectField` options, submenus), above the modal |
|
|
350
|
+
| `@tooltipZ` | 1400 | the `Tooltip` tip, above the menu and the dialogs it is raised from |
|
|
351
|
+
|
|
352
|
+
The tip stays above the menu: a hint on a menu item, on a dialog's button or on a docked window's control must not hide
|
|
353
|
+
under them. Keep that order if you change one value. The modal overlay (1001), the chat shell (1002), the floating
|
|
354
|
+
window (`@floatingWindowZ`, 150) and the sheet (100) stay below both. `npm run lint` of this package renders the
|
|
355
|
+
stylesheet and checks the order and that each variable reaches its rule.
|
|
356
|
+
|
|
357
|
+
```less
|
|
358
|
+
// theme.config: the host's own layers go up to 2000, the menus and tips stay over them
|
|
359
|
+
@menuZ: 2100;
|
|
360
|
+
@tooltipZ: 2200;
|
|
361
|
+
```
|
|
362
|
+
|
|
342
363
|
## License
|
|
343
364
|
|
|
344
365
|
[MIT](./LICENSE)
|
|
@@ -559,6 +559,19 @@
|
|
|
559
559
|
// stack. Hosts add their stacking index on top, leaving headroom before 200.
|
|
560
560
|
@floatingWindowZ: 150;
|
|
561
561
|
|
|
562
|
+
/*-------------------
|
|
563
|
+
Overlay layers
|
|
564
|
+
--------------------*/
|
|
565
|
+
// z-index of the surfaces the components portal to <body>. A theme overrides them by setting
|
|
566
|
+
// the variable, with no rule on the `.smwb-*` classes; each must stay above whatever the host
|
|
567
|
+
// app stacks under it (its header, sheets, windows, dialogs).
|
|
568
|
+
// A floating Menu (OverflowMenu, SelectField options, submenus) sits above the modal (1001),
|
|
569
|
+
// the chat shell (1002) and every surface that opens it. Off-grid.
|
|
570
|
+
@menuZ: 1300;
|
|
571
|
+
// A Tooltip sits above the menu and the dialogs it is raised from: a hint on a menu item,
|
|
572
|
+
// a dialog's button or a docked window's control must not hide under them. Off-grid.
|
|
573
|
+
@tooltipZ: 1400;
|
|
574
|
+
|
|
562
575
|
/*-------------------
|
|
563
576
|
Tooltip
|
|
564
577
|
--------------------*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smwb/ui-styles",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Framework-agnostic LESS design tokens and component styles (smwb-*) shared by the @smwb UI libraries. Prebuilt aggregate CSS lives in @smwb/ui-css.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"lint": "node scripts/check-aggregate.mjs && node scripts/check-tokens.mjs && node scripts/check-control-heights.mjs && node scripts/check-typography-case.mjs && node scripts/check-chart-series.mjs && node scripts/check-normalize-specificity.mjs"
|
|
22
|
+
"lint": "node scripts/check-aggregate.mjs && node scripts/check-tokens.mjs && node scripts/check-control-heights.mjs && node scripts/check-typography-case.mjs && node scripts/check-overlay-layers.mjs && node scripts/check-chart-series.mjs && node scripts/check-normalize-specificity.mjs"
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://sourcecraft.dev/elfenmail/ui",
|
|
25
25
|
"repository": {
|