@synopackageland/ui 0.17.15 → 0.18.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +9 -7
  3. package/dist/components/app/page-toolbar/PageToolbar.vue.d.ts +15 -0
  4. package/dist/components/composite/callout/Callout.vue.d.ts +14 -6
  5. package/dist/components/composite/comment-item/CommentItem.vue.d.ts +2 -2
  6. package/dist/components/composite/facet-panel/FacetPanel.vue.d.ts +34 -0
  7. package/dist/components/composite/form/Form.vue.d.ts +1 -1
  8. package/dist/components/composite/form/context.d.ts +6 -0
  9. package/dist/components/composite/new-items-pill/NewItemsPill.vue.d.ts +14 -0
  10. package/dist/components/composite/summary-card/SummaryCard.vue.d.ts +48 -0
  11. package/dist/components/composite/tag-editor/TagEditor.vue.d.ts +32 -0
  12. package/dist/components/composite/timeline-row/TimelineRow.vue.d.ts +57 -0
  13. package/dist/components/composite/tree-view/TreeView.vue.d.ts +2 -2
  14. package/dist/components/primitives/badge/Badge.vue.d.ts +7 -0
  15. package/dist/components/primitives/button/Button.vue.d.ts +1 -1
  16. package/dist/components/primitives/dropdown-menu/DropdownMenu.vue.d.ts +5 -0
  17. package/dist/components/primitives/dropdown-menu/types.d.ts +6 -0
  18. package/dist/components/primitives/popover/Popover.vue.d.ts +8 -1
  19. package/dist/components/primitives/segment-control/SegmentItem.vue.d.ts +2 -0
  20. package/dist/components/primitives/sheet/Sheet.vue.d.ts +10 -0
  21. package/dist/components/primitives/skeleton/SectionSkeleton.vue.d.ts +6 -0
  22. package/dist/i18n/text.d.ts +7 -0
  23. package/dist/index.d.ts +9 -0
  24. package/dist/index.js +10624 -9759
  25. package/dist/json/catalog.d.ts +2 -0
  26. package/dist/json/registry.d.ts +34 -0
  27. package/dist/json-ai-prompt.md +1 -1
  28. package/dist/json-catalog.schema.json +2 -1
  29. package/dist/json-preview/preview.js +7202 -6775
  30. package/dist/json.js +1 -1
  31. package/dist/reka-runtime.json +1 -1
  32. package/dist/theme.css +1 -1
  33. package/dist/themes/dsm7-embedded-theme.css +1 -1
  34. package/dist/themes/dsm7-embedded.css +1 -1
  35. package/dist/themes/dsm7.css +1 -1
  36. package/docs/button-policy.md +3 -1
  37. package/docs/callout.md +9 -2
  38. package/docs/layout-rules.md +4 -3
  39. package/docs/theme-hooks.md +16 -1
  40. package/package.json +1 -76
@@ -20,6 +20,7 @@ are in [dsm-native-metrics.md](dsm-native-metrics.md).
20
20
  | Dialog, sheet or wizard footer | `Dialog`, `Sheet`, `Wizard` `#footer` | capsule | Cancel `secondary`, then OK `primary` |
21
21
  | Wizard footer | `Wizard` | capsule | The step's `#actions` at the start (a quiet `ghost` `kind="tool"` text action); Cancel `secondary` (a page wizard only), Back `secondary`, then Next / Apply / Finish `primary` at the end |
22
22
  | Confirmation of a destructive action | `Dialog` `#footer` | capsule | Cancel `secondary`, then Delete `danger` |
23
+ | Destructive choice beside the main action | `Dialog` `#footer` | capsule | Cancel `secondary`, the destructive choice `danger-outline` (Replace theirs), then the main action `primary` (Save as copy) |
23
24
  | Form or window footer | `FormActions`, `AppActionBar`, `Footbar`, `Panel` `#fbar` | capsule | Reset `secondary`, then Apply `primary` |
24
25
  | Notification | `Notification` `confirm` / `cancel` | capsule | Cancel `secondary`, then the action `primary` |
25
26
  | Toolbar | `AppToolbar`, a row above a list | tool | `secondary`; `SplitButton` for Create and its variants |
@@ -36,7 +37,8 @@ are in [dsm-native-metrics.md](dsm-native-metrics.md).
36
37
  wizard. An action that stays on the page, such as Disable this connection,
37
38
  Open or Check again, is a tool button even in a section footer.
38
39
  2. One main action per footer: one `primary`, or one `danger` for a
39
- destructive confirmation. The others are `secondary`.
40
+ destructive confirmation. The others are `secondary`, or `danger-outline`
41
+ for a destructive choice that is not the main one.
40
42
  3. The main action goes last, at the right edge: Cancel then OK, Reset then
41
43
  Apply. A footer is right-aligned, except `FormActions` in a page form, which
42
44
  starts at the field edge.
package/docs/callout.md CHANGED
@@ -9,6 +9,7 @@ has its own component, and none of them is a full-width banner.
9
9
  | A passing result: "Settings applied", "The check passed", "Copied" | `useToast()` | A toast that fades after 4.5 s. Do not leave a Callout behind for it. |
10
10
  | Something the user has to act on: a missing setting, a failed connection, a sign-in that waits | `<Callout>` | One-line title, at most one line of text, one action. |
11
11
  | A risk or a limit of a feature | `<Callout variant="inline">` | One short sentence; longer text in `#details` behind "Learn more", or a link. |
12
+ | A state of the page that fits its toolbar row: "Two devices are offline", "Read only" | `<Callout variant="hint">` | The icon and a few words on one line; the details in a tooltip. |
12
13
  | A failure the user has to know about now, outside the page | `Notification` / `MessageBox` | See their docs. |
13
14
 
14
15
  ## Closing
@@ -57,6 +58,12 @@ icon and one line of secondary text, with a link or a small button after it.
57
58
  Use it for a note under a field or a section heading, where a panel would
58
59
  weigh more than the note.
59
60
 
61
+ `variant="hint"` is one toolbar-high line: the tone's icon, the title in bold
62
+ and the message after it, cut with an ellipsis when the row is short. The
63
+ `#details` slot goes behind an info mark whose tooltip opens on hover or focus,
64
+ and on a tap with a touch pointer. A hint has no close button; it goes away
65
+ when its cause does. Put it in a `PageToolbar` or another row of controls.
66
+
60
67
  ### Why this one
61
68
 
62
69
  Three directions were drawn as working prototypes, each in every tone, with
@@ -122,11 +129,11 @@ Two earlier looks were rejected:
122
129
  | Prop / slot | Use |
123
130
  | --- | --- |
124
131
  | `tone` | `info` (default), `success`, `warning`, `danger` |
125
- | `variant` | `soft` (default) or `inline` |
132
+ | `variant` | `soft` (default), `inline` or `hint` |
126
133
  | `title` | One line, the thing to know |
127
134
  | default slot | The message |
128
135
  | `#actions` | One action, at the end of the message |
129
- | `#details` + `v-model:expanded` | Longer text behind a "Learn more" toggle (`moreLabel`, `lessLabel`) |
136
+ | `#details` + `v-model:expanded` | Longer text behind a "Learn more" toggle (`moreLabel`, `lessLabel`); in a hint, the tooltip of its info mark (named by `moreLabel`) |
130
137
  | `code` | A machine error code, shown quieter after the message |
131
138
  | `dismissible` (default `true`), `dismissKey`, `closeLabel`, `@close` | The close button; the callout returns when its text or `dismissKey` changes. `false` only for a state that must stay in view |
132
139
  | `fill` | Span the container instead of stopping at 720px |
@@ -26,7 +26,8 @@ These rules keep pages built from `@synopackageland/ui` consistent. The componen
26
26
 
27
27
  ## Fields
28
28
 
29
- - Labels sit above their controls (`Form direction="vertical"`), except in short DSM-style dialogs.
29
+ - Labels sit above their controls (`Form direction="vertical"`), except in short DSM-style dialogs and in side sheets (drawers).
30
+ - In a dialog or a side `Sheet`, keep the default `direction="auto"`: as in DSM, the labels sit in a left column whenever the form is at least 400px wide (a 420–480px sheet) and stack above their controls only below that (a phone). Size the column with `Form label-width` (about 120px for short labels); a long label wraps inside it and stays level with its control's first line, whether that is a field, a select, a switch, a toggle group or a segment control.
30
31
  - Size a field by its content: number fields are 128px; text fields use `fieldWidth`. Put two short fields side by side rather than stretching one across the page.
31
32
  - A checkbox's text sits on the same line as its box. Do not apply `display: grid` to `label` in App CSS; `Checkbox` renders its own label.
32
33
  - For 2–4 mutually exclusive settings, use `RadioGroup` (vertical by default, `orientation="horizontal"` when labels fit). In a wizard step, `variant="card"` draws the options as choice cards with an optional `icon` each. A checkbox enables an independent option; a switch turns a feature on or off immediately. Keep the circular radio with a dot, square checkbox with a tick, and pill switch with a moving thumb.
@@ -54,7 +55,7 @@ The setting is a form value, saved with the page's Apply action. It does not nav
54
55
  ## Settings pages
55
56
 
56
57
  - Use `<SectionTabs fill keep-mounted>` for settings with local unsaved drafts. `keep-mounted` mounts every supplied item panel immediately and hides inactive panels with `v-show`; their effects stay active. Without it, switching tabs unmounts the previous panel. `fill` alone only controls layout. Keep persistent business data and background work in the app when needed.
57
- - `SettingsPage` spaces direct sibling `SettingsSection`s by `--ui-space-6` (24px); place them directly in its default slot without a `Space` wrapper. `Fieldset` keeps its own DSM spacing.
58
+ - `SettingsPage` stacks its body without a `Space` wrapper: each visible direct child sits `--ui-space-4` (16px) under the one before (a Callout, a skeleton, a section), and sibling `SettingsSection`s are `--ui-space-6` (24px) apart. Place them directly in its default slot. A `hidden` child (a closed Callout) takes no gap, and `Fieldset` keeps its own DSM spacing.
58
59
  - A settings page has one label column. `FormItem` (horizontal), `SettingsRow` and `KeyValueRow` share `--ui-label-column` (`--ui-label-width`, at most 40% of a narrow row) and `--ui-label-gap`, so SDK panels and App rows line up; `FormActions inset` starts at the same edge. Labels and `KeyValueRow` values break between words, not inside one. Do not pass a different `labelWidth` per section.
59
60
  - Labels sit left in the column, as on DSM's own settings pages: the eye runs down one edge, and a long label wraps instead of pushing the value.
60
61
  - Colours are fixed by role: section title `--ui-text` semibold 14px, label and value `--ui-text`, help text `--ui-text-secondary` 12px.
@@ -107,7 +108,7 @@ The setting is a form value, saved with the page's Apply action. It does not nav
107
108
  ## Page
108
109
 
109
110
  - `PageHeader` sticks to the top while the content scrolls.
110
- - A settings page with tabs is `SectionTabs fill` with one `SettingsPage` per panel, in a container with a height (a window, `AppLayout height="fill"`): the tab strip stays at the top, the footer at the bottom, and only the sections scroll. Without a height (a phone page), 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.
111
+ - A settings page with tabs is `SectionTabs fill` with one `SettingsPage` per panel, in a container with a height (a window, `AppLayout height="fill"`; in a flex column it takes the height its siblings leave, with no override): the tab strip stays at the top, the footer at the bottom, and only the sections scroll. Without a height (a phone page), 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.
111
112
  - `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.
112
113
  - `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.
113
114
  - `EmptyState` fills the remaining height and centres its content. Do not add footnotes below it.
@@ -79,20 +79,35 @@ here stay implementation details and can change in any release.
79
79
 
80
80
  | Attribute | On | Values |
81
81
  | --- | --- | --- |
82
- | `data-variant` | `Button` | `primary`, `secondary`, `ghost`, `danger` |
82
+ | `data-variant` | `Button` | `primary`, `secondary`, `ghost`, `danger`, `danger-outline` |
83
83
  | `data-variant` | `IconButton` | `primary`, `secondary`, `ghost` |
84
84
  | `data-variant` | `SplitButton`'s outer group | `primary`, `secondary` |
85
85
  | `data-kind` | `Button` | `tool`, `action` |
86
86
  | `data-loading`, `data-disabled` | `Button` | present while loading / explicitly disabled |
87
+ | `data-lead`, `data-trail` | `Button`'s label | present when an element (icon, `StatusDot`) sits before / after the text |
87
88
  | `data-split-main`, `data-split-arrow` | `SplitButton`'s two halves | present |
88
89
  | `data-ui-surface` | `Surface` and every `Card` frame | present |
89
90
  | `data-variant` | `Surface` / `Card` frame | `default`, `inset` |
90
91
  | `data-ui-dialog`, `data-ui-sheet` | `Dialog` / `Sheet` panels | present |
92
+ | `data-modal` | a `Sheet` panel | `false` on a non-modal sheet |
93
+ | `data-ui-badge-dot` | `Badge`'s leading dot | present |
94
+ | `data-menu-description` | a `DropdownMenu` entry's second line | present |
95
+ | `data-ui-segment-count` | a `SegmentItem`'s count pill | present |
91
96
  | `data-ui-list-item-title`, `-description`, `-meta`, `-actions`, `-leading` | `ListItem` parts | present |
92
97
  | `data-ui-statistic-label`, `-value`, `-note` | `Statistic` parts | present |
93
98
  | `data-ui-stat-tile` | `StatTile` (`data-tone`; a filter tile also `data-state` `on` / `off`) | present |
94
99
  | `data-ui-stat-tile-label`, `-value`, `-unit`, `-note` | `StatTile` parts | present |
95
100
  | `data-ui-stat-tile-group` | `StatTileGroup` | present |
101
+ | `data-ui-page-toolbar`, `-start`, `-actions` | `PageToolbar` and its two sides | present |
102
+ | `data-ui-summary-card` | `SummaryCard` (`data-state` `loading`, `error`, `ready`; `data-wide`) | present |
103
+ | `data-ui-summary-card-title`, `-state`, `-figures`, `-figure`, `-body`, `-note`, `-error` | `SummaryCard` parts | present |
104
+ | `data-ui-skeleton` | `SectionSkeleton` | `lines`, `figures`, `rows` (parts `data-ui-skeleton-line`, `-figure`, `-row`) |
105
+ | `data-ui-timeline-row` | `TimelineRow` (class `ui-timeline-row`, `data-tone`, `data-expanded`); under a 600px container the chip and time move under the meta | present |
106
+ | `data-ui-timeline-row-leading`, `-icon`, `-title`, `-meta`, `-chip`, `-time`, `-actions`, `-toggle`, `-detail` | `TimelineRow` parts | present |
107
+ | `data-ui-new-items-pill` | `NewItemsPill` (`data-edge` `top`, `bottom`) | present |
108
+ | `data-ui-facet-panel` | `FacetPanel` (`data-presentation` `panel`, `sheet`) | present |
109
+ | `data-ui-facet-group` (`data-key`), `-group-toggle`, `data-ui-facet-value` (`aria-pressed`), `data-ui-facet-count`, `data-ui-facet-panel-clear`, `-trigger`, `-count` | `FacetPanel` parts | present |
110
+ | `data-ui-tag-editor` (`data-editing`), `-read`, `-field`, `-input`, `-list`, `-option` (`data-kind` `option`, `create`) | `TagEditor` parts | present |
96
111
  | `data-ui-fieldset` | `Fieldset` | present |
97
112
  | `data-fieldset-description` | `Fieldset` description under the title | present |
98
113
  | `data-ui-form-group` | `FormGroup` (`data-disabled` while disabled) | present |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/ui",
3
- "version": "0.17.15",
3
+ "version": "0.18.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",
@@ -52,48 +52,6 @@
52
52
  "./themes/dsm7-embedded-reset.css": "./dist/themes/dsm7-embedded-reset.css",
53
53
  "./themes/dsm7-embedded-theme.css": "./dist/themes/dsm7-embedded-theme.css"
54
54
  },
55
- "scripts": {
56
- "dev": "vite build --watch",
57
- "build": "vite build && vite build --mode json && vite build --mode rich-text && vite build --mode cli && vite build --mode preview && vite build --mode embedded && node scripts/postbuild.mjs",
58
- "lint": "eslint .",
59
- "typecheck": "vue-tsc --noEmit -p tsconfig.json",
60
- "test": "vitest run",
61
- "test:watch": "vitest",
62
- "test:changed": "echo \"test:changed skips the tests the changes since ${SYNOPKGLAND_GATE_BASE:-origin/master} do not reach (vitest --changed); pnpm check runs them all\" && vitest run --changed ${SYNOPKGLAND_GATE_BASE:-origin/master}",
63
- "story": "histoire dev",
64
- "story:build": "histoire build",
65
- "check:host": "node scripts/dsm-host-shots.mjs",
66
- "check:switch": "node scripts/check-switch.mjs",
67
- "check:tabs": "node scripts/check-tabs.mjs",
68
- "check:narrow": "node scripts/check-narrow-controls.mjs",
69
- "check:responsive": "node scripts/check-responsive.mjs",
70
- "check:adaptive": "node scripts/check-adaptive.mjs",
71
- "check:sidebar-focus": "node scripts/check-sidebar-focus.mjs",
72
- "check:json-render": "node scripts/check-json-render.mjs",
73
- "check:motion": "node scripts/check-motion.mjs",
74
- "check:topology": "node scripts/check-topology.mjs",
75
- "check:wizard": "node scripts/check-wizard.mjs",
76
- "check:edges": "node scripts/check-edges.mjs",
77
- "check:data-grid": "node scripts/check-data-grid.mjs",
78
- "check:truncation": "node scripts/check-truncation.mjs",
79
- "check:link": "node scripts/check-link.mjs",
80
- "check:text-select": "node scripts/check-text-select.mjs",
81
- "check:date-picker": "node scripts/check-date-picker.mjs",
82
- "check:full-page": "node scripts/check-full-page.mjs",
83
- "check:internal": "node --test scripts/check-internal-content.test.mjs scripts/check-npm-metadata.test.mjs && node scripts/check-internal-content.mjs --repo .",
84
- "check:npm-metadata": "node scripts/check-npm-metadata.mjs",
85
- "check:package": "node scripts/check-package-content.mjs",
86
- "notices:update": "node scripts/third-party-notices.mjs --write",
87
- "notices:check": "node scripts/third-party-notices.mjs --check",
88
- "check": "bash scripts/docker-check.sh 'pnpm check:internal && pnpm build && node scripts/run-parallel.mjs lint typecheck test && pnpm check:package'",
89
- "check:fast": "bash scripts/docker-check.sh 'pnpm check:internal && pnpm build && node scripts/run-parallel.mjs lint typecheck test:changed && pnpm check:package'",
90
- "check:local-browser": "node scripts/app-local-browser.mjs",
91
- "check:infotip": "node scripts/check-infotip.mjs",
92
- "release:stage": "node scripts/stage-release.mjs",
93
- "check:polish": "bash scripts/docker-check.sh --build --out .polish-shots 'node scripts/check-polish.mjs'",
94
- "check:acceptance": "node scripts/check-acceptance.mjs",
95
- "check:palette": "node scripts/check-palette.mjs"
96
- },
97
55
  "peerDependencies": {
98
56
  "vue": "^3.5.0"
99
57
  },
@@ -113,42 +71,9 @@
113
71
  "@tiptap/vue-3": "3.32.1",
114
72
  "zod": "^4.6.5"
115
73
  },
116
- "devDependencies": {
117
- "@eslint/js": "10.0.1",
118
- "@histoire/plugin-vue": "1.0.0-beta.1",
119
- "@tailwindcss/vite": "4.3.3",
120
- "@vitejs/plugin-vue": "6.0.9",
121
- "@vue/test-utils": "2.5.1",
122
- "eslint": "10.11.0",
123
- "eslint-plugin-vue": "10.11.1",
124
- "flexsearch": "0.8.212",
125
- "globals": "17.12.0",
126
- "histoire": "1.0.0-beta.1",
127
- "jsdom": "30.1.1",
128
- "playwright": "1.58.2",
129
- "reka-ui": "2.10.5",
130
- "tailwindcss": "4.3.3",
131
- "typescript": "5.9.3",
132
- "typescript-eslint": "8.71.0",
133
- "vite": "7.3.6",
134
- "vite-plugin-dts": "5.1.1",
135
- "vitest": "5.0.2",
136
- "vscode-oniguruma": "2.0.1",
137
- "vscode-textmate": "9.3.2",
138
- "vue": "3.5.43",
139
- "vue-eslint-parser": "10.4.1",
140
- "vue-tsc": "3.3.11"
141
- },
142
74
  "engines": {
143
75
  "node": ">=20"
144
76
  },
145
- "packageManager": "pnpm@10.33.2",
146
- "pnpm": {
147
- "onlyBuiltDependencies": [
148
- "esbuild",
149
- "vue-demi"
150
- ]
151
- },
152
77
  "config": {
153
78
  "bundledRuntime": {
154
79
  "reka-ui": "2.10.5"