@synopackageland/ui 0.20.20 → 0.21.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.
@@ -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,82 @@ 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
+ - Rare or destructive items belong in `headerActions` ("…" in the bar), not
535
+ in the page actions.
536
+ - `phone-actions` on `AppLayout`, and on a `PageHeader`, `AppToolbar` or
537
+ `PushTransition` for one page: `fab` (default), `bar` (icons in the bar, as
538
+ in 0.20.20) or `inline` (the page's own header row).
539
+ - `PageFab` picks the FAB explicitly: `<PageFab><Button variant="primary">…</Button></PageFab>`
540
+ inside the page's actions. On a touch phone its content is the FAB and the
541
+ page's other actions go to the bar; elsewhere it renders in place.
542
+ - A page whose primary action is in a footer bar (a `SettingsPage` footer, a
543
+ sticky `FormActions`) keeps its actions in the bar: the bottom already has a
544
+ primary. Content gets `--ui-fab-room` (88px) of bottom padding so the last
545
+ row is never under the FAB. Toasts are not moved above the FAB.
546
+
547
+ **Hide on scroll.** On by default (`AppLayout` `hide-on-scroll`). Scrolling
548
+ the page down 16px or more slides the bar, the tab bar, the FAB and a clean
549
+ settings footer out (`data-ui-bars-hidden`, `all` when the page scrolls under
550
+ the bar, `bottom` when the document scrolls); any scroll up of 4px, the top of
551
+ the page and a scroll that stops at its end bring them back. Safe areas are
552
+ kept, and they move in `--ui-motion-bars` (200ms; 0 with reduced motion). They
553
+ never hide while the speed dial, the drawer, a sheet or a dialog is open or a
554
+ text field has focus, and focus moving into a bar shows them. A page shorter
555
+ than the bars' room never hides them.
556
+
557
+ - Opt out for the App: `<AppLayout :hide-on-scroll="false">`; for one page:
558
+ `<PageContent :hide-on-scroll="false">`. Both keep the settings footer too.
559
+ - **Settings footer.** A `SettingsPage` footer hides with the bars only while
560
+ the form is clean: never while it is dirty, invalid or saving, so Apply is
561
+ in reach after every edit. Set `dirty`, `invalid` and `saving` on the
562
+ SettingsPage, or let it read them: clean while the footer's primary button
563
+ (every button, without a primary) is disabled, invalid while a field has
564
+ `aria-invalid="true"`, saving while a footer button is loading. A clean
565
+ footer stays at rest: it slides away only with the bars, so Reset / Apply
566
+ never appear or vanish under the finger while the user edits.
567
+
568
+ **Footer hints.** In any footer bar (`data-ui-footer-bar`: SettingsPage,
569
+ Dialog, Sheet, BottomSheet, Card, Panel, Wizard, AppActionBar) a hint or
570
+ status beside the buttons ("Enter a Custom ASR API key") takes a full-width
571
+ line of its own above them on a touch phone, wrapping if it must. A hint is an
572
+ element with text and no control in it; wrap bare text in a `<span>`.
573
+
574
+ **Inside a host shell.** The Package Land mobile shell draws no chrome around
575
+ a registered phone App: the App's bar is the only top bar and its tab bar the
576
+ only bottom bar, edge to edge. A host that draws its own bars sets
577
+ `--ui-host-inset-top/-right/-bottom/-left` on the App's root (or `:root`);
578
+ they replace `env(safe-area-inset-*)` in `--ui-safe-*`, so the bar, the tab
579
+ bar and the FAB clear the host's chrome instead of stacking under it. Android
580
+ Back closes the speed dial first, then pops the App's history.
581
+
506
582
  The navigation drawer is Reka's `Drawer` with `swipe-direction="left"`,
507
583
  portalled like `BottomSheet` (into the AppRoot in app scope). It is 85% of
508
584
  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.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",