@synopackageland/ui 0.17.4 → 0.17.5
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 +10 -0
- package/README.md +42 -1
- package/dist/components/app/section-tabs/SectionTabs.vue.d.ts +4 -2
- package/dist/components/composite/stacked-bar/StackedBar.vue.d.ts +31 -0
- package/dist/components/composite/stat-tile/StatTile.vue.d.ts +42 -0
- package/dist/components/composite/stat-tile/StatTileGroup.vue.d.ts +30 -0
- package/dist/i18n/text.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6913 -6698
- package/dist/json-preview/preview.js +672 -642
- 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/button-policy.md +1 -0
- package/docs/layout-rules.md +2 -0
- package/docs/size-and-split.md +45 -4
- package/docs/theme-hooks.md +5 -0
- package/package.json +1 -1
package/docs/button-policy.md
CHANGED
|
@@ -24,6 +24,7 @@ are in [dsm-native-metrics.md](dsm-native-metrics.md).
|
|
|
24
24
|
| Notification | `Notification` `confirm` / `cancel` | capsule | Cancel `secondary`, then the action `primary` |
|
|
25
25
|
| Toolbar | `AppToolbar`, a row above a list | tool | `secondary`; `SplitButton` for Create and its variants |
|
|
26
26
|
| Page header | `PageHeader` `#actions` | tool | one refresh `IconButton` per page |
|
|
27
|
+
| Tab row | `SectionTabs` `#actions` | tool | `secondary`, for the shown section (Export, Check again) |
|
|
27
28
|
| Section or card | `SettingsSection` / `Card` body, `#actions`, `#footer` | tool | `secondary`; a Save / Cancel row there goes in `FormActions` |
|
|
28
29
|
| Beside a field | `InputGroup` | tool | `secondary` (Open, Copy, Test) |
|
|
29
30
|
| Row of a list or grid | `ListItem` `#actions`, an `actions` column | tool | `IconButton` with a `label` |
|
package/docs/layout-rules.md
CHANGED
|
@@ -66,6 +66,8 @@ These rules keep pages built from `@synopackageland/ui` consistent. The componen
|
|
|
66
66
|
## Status
|
|
67
67
|
|
|
68
68
|
- Show a headline number (space freed, files moved) with `Statistic`: `label`, `value`, optional `note`; `size="lg"` for the one number a page leads with. Put several in `Surface`s in a grid. Do not set font sizes for figures.
|
|
69
|
+
- A row of counts that also filters the page (Online, Outdated, Failed) is a `StatTileGroup` of `StatTile`s, each with a `filter` key; the group's model is the filters that are on. A single filter tile takes `v-model`. Do not style buttons as tiles.
|
|
70
|
+
- Show how a whole splits up (a volume by content, devices by read status) with `StackedBar`: one bar, a legend with the sizes, and one accessible name for all of it.
|
|
69
71
|
- Colour a usage bar by meaning with `Progress tone` (`warning` when nearly full) rather than drawing your own bar.
|
|
70
72
|
- Show a state as a `Badge` in a `KeyValueRow`, not as a sentence. A toned badge leads with a dot; keep `neutral` for plain values such as a version.
|
|
71
73
|
- A passing result ("Settings applied") is a toast; a Callout is for something the user has to act on or a short risk note, with one title, one line and one action ([callout](callout.md)).
|
package/docs/size-and-split.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
# SplitPane, SizeBar and
|
|
1
|
+
# SplitPane, SizeBar, StorageMeter and StackedBar
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
styled with classes only and work inside the DSM-embedded
|
|
3
|
+
Building blocks for storage pages: two panes the user resizes, a size bar for
|
|
4
|
+
a list row, a "free now → free after" projection, and a bar of the parts of a
|
|
5
|
+
whole. All are styled with classes only and work inside the DSM-embedded
|
|
6
|
+
theme.
|
|
6
7
|
|
|
7
8
|
## SplitPane
|
|
8
9
|
|
|
@@ -94,3 +95,43 @@ part use `--ui-primary`. Hooks: `data-ui-storage-meter`,
|
|
|
94
95
|
`data-ui-storage-meter-now`, `data-ui-storage-meter-after`,
|
|
95
96
|
`data-ui-storage-meter-used`, `data-ui-storage-meter-freeing`
|
|
96
97
|
(`data-at-least`).
|
|
98
|
+
|
|
99
|
+
## StackedBar
|
|
100
|
+
|
|
101
|
+
One 6px bar of the parts of a whole, with a legend of their sizes under it.
|
|
102
|
+
With `total` it shows capacity: the parts against the volume's size, the rest
|
|
103
|
+
as free space. Without it, it shows composition: the parts fill the bar.
|
|
104
|
+
|
|
105
|
+
```vue
|
|
106
|
+
<StackedBar
|
|
107
|
+
label="Volume 1"
|
|
108
|
+
:total="volume.size"
|
|
109
|
+
:segments="[
|
|
110
|
+
{ label: 'Photos', value: photos, tone: 'primary' },
|
|
111
|
+
{ label: 'Backups', value: backups, color: 'var(--ui-accent-7)' },
|
|
112
|
+
{ label: 'Snapshots', value: snapshots, tone: 'warning' },
|
|
113
|
+
]"
|
|
114
|
+
/>
|
|
115
|
+
<StackedBar label="Read coverage" :segments="coverage" :format="n => `${n} devices`" />
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| Prop | Default | Meaning |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| `segments` | required | `{ label, value, tone?, color?, key? }[]`. `tone` is `primary` (default), `info`, `success`, `warning`, `danger` or `neutral`; `color` (any CSS colour) wins over it; `key` names the part in its hooks (default: the label). A value that is 0, negative or not a number draws nothing and counts as 0. |
|
|
121
|
+
| `total` | unset | The whole. What the parts leave is the free part; a total smaller than the parts grows to them. |
|
|
122
|
+
| `label` | unset | Names the bar before its parts in the accessible name: `Volume 1: …`. |
|
|
123
|
+
| `remainderLabel` | "Free" | The free part's word; an empty string leaves it out of the legend and the name. |
|
|
124
|
+
| `legend` | `true` | The legend under the bar. |
|
|
125
|
+
| `format` | `formatFileSize` | Value formatter (DSM's 1024 base). |
|
|
126
|
+
|
|
127
|
+
The whole is one `role="img"` named by every part and its size, then the free
|
|
128
|
+
part and "Total" when there is a `total`, joined as the UI language lists
|
|
129
|
+
them: "Volume 1: Photos 820 GB, Backups 1.4 TB, Free 1.7 TB, Total 4 TB". The
|
|
130
|
+
bar and legend are hidden from assistive technology, so nothing is read
|
|
131
|
+
twice. `primary` and `info` are the same blue in DSM: give neighbouring parts
|
|
132
|
+
different tones, or a lighter shade such as `var(--ui-accent-7)` through
|
|
133
|
+
`color`. A non-zero part is at least 2px wide, and a 1px surface line separates
|
|
134
|
+
neighbouring parts. The track colour is `--ui-stacked-bar-track` (default
|
|
135
|
+
`--ui-gray-a3`). Hooks: `data-ui-stacked-bar`, `data-ui-stacked-bar-track`,
|
|
136
|
+
`data-ui-stacked-bar-segment` (`data-key`, `data-tone`),
|
|
137
|
+
`data-ui-stacked-bar-legend`, `data-ui-stacked-bar-remainder`.
|
package/docs/theme-hooks.md
CHANGED
|
@@ -90,6 +90,11 @@ here stay implementation details and can change in any release.
|
|
|
90
90
|
| `data-ui-dialog`, `data-ui-sheet` | `Dialog` / `Sheet` panels | present |
|
|
91
91
|
| `data-ui-list-item-title`, `-description`, `-meta`, `-actions`, `-leading` | `ListItem` parts | present |
|
|
92
92
|
| `data-ui-statistic-label`, `-value`, `-note` | `Statistic` parts | present |
|
|
93
|
+
| `data-ui-stat-tile` | `StatTile` (`data-tone`; a filter tile also `data-state` `on` / `off`) | present |
|
|
94
|
+
| `data-ui-stat-tile-label`, `-value`, `-unit`, `-note` | `StatTile` parts | present |
|
|
95
|
+
| `data-ui-stat-tile-group` | `StatTileGroup` | present |
|
|
96
|
+
| `data-ui-stacked-bar`, `-track`, `-segment`, `-legend`, `-remainder` | `StackedBar` parts (a segment has `data-key` and `data-tone`) | present |
|
|
97
|
+
| `data-ui-section-tabs-row`, `data-ui-section-tabs-actions` | `SectionTabs` with `#actions`: the row and the actions | present |
|
|
93
98
|
| `data-tone` | `Callout` | `info`, `success`, `warning`, `danger` |
|
|
94
99
|
| `data-variant` | `Callout` | `soft`, `inline` |
|
|
95
100
|
| `data-fill` | `Callout` | present when it spans its container |
|