@synopackageland/ui 0.20.17 → 0.20.19
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 +13 -0
- package/dist/cli.js +0 -0
- package/dist/components/composite/callout/Callout.vue.d.ts +11 -0
- package/dist/components/composite/callout/calloutDismissal.d.ts +17 -2
- package/dist/components/primitives/toast/toast.d.ts +11 -1
- package/dist/composables/focusOwner.d.ts +4 -0
- package/dist/composables/openerFocus.d.ts +6 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +10659 -10616
- package/dist/json-preview/preview.js +4854 -4844
- 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/callout.md +40 -0
- package/docs/mobile-native.md +7 -0
- package/package.json +3 -86
package/docs/callout.md
CHANGED
|
@@ -51,6 +51,33 @@ otherwise the first toolbar (`AppToolbar`) or page header (`PageHeader`)
|
|
|
51
51
|
shows one while a callout is closed, and none when nothing is. There is
|
|
52
52
|
never a second icon, wherever the App puts the callout.
|
|
53
53
|
|
|
54
|
+
**A notice about a passing state closes for that appearance only.** For a
|
|
55
|
+
state that comes and goes (reconnecting, an error, a stalled capture), show
|
|
56
|
+
the Callout with `v-if` while the state lasts and set
|
|
57
|
+
`dismiss-scope="occurrence"`. Closing hides this appearance: nothing is
|
|
58
|
+
stored, and the dismissal is forgotten when the Callout unmounts, so the next
|
|
59
|
+
time the state starts the notice shows again. `persistent` (the default) is
|
|
60
|
+
the behaviour above.
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
<Callout v-if="reconnecting" tone="warning" dismiss-key="reconnecting" dismiss-scope="occurrence">
|
|
64
|
+
Reconnecting… Notes are saved on this device until the connection is back.
|
|
65
|
+
</Callout>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
To show a closed callout again from code (its condition ended while it stays
|
|
69
|
+
mounted, or a setting was reset), forget its dismissal by its `dismissKey`:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { dismissalKey, forgetDismissal } from '@synopackageland/ui'
|
|
73
|
+
|
|
74
|
+
forgetDismissal(dismissalKey('reconnecting'))
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`dismissalKey(dismissKey)` is the storage key of the callout with that
|
|
78
|
+
`dismissKey`; `forgetDismissal(key)` removes it from this page load and from
|
|
79
|
+
`localStorage`, and a mounted callout under that key shows again.
|
|
80
|
+
|
|
54
81
|
Storage is read and written inside `try`/`catch`: without it (a private
|
|
55
82
|
window, blocked site data) a callout shows as usual, and closing it lasts for
|
|
56
83
|
the page load.
|
|
@@ -160,6 +187,18 @@ and without an action, light and dark, and on a settings page:
|
|
|
160
187
|
toast.success('Settings applied', 'Added port 6690')
|
|
161
188
|
```
|
|
162
189
|
|
|
190
|
+
`useToast()` needs a `<ToastProvider>` ancestor (the App puts one around
|
|
191
|
+
its shell) and
|
|
192
|
+
throws without it. A component that also mounts without the App shell (in
|
|
193
|
+
a unit test or a preview) asks for `useToast({ optional: true })`: without a
|
|
194
|
+
provider it gets a controller that shows nothing (its calls return -1,
|
|
195
|
+
`update` returns false). A test that wants to see the toasts provides its
|
|
196
|
+
own controller under the exported `toastControllerKey`:
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
mount(Component, { global: { provide: { [toastControllerKey]: fakeToast } } })
|
|
200
|
+
```
|
|
201
|
+
|
|
163
202
|
- Work in progress keeps one toast id from start to result. A pending toast
|
|
164
203
|
shows only if the work takes longer than 300 ms, has no timer, and turns
|
|
165
204
|
into its result in place; an error's Retry can turn it back into pending:
|
|
@@ -197,6 +236,7 @@ and without an action, light and dark, and on a settings page:
|
|
|
197
236
|
| `#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) |
|
|
198
237
|
| `code` | A machine error code, shown quieter after the message |
|
|
199
238
|
| `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 |
|
|
239
|
+
| `dismissScope` | `persistent` (default): closing is remembered as above. `occurrence`: this appearance only, forgotten when the Callout unmounts |
|
|
200
240
|
| `fill` | Deprecated: a Callout spans its container by default |
|
|
201
241
|
|
|
202
242
|
Theme hooks (`data-tone`, `data-variant`, `data-fill`, `data-dismissible`, the `data-ui-callout-*`
|
package/docs/mobile-native.md
CHANGED
|
@@ -192,6 +192,13 @@ narrower; a row's last item has no neighbour to share room with), and on the
|
|
|
192
192
|
InputSteppers presets button (shifted towards the text, same size). Unset,
|
|
193
193
|
the box grows evenly as above.
|
|
194
194
|
|
|
195
|
+
A scroller cuts off the part of a box outside it on every side. A control on
|
|
196
|
+
a scroller's start edge loses that part too, so a scroller that holds page
|
|
197
|
+
content keeps the page gutter as its own padding: on touch a `SettingsPage`
|
|
198
|
+
body reaches over the gutter and pads its content by it. Tags in a select
|
|
199
|
+
field keep `--ui-tap-gap` between them on touch, so a tag's remove button
|
|
200
|
+
(44px box) never reaches the next tag.
|
|
201
|
+
|
|
195
202
|
`check:mobile` exempts a link set in a sentence (inline, with text beside it
|
|
196
203
|
in the same parent): WCAG 2.5.8 lets the line of text decide its size. A link
|
|
197
204
|
alone on its line still needs 44px.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/ui",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.19",
|
|
4
4
|
"description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -79,34 +79,6 @@
|
|
|
79
79
|
"@tiptap/vue-3": "3.32.1",
|
|
80
80
|
"zod": "^4.6.5"
|
|
81
81
|
},
|
|
82
|
-
"devDependencies": {
|
|
83
|
-
"@eslint/js": "10.0.1",
|
|
84
|
-
"@histoire/plugin-vue": "1.0.0-beta.1",
|
|
85
|
-
"@tailwindcss/vite": "4.3.3",
|
|
86
|
-
"@tanstack/vue-virtual": "3.13.39",
|
|
87
|
-
"@vitejs/plugin-vue": "6.0.9",
|
|
88
|
-
"@vue/test-utils": "2.5.1",
|
|
89
|
-
"@vueuse/core": "14.4.0",
|
|
90
|
-
"eslint": "10.11.0",
|
|
91
|
-
"eslint-plugin-vue": "10.11.1",
|
|
92
|
-
"flexsearch": "0.8.212",
|
|
93
|
-
"globals": "17.12.0",
|
|
94
|
-
"histoire": "1.0.0-beta.1",
|
|
95
|
-
"jsdom": "30.1.1",
|
|
96
|
-
"playwright": "1.58.2",
|
|
97
|
-
"reka-ui": "2.11.0",
|
|
98
|
-
"tailwindcss": "4.3.3",
|
|
99
|
-
"typescript": "5.9.3",
|
|
100
|
-
"typescript-eslint": "8.71.0",
|
|
101
|
-
"vite": "7.3.6",
|
|
102
|
-
"vite-plugin-dts": "5.1.1",
|
|
103
|
-
"vitest": "5.0.2",
|
|
104
|
-
"vscode-oniguruma": "2.0.1",
|
|
105
|
-
"vscode-textmate": "9.3.2",
|
|
106
|
-
"vue": "3.5.43",
|
|
107
|
-
"vue-eslint-parser": "10.4.1",
|
|
108
|
-
"vue-tsc": "3.3.11"
|
|
109
|
-
},
|
|
110
82
|
"engines": {
|
|
111
83
|
"node": ">=20"
|
|
112
84
|
},
|
|
@@ -117,60 +89,5 @@
|
|
|
117
89
|
"reka-ui": "2.11.0"
|
|
118
90
|
}
|
|
119
91
|
},
|
|
120
|
-
"homepage": "https://www.varvis.me/docs/"
|
|
121
|
-
|
|
122
|
-
"check:docs": "node --test scripts/check-doc-versions.test.mjs && node scripts/check-doc-versions.mjs",
|
|
123
|
-
"dev": "vite build --watch",
|
|
124
|
-
"build": "vite build && vite build --mode json && vite build --mode rich-text && vite build --mode grid && vite build --mode cli && vite build --mode preview && vite build --mode embedded && node scripts/postbuild.mjs",
|
|
125
|
-
"lint": "eslint .",
|
|
126
|
-
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
|
|
127
|
-
"test": "vitest run",
|
|
128
|
-
"test:watch": "vitest",
|
|
129
|
-
"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}",
|
|
130
|
-
"story": "histoire dev",
|
|
131
|
-
"story:build": "histoire build",
|
|
132
|
-
"check:host": "node scripts/dsm-host-shots.mjs",
|
|
133
|
-
"check:switch": "node scripts/check-switch.mjs",
|
|
134
|
-
"check:tabs": "node scripts/check-tabs.mjs",
|
|
135
|
-
"check:mobile": "node scripts/check-mobile-overflow.mjs",
|
|
136
|
-
"check:ui-patch": "node scripts/check-ui-patch.mjs",
|
|
137
|
-
"check:narrow": "node scripts/check-narrow-controls.mjs",
|
|
138
|
-
"check:drawer-form": "node scripts/check-drawer-form.mjs",
|
|
139
|
-
"check:responsive": "node scripts/check-responsive.mjs",
|
|
140
|
-
"check:adaptive": "node scripts/check-adaptive.mjs",
|
|
141
|
-
"check:sidebar-focus": "node scripts/check-sidebar-focus.mjs",
|
|
142
|
-
"check:json-render": "node scripts/check-json-render.mjs",
|
|
143
|
-
"check:motion": "node scripts/check-motion.mjs",
|
|
144
|
-
"check:topology": "node scripts/check-topology.mjs",
|
|
145
|
-
"check:wizard": "node scripts/check-wizard.mjs",
|
|
146
|
-
"check:edges": "node scripts/check-edges.mjs",
|
|
147
|
-
"check:data-grid": "node scripts/check-data-grid.mjs",
|
|
148
|
-
"check:truncation": "node scripts/check-truncation.mjs",
|
|
149
|
-
"check:link": "node scripts/check-link.mjs",
|
|
150
|
-
"check:text-select": "node scripts/check-text-select.mjs",
|
|
151
|
-
"check:date-picker": "node scripts/check-date-picker.mjs",
|
|
152
|
-
"check:full-page": "node scripts/check-full-page.mjs",
|
|
153
|
-
"check:short-viewport": "node scripts/check-short-viewport.mjs",
|
|
154
|
-
"check:focus-restore": "node scripts/check-focus-restore.mjs",
|
|
155
|
-
"check:detail-surface": "node scripts/check-detail-surface.mjs",
|
|
156
|
-
"check:internal": "node --test scripts/check-internal-content.test.mjs scripts/check-npm-metadata.test.mjs && node scripts/check-internal-content.mjs --repo .",
|
|
157
|
-
"check:npm-metadata": "node scripts/check-npm-metadata.mjs",
|
|
158
|
-
"check:package": "node scripts/check-package-content.mjs",
|
|
159
|
-
"check:public-api-consumer": "node scripts/check-public-api-consumer.mjs",
|
|
160
|
-
"notices:update": "node scripts/third-party-notices.mjs --write",
|
|
161
|
-
"notices:check": "node scripts/third-party-notices.mjs --check",
|
|
162
|
-
"check": "bash scripts/docker-check.sh \"npm run gates\"",
|
|
163
|
-
"check:fast": "bash scripts/docker-check.sh \"npm run gates\"",
|
|
164
|
-
"check:local-browser": "node scripts/app-local-browser.mjs",
|
|
165
|
-
"check:infotip": "node scripts/check-infotip.mjs",
|
|
166
|
-
"release:stage": "node scripts/stage-release.mjs",
|
|
167
|
-
"check:polish": "bash scripts/docker-check.sh --build --out .polish-shots 'node scripts/check-polish.mjs'",
|
|
168
|
-
"check:acceptance": "node scripts/check-acceptance.mjs",
|
|
169
|
-
"check:palette": "node scripts/check-palette.mjs",
|
|
170
|
-
"gates": "node scripts/gates.mjs",
|
|
171
|
-
"gates:full": "node scripts/gates.mjs --full",
|
|
172
|
-
"check:layout": "node scripts/check-layout.mjs",
|
|
173
|
-
"release:smoke": "node scripts/release-smoke.mjs",
|
|
174
|
-
"check:browser-install": "playwright install chromium"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
92
|
+
"homepage": "https://www.varvis.me/docs/"
|
|
93
|
+
}
|