@synopackageland/ui 0.20.20 → 0.21.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.
@@ -267,7 +267,7 @@ are in `src/feedback/feedback.css`.
267
267
 
268
268
  | | Desktop, tablet, narrow window with a mouse | Phone |
269
269
  |---|---|---|
270
- | Toast | bottom right, 360px, swipe right, a stack | bottom, 8px from each side, above the visible tab bar or the keyboard (`--ui-kb-inset`), whichever is higher, plus `--ui-safe-bottom` and 8px; swipe down; only the newest shows, with a `+N` count of the others still open |
270
+ | Toast | bottom right, 360px, swipe right, a stack | bottom, 8px from each side, above the visible tab bar or the keyboard (`--ui-kb-inset`), whichever is higher, plus `--ui-safe-bottom` and 8px, and 8px above a shown FAB; swipe down; only the newest shows, with a `+N` count of the others still open |
271
271
  | Notification | the chosen corner, 360px | top, 8px from each side, below `--ui-safe-top` plus 8px; `alignment` is ignored |
272
272
 
273
273
  - Toasts behind the front one keep their own timers, so a short one can
@@ -414,7 +414,7 @@ Where it is used:
414
414
  |---|---|---|
415
415
  | `ListDetail` | the list fills the room; the detail is pushed over it, with Back in place of Close | the split view, unchanged |
416
416
  | `SectionTabs`, five or more sections or `fill` (a settings page) | a grouped list (`group` on each item sets the blocks, 48px rows with a chevron) that pushes the tapped section; `v-model:pushed` | the strip |
417
- | `SectionTabs`, four or fewer sections | a full-width SegmentControl with equal segments | the strip |
417
+ | `SectionTabs`, four or fewer sections | the scrolling underline strip on a touch phone (0.21.0); a full-width SegmentControl with equal segments in a narrow window used with a mouse, or with `phone="segment"` | the strip |
418
418
  | `SectionTabs` with `phone="strip"` | the scrolling strip, for tabs inside a pushed page or a sheet | the strip |
419
419
 
420
420
  `phone` (`auto`, `list`, `segment`, `strip`) overrides the choice. A phone
@@ -503,6 +503,90 @@ them at the bottom of the screen). The root carries
503
503
  `data-ui-layout-scroll="page"`. A DataGrid or another page that scrolls
504
504
  itself keeps its layout.
505
505
 
506
+ ### Native phone shell (0.21.0)
507
+
508
+ A *touch phone* is an `AppLayout` 640px or narrower under a coarse pointer
509
+ (the root carries `data-ui-phone`). A narrow DSM window driven by a mouse is
510
+ the phone layout without these additions, and wider layouts are unchanged.
511
+
512
+ **Bar.** One 48px row: Back on a sub-page, else the menu button, else the
513
+ App's icon (`brand-icon`) on a root page; the title, start-aligned beside
514
+ anything else; at most two trailing icons, the rest in "…". There is no brand
515
+ row. Tabs for the page (`SectionTabs` with four or fewer sections) are the
516
+ scrolling underline strip right under the bar; `phone="segment"` keeps the
517
+ SegmentControl. `AppTabBar` labels are 12px under 24px icons.
518
+
519
+ **Page actions on a FAB.** By default (`AppLayout` `phone-actions="fab"`)
520
+ the page's actions (PageHeader `#actions`, a pushed page's
521
+ `#header-actions`, AppToolbar `#actions`) render in a floating action button
522
+ at the bottom right, 16px from the edges and above the tab bar. No App
523
+ change: the same slot moves.
524
+
525
+ - One action: the FAB is that action (56px, its icon only, its label as the
526
+ accessible name). A tap runs it. It is the area's one primary: a danger
527
+ action stays red.
528
+ - Two or more: the FAB (`+`, "Page actions") opens a speed dial: the actions
529
+ as labelled 48px pills over a scrim, staggered in. Focus moves to the first
530
+ and stays in the dial; Escape, Back, a press on the scrim or the FAB close
531
+ it and focus returns to the FAB. A pick runs the action and closes the dial;
532
+ an action that opens a menu closes it once the menu closes. The page behind
533
+ is inert while it is open. Reduced motion shows and hides it at once.
534
+ - Every pill is its icon and its text. An action with no text of its own (an
535
+ `IconButton` such as "More actions", an icon-only Button) shows its
536
+ accessible name, from `aria-label` or `title`; the pill sizes to it and a
537
+ name too long for the screen ends in an ellipsis inside the pill.
538
+ - Rare or destructive items belong in `headerActions` ("…" in the bar), not
539
+ in the page actions.
540
+ - `phone-actions` on `AppLayout`, and on a `PageHeader`, `AppToolbar` or
541
+ `PushTransition` for one page: `fab` (default), `bar` (icons in the bar, as
542
+ in 0.20.20) or `inline` (the page's own header row).
543
+ - `PageFab` picks the FAB explicitly: `<PageFab><Button variant="primary">…</Button></PageFab>`
544
+ inside the page's actions. On a touch phone its content is the FAB and the
545
+ page's other actions go to the bar; elsewhere it renders in place.
546
+ - A page whose primary action is in a footer bar (a `SettingsPage` footer, a
547
+ sticky `FormActions`) keeps its actions in the bar: the bottom already has a
548
+ primary. Content gets `--ui-fab-room` (88px) of bottom padding so the last
549
+ row is never under the FAB.
550
+ - A toast sits 8px above the FAB while the FAB is shown, and back at its own
551
+ place while the FAB is hidden on scroll or by the keyboard, and steps aside
552
+ (fades out) while the speed dial is open; it moves with the bars (`--ui-motion-bars`, at once with reduced motion). A page without a FAB,
553
+ a DSM window and a desktop place toasts as before.
554
+
555
+ **Hide on scroll.** On by default (`AppLayout` `hide-on-scroll`). Scrolling
556
+ the page down 16px or more slides the bar, the tab bar, the FAB and a clean
557
+ settings footer out (`data-ui-bars-hidden`, `all` when the page scrolls under
558
+ the bar, `bottom` when the document scrolls); any scroll up of 4px, the top of
559
+ the page and a scroll that stops at its end bring them back. Safe areas are
560
+ kept, and they move in `--ui-motion-bars` (200ms; 0 with reduced motion). They
561
+ never hide while the speed dial, the drawer, a sheet or a dialog is open or a
562
+ text field has focus, and focus moving into a bar shows them. A page shorter
563
+ than the bars' room never hides them.
564
+
565
+ - Opt out for the App: `<AppLayout :hide-on-scroll="false">`; for one page:
566
+ `<PageContent :hide-on-scroll="false">`. Both keep the settings footer too.
567
+ - **Settings footer.** A `SettingsPage` footer hides with the bars only while
568
+ the form is clean: never while it is dirty, invalid or saving, so Apply is
569
+ in reach after every edit. Set `dirty`, `invalid` and `saving` on the
570
+ SettingsPage, or let it read them: clean while the footer's primary button
571
+ (every button, without a primary) is disabled, invalid while a field has
572
+ `aria-invalid="true"`, saving while a footer button is loading. A clean
573
+ footer stays at rest: it slides away only with the bars, so Reset / Apply
574
+ never appear or vanish under the finger while the user edits.
575
+
576
+ **Footer hints.** In any footer bar (`data-ui-footer-bar`: SettingsPage,
577
+ Dialog, Sheet, BottomSheet, Card, Panel, Wizard, AppActionBar) a hint or
578
+ status beside the buttons ("Enter a Custom ASR API key") takes a full-width
579
+ line of its own above them on a touch phone, wrapping if it must. A hint is an
580
+ element with text and no control in it; wrap bare text in a `<span>`.
581
+
582
+ **Inside a host shell.** The Package Land mobile shell draws no chrome around
583
+ a registered phone App: the App's bar is the only top bar and its tab bar the
584
+ only bottom bar, edge to edge. A host that draws its own bars sets
585
+ `--ui-host-inset-top/-right/-bottom/-left` on the App's root (or `:root`);
586
+ they replace `env(safe-area-inset-*)` in `--ui-safe-*`, so the bar, the tab
587
+ bar and the FAB clear the host's chrome instead of stacking under it. Android
588
+ Back closes the speed dial first, then pops the App's history.
589
+
506
590
  The navigation drawer is Reka's `Drawer` with `swipe-direction="left"`,
507
591
  portalled like `BottomSheet` (into the AppRoot in app scope). It is 85% of
508
592
  the screen, up to 320px, and mounted only while open. A drag left follows the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/ui",
3
- "version": "0.20.20",
3
+ "version": "0.21.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",
@@ -60,62 +60,6 @@
60
60
  "./themes/dsm7-embedded-reset.css": "./dist/themes/dsm7-embedded-reset.css",
61
61
  "./themes/dsm7-embedded-theme.css": "./dist/themes/dsm7-embedded-theme.css"
62
62
  },
63
- "scripts": {
64
- "check:docs": "node --test scripts/check-doc-versions.test.mjs && node scripts/check-doc-versions.mjs",
65
- "dev": "vite build --watch",
66
- "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",
67
- "lint": "eslint .",
68
- "typecheck": "vue-tsc --noEmit -p tsconfig.json",
69
- "test": "vitest run",
70
- "test:watch": "vitest",
71
- "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}",
72
- "story": "histoire dev",
73
- "story:build": "histoire build",
74
- "check:host": "node scripts/dsm-host-shots.mjs",
75
- "check:switch": "node scripts/check-switch.mjs",
76
- "check:tabs": "node scripts/check-tabs.mjs",
77
- "check:mobile": "node scripts/check-mobile-overflow.mjs",
78
- "check:ui-patch": "node scripts/check-ui-patch.mjs",
79
- "check:narrow": "node scripts/check-narrow-controls.mjs",
80
- "check:drawer-form": "node scripts/check-drawer-form.mjs",
81
- "check:responsive": "node scripts/check-responsive.mjs",
82
- "check:adaptive": "node scripts/check-adaptive.mjs",
83
- "check:sidebar-focus": "node scripts/check-sidebar-focus.mjs",
84
- "check:json-render": "node scripts/check-json-render.mjs",
85
- "check:motion": "node scripts/check-motion.mjs",
86
- "check:topology": "node scripts/check-topology.mjs",
87
- "check:wizard": "node scripts/check-wizard.mjs",
88
- "check:edges": "node scripts/check-edges.mjs",
89
- "check:data-grid": "node scripts/check-data-grid.mjs",
90
- "check:truncation": "node scripts/check-truncation.mjs",
91
- "check:link": "node scripts/check-link.mjs",
92
- "check:text-select": "node scripts/check-text-select.mjs",
93
- "check:date-picker": "node scripts/check-date-picker.mjs",
94
- "check:full-page": "node scripts/check-full-page.mjs",
95
- "check:short-viewport": "node scripts/check-short-viewport.mjs",
96
- "check:phone-layout": "node scripts/check-phone-layout.mjs",
97
- "check:focus-restore": "node scripts/check-focus-restore.mjs",
98
- "check:detail-surface": "node scripts/check-detail-surface.mjs",
99
- "check:internal": "node --test scripts/check-internal-content.test.mjs scripts/check-npm-metadata.test.mjs && node scripts/check-internal-content.mjs --repo .",
100
- "check:npm-metadata": "node scripts/check-npm-metadata.mjs",
101
- "check:package": "node scripts/check-package-content.mjs",
102
- "check:public-api-consumer": "node scripts/check-public-api-consumer.mjs",
103
- "notices:update": "node scripts/third-party-notices.mjs --write",
104
- "notices:check": "node scripts/third-party-notices.mjs --check",
105
- "check": "bash scripts/docker-check.sh \"npm run gates\"",
106
- "check:fast": "bash scripts/docker-check.sh \"npm run gates\"",
107
- "check:local-browser": "node scripts/app-local-browser.mjs",
108
- "check:infotip": "node scripts/check-infotip.mjs",
109
- "release:stage": "node scripts/stage-release.mjs",
110
- "check:polish": "bash scripts/docker-check.sh --build --out .polish-shots 'node scripts/check-polish.mjs'",
111
- "check:acceptance": "node scripts/check-acceptance.mjs",
112
- "check:palette": "node scripts/check-palette.mjs",
113
- "gates": "node scripts/gates.mjs",
114
- "gates:full": "node scripts/gates.mjs --full",
115
- "check:layout": "node scripts/check-layout.mjs",
116
- "release:smoke": "node scripts/release-smoke.mjs",
117
- "check:browser-install": "playwright install chromium"
118
- },
119
63
  "peerDependencies": {
120
64
  "vue": "^3.5.0"
121
65
  },
@@ -166,13 +110,6 @@
166
110
  "engines": {
167
111
  "node": ">=20"
168
112
  },
169
- "packageManager": "pnpm@10.33.2",
170
- "pnpm": {
171
- "onlyBuiltDependencies": [
172
- "esbuild",
173
- "vue-demi"
174
- ]
175
- },
176
113
  "config": {
177
114
  "bundledRuntime": {
178
115
  "@tanstack/vue-virtual": "3.13.39",
@@ -180,5 +117,61 @@
180
117
  "reka-ui": "2.11.0"
181
118
  }
182
119
  },
183
- "homepage": "https://www.varvis.me/docs/"
184
- }
120
+ "homepage": "https://www.varvis.me/docs/",
121
+ "scripts": {
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:phone-layout": "node scripts/check-phone-layout.mjs",
155
+ "check:focus-restore": "node scripts/check-focus-restore.mjs",
156
+ "check:detail-surface": "node scripts/check-detail-surface.mjs",
157
+ "check:internal": "node --test scripts/check-internal-content.test.mjs scripts/check-npm-metadata.test.mjs && node scripts/check-internal-content.mjs --repo .",
158
+ "check:npm-metadata": "node scripts/check-npm-metadata.mjs",
159
+ "check:package": "node scripts/check-package-content.mjs",
160
+ "check:public-api-consumer": "node scripts/check-public-api-consumer.mjs",
161
+ "notices:update": "node scripts/third-party-notices.mjs --write",
162
+ "notices:check": "node scripts/third-party-notices.mjs --check",
163
+ "check": "bash scripts/docker-check.sh \"npm run gates\"",
164
+ "check:fast": "bash scripts/docker-check.sh \"npm run gates\"",
165
+ "check:local-browser": "node scripts/app-local-browser.mjs",
166
+ "check:infotip": "node scripts/check-infotip.mjs",
167
+ "release:stage": "node scripts/stage-release.mjs",
168
+ "check:polish": "bash scripts/docker-check.sh --build --out .polish-shots 'node scripts/check-polish.mjs'",
169
+ "check:acceptance": "node scripts/check-acceptance.mjs",
170
+ "check:palette": "node scripts/check-palette.mjs",
171
+ "gates": "node scripts/gates.mjs",
172
+ "gates:full": "node scripts/gates.mjs --full",
173
+ "check:layout": "node scripts/check-layout.mjs",
174
+ "release:smoke": "node scripts/release-smoke.mjs",
175
+ "check:browser-install": "playwright install chromium"
176
+ }
177
+ }