@synopackageland/ui 0.20.9 → 0.20.11

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.
@@ -286,9 +286,10 @@ import {
286
286
  - `PageContent surface="auto"` puts the page straight on the content area: flush
287
287
  beside the sidebar and under the toolbar, at the DSM window's page padding,
288
288
  with no card, border or outer margin around it. The area is white, unless the
289
- page holds a card (`Card`, `Surface`): then it is the page grey
290
- (`--ui-bg`, the web canvas) and the cards lift off it with a 1px frame and
291
- `--ui-shadow-card`, as on DSM's own card pages. A list page stays white: a
289
+ page holds a card (`Card`, `Surface`): then it is the card-page canvas
290
+ (`--ui-page-canvas`, a near-white tint) and the cards lift off it with a 1px
291
+ frame and `--ui-shadow-card`, as on DSM's own card pages. A web app can set
292
+ `--ui-app-web-canvas` to pick its own canvas. A list page stays white: a
292
293
  page with a `DataGrid` on it (not inside a card) keeps the white area when a
293
294
  `Surface` opens beside the list, such as a detail pane for the selected row;
294
295
  the pane keeps its 1px border and takes no shadow, so selecting a row never
@@ -296,7 +297,7 @@ import {
296
297
  release shares the DSM document and its stylesheet still has the earlier
297
298
  rules. Draw the pane with [`ListDetail`](list-detail.md), which is not a
298
299
  `Surface` and adds a resizable separator. `surface="card"` always stays
299
- white. `surface="flat"` always takes the grey canvas, for multi-card
300
+ white. `surface="flat"` always takes the canvas, for multi-card
300
301
  dashboards. All three behave the same in the web, DSM-window and mobile
301
302
  presentations.
302
303
  `surface="none"` adds no page surface and removes the horizontal page gutters
@@ -385,11 +386,14 @@ Applications can adjust tokens per mode without CSS leaks into the DSM host:
385
386
  ```
386
387
 
387
388
  The web colour tokens are read with fallbacks, so a theme can also set them on
388
- any ancestor. Light defaults and the dark values the workbench uses:
389
+ any ancestor. `--ui-app-web-canvas` defaults to the theme's card-page canvas
390
+ (`--ui-page-canvas`), which is set on the theme (see
391
+ [colour system](color-system.md)) and is the same in the web, DSM-window and
392
+ phone presentations. Light defaults and the dark values the workbench uses:
389
393
 
390
394
  | Token | Light (default) | Dark |
391
395
  | --- | --- | --- |
392
- | `--ui-app-web-canvas` | `var(--ui-bg)` (`#f4f6f3`) | `var(--ui-bg)` (`#11161c`) |
396
+ | `--ui-app-web-canvas` | `var(--ui-page-canvas)` (`#fafbf9`) | `var(--ui-bg)` (`#121513`) |
393
397
  | `--ui-app-web-surface` | `var(--ui-surface)` | `var(--ui-surface)` (`#1f2832`) |
394
398
  | `--ui-app-web-border` | `var(--ui-border)` | `#34404d` |
395
399
  | `--ui-app-web-shadow` | `var(--ui-shadow-card)` | `var(--ui-shadow-card)` |
@@ -52,6 +52,11 @@ are in [dsm-native-metrics.md](dsm-native-metrics.md).
52
52
  8. An icon-only action is an `IconButton` with a `label`; it shows as its
53
53
  tooltip and names the button for screen readers.
54
54
  9. Labels are verbs, without a closing period: Apply, Disable this connection.
55
+ 10. A label is plain text, with at most an icon before or after it:
56
+ `<Button><Mic :size="16" />Record</Button>`. The Button counts only an `svg`
57
+ or an element marked `data-icon` (`Icon` and `StatusDot` are) as the icon:
58
+ it gets the 8px gap and sits on the label's centre line. Do not wrap the
59
+ text in a `<span>`; a span is read as text, so it gets no gap of its own.
55
60
 
56
61
  ## What the components do
57
62
 
@@ -39,7 +39,8 @@ at 7:1 or more (`tests/css/palette.test.ts`).
39
39
 
40
40
  | Role | Step | DSM 7 |
41
41
  | --- | --- | --- |
42
- | `--ui-bg` | `#f4f6f3` | the page behind cards: a pale sage mist, light enough that cards read by their frame and shadow rather than a dark page |
42
+ | `--ui-bg` | `#f4f6f3` | the app's page: a pale sage mist, light enough that cards read by their frame and shadow rather than a dark page |
43
+ | `--ui-page-canvas` | `#fafbf9` | the canvas behind a page of cards: a near-white tint, a step lighter than the app page, so a card page sits beside a white one; the card's 1px frame and shadow do the separating |
43
44
  | `--ui-surface`, `--ui-surface-raised` | `gray-1` | white window, cards and panels; menus and dialogs add a shadow |
44
45
  | `--ui-surface-subtle`, `--ui-surface-inset` | `mist-a2` | faint block, 12% of `#bec8c0` |
45
46
  | `--ui-surface-hover` | `accent-a2` | list row hover, 4% blue |
@@ -110,10 +111,12 @@ step 3, so links and selected labels stay readable on a dark page.
110
111
  ## Dark theme
111
112
 
112
113
  The dark theme (`src/theme/dark.css`) ships inside `theme.css` and the embedded stylesheets. It applies wherever
113
- `data-ui-color-scheme="dark"` is set: on the app root through
114
- `<AppRoot color-scheme="dark">`, or on `<html>` for a full page (an app with
115
- an accent still passes `color-scheme="dark"` to AppRoot, which derives the
116
- accent for it). The library does not follow `prefers-color-scheme` by itself;
114
+ `data-ui-color-scheme="dark"` is set: on the app root (`[data-ui-app]`)
115
+ through `<AppRoot color-scheme="dark">`. With `theme.css` on a page of your own,
116
+ `<html data-ui-color-scheme="dark">` works too; the embedded stylesheets (a DSM
117
+ window) are scoped to the app root and read the attribute only there, never on
118
+ the host's `<html>` (an app with an accent passes `color-scheme="dark"` to
119
+ AppRoot in any case, which derives the accent for it). The library does not follow `prefers-color-scheme` by itself;
117
120
  the host decides and sets the attribute.
118
121
 
119
122
  The same roles, with the light page's sage carried into the greys:
@@ -121,6 +124,7 @@ The same roles, with the light page's sage carried into the greys:
121
124
  | Role | Dark | |
122
125
  | --- | --- | --- |
123
126
  | `--ui-bg` | `#121513` | the page |
127
+ | `--ui-page-canvas` | the page | a card is the lighter layer, so a page of cards needs no extra tint |
124
128
  | `--ui-surface` | `#1b1f1c` | a card or panel |
125
129
  | `--ui-surface-raised` | `#242925` | a menu or dialog |
126
130
  | `--ui-text` | `#e3e8e4` | 13.4:1 on a card |
@@ -31,7 +31,7 @@ here stay implementation details and can change in any release.
31
31
  | --- | --- | --- |
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
- | `data-ui-color-scheme` | the app root (AppRoot `color-scheme`, mirrored on floating hosts) or `<html>` | `dark` |
34
+ | `data-ui-color-scheme` | the app root (AppRoot `color-scheme`, mirrored on floating hosts); `<html>` only with `theme.css`, not the embedded stylesheets | `dark` |
35
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` |
package/docs/wizard.md CHANGED
@@ -53,6 +53,10 @@ const open = ref(false)
53
53
  - **Text.** `description` is one short line at the top of the step, under the
54
54
  hero, without a closing period. Keep the content to the controls the step
55
55
  needs; it may be wide (a row of cards) or a form.
56
+ - **Layout.** The step lays its content out as written, in block flow: it
57
+ does not stack its children with a gap. Several blocks go in one `Form`
58
+ (fields one field gap apart) or a `<Space direction="column">`; a lone
59
+ Callout, paragraph or card grid needs no wrapper.
56
60
  - **Choices.** A step's 2–4 options are choice cards:
57
61
  `<RadioGroup variant="card" orientation="horizontal" :options>`. Each card
58
62
  shows the option's `icon` in a tile, its label and one line, and keeps the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/ui",
3
- "version": "0.20.9",
3
+ "version": "0.20.11",
4
4
  "description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
5
5
  "license": "MIT",
6
6
  "type": "module",