@synopackageland/ui 0.20.8 → 0.20.9
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/CHANGELOG.md +6 -0
- package/dist/index.js +9909 -9903
- package/dist/json-preview/preview.js +5010 -5004
- package/dist/json.js +8 -8
- package/dist/lib/adaptiveLayout.d.ts +6 -0
- package/dist/reka-runtime.json +1 -1
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/docs/adaptive-layout.md +35 -0
- package/docs/theme-hooks.md +1 -1
- package/package.json +1 -1
package/docs/adaptive-layout.md
CHANGED
|
@@ -65,6 +65,41 @@ for a viewport change. `ensureDeviceViewport()` therefore fires one `resize`
|
|
|
65
65
|
on the next frame after it changes the viewport (and after it restores it), so
|
|
66
66
|
the window narrows to the phone's width.
|
|
67
67
|
|
|
68
|
+
### Full-page type scale
|
|
69
|
+
|
|
70
|
+
A full page reads at a web console's sizes, one step above a DSM window. The
|
|
71
|
+
tokens are set on the web layout (`data-ui-layout-mode="web"`) and on an app
|
|
72
|
+
root that holds one or is a `full-page` root, so dialogs teleported into the
|
|
73
|
+
root follow. A DSM window keeps DSM's sizes and a phone its own scale
|
|
74
|
+
([mobile-native.md](mobile-native.md)).
|
|
75
|
+
|
|
76
|
+
| Token | DSM window | Full page |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `--ui-font-size` (body, navigation, buttons, fields) | 13px | 14px |
|
|
79
|
+
| `--ui-font-size-control` (checkbox, select, form and settings labels) | 13px | 14px |
|
|
80
|
+
| `--ui-font-size-sm` (secondary text, group labels) | 12px | 13px |
|
|
81
|
+
| `--ui-font-size-lg` (a main label) | 14px | 15px |
|
|
82
|
+
| `--ui-font-size-tab` / `--ui-font-size-section` | 12px / 15px | 13px / 16px |
|
|
83
|
+
| `--ui-font-size-h1` / `-h2` / `-h3` | 20 / 16 / 14px | 22 / 18 / 16px |
|
|
84
|
+
| `--ui-grid-font-size` | 13px | 14px |
|
|
85
|
+
| `--ui-control-sm` / `-md` / `-lg` | 24 / 28 / 34px | 28 / 32 / 36px |
|
|
86
|
+
| `--ui-grid-row-height` / `--ui-grid-header-height` | 28px | 32px |
|
|
87
|
+
| `--ui-list-row-height` | 32px | 36px |
|
|
88
|
+
| `--ui-nav-row-height-default` | 42px | 36px |
|
|
89
|
+
| `--ui-label-offset` (a label beside a field) | 4px | 6px |
|
|
90
|
+
|
|
91
|
+
The web page header's title is `--ui-font-size-title` (16px) over a
|
|
92
|
+
`--ui-font-size-sm` description. The smallest text (`--ui-font-size-xs`) stays
|
|
93
|
+
12px and a dialog's title 16px. Control and grid sizes apply under a mouse
|
|
94
|
+
only: a touch tablet keeps its touch sizes, and an explicit `data-ui-density`
|
|
95
|
+
keeps what the app chose.
|
|
96
|
+
|
|
97
|
+
A page without a `PageHeader` that starts with a `PageToolbar` starts on the
|
|
98
|
+
page padding: its toolbar is a control-height row, not a 48px chrome row, so
|
|
99
|
+
there is no empty band over it. Under a header, and inside a card or pane, a
|
|
100
|
+
toolbar stays one chrome row. An App that adds its own top padding to an
|
|
101
|
+
untitled page doubles the page padding the shell already gives it.
|
|
102
|
+
|
|
68
103
|
## Viewport, keyboard and Back on a phone
|
|
69
104
|
|
|
70
105
|
A full-page `AppRoot` is the page: it is `100dvh` tall, `html` and `body`
|
package/docs/theme-hooks.md
CHANGED
|
@@ -32,7 +32,7 @@ here stay implementation details and can change in any release.
|
|
|
32
32
|
| `data-ui-app` | `AppRoot`'s root and its floating hosts (portals) | present |
|
|
33
33
|
| `data-ui-theme`, `data-ui-density`, `data-ui-accent` | the app root (mirrored on floating hosts) | theme name, `compact`/`comfortable`, present |
|
|
34
34
|
| `data-ui-color-scheme` | the app root (AppRoot `color-scheme`, mirrored on floating hosts) or `<html>` | `dark` |
|
|
35
|
-
| `data-ui-presentation` | `AppRoot` root | `mobile
|
|
35
|
+
| `data-ui-presentation` | `AppRoot` root | `mobile` (640px or narrower), else `web` for a `full-page` root or one holding an `AppLayout` with `wide-layout="web"` from 960px, else `window` (a DSM window at any width) |
|
|
36
36
|
| `data-ui-floating` | a floating host (dialog, menu, popover) | present |
|
|
37
37
|
| `data-ui-layout-mode` | `AppLayout` root | `mobile`, `window`, `web` |
|
|
38
38
|
| `data-ui-navigation` | `AppLayout` root, and `AppSidebar`'s `<nav>`, while the navigation is a top bar | `top` (absent for the sidebar and on a phone) |
|