@synopackageland/ui 0.20.0 → 0.20.1
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 +7 -0
- package/README.md +6 -6
- package/dist/components/app/app-toolbar/AppToolbar.vue.d.ts +3 -3
- package/dist/components/app/page-content/PageContent.vue.d.ts +1 -1
- package/dist/components/app/page-header/PageHeader.vue.d.ts +3 -3
- package/dist/components/composite/callout/Callout.vue.d.ts +10 -5
- package/dist/components/composite/callout/CalloutRecall.vue.d.ts +3 -0
- package/dist/components/composite/callout/CalloutRecallList.vue.d.ts +3 -0
- package/dist/components/composite/callout/calloutDismissal.d.ts +37 -0
- package/dist/i18n/text.d.ts +2 -0
- package/dist/index.js +7566 -7407
- package/dist/json-ai-prompt.md +1 -1
- package/dist/json-catalog.schema.json +1 -1
- package/dist/json-preview/preview.js +6098 -5939
- package/dist/json.js +9 -9
- 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 +5 -1
- package/docs/app-local-modal.md +4 -4
- package/docs/callout.md +61 -23
- package/docs/{component-defaults-0.5.7.md → component-defaults.md} +1 -1
- package/docs/json-ui.md +2 -2
- package/docs/theme-hooks.md +3 -2
- package/package.json +2 -2
package/docs/adaptive-layout.md
CHANGED
|
@@ -132,7 +132,11 @@ import {
|
|
|
132
132
|
with no card, border or outer margin around it. The area is white, unless the
|
|
133
133
|
page holds a card (`Card`, `Surface`): then it is the page grey
|
|
134
134
|
(`--ui-bg`, the web canvas) and the cards lift off it with a 1px frame and
|
|
135
|
-
`--ui-shadow-card`, as on DSM's own card pages.
|
|
135
|
+
`--ui-shadow-card`, as on DSM's own card pages. A list page stays white: a
|
|
136
|
+
page with a `DataGrid` on it (not inside a card) keeps the white area when a
|
|
137
|
+
`Surface` opens beside the list, such as a detail pane for the selected row;
|
|
138
|
+
the pane keeps its 1px border and takes no shadow, so selecting a row never
|
|
139
|
+
repaints the page. `surface="card"` always stays
|
|
136
140
|
white. `surface="flat"` always takes the grey canvas, for multi-card
|
|
137
141
|
dashboards. All three behave the same in the web, DSM-window and mobile
|
|
138
142
|
presentations.
|
package/docs/app-local-modal.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# App-local modal
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`AppRoot` uses
|
|
4
4
|
`modal-scope="app"` unless you pass `modal-scope="document"`, which only a
|
|
5
5
|
full-page web or Portal app should do: document mode locks `document.body`.
|
|
6
6
|
|
|
@@ -148,9 +148,9 @@ root and inside the active panel, or use the library's supported popup component
|
|
|
148
148
|
|
|
149
149
|
Reka 2.10.5 is an exact development dependency, bundled into the UI library's
|
|
150
150
|
ESM dist. It is no longer a consumer runtime dependency. Vue remains an external
|
|
151
|
-
peer, and the bundled code uses that same Vue instance.
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
peer, and the bundled code uses that same Vue instance. Consumers receive the
|
|
152
|
+
body-style fix by rebuilding, without a package-manager patch or app code change.
|
|
153
|
+
Independent modality is the default.
|
|
154
154
|
|
|
155
155
|
`build/reka-patches.json` records the SHA-256 of every original upstream ESM
|
|
156
156
|
module plus exact before/after hunks. `build/rekaPatch.ts` verifies the installed
|
package/docs/callout.md
CHANGED
|
@@ -14,12 +14,46 @@ has its own component, and none of them is a full-width banner.
|
|
|
14
14
|
|
|
15
15
|
## Closing
|
|
16
16
|
|
|
17
|
-
A Callout is dismissible by default: a 24px ✕
|
|
17
|
+
A Callout is dismissible by default: a 24px ✕ at the end of the line,
|
|
18
18
|
drawn in the tone, labelled "Close" (`closeLabel`) and reached with Tab.
|
|
19
|
-
Closing hides that callout and emits `close`.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Closing hides that callout and emits `close`. A closed callout is not drawn
|
|
20
|
+
and takes no room: no empty line, no gap, no margin.
|
|
21
|
+
|
|
22
|
+
**It stays closed.** The dismissal is stored in `localStorage` under
|
|
23
|
+
`syno-pkg-land-ui:callout:<app>:<id>`, so the callout stays closed after a
|
|
24
|
+
reload and when the user comes back to the page. `<app>` is the DSM package
|
|
25
|
+
(from `/webman/3rdparty/<package>/`) or the page's host and directory. `<id>`
|
|
26
|
+
is the callout's `dismissKey`; without one it is a hash of the page path,
|
|
27
|
+
the tone and the text. Give every callout a stable `dismissKey` that names
|
|
28
|
+
what it is about:
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<Callout tone="info" dismiss-key="recycle-bin-empty-in-dsm">
|
|
32
|
+
Or empty it in DSM: Control Panel › Shared Folder › Edit › Recycle Bin
|
|
33
|
+
</Callout>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**It comes back when what it says changes.** The stored value is a hash of
|
|
37
|
+
the tone, title, `code` and rendered text, so the same callout with a new
|
|
38
|
+
message (a new error, "97% full" after "92% full") shows again, with or
|
|
39
|
+
without a `dismissKey`.
|
|
40
|
+
|
|
41
|
+
**A `danger` callout is hidden for this page load only.** An error that is
|
|
42
|
+
still there after a reload is worth seeing again; closing it only clears the
|
|
43
|
+
page for now. Every other tone is remembered.
|
|
44
|
+
|
|
45
|
+
**The page's info button brings it back.** A closed callout that is still on
|
|
46
|
+
the page is listed in the page's one info button (ⓘ) at the start of the
|
|
47
|
+
toolbar, or on the title line, under "Hidden notices", each with "Show
|
|
48
|
+
again", which shows it and forgets the dismissal. Where the toolbar or title
|
|
49
|
+
line already has an info button (a page's notes), the list is added to it;
|
|
50
|
+
otherwise the first toolbar (`AppToolbar`) or page header (`PageHeader`)
|
|
51
|
+
shows one while a callout is closed, and none when nothing is. There is
|
|
52
|
+
never a second icon, wherever the App puts the callout.
|
|
53
|
+
|
|
54
|
+
Storage is read and written inside `try`/`catch`: without it (a private
|
|
55
|
+
window, blocked site data) a callout shows as usual, and closing it lasts for
|
|
56
|
+
the page load.
|
|
23
57
|
|
|
24
58
|
Set `:dismissible="false"` only for a state that must stay in view until it
|
|
25
59
|
is resolved, such as a setup step the App cannot work without. Never hide the
|
|
@@ -31,12 +65,15 @@ on the page.
|
|
|
31
65
|
A Callout and a Toast share one look: a raised surface in the page's neutral
|
|
32
66
|
colour (`--ui-surface-raised`), with no frame and no tinted fill. A 1px ring
|
|
33
67
|
at 6% of the text colour and a soft shadow lift it off the page. The tone
|
|
34
|
-
appears in
|
|
68
|
+
appears in two small places only:
|
|
35
69
|
|
|
36
|
-
- a 1.5px light along the top edge, in the tone, fading out halfway across;
|
|
37
70
|
- a faint glow of the tone (9%; 14% in the workbench dark theme) in the
|
|
38
71
|
corner behind the icon;
|
|
39
|
-
- the 18px
|
|
72
|
+
- the icon (16px in a Callout, 18px in a Toast).
|
|
73
|
+
|
|
74
|
+
A Toast also has a 1.5px light along its top edge, in the tone, fading out
|
|
75
|
+
halfway across. A Callout drops it: it stays on the page, where DSM draws its
|
|
76
|
+
notes with no decoration.
|
|
40
77
|
|
|
41
78
|
The title reads in the text colour at 600, and the message under it in the
|
|
42
79
|
secondary text colour. Corners are 12px (`--ui-callout-radius`), rounder than
|
|
@@ -45,10 +82,19 @@ of them. Buttons in `#actions` and a toast's action are capsules. A Callout
|
|
|
45
82
|
fades in and rises 6px when it appears, and a toast slides in; with reduced
|
|
46
83
|
motion both appear at once.
|
|
47
84
|
|
|
48
|
-
A Callout
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
a narrow panel they move under
|
|
85
|
+
A Callout spans its container (block, `width: 100%`), so it lines up with
|
|
86
|
+
the table or form under it. `--ui-callout-max-width` (none by default) caps
|
|
87
|
+
it where a theme wants that; `fill` is no longer needed. Actions sit at the
|
|
88
|
+
end of the message while the width allows; on a narrow panel they move under
|
|
89
|
+
the text.
|
|
90
|
+
|
|
91
|
+
One line is a form row high, 32px: 7px above and below an 18px line. The
|
|
92
|
+
icon, the text, a small action button (pulled into the line, so it does not
|
|
93
|
+
make it taller) and the ✕ are centred on it. A taller callout, a title and a
|
|
94
|
+
message or wrapped text, centres the icon and the ✕ on the whole block
|
|
95
|
+
rather than on its first line: a Callout has a title and at most one line,
|
|
96
|
+
so the block stays short, and centring keeps the icon and the ✕ level with an
|
|
97
|
+
action button, which first-line alignment would not.
|
|
52
98
|
|
|
53
99
|
Contrast was measured on the surface, light and dark, in every tone: text at
|
|
54
100
|
least 5.4:1, icons at least 3.3:1.
|
|
@@ -82,14 +128,6 @@ and without an action, light and dark, and on a settings page:
|
|
|
82
128
|
neutral, still shows the tone at a glance, and reads as modern without a
|
|
83
129
|
coloured box.
|
|
84
130
|
|
|
85
|
-
Two earlier looks were rejected:
|
|
86
|
-
|
|
87
|
-
- **0.14.9 and before**: full width, a 3px bar on the leading edge, a tinted
|
|
88
|
-
strip, and buttons stacked under the text. It read as a dated admin-tool
|
|
89
|
-
warning box.
|
|
90
|
-
- **A first redesign**: a tinted fill with a thin tinted frame. It was still
|
|
91
|
-
a coloured box.
|
|
92
|
-
|
|
93
131
|
## Writing one
|
|
94
132
|
|
|
95
133
|
- **No closing period.** Callout text (title, message, details, action
|
|
@@ -137,10 +175,10 @@ Two earlier looks were rejected:
|
|
|
137
175
|
| `#actions` | One action, at the end of the message |
|
|
138
176
|
| `#details` + `v-model:expanded` | Longer text behind a "Learn more" toggle (`moreLabel`, `lessLabel`); in a hint, the tooltip of the whole line (`moreLabel` is not used) |
|
|
139
177
|
| `code` | A machine error code, shown quieter after the message |
|
|
140
|
-
| `dismissible` (default `true`), `dismissKey`, `closeLabel`, `@close` | The close button
|
|
141
|
-
| `fill` |
|
|
178
|
+
| `dismissible` (default `true`), `dismissKey`, `closeLabel`, `@close` | The close button. Closing is remembered (a `danger` callout for this page load only) until the text changes; `dismissKey` is the callout's stable id within the App. `false` only for a state that must stay in view |
|
|
179
|
+
| `fill` | Deprecated: a Callout spans its container by default |
|
|
142
180
|
|
|
143
181
|
Theme hooks (`data-tone`, `data-variant`, `data-fill`, `data-dismissible`, the `data-ui-callout-*`
|
|
144
|
-
parts) and tokens (`--ui-callout-max-width`, `--ui-callout-radius`,
|
|
182
|
+
parts, and `data-ui-callout-recall`, `-recall-trigger` and `-restore` for the info button's list) and tokens (`--ui-callout-max-width`, `--ui-callout-radius`,
|
|
145
183
|
`--ui-callout-glow`, `--ui-callout-shadow`, which Toast shares) are listed in
|
|
146
184
|
[theme hooks](theme-hooks.md).
|
package/docs/json-ui.md
CHANGED
|
@@ -9,7 +9,7 @@ normal Vue/TypeScript extensions.
|
|
|
9
9
|
It also supports responsive `AppShell` and `ResponsiveView` alternatives:
|
|
10
10
|
one JSON spec renders as a DSM window or a phone view, and as a wide Portal
|
|
11
11
|
page when its `AppShell` sets `wideLayout: "web"`.
|
|
12
|
-
`AppShell` `navigation: "top"`
|
|
12
|
+
`AppShell` `navigation: "top"` shows its `SidebarNav` as one bar above
|
|
13
13
|
the page instead of a left column; a phone keeps the drawer.
|
|
14
14
|
See [adaptive-layout.md](adaptive-layout.md).
|
|
15
15
|
|
|
@@ -113,7 +113,7 @@ The package ships a `syno-pkg-land-ui` command and the same functions from the J
|
|
|
113
113
|
entry. After `npm install @synopackageland/ui`, run
|
|
114
114
|
`npx --no syno-pkg-land-ui <command>`. To run it without installing locally, use
|
|
115
115
|
`npx -y -p @synopackageland/ui syno-pkg-land-ui <command>`; pin the package version
|
|
116
|
-
for reproducible automation.
|
|
116
|
+
for reproducible automation. `syno-pkg-land-ui` is the package's command name.
|
|
117
117
|
|
|
118
118
|
| Command | Purpose | Function |
|
|
119
119
|
| --- | --- | --- |
|
package/docs/theme-hooks.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Theme hooks: public `data-*` attributes and layout tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The attributes and tokens on this page are **public API**. An app
|
|
4
4
|
or a workspace theme may select on them in its own CSS and set the tokens on
|
|
5
5
|
any ancestor. Class names, element nesting and every attribute not listed
|
|
6
6
|
here stay implementation details and can change in any release.
|
|
@@ -141,6 +141,7 @@ here stay implementation details and can change in any release.
|
|
|
141
141
|
| `data-fill` | `Callout` | present when it spans its container |
|
|
142
142
|
| `data-tone` | each `Toast` (class `ui-toast`) | `info`, `success`, `warning`, `danger` |
|
|
143
143
|
| `data-ui-callout-title`, `-body`, `-code`, `-more`, `-details`, `-actions` | `Callout` parts | present |
|
|
144
|
+
| `data-ui-callout-recall`, `data-ui-callout-recall-trigger`, `data-ui-callout-restore` | the list of closed callouts in the page's info button, the info button a toolbar or page header adds for it, and a "Show again" button | present |
|
|
144
145
|
|
|
145
146
|
Select a `Button` variant with its tag so a `Surface`'s `data-variant` is not
|
|
146
147
|
caught as well: `button[data-variant='primary']`.
|
|
@@ -162,7 +163,7 @@ before the token existed. Set them on the app root or any ancestor.
|
|
|
162
163
|
| `--ui-mobile-bar-bg` | the phone bar's background | `var(--ui-surface)` |
|
|
163
164
|
| `--ui-mobile-bar-fg` | the phone bar's text, menu button and brand | `var(--ui-text-secondary)` (text), `var(--ui-text)` (button, brand) |
|
|
164
165
|
| `--ui-mobile-bar-border` | the phone bar's bottom rule | `var(--ui-border-subtle)` |
|
|
165
|
-
| `--ui-callout-max-width` | how wide a `Callout` grows
|
|
166
|
+
| `--ui-callout-max-width` | caps how wide a `Callout` grows; it spans its container by default | none |
|
|
166
167
|
| `--ui-callout-radius` | a `Callout`'s and a `Toast`'s corners | 12px |
|
|
167
168
|
| `--ui-callout-glow` | how strong the tone's glow is behind a `Callout`'s or `Toast`'s icon; a dark theme raises it (workbench: 14%) | 9% |
|
|
168
169
|
| `--ui-callout-shadow` | the shadow under a `Callout` and a `Toast` (workbench dark: `0 10px 28px -12px rgba(0, 0, 0, 0.6)`) | `0 8px 24px -12px rgba(15, 23, 42, 0.18)` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/ui",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"docs/button-policy.md",
|
|
19
19
|
"docs/callout.md",
|
|
20
20
|
"docs/color-system.md",
|
|
21
|
-
"docs/component-defaults
|
|
21
|
+
"docs/component-defaults.md",
|
|
22
22
|
"docs/json-ui.md",
|
|
23
23
|
"docs/layout-rules.md",
|
|
24
24
|
"docs/size-and-split.md",
|