@synopackageland/ui 0.18.3 → 0.19.0
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 +2 -1
- package/dist/components/composite/callout/Callout.vue.d.ts +3 -3
- package/dist/components/composite/settings-section/SettingsSection.vue.d.ts +4 -4
- package/dist/components/composite/timeline-row/TimelineRow.vue.d.ts +2 -2
- package/dist/components/containers/card/Card.vue.d.ts +4 -4
- package/dist/components/containers/expandable-item/ExpandableItem.vue.d.ts +3 -3
- package/dist/components/primitives/motion/MotionCollapse.vue.d.ts +16 -0
- package/dist/index.js +7204 -7055
- package/dist/json-preview/preview.js +4366 -4262
- package/dist/lib/motion.d.ts +33 -0
- 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/theme-hooks.md +32 -0
- package/package.json +77 -1
package/docs/theme-hooks.md
CHANGED
|
@@ -55,6 +55,7 @@ here stay implementation details and can change in any release.
|
|
|
55
55
|
| `data-ui-page-header` | `PageHeader` | present |
|
|
56
56
|
| `data-ui-page-header-meta`, `data-ui-page-header-actions` | `PageHeader`'s meta and actions areas | present |
|
|
57
57
|
| `data-page-surface` | `PageContent` | `auto`, `card`, `flat`, `none` |
|
|
58
|
+
| `data-ui-motion` | set by the app on any ancestor (an `AppRoot`, `<html>`) | `off`: the library's motion is instant inside it, as under reduced motion ([Motion](#motion)) |
|
|
58
59
|
|
|
59
60
|
### Navigation rows (`AppSidebar`, side or top)
|
|
60
61
|
|
|
@@ -166,6 +167,37 @@ The colour, radius, spacing and web tokens are listed in the
|
|
|
166
167
|
[README](../README.md#theme-override), [colour system](color-system.md) and
|
|
167
168
|
[adaptive layout](adaptive-layout.md#safe-overrides).
|
|
168
169
|
|
|
170
|
+
## Motion
|
|
171
|
+
|
|
172
|
+
The components move a little by default: dialogs and their masks fade in and
|
|
173
|
+
settle from 97 %, menus, popovers and select lists drop 4px from their trigger,
|
|
174
|
+
a notification slides 8px in, expandable bodies (`Card`, `SettingsSection`,
|
|
175
|
+
`ExpandableItem`, `Callout` details, `TimelineRow`, `FacetPanel`, `Accordion`,
|
|
176
|
+
`Fieldset`) open their height, a row the user just added fades in, and a tab
|
|
177
|
+
panel switched to rises 4px. Only opacity, transforms and height through grid
|
|
178
|
+
rows move. Exits are shorter than entrances and let clicks through at once.
|
|
179
|
+
Nothing animates on first render, and a list's first data, a refresh or paging
|
|
180
|
+
does not animate its rows.
|
|
181
|
+
|
|
182
|
+
| Token | Value | Use |
|
|
183
|
+
| --- | --- | --- |
|
|
184
|
+
| `--ui-motion-fast` | 120ms | colour and state changes, menus opening, anything closing |
|
|
185
|
+
| `--ui-motion-normal` | 180ms | dialogs opening, a new row, a tab panel, the loading mask |
|
|
186
|
+
| `--ui-motion-slow` | 240ms | height, notifications and toasts arriving, a sheet sliding in |
|
|
187
|
+
| `--ui-motion-ease-out` | `cubic-bezier(0.22, 1, 0.36, 1)` | arriving |
|
|
188
|
+
| `--ui-motion-ease-in` | `cubic-bezier(0.4, 0, 1, 1)` | leaving |
|
|
189
|
+
| `--ui-motion-ease-in-out` | `cubic-bezier(0.4, 0, 0.2, 1)` | height between two resting states |
|
|
190
|
+
|
|
191
|
+
Under `prefers-reduced-motion: reduce` all of it is instant. To turn it off
|
|
192
|
+
for part of a page, or the whole App, set `data-ui-motion="off"` on any
|
|
193
|
+
ancestor:
|
|
194
|
+
|
|
195
|
+
```vue
|
|
196
|
+
<AppRoot data-ui-motion="off">
|
|
197
|
+
<App />
|
|
198
|
+
</AppRoot>
|
|
199
|
+
```
|
|
200
|
+
|
|
169
201
|
## Example: a dark top bar
|
|
170
202
|
|
|
171
203
|
```css
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
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,6 +52,49 @@
|
|
|
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:drawer-form": "node scripts/check-drawer-form.mjs",
|
|
70
|
+
"check:responsive": "node scripts/check-responsive.mjs",
|
|
71
|
+
"check:adaptive": "node scripts/check-adaptive.mjs",
|
|
72
|
+
"check:sidebar-focus": "node scripts/check-sidebar-focus.mjs",
|
|
73
|
+
"check:json-render": "node scripts/check-json-render.mjs",
|
|
74
|
+
"check:motion": "node scripts/check-motion.mjs",
|
|
75
|
+
"check:topology": "node scripts/check-topology.mjs",
|
|
76
|
+
"check:wizard": "node scripts/check-wizard.mjs",
|
|
77
|
+
"check:edges": "node scripts/check-edges.mjs",
|
|
78
|
+
"check:data-grid": "node scripts/check-data-grid.mjs",
|
|
79
|
+
"check:truncation": "node scripts/check-truncation.mjs",
|
|
80
|
+
"check:link": "node scripts/check-link.mjs",
|
|
81
|
+
"check:text-select": "node scripts/check-text-select.mjs",
|
|
82
|
+
"check:date-picker": "node scripts/check-date-picker.mjs",
|
|
83
|
+
"check:full-page": "node scripts/check-full-page.mjs",
|
|
84
|
+
"check:internal": "node --test scripts/check-internal-content.test.mjs scripts/check-npm-metadata.test.mjs && node scripts/check-internal-content.mjs --repo .",
|
|
85
|
+
"check:npm-metadata": "node scripts/check-npm-metadata.mjs",
|
|
86
|
+
"check:package": "node scripts/check-package-content.mjs",
|
|
87
|
+
"notices:update": "node scripts/third-party-notices.mjs --write",
|
|
88
|
+
"notices:check": "node scripts/third-party-notices.mjs --check",
|
|
89
|
+
"check": "bash scripts/docker-check.sh 'pnpm check:internal && pnpm build && node scripts/run-parallel.mjs lint typecheck test && pnpm check:package'",
|
|
90
|
+
"check:fast": "bash scripts/docker-check.sh 'pnpm check:internal && pnpm build && node scripts/run-parallel.mjs lint typecheck test:changed && pnpm check:package'",
|
|
91
|
+
"check:local-browser": "node scripts/app-local-browser.mjs",
|
|
92
|
+
"check:infotip": "node scripts/check-infotip.mjs",
|
|
93
|
+
"release:stage": "node scripts/stage-release.mjs",
|
|
94
|
+
"check:polish": "bash scripts/docker-check.sh --build --out .polish-shots 'node scripts/check-polish.mjs'",
|
|
95
|
+
"check:acceptance": "node scripts/check-acceptance.mjs",
|
|
96
|
+
"check:palette": "node scripts/check-palette.mjs"
|
|
97
|
+
},
|
|
55
98
|
"peerDependencies": {
|
|
56
99
|
"vue": "^3.5.0"
|
|
57
100
|
},
|
|
@@ -71,9 +114,42 @@
|
|
|
71
114
|
"@tiptap/vue-3": "3.32.1",
|
|
72
115
|
"zod": "^4.6.5"
|
|
73
116
|
},
|
|
117
|
+
"devDependencies": {
|
|
118
|
+
"@eslint/js": "10.0.1",
|
|
119
|
+
"@histoire/plugin-vue": "1.0.0-beta.1",
|
|
120
|
+
"@tailwindcss/vite": "4.3.3",
|
|
121
|
+
"@vitejs/plugin-vue": "6.0.9",
|
|
122
|
+
"@vue/test-utils": "2.5.1",
|
|
123
|
+
"eslint": "10.11.0",
|
|
124
|
+
"eslint-plugin-vue": "10.11.1",
|
|
125
|
+
"flexsearch": "0.8.212",
|
|
126
|
+
"globals": "17.12.0",
|
|
127
|
+
"histoire": "1.0.0-beta.1",
|
|
128
|
+
"jsdom": "30.1.1",
|
|
129
|
+
"playwright": "1.58.2",
|
|
130
|
+
"reka-ui": "2.10.5",
|
|
131
|
+
"tailwindcss": "4.3.3",
|
|
132
|
+
"typescript": "5.9.3",
|
|
133
|
+
"typescript-eslint": "8.71.0",
|
|
134
|
+
"vite": "7.3.6",
|
|
135
|
+
"vite-plugin-dts": "5.1.1",
|
|
136
|
+
"vitest": "5.0.2",
|
|
137
|
+
"vscode-oniguruma": "2.0.1",
|
|
138
|
+
"vscode-textmate": "9.3.2",
|
|
139
|
+
"vue": "3.5.43",
|
|
140
|
+
"vue-eslint-parser": "10.4.1",
|
|
141
|
+
"vue-tsc": "3.3.11"
|
|
142
|
+
},
|
|
74
143
|
"engines": {
|
|
75
144
|
"node": ">=20"
|
|
76
145
|
},
|
|
146
|
+
"packageManager": "pnpm@10.33.2",
|
|
147
|
+
"pnpm": {
|
|
148
|
+
"onlyBuiltDependencies": [
|
|
149
|
+
"esbuild",
|
|
150
|
+
"vue-demi"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
77
153
|
"config": {
|
|
78
154
|
"bundledRuntime": {
|
|
79
155
|
"reka-ui": "2.10.5"
|