@synopackageland/ui 0.14.10 → 0.15.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/CHANGELOG.md +16 -0
- package/README.md +5 -0
- package/dist/components/app/app-root/AppRoot.vue.d.ts +7 -0
- package/dist/components/containers/expandable-item/ExpandableItem.vue.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6015 -6000
- package/dist/json-preview/preview.js +1468 -1463
- package/dist/lib/accent.d.ts +12 -5
- package/dist/lib/color.d.ts +2 -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 +2 -2
- package/docs/color-system.md +48 -12
- package/docs/theme-hooks.md +1 -0
- package/package.json +1 -1
package/docs/adaptive-layout.md
CHANGED
|
@@ -224,9 +224,9 @@ any ancestor. Light defaults and the dark values the workbench uses:
|
|
|
224
224
|
|
|
225
225
|
| Token | Light (default) | Dark |
|
|
226
226
|
| --- | --- | --- |
|
|
227
|
-
| `--ui-app-web-canvas` | `var(--ui-bg)` (`#
|
|
227
|
+
| `--ui-app-web-canvas` | `var(--ui-bg)` (`#f4f6f3`) | `var(--ui-bg)` (`#11161c`) |
|
|
228
228
|
| `--ui-app-web-surface` | `var(--ui-surface)` | `var(--ui-surface)` (`#1f2832`) |
|
|
229
|
-
| `--ui-app-web-border` | `var(--ui-
|
|
229
|
+
| `--ui-app-web-border` | `var(--ui-border)` | `#34404d` |
|
|
230
230
|
| `--ui-app-web-shadow` | `var(--ui-shadow-card)` | `var(--ui-shadow-card)` |
|
|
231
231
|
| `--ui-web-sidebar-collapsed-width` | `64px` | same |
|
|
232
232
|
|
package/docs/color-system.md
CHANGED
|
@@ -39,25 +39,25 @@ at 7:1 or more (`tests/css/palette.test.ts`).
|
|
|
39
39
|
|
|
40
40
|
| Role | Step | DSM 7 |
|
|
41
41
|
| --- | --- | --- |
|
|
42
|
-
| `--ui-bg` | `#
|
|
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 |
|
|
43
43
|
| `--ui-surface`, `--ui-surface-raised` | `gray-1` | white window, cards and panels; menus and dialogs add a shadow |
|
|
44
|
-
| `--ui-surface-subtle`, `--ui-surface-inset` | `
|
|
44
|
+
| `--ui-surface-subtle`, `--ui-surface-inset` | `mist-a2` | faint block, 12% of `#bec8c0` |
|
|
45
45
|
| `--ui-surface-hover` | `accent-a2` | list row hover, 4% blue |
|
|
46
46
|
| `--ui-surface-selected`, `--ui-primary-soft` | `accent-a3` | selected row and nav item, 10% blue |
|
|
47
47
|
| `--ui-text` | `gray-12` | `#414b55` |
|
|
48
48
|
| `--ui-text-secondary` | `gray-a11` | 82% of `#414b55` |
|
|
49
49
|
| `--ui-text-muted`, `--ui-text-disabled` | `gray-a9` | 40% of `#414b55`, placeholder and disabled text |
|
|
50
|
-
| `--ui-border` | `
|
|
51
|
-
| `--ui-border-strong`, `--ui-control-border-hover` | `
|
|
52
|
-
| `--ui-border-subtle` | `
|
|
53
|
-
| `--ui-control-bg` | `
|
|
54
|
-
| `--ui-control-bg-active` | `
|
|
55
|
-
| `--ui-control-border-active` | `
|
|
50
|
+
| `--ui-border` | `mist-a6` | field and card frame, 50% of `#bec8c0` |
|
|
51
|
+
| `--ui-border-strong`, `--ui-control-border-hover` | `mist-a7` | hovered frame, 40% of `#748278` |
|
|
52
|
+
| `--ui-border-subtle` | `mist-a3` | grid rules, 26% of `#bec8c0` |
|
|
53
|
+
| `--ui-control-bg` | `mist-a3` | button fill, 26% of `#bec8c0` |
|
|
54
|
+
| `--ui-control-bg-active` | `mist-a6` | pressed button, 50% of `#bec8c0` |
|
|
55
|
+
| `--ui-control-border-active` | `mist-a8` | pressed frame, 55% of `#748278` |
|
|
56
56
|
| `--ui-primary`, `-hover`, `-active` | `accent-9`, `-10`, `-11` | blue button at rest, hovered, pressed |
|
|
57
57
|
| `--ui-primary-foreground` | `accent-contrast` | white label |
|
|
58
58
|
| `--ui-focus-ring` | `accent-a7` | 50% blue |
|
|
59
59
|
| `--ui-info`, `--ui-success`, `--ui-warning`, `--ui-danger` | step 9 of each tone | status dots, bars, icons |
|
|
60
|
-
| `--ui-{tone}-soft` | `a3` of each tone (`
|
|
60
|
+
| `--ui-{tone}-soft` | `a3` of each tone (`mist-a3` for neutral) | badge fill |
|
|
61
61
|
| `--ui-{tone}-text` | step 11 of each tone (`gray-11` for neutral) | badge text |
|
|
62
62
|
| `--ui-danger-hover`, `--ui-danger-active` | `red-10`, `red-11` | red button hovered, pressed |
|
|
63
63
|
| `--ui-warning-accent` | `orange-10` | a warning Callout's or Toast's top light, glow and icon |
|
|
@@ -71,9 +71,9 @@ The scales follow DSM where the two disagree:
|
|
|
71
71
|
- **DSM blue with a white label reads at 4.0:1.** That is under the 4.5:1 AA
|
|
72
72
|
asks of body text and above the 3:1 it asks of a control. DSM's own buttons
|
|
73
73
|
use it, so the default accent keeps it. An app accent must reach 4.5:1.
|
|
74
|
-
- **Grid rules are step 3, not step 6.** DSM draws them
|
|
75
|
-
|
|
76
|
-
- **A pressed button is step 6.** DSM fills it
|
|
74
|
+
- **Grid rules are step 3, not step 6.** DSM draws them as light as a button
|
|
75
|
+
fill; the theme draws both in its mist (26% of `#bec8c0`).
|
|
76
|
+
- **A pressed button is step 6.** DSM fills it in the colour
|
|
77
77
|
of a field's frame.
|
|
78
78
|
- **Orange step 10 is darker than DSM's hover orange,** so a warning Callout's
|
|
79
79
|
icon keeps 3:1 on its tint.
|
|
@@ -101,6 +101,42 @@ properties, for an app's own parts. The colour must be opaque `#rgb`,
|
|
|
101
101
|
A light colour comes out darker than it went in: `#ffd400` becomes a deep
|
|
102
102
|
amber, because a white label does not read on yellow.
|
|
103
103
|
|
|
104
|
+
In the dark theme, `AppRoot color-scheme="dark"` derives the accent with
|
|
105
|
+
`accentScale(color, { dark: true })`: step 9 and 10 are the same fills, so a
|
|
106
|
+
button keeps its white label; steps 1–8 are thicker tints laid on the dark
|
|
107
|
+
card (4–70%); steps 11 and 12 add white until they read at 4.5:1 and 7:1 on
|
|
108
|
+
step 3, so links and selected labels stay readable on a dark page.
|
|
109
|
+
|
|
110
|
+
## Dark theme
|
|
111
|
+
|
|
112
|
+
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;
|
|
117
|
+
the host decides and sets the attribute.
|
|
118
|
+
|
|
119
|
+
The same roles, with the light page's sage carried into the greys:
|
|
120
|
+
|
|
121
|
+
| Role | Dark | |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| `--ui-bg` | `#121513` | the page |
|
|
124
|
+
| `--ui-surface` | `#1b1f1c` | a card or panel |
|
|
125
|
+
| `--ui-surface-raised` | `#242925` | a menu or dialog |
|
|
126
|
+
| `--ui-text` | `#e3e8e4` | 13.4:1 on a card |
|
|
127
|
+
| `--ui-text-secondary` | 74% of the text | 7.9:1 on a card |
|
|
128
|
+
| `--ui-text-muted` | 50% of the text | |
|
|
129
|
+
| `--ui-border`, `-strong`, `-subtle` | mist at 16%, 26%, 9% | `rgba(200, 214, 204, …)` |
|
|
130
|
+
| `--ui-primary` | DSM blue `#057feb` | white label 4:1, as in light |
|
|
131
|
+
| `--ui-accent-11` | `#3597ef` | link text, 4.5:1 on step 3 |
|
|
132
|
+
| `--ui-info-text` … `--ui-danger-text` | `#7dbdf5`, `#6fdc8a`, `#f8bd84`, `#f59a9a` | 6.6:1 or more on their soft fill |
|
|
133
|
+
| `--ui-*-soft` | the tone at 18% | |
|
|
134
|
+
|
|
135
|
+
The tones' solid fills, radii, spacing and type are the light values. The
|
|
136
|
+
masks and shades (`--ui-overlay`, `--ui-drawer-backdrop`,
|
|
137
|
+
`--ui-scroll-edge-shade`), shadows, tooltip, scroll bar and switch thumb have
|
|
138
|
+
dark values too; a component draws no colour of its own outside these tokens.
|
|
139
|
+
|
|
104
140
|
## Lines and text
|
|
105
141
|
|
|
106
142
|
`--ui-hairline` is 1px, and 0.5px (one device pixel) from 2dppx up. Menu
|
package/docs/theme-hooks.md
CHANGED
|
@@ -31,6 +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
35
|
| `data-ui-presentation` | `AppRoot` root | `mobile`, `window`, `web` |
|
|
35
36
|
| `data-ui-floating` | a floating host (dialog, menu, popover) | present |
|
|
36
37
|
| `data-ui-layout-mode` | `AppLayout` root | `mobile`, `window`, `web` |
|