@synopackageland/ui 0.14.6 → 0.14.8
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 +19 -0
- package/README.md +2 -1
- package/dist/ButtonPolicyDemo.vue.d.ts +3 -0
- package/dist/components/app/page-content/PageContent.vue.d.ts +1 -1
- package/dist/components/composite/settings-section/SettingsSection.vue.d.ts +2 -2
- package/dist/components/containers/card/Card.vue.d.ts +2 -2
- package/dist/components/primitives/button/Button.vue.d.ts +4 -3
- package/dist/composables/buttonKind.d.ts +12 -4
- package/dist/index.js +255 -259
- package/dist/json-ai-prompt.md +1 -1
- package/dist/json-catalog.schema.json +1 -1
- package/dist/json-preview/preview.js +2380 -2387
- package/dist/json.js +22 -22
- 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 +12 -9
- package/docs/button-policy.md +62 -0
- package/docs/color-system.md +2 -1
- package/docs/layout-rules.md +2 -1
- package/package.json +2 -1
package/docs/adaptive-layout.md
CHANGED
|
@@ -127,12 +127,15 @@ import {
|
|
|
127
127
|
a full-page Portal to enable the full-page layout at 1200px or wider.
|
|
128
128
|
- `AppLayout` defaults to `responsive=true`. Set `:responsive="false"`
|
|
129
129
|
only if the host application intentionally implements its own complete responsive shell.
|
|
130
|
-
- `PageContent surface="auto"` puts the page straight on
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
the
|
|
135
|
-
|
|
130
|
+
- `PageContent surface="auto"` puts the page straight on the content area: flush
|
|
131
|
+
beside the sidebar and under the toolbar, at the DSM window's page padding,
|
|
132
|
+
with no card, border or outer margin around it. The area is white, unless the
|
|
133
|
+
page holds a card (`Card`, `Surface`): then it is the page grey
|
|
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. `surface="card"` always stays
|
|
136
|
+
white. `surface="flat"` always takes the grey canvas, for multi-card
|
|
137
|
+
dashboards. All three behave the same in the web, DSM-window and mobile
|
|
138
|
+
presentations.
|
|
136
139
|
`surface="none"` adds no page surface and removes the horizontal page gutters
|
|
137
140
|
in **all** presentations, for editors or standalone content that owns its
|
|
138
141
|
layout. It preserves width limits, fill height and section gaps; it does not
|
|
@@ -221,10 +224,10 @@ any ancestor. Light defaults and the dark values the workbench uses:
|
|
|
221
224
|
|
|
222
225
|
| Token | Light (default) | Dark |
|
|
223
226
|
| --- | --- | --- |
|
|
224
|
-
| `--ui-app-web-canvas` | `var(--ui-
|
|
225
|
-
| `--ui-app-web-surface` | `var(--ui-surface)` | `#
|
|
227
|
+
| `--ui-app-web-canvas` | `var(--ui-bg)` (`#f0f2f5`) | `var(--ui-bg)` (`#11161c`) |
|
|
228
|
+
| `--ui-app-web-surface` | `var(--ui-surface)` | `var(--ui-surface)` (`#1f2832`) |
|
|
226
229
|
| `--ui-app-web-border` | `var(--ui-gray-a6)` | `#34404d` |
|
|
227
|
-
| `--ui-app-web-shadow` | `
|
|
230
|
+
| `--ui-app-web-shadow` | `var(--ui-shadow-card)` | `var(--ui-shadow-card)` |
|
|
228
231
|
| `--ui-web-sidebar-collapsed-width` | `64px` | same |
|
|
229
232
|
|
|
230
233
|
`AppLayout navigation="top"` puts the navigation in a bar above the page in the
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Button policy
|
|
2
|
+
|
|
3
|
+
DSM 7 draws two button shapes. A **capsule** belongs to the bar that closes a
|
|
4
|
+
window, dialog or form: OK / Cancel, Apply / Reset, a wizard's Next, a
|
|
5
|
+
confirmation's Delete. Every other button is a **tool button** with the 3px
|
|
6
|
+
control radius: toolbars, page headers, sections, rows, fields. The components
|
|
7
|
+
pick the shape from where a button sits; an App chooses only the variant.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
Measured on DSM 7.4 (Control Panel, Package Center, File Station): every button
|
|
12
|
+
is 28px high. A footer capsule is at least 80px wide, 120px for the blue or red
|
|
13
|
+
one; a tool button sizes to its label with 13px each side. Colours and states
|
|
14
|
+
are in [dsm-native-metrics.md](dsm-native-metrics.md).
|
|
15
|
+
|
|
16
|
+
## Where each button goes
|
|
17
|
+
|
|
18
|
+
| Place | Component | Shape | Variants |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| Dialog, sheet or wizard footer | `Dialog`, `Sheet`, `Wizard` `#footer` | capsule | Cancel `secondary`, then OK `primary` |
|
|
21
|
+
| Confirmation of a destructive action | `Dialog` `#footer` | capsule | Cancel `secondary`, then Delete `danger` |
|
|
22
|
+
| Form or window footer | `FormActions`, `AppActionBar`, `Footbar`, `Panel` `#fbar` | capsule | Reset `secondary`, then Apply `primary` |
|
|
23
|
+
| Notification | `Notification` `confirm` / `cancel` | capsule | Cancel `secondary`, then the action `primary` |
|
|
24
|
+
| Toolbar | `AppToolbar`, a row above a list | tool | `secondary`; `SplitButton` for Create and its variants |
|
|
25
|
+
| Page header | `PageHeader` `#actions` | tool | one refresh `IconButton` per page |
|
|
26
|
+
| Section or card | `SettingsSection` / `Card` body, `#actions`, `#footer` | tool | `secondary`; a Save / Cancel row there goes in `FormActions` |
|
|
27
|
+
| Beside a field | `InputGroup` | tool | `secondary` (Open, Copy, Test) |
|
|
28
|
+
| Row of a list or grid | `ListItem` `#actions`, an `actions` column | tool | `IconButton` with a `label` |
|
|
29
|
+
| Navigation, help, external page | `Link` | text link | not a button |
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
1. A capsule only ends something: it closes a dialog, applies a form or moves a
|
|
34
|
+
wizard. An action that stays on the page, such as Disable this connection,
|
|
35
|
+
Open or Check again, is a tool button even in a section footer.
|
|
36
|
+
2. One main action per footer: one `primary`, or one `danger` for a
|
|
37
|
+
destructive confirmation. The others are `secondary`.
|
|
38
|
+
3. The main action goes last, at the right edge: Cancel then OK, Reset then
|
|
39
|
+
Apply. A footer is right-aligned, except `FormActions` in a page form, which
|
|
40
|
+
starts at the field edge.
|
|
41
|
+
4. Toolbar and row actions are grey, Delete too. Red appears in the dialog that
|
|
42
|
+
confirms the deletion, not on the button that opens it.
|
|
43
|
+
5. Inside a page, use `primary` only for the one step that unblocks the page,
|
|
44
|
+
such as Sign in in a callout; at most one per section.
|
|
45
|
+
6. Keep the default size. `sm` and `lg` exist for dense rows and touch layouts;
|
|
46
|
+
neighbouring buttons share one size.
|
|
47
|
+
7. A disabled button keeps its shape and place. Say why next to it.
|
|
48
|
+
8. An icon-only action is an `IconButton` with a `label`; it shows as its
|
|
49
|
+
tooltip and names the button for screen readers.
|
|
50
|
+
9. Labels are verbs, without a closing period: Apply, Disable this connection.
|
|
51
|
+
|
|
52
|
+
## What the components do
|
|
53
|
+
|
|
54
|
+
- A Button takes its shape from the closest footer: inside `Dialog`, `Sheet`
|
|
55
|
+
and `Wizard` footers, `FormActions`, `AppActionBar`, `Footbar`, a `Panel`
|
|
56
|
+
`#fbar` or a `Notification` it is a capsule, everywhere else a tool button.
|
|
57
|
+
Set `kind="tool"` on one footer button to keep it a tool button (Help, say).
|
|
58
|
+
- In development, a Button warns in the console when `kind="action"` is set
|
|
59
|
+
outside a footer, when a footer has two main actions, or when the main action
|
|
60
|
+
is not last. Production builds do not check.
|
|
61
|
+
|
|
62
|
+

|
package/docs/color-system.md
CHANGED
|
@@ -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
|
|
42
|
+
| `--ui-bg` | `#f0f2f5` (between `gray-2` and `gray-3`) | the page behind cards: the cool grey of Storage Manager's Overview (`rgb(244 248 250)`), one step deeper |
|
|
43
|
+
| `--ui-surface`, `--ui-surface-raised` | `gray-1` | white window, cards and panels; menus and dialogs add a shadow |
|
|
43
44
|
| `--ui-surface-subtle`, `--ui-surface-inset` | `gray-a2` | grey block, 18% of `#c6d4e0` |
|
|
44
45
|
| `--ui-surface-hover` | `accent-a2` | list row hover, 4% blue |
|
|
45
46
|
| `--ui-surface-selected`, `--ui-primary-soft` | `accent-a3` | selected row and nav item, 10% blue |
|
package/docs/layout-rules.md
CHANGED
|
@@ -15,8 +15,9 @@ These rules keep pages built from `@synopackageland/ui` consistent. The componen
|
|
|
15
15
|
|
|
16
16
|
## Actions
|
|
17
17
|
|
|
18
|
+
- [Button policy](button-policy.md) says which button goes where: its shape, variant and order.
|
|
18
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.
|
|
19
|
-
-
|
|
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`.
|
|
20
21
|
- On a settings form longer than the window, `FormActions sticky` keeps Apply in view at the bottom over a divider. Do not write your own sticky footer.
|
|
21
22
|
- Each page has one refresh, in the page header. Panels expose `refresh()` for it instead of their own button.
|
|
22
23
|
- A disabled primary button keeps readable text. Put the reason next to it, such as "Enter the password to confirm."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.8",
|
|
4
4
|
"description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"README.md",
|
|
16
16
|
"docs/adaptive-layout.md",
|
|
17
17
|
"docs/app-local-modal.md",
|
|
18
|
+
"docs/button-policy.md",
|
|
18
19
|
"docs/color-system.md",
|
|
19
20
|
"docs/component-defaults-0.5.7.md",
|
|
20
21
|
"docs/json-ui.md",
|