@synopackageland/ui 0.19.11 → 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 +14 -0
- package/README.md +25 -19
- 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/layout-rules.md +14 -3
- 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/layout-rules.md
CHANGED
|
@@ -19,7 +19,7 @@ These rules keep pages built from `@synopackageland/ui` consistent. The componen
|
|
|
19
19
|
- Buttons that belong together sit in one row with an 8px gap: `FormActions` in a form, the `#footer` slot in a section or card.
|
|
20
20
|
- Only the bar that closes a dialog or form draws capsule `action` buttons, without a `kind`: `FormActions`, `Footbar`, `AppActionBar`, a `Notification`'s actions, and the footers of `Dialog`, `Wizard`, `Sheet` and `Panel` (`#fbar`), with the main action last. `kind="tool"` opts one button out. A `SettingsSection` or `Card` footer, header actions and content stay `tool` buttons; put a section's Save / Cancel in `FormActions`.
|
|
21
21
|
- A settings tab's Reset / Apply go in `SettingsPage`'s `#footer`: it stays at the bottom over a divider while only the sections scroll. Do not write your own sticky footer.
|
|
22
|
-
- Each page has one refresh, in the page
|
|
22
|
+
- Each page has one refresh, with the page's other buttons: in the bar above the page (the SDK `AppShell`'s `#actions`), or in `PageHeader` where a page draws one. Panels expose `refresh()` for it instead of their own button.
|
|
23
23
|
- A disabled primary button keeps readable text. Put the reason next to it, such as "Enter the password to confirm."
|
|
24
24
|
- Danger actions sit apart from the rest: the explanation comes first, then the button, or a confirm dialog.
|
|
25
25
|
- Return the promise from a `Button` or `IconButton` click handler (`@click="save"` with an `async save`): the button shows a spinner, keeps its width and ignores further clicks until the promise settles. Use the `loading` prop only for work the button did not start.
|
|
@@ -108,8 +108,19 @@ The setting is a form value, saved with the page's Apply action. It does not nav
|
|
|
108
108
|
|
|
109
109
|
## Page
|
|
110
110
|
|
|
111
|
-
- `
|
|
112
|
-
-
|
|
111
|
+
- A page under a sidebar draws no title: the selected sidebar item names it. Keep a visually hidden `h1` with the page's name for screen readers, and put the page's buttons in a bar above the page (`AppToolbar` `#actions`). The SDK `AppShell` does both by itself; its `header: true` shows `PageHeader` instead. Pages have no subtitle.
|
|
112
|
+
- Only the content scrolls. The navigation, the bar above the page, a page's tab strip and a settings footer stay in place, and no scrollbar runs past them. On a phone (640px and narrower) the page has one scrolling area, nothing scrolls sideways, and the footer stays in view.
|
|
113
|
+
- Where a page draws `PageHeader`, it sticks to the top while the content scrolls.
|
|
114
|
+
- A settings page with tabs is `SectionTabs fill` with one `SettingsPage` per panel, in a container with a height (a window, `AppLayout height="fill"` with `PageContent height="fill"`, or a page of the SDK `AppShell`, which fills by itself when it shows one): the tab strip stays at the top, the footer at the bottom edge, and only the sections scroll. A tab that is not a `SettingsPage` scrolls under the strip. The height passes through the App's own wrapper elements; do not add CSS to pass it on. A `SettingsPage` without tabs behaves the same, and its footer sits on the bottom edge with no space under it. Without a height, the page scrolls, the strip sticks to the top and the footer to the bottom, above the safe area. Under 520px of row width labels stack over their controls.
|
|
113
115
|
- `DataGrid` and `DataTable` fill the height their flex-column container leaves by default (`fill`), as DSM's lists do: the header row stays, the rows scroll inside the table, and a DataGrid's footer ("3 items", the pager) sits at the container's bottom whatever the row count. A list page uses `AppLayout height="fill"` and `PageContent height="fill"` so the table, its last child, gets that height. Where the page itself scrolls (a phone), the footer sticks to the bottom of the viewport above the safe area. Give a short table inside a form, a settings section or a dialog `:fill="false"`: it is as tall as its rows. Do not let the whole page scroll past a 50-row page to reach the pager.
|
|
114
116
|
- `PageHeader` keeps the title and its `meta` slot (an info button, a chip) on one line. Actions that would crowd the title move under it, at the right edge; a title longer than its line ends in "…" and shows in full on hover.
|
|
115
117
|
- `EmptyState` fills the remaining height and centres its content. Do not add footnotes below it.
|
|
118
|
+
|
|
119
|
+
## Moving an existing App
|
|
120
|
+
|
|
121
|
+
An App written for the older layout (a title on every page, the whole page scrolling) moves to these rules as follows:
|
|
122
|
+
|
|
123
|
+
- With the SDK `AppShell`, a page that should keep its visible title sets `header: true`. Drop page descriptions; they are not shown.
|
|
124
|
+
- Remove a hidden `h1` you added beside `header: false` and buttons you moved into your own `AppToolbar`: the shell names the page and puts `#actions` in the bar above it.
|
|
125
|
+
- Remove CSS that passed the height to a settings page through your wrappers (such as `.integration-app > [data-page] { flex: 1 1 0%; min-height: 0 }` and the same for its child) and CSS that removed the space under a settings footer (`padding-bottom: 0` on the page content).
|
|
126
|
+
- Remove `fill: true` from SDK pages whose content is a `SettingsPage` or `SectionTabs fill`; keep it where the content scrolls itself, such as a split view or a table paged by height.
|
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.
|
|
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",
|