@sovereignfs/ui 0.106.0 → 0.107.3

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/dist/index.d.ts CHANGED
@@ -506,7 +506,7 @@ interface BadgeProps {
506
506
  */
507
507
  declare function Badge({ variant, size, status, uppercase, children, }: BadgeProps): react.JSX.Element;
508
508
 
509
- type IconName = 'house' | 'settings' | 'log-out' | 'smartphone' | 'chevron-right' | 'chevron-left' | 'chevron-down' | 'chevron-up' | 'circle-chevron-left' | 'menu' | 'x' | 'check' | 'plus' | 'trash-2' | 'pencil' | 'rotate-ccw' | 'search' | 'copy' | 'user' | 'users' | 'user-round-plus' | 'shield' | 'lock' | 'eye' | 'eye-off' | 'hat-glasses' | 'mail' | 'message-square' | 'archive' | 'archive-restore' | 'clock' | 'bell' | 'inbox' | 'activity' | 'package' | 'database' | 'layers' | 'grid-2x2' | 'layout-dashboard' | 'layout-grid' | 'square-kanban' | 'info' | 'alert-triangle' | 'circle-check' | 'circle-x' | 'calendar' | 'sliders-horizontal' | 'ellipsis-vertical' | 'rectangle-ellipsis' | 'file' | 'folder' | 'upload' | 'download' | 'external-link' | 'arrow-left-right' | 'send' | 'list' | 'list-ordered' | 'link' | 'code' | 'rotate-cw' | 'refresh-cw' | 'history' | 'minus' | 'table' | 'sheet' | 'folders' | 'folder-closed' | 'file-text' | 'folder-open' | 'share-2' | 'luggage' | 'map-pin' | 'route' | 'bold' | 'italic' | 'paint-bucket' | 'banana' | 'apple' | 'carrot' | 'egg' | 'beef' | 'fish' | 'coffee' | 'wine' | 'beer' | 'cookie' | 'pizza' | 'candy' | 'salad' | 'milk' | 'drumstick' | 'croissant' | 'cup-soda' | 'spray-can' | 'snowflake' | 'shopping-basket' | 'panel-left' | 'pin' | 'credit-card' | 'ban' | 'shield-off' | 'user-x' | 'panel-left-close' | 'panel-left-open' | 'list-todo' | 'user-plus' | 'calendar-days' | 'folder-kanban' | 'folder-lock' | 'folder-plus' | 'folder-input' | 'file-image' | 'square-text' | 'file-code-corner' | 'archive-x' | 'settings-2' | 'arrow-right-left' | 'save' | 'hard-drive' | 'notebook-pen' | 'fingerprint-pattern';
509
+ type IconName = 'house' | 'settings' | 'log-out' | 'smartphone' | 'chevron-right' | 'chevron-left' | 'chevron-down' | 'chevron-up' | 'circle-chevron-left' | 'menu' | 'x' | 'check' | 'plus' | 'trash-2' | 'pencil' | 'rotate-ccw' | 'search' | 'copy' | 'user' | 'users' | 'user-round-plus' | 'shield' | 'lock' | 'eye' | 'eye-off' | 'hat-glasses' | 'mail' | 'message-square' | 'archive' | 'archive-restore' | 'clock' | 'bell' | 'inbox' | 'activity' | 'package' | 'database' | 'layers' | 'grid-2x2' | 'layout-dashboard' | 'layout-grid' | 'square-kanban' | 'info' | 'alert-triangle' | 'circle-check' | 'circle-x' | 'calendar' | 'sliders-horizontal' | 'ellipsis-vertical' | 'rectangle-ellipsis' | 'file' | 'folder' | 'upload' | 'download' | 'external-link' | 'arrow-left-right' | 'send' | 'list' | 'list-ordered' | 'link' | 'code' | 'rotate-cw' | 'refresh-cw' | 'history' | 'minus' | 'table' | 'sheet' | 'folders' | 'folder-closed' | 'file-text' | 'folder-open' | 'share-2' | 'luggage' | 'map-pin' | 'route' | 'bold' | 'italic' | 'paint-bucket' | 'banana' | 'apple' | 'carrot' | 'egg' | 'beef' | 'fish' | 'coffee' | 'wine' | 'beer' | 'cookie' | 'pizza' | 'candy' | 'salad' | 'milk' | 'drumstick' | 'croissant' | 'cup-soda' | 'spray-can' | 'snowflake' | 'shopping-basket' | 'panel-left' | 'pin' | 'credit-card' | 'ban' | 'shield-off' | 'user-x' | 'panel-left-close' | 'panel-left-open' | 'list-todo' | 'user-plus' | 'calendar-days' | 'folder-kanban' | 'folder-lock' | 'folder-plus' | 'folder-input' | 'file-image' | 'square-text' | 'file-code-corner' | 'archive-x' | 'settings-2' | 'arrow-right-left' | 'save' | 'hard-drive' | 'notebook-pen' | 'fingerprint-pattern' | 'square-pen' | 'shopping-cart' | 'store' | 'hammer' | 'wrench' | 'plug' | 'laptop' | 'headphones' | 'shirt' | 'gift' | 'sprout' | 'flower-2' | 'briefcase' | 'paperclip' | 'pill' | 'baby' | 'dog' | 'sofa' | 'wallet-cards' | 'scan-barcode';
510
510
 
511
511
  /** Decorative icon — visually meaningful but described by surrounding text. */
512
512
  type DecorativeProps = {
@@ -639,8 +639,13 @@ interface PopoverProps {
639
639
  trigger: ReactElement;
640
640
  open: boolean;
641
641
  onClose: () => void;
642
- /** Which edge of the trigger the panel aligns to. Default: 'right'. */
643
- align?: 'left' | 'right';
642
+ /**
643
+ * Which edge of the trigger the panel aligns to: `'right'` opens it leftwards from the trigger, `'left'` rightwards.
644
+ * `'auto'` is `'right'` where the panel fits on that side and the other side where it does not, counting as room only
645
+ * what is visible: the viewport, less whatever a scrolling ancestor would clip (a trigger at the left of a page beside
646
+ * a sidebar has none to its left, though the viewport has). Default: 'right'.
647
+ */
648
+ align?: 'left' | 'right' | 'auto';
644
649
  /** Panel width in px, or `'trigger'` to match the trigger element's own
645
650
  * rendered width exactly (e.g. a dropdown under a full-width form field,
646
651
  * where a fixed pixel width would either overflow or leave a gap
@@ -860,6 +865,9 @@ interface DialogProps {
860
865
  * — restyle the title text (e.g. a smaller font size to match a
861
866
  * consumer's own compact header elsewhere). */
862
867
  titleClassName?: string;
868
+ /** The body fills the panel edge to edge, with no padding and no scrolling of its own: for content that lays out and
869
+ * scrolls its own regions (`SettingsDialog`'s navigation and section). Off by default. */
870
+ flush?: boolean;
863
871
  children: ReactNode;
864
872
  }
865
873
  /**
@@ -893,7 +901,7 @@ interface DialogProps {
893
901
  * are present render as non-scrolling flex siblings around `.content`, which
894
902
  * stays the only scrollable region in every shape.
895
903
  */
896
- declare function Dialog({ open, onClose, size, 'aria-label': ariaLabel, title, header, footer, rowClassName, titleClassName, children, }: DialogProps): react.ReactPortal | null;
904
+ declare function Dialog({ open, onClose, size, 'aria-label': ariaLabel, title, header, footer, rowClassName, titleClassName, flush, children, }: DialogProps): react.ReactPortal | null;
897
905
 
898
906
  interface DrawerProps {
899
907
  /** Whether the drawer is shown. When false, nothing renders. */
@@ -1294,6 +1302,20 @@ interface AppsLauncherProps {
1294
1302
  'aria-label'?: string;
1295
1303
  align?: 'left' | 'right';
1296
1304
  }
1305
+ /** One of the apps a person can open, as the Core API's `listMyApps` answers it (the SDK's `apps.list()`). */
1306
+ interface LauncherAppTile {
1307
+ id: string;
1308
+ name: string;
1309
+ icon: string | null;
1310
+ launchUrl: string;
1311
+ }
1312
+ /**
1313
+ * The launcher's items for the apps a person can open: each app's icon, or its name's first letter when it has none, opening its
1314
+ * launch address. The app the launcher is in, when named, is left out, since a person is already in it.
1315
+ */
1316
+ declare function appsLauncherItems(apps: readonly LauncherAppTile[], options?: {
1317
+ current?: string;
1318
+ }): AppsLauncherItem[];
1297
1319
  /**
1298
1320
  * AppsLauncher — the desktop "Apps" switcher: a 28px grid-icon trigger that
1299
1321
  * opens a `Popover` with a 3-column tile grid. The desktop counterpart to
@@ -1600,6 +1622,10 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
1600
1622
  instanceLogoUrl?: string;
1601
1623
  /** Where the brand badge links — typically the Launcher plugin's route. */
1602
1624
  homeHref: string;
1625
+ /** An app's own wordmark, drawn in place of the brand badge: already built by the app, its own link included (to its
1626
+ * home). Omit for the badge, which is core's. `instanceName` still names the header's home for assistive technology
1627
+ * only when the badge is drawn. */
1628
+ brand?: ReactNode;
1603
1629
  /** The active plugin, rendered next to the brand badge. Omit for a page
1604
1630
  * with no single active plugin (e.g. the Launcher itself). */
1605
1631
  plugin?: HeaderPlugin;
@@ -1634,7 +1660,7 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
1634
1660
  * implementation. Every slot on the right is optional, so an app that runs
1635
1661
  * on its own (with no launcher, say) uses this header too.
1636
1662
  */
1637
- declare function Header({ instanceName, instanceLogoUrl, homeHref, plugin, leading, launcher, notifications, avatarMenu, className, ...rest }: HeaderProps): react.JSX.Element;
1663
+ declare function Header({ instanceName, instanceLogoUrl, homeHref, brand, plugin, leading, launcher, notifications, avatarMenu, className, ...rest }: HeaderProps): react.JSX.Element;
1638
1664
 
1639
1665
  interface MobileHeaderProps extends HTMLAttributes<HTMLDivElement> {
1640
1666
  /** The brand/logo element — already a complete, clickable link home (e.g. an
@@ -1690,9 +1716,12 @@ interface FooterIcon {
1690
1716
  active?: boolean;
1691
1717
  }
1692
1718
  interface MobileFooterProps extends HTMLAttributes<HTMLElement> {
1693
- /** Opens the app drawer/launcher. Always rendered as the centered slot;
1694
- * not overridable. */
1719
+ /** Opens what the centered button opens: the apps by default, or what `launcherLabel` names (an app's own drawer).
1720
+ * Always rendered as the centered slot. */
1695
1721
  onOpenApps: () => void;
1722
+ /** The centered button's name, read by assistive technology: "Apps" when not given. An app whose middle button opens
1723
+ * something of its own (its lists, say) names it here, with `launcherIcon` to match. */
1724
+ launcherLabel?: string;
1696
1725
  /** Custom launcher icon (e.g. a plugin-supplied image). Defaults to a
1697
1726
  * generic grid icon. */
1698
1727
  launcherIcon?: ReactNode;
@@ -1725,7 +1754,7 @@ interface MobileFooterProps extends HTMLAttributes<HTMLElement> {
1725
1754
  * pattern, correctly clear `Sheet`/`Drawer`/`Dialog` instead of being
1726
1755
  * overlapped by them).
1727
1756
  */
1728
- declare function MobileFooter({ onOpenApps, launcherIcon, launcherOpen, leftIcons, rightIcons, className, ...rest }: MobileFooterProps): react.JSX.Element;
1757
+ declare function MobileFooter({ onOpenApps, launcherIcon, launcherLabel, launcherOpen, leftIcons, rightIcons, className, ...rest }: MobileFooterProps): react.JSX.Element;
1729
1758
 
1730
1759
  interface MobileAppsDrawerItem {
1731
1760
  /** Stable identity for this tile — used as the React key. */
@@ -1942,6 +1971,267 @@ interface PushControlProps {
1942
1971
  */
1943
1972
  declare function PushControl({ appName, state, working, error, onTurnOn, onTurnOff, children, className, }: PushControlProps): react.JSX.Element | null;
1944
1973
 
1974
+ /**
1975
+ * Linear barcodes as bars: EAN-13, EAN-8, UPC-A, Code 128 and Code 39, each to a row of modules (`true` is a bar), with no
1976
+ * dependency. Pure, so that each kind is tested against known codes with no browser. The quiet zone is the drawer's.
1977
+ */
1978
+ type BarcodeFormat = 'ean13' | 'ean8' | 'upca' | 'code128' | 'code39';
1979
+ interface EncodedBarcode {
1980
+ /** The bars and spaces, one module each. */
1981
+ modules: boolean[];
1982
+ /** What is written under the bars: the value with its check digit, where the kind has one. */
1983
+ text: string;
1984
+ /** The quiet zone each side, in modules, as the kind's specification asks at least. */
1985
+ quiet: number;
1986
+ }
1987
+ /** The GS1 check digit of the digits before it: weights 3 and 1 from the right. */
1988
+ declare function gs1CheckDigit(digits: string): number;
1989
+ /** The bars of a value in a kind, or null when the value cannot be that kind (a wrong check digit, a character it has not). */
1990
+ declare function encodeBarcode(format: BarcodeFormat, value: string): EncodedBarcode | null;
1991
+
1992
+ interface BarcodeProps {
1993
+ format: BarcodeFormat;
1994
+ /** The value. EAN-13, EAN-8 and UPC-A take it with or without its check digit; a wrong one is refused. */
1995
+ value: string;
1996
+ /** What the picture is, for a screen reader: a barcode is read by a scanner, not a person. */
1997
+ label: string;
1998
+ /** Whether the value is written under the bars, as a cashier reads it when the scanner cannot. On by default. */
1999
+ showText?: boolean;
2000
+ /** Said in place of the bars when the value cannot be drawn in its kind. English by default. */
2001
+ invalidText?: string;
2002
+ }
2003
+ /**
2004
+ * Barcode — a linear barcode (EAN-13, EAN-8, UPC-A, Code 128, Code 39) drawn as an inline SVG, as `QrCode` draws a QR code: no
2005
+ * dependency, nothing requested, nothing injected as markup. Black on white in every theme, with its quiet zone, scaled to its
2006
+ * width. A value its kind cannot hold draws no bars and says so.
2007
+ */
2008
+ declare function Barcode({ format, value, label, showText, invalidText, }: BarcodeProps): react.JSX.Element;
2009
+
2010
+ interface AppSidebarItem {
2011
+ id: string;
2012
+ label: string;
2013
+ /** Where it goes. Without one, the row is a button calling `onClick`. */
2014
+ href?: string;
2015
+ onClick?: () => void;
2016
+ /** The row's icon. On a rail an item with none shows its label's first letter. */
2017
+ icon?: IconName;
2018
+ /** The icon's colour (an app's or a person's `#rrggbb`), drawn on the ordinary surface: never a background or the text's. */
2019
+ iconColor?: string;
2020
+ /** A count after the label, such as what is still open. */
2021
+ count?: ReactNode;
2022
+ /** A second line under the label, such as whose it is. */
2023
+ description?: string;
2024
+ /** Whether this is the page shown, decided by the app. */
2025
+ active?: boolean;
2026
+ }
2027
+ interface AppSidebarAction {
2028
+ /** The row's words, such as "New list". */
2029
+ label: string;
2030
+ href?: string;
2031
+ onClick?: () => void;
2032
+ }
2033
+ interface AppSidebarBlock {
2034
+ id: string;
2035
+ /** A heading over the block; none for a block of the app's places. */
2036
+ heading?: string;
2037
+ items: AppSidebarItem[];
2038
+ /** A trailing _+ New …_ row. */
2039
+ action?: AppSidebarAction;
2040
+ }
2041
+ /** Props for a consumer's own link element (Next's `<Link>`). */
2042
+ interface AppSidebarLinkProps {
2043
+ href: string;
2044
+ className: string;
2045
+ 'aria-current': 'page' | undefined;
2046
+ 'aria-label': string | undefined;
2047
+ /** The label as the pointer's tooltip, on a rail. */
2048
+ title: string | undefined;
2049
+ onClick: (() => void) | undefined;
2050
+ children: ReactNode;
2051
+ }
2052
+ interface AppSidebarProps {
2053
+ blocks: AppSidebarBlock[];
2054
+ /** `full` or `rail` (from `useAppSidebar`); `hidden` draws nothing. */
2055
+ state: 'full' | 'rail' | 'hidden';
2056
+ /** The sidebar's own button, from full to a rail and back. Omit for no button. */
2057
+ onToggleRail?: () => void;
2058
+ /** The navigation's accessible name, usually the app's. */
2059
+ 'aria-label': string;
2060
+ /** The rail button's words: `[widen, narrow]`. English by default. */
2061
+ railLabels?: readonly [string, string];
2062
+ /** Anything under the blocks, before the rail button. */
2063
+ footer?: ReactNode;
2064
+ /** Told when a row or an action is followed: a drawer closes on it. */
2065
+ onNavigate?: () => void;
2066
+ renderLink?: (item: AppSidebarItem | AppSidebarAction, linkProps: AppSidebarLinkProps) => ReactNode;
2067
+ /** `side` (default): a column at the left of the page. `drawer`: the same blocks filling a phone's drawer, with room to touch. */
2068
+ placement?: 'side' | 'drawer';
2069
+ className?: string;
2070
+ }
2071
+ /**
2072
+ * AppSidebar — the sidebar every app's frame has, drawn once. Full, a rail of icons (each named by its label, which the pointer
2073
+ * shows as the browser's own tooltip: a drawn one would be cut off by the sidebar's scrolling) or hidden,
2074
+ * as `useAppSidebar` keeps it per app and per kind of page. Its content is blocks, each with an optional heading, rows with an
2075
+ * icon in a colour and a count, and an optional trailing _+ New …_ row.
2076
+ *
2077
+ * Framework-agnostic: links come from `renderLink`, and what is current is the app's to say. It knows nothing of an app's data
2078
+ * or words: every label is given.
2079
+ */
2080
+ declare function AppSidebar({ blocks, state, onToggleRail, 'aria-label': ariaLabel, railLabels, footer, onNavigate, renderLink, placement, className, }: AppSidebarProps): react.JSX.Element | null;
2081
+
2082
+ /**
2083
+ * How an app's sidebar is shown: **full**, a **rail** of icons, or **hidden**. It is a choice about a screen, not a person's data,
2084
+ * so it is kept on the device, per app and **per kind of page**: the app names its kinds (`'home'` and `'page'`, say), and a
2085
+ * person's choice changes that kind's default on this device and nothing else. Every kind opens full unless the app says
2086
+ * otherwise.
2087
+ *
2088
+ * Pure: what was stored goes in and a state comes out, so the rules are tested with no browser. Taken from Shopper's
2089
+ * `src/ui/sidebar.ts`, its first consumer, with the kinds of page left to the app.
2090
+ */
2091
+ type SidebarState = 'full' | 'rail' | 'hidden';
2092
+ /** What is kept for a kind of page: how it is shown, and how it was shown last when not hidden, so that showing it again is what it was. */
2093
+ interface SidebarMemory {
2094
+ state: SidebarState;
2095
+ shown: Exclude<SidebarState, 'hidden'>;
2096
+ }
2097
+ type SidebarStored = Readonly<Record<string, SidebarMemory>>;
2098
+ /** The key an app's choices are kept under on the device. */
2099
+ declare const sidebarStorageKey: (appId: string) => string;
2100
+ /** What was stored, read defensively: anything that is not what was written is ignored, and the default stands. */
2101
+ declare function parseSidebarStored(raw: string | null | undefined): SidebarStored;
2102
+ declare const sidebarStateFor: (kind: string, stored: SidebarStored, fallback?: SidebarState) => SidebarState;
2103
+ /** The header's button: hides the sidebar, or shows it again as it was. */
2104
+ declare function toggleSidebarHidden(kind: string, stored: SidebarStored, fallback?: SidebarState): SidebarStored;
2105
+ /** The sidebar's own button: full becomes a rail and a rail becomes full. A hidden sidebar has no such button. */
2106
+ declare function toggleSidebarRail(kind: string, stored: SidebarStored, fallback?: SidebarState): SidebarStored;
2107
+
2108
+ /** The phone's footer: `MobileFooter`'s icons and middle button. Without `onOpenApps`, the middle button opens the navigation drawer. */
2109
+ type AppFrameFooter = Omit<MobileFooterProps, 'onOpenApps' | 'launcherOpen'> & {
2110
+ onOpenApps?: () => void;
2111
+ launcherOpen?: boolean;
2112
+ };
2113
+ interface AppFrameLabels {
2114
+ /** The header's sidebar button, when it hides the sidebar. */
2115
+ hideSidebar: string;
2116
+ /** The header's sidebar button, when it shows the sidebar again. */
2117
+ showSidebar: string;
2118
+ /** The phone header's button that opens the navigation drawer. */
2119
+ openNavigation: string;
2120
+ }
2121
+ interface AppFrameProps {
2122
+ /** The app's id: its sidebar's choices are kept on the device under it. */
2123
+ appId: string;
2124
+ /** The app's name: the navigation's accessible name and the header's home for assistive technology. */
2125
+ name: string;
2126
+ /** The app's wordmark, already a link home. Drawn in the header on every screen. */
2127
+ brand: ReactNode;
2128
+ /** The kind of page shown (`'home'`, `'page'`, as the app names them): the sidebar is remembered per kind. */
2129
+ pageKind: string;
2130
+ /** How the sidebar is shown on a kind of page until a person chooses. `full` by default. */
2131
+ defaultSidebar?: SidebarState;
2132
+ /** The sidebar's blocks, which the phone's drawer shows too. */
2133
+ blocks: AppSidebarBlock[];
2134
+ renderLink?: AppSidebarProps['renderLink'];
2135
+ /** Under the sidebar's blocks. */
2136
+ sidebarFooter?: ReactNode;
2137
+ /** The suite's launcher, the bell and the avatar menu: each drawn only when given, in that order. On a phone there is no launcher. */
2138
+ launcher?: ReactNode;
2139
+ notifications?: ReactNode;
2140
+ avatarMenu?: ReactNode;
2141
+ /** The phone's footer. Omit for none. */
2142
+ footer?: AppFrameFooter;
2143
+ /** The right column (an item, a card): beside the content on a wide screen, over it on a phone. */
2144
+ detail?: ReactNode;
2145
+ /** The frame's own words; English by default. */
2146
+ labels?: Partial<AppFrameLabels>;
2147
+ /** Where the header's home is when no `brand` link is followed (core's badge falls back to it). `/` by default. */
2148
+ homeHref?: string;
2149
+ children: ReactNode;
2150
+ }
2151
+ /**
2152
+ * AppFrame — the frame of every app's signed-in page: on a wide screen `Header`, `AppSidebar`, the content and an optional right
2153
+ * column; on a phone `MobileHeader`, the content, `MobileFooter` and a `Drawer` with the sidebar's blocks. Only what is drawn
2154
+ * differs by the screen: the routes, the blocks and what each row opens are the same, and nothing here changes an address.
2155
+ *
2156
+ * It is the shell root (`#sv-app-shell`) that overlays portal into, and it publishes the header's and the footer's heights
2157
+ * (`--sv-shell-header-height`, `--sv-shell-footer-height`) so that dialogs, drawers, toasts and a floating button clear them, as
2158
+ * Tusk's and Shopper's own frames did.
2159
+ */
2160
+ declare function AppFrame({ appId, name, brand, pageKind, defaultSidebar, blocks, renderLink, sidebarFooter, launcher, notifications, avatarMenu, footer, detail, labels, homeHref, children, }: AppFrameProps): react.JSX.Element;
2161
+
2162
+ interface AppSidebarControl {
2163
+ /** How the sidebar is shown here. Always `hidden` on a phone, whose navigation is a drawer. */
2164
+ state: SidebarState;
2165
+ /** Whether there is a sidebar to show at this width (not on a phone). */
2166
+ available: boolean;
2167
+ /** The header's button: hides it, or shows it again as it was. */
2168
+ toggleHidden(): void;
2169
+ /** The sidebar's own button: full to a rail and back. */
2170
+ toggleRail(): void;
2171
+ }
2172
+ /**
2173
+ * How an app's sidebar is shown on a kind of page, on this device. The server and the first paint show the default, so that the
2174
+ * two agree; what the person chose before is read in an effect straight after, and a change in another tab is followed.
2175
+ */
2176
+ declare function useAppSidebar(appId: string, pageKind: string, fallback?: SidebarState): AppSidebarControl;
2177
+
2178
+ interface SettingsSection {
2179
+ id: string;
2180
+ label: string;
2181
+ icon: IconName;
2182
+ /** The section's content, shown with no heading of its own: the navigation names it. */
2183
+ content: ReactNode;
2184
+ /** The section's own address, when the app gives each one (rendered as a link with `renderLink`, or a plain `<a>`). */
2185
+ href?: string;
2186
+ }
2187
+ interface SettingsGroup {
2188
+ id: string;
2189
+ sections: SettingsSection[];
2190
+ }
2191
+ /** Props for a consumer's own link element (Next's `<Link>`), as `NavList`'s `renderLink` receives them. */
2192
+ interface SettingsLinkProps {
2193
+ href: string;
2194
+ className: string;
2195
+ 'aria-current': 'page' | undefined;
2196
+ onClick: () => void;
2197
+ children: ReactNode;
2198
+ }
2199
+ interface SettingsDialogProps {
2200
+ open: boolean;
2201
+ onClose: () => void;
2202
+ /** The dialog's title, shown across its width. "Settings" when not given. */
2203
+ title?: string;
2204
+ /** Sections in groups; a divider is drawn between groups. */
2205
+ groups: SettingsGroup[];
2206
+ /**
2207
+ * The section shown. `null` shows the sections alone on a phone (the first step there) and the first section on a wider
2208
+ * screen, so that the same value is right for both and nothing about the route depends on the viewport.
2209
+ */
2210
+ active: string | null;
2211
+ /** Called with a section's id when it is chosen, and with `null` by a phone's back arrow. */
2212
+ onSelect: (id: string | null) => void;
2213
+ /** A search box over the sections, filtering them by label. Off by default. */
2214
+ search?: boolean;
2215
+ /** The search box's label and placeholder. "Search settings" when not given. */
2216
+ searchLabel?: string;
2217
+ /** The back arrow's accessible name on a phone. "Back" when not given. */
2218
+ backLabel?: string;
2219
+ /** Size on a wide screen: `lg` fills the screen with a margin, `fixed` is capped. Always the whole screen on a phone. */
2220
+ size?: 'lg' | 'fixed';
2221
+ renderLink?: (section: SettingsSection, linkProps: SettingsLinkProps) => ReactNode;
2222
+ }
2223
+ /**
2224
+ * SettingsDialog — settings as one dialog with a side navigation, the same in core and every app.
2225
+ *
2226
+ * A title row and close across the width; on the left, sections in groups with a divider between groups, each with an
2227
+ * icon, and an optional search; on the right, the active section's content, scrolling inside a frame that never changes
2228
+ * size. On a phone it is the whole screen: the sections, then one section with a back arrow.
2229
+ *
2230
+ * Controlled: the app decides which section is shown (`active`, `onSelect`), so that it can give every section an
2231
+ * address. Framework-agnostic: links come from `renderLink`.
2232
+ */
2233
+ declare function SettingsDialog({ open, onClose, title, groups, active, onSelect, search, searchLabel, backLabel, size, renderLink, }: SettingsDialogProps): react.JSX.Element;
2234
+
1945
2235
  interface DeviceOnlyGateProps {
1946
2236
  children: ReactNode;
1947
2237
  /** Defaults to a generic "this app" phrasing — pass the plugin's own name. */
@@ -3043,6 +3333,12 @@ interface IconPickerProps {
3043
3333
  triggerLabel?: string;
3044
3334
  disabled?: boolean;
3045
3335
  className?: string;
3336
+ /**
3337
+ * Which edge of the trigger the panel aligns to (`Popover`'s `align`). Default `'auto'`: opens leftwards from the
3338
+ * trigger where there is room for it, and rightwards where there is not, so a picker at the left of a page, or of a
3339
+ * row, is never cut off.
3340
+ */
3341
+ align?: 'left' | 'right' | 'auto';
3046
3342
  }
3047
3343
  /**
3048
3344
  * IconPicker — a trigger button showing the current icon that opens a
@@ -3050,10 +3346,13 @@ interface IconPickerProps {
3050
3346
  * bounded icon set (e.g. Sovereign Shopper's grocery category icons,
3051
3347
  * SHP-05) rather than the full design-system icon library.
3052
3348
  *
3349
+ * The panel opens on the side of the trigger that has room (`align`), so the picker can sit
3350
+ * at either end of a row.
3351
+ *
3053
3352
  * Selecting an icon both closes the picker and calls `onChange` — a
3054
3353
  * consumer's `onChange` never needs to close the picker itself.
3055
3354
  */
3056
- declare function IconPicker({ value, onChange, options, 'aria-label': ariaLabel, triggerLabel, disabled, className, }: IconPickerProps): react.JSX.Element;
3355
+ declare function IconPicker({ value, onChange, options, 'aria-label': ariaLabel, triggerLabel, disabled, className, align, }: IconPickerProps): react.JSX.Element;
3057
3356
 
3058
3357
  interface ColorPickerSwatch {
3059
3358
  /** Accessible name and tooltip, e.g. "Sky". */
@@ -4222,5 +4521,5 @@ interface QrCodeProps {
4222
4521
  */
4223
4522
  declare function QrCode({ modules, label }: QrCodeProps): react.JSX.Element;
4224
4523
 
4225
- export { Accordion, Alert, AppTile, AppsLauncher, AspectRatio, AuthButton, AuthCard, AuthCodeInput, AuthDivider, AuthError, AuthField, AuthFooter, AuthForm, AuthLink, AuthLinkButton, AuthNotice, AuthShell, Avatar, AvatarStack, Badge, BalanceChip, BrandBadge, Breadcrumb, Button, ButtonGroup, ButtonLink, Calendar, Card, CardTile, CardTileGrid, ChangePasswordForm, CheckableListRow, Checkbox, CodeTextarea, Collapsible, ColorPicker, Combobox, Command, ConfirmDialog, ConsentPrompt, ContextMenu, CopyButton, CurrencyInput, DataTable, DatePicker, DateRangePicker, DeviceOnlyGate, DeviceStorageKeyGate, Dialog, DragHandleRow, Drawer, EmptyState, ExportPanel, FileDropzone, FloatingActionButton, ForgotPasswordForm, FormField, GripIcon, Header, HeaderFooterLayout, HoverCard, IOS_INSTALL_STEPS, Icon, IconPicker, Input, InstallHint, InstallPrompt, Item, Kbd, Label, LegalLinks, LinkSovereignPanel, LockedState, MOBILE_BREAKPOINT_PX, Markdown, Marker, MemberMultiSelect, Menu, MenuEntries, Menubar, Message, MessageScroller, MobileAppsDrawer, MobileFooter, MobileHeader, NavList, NavTabs, NavigationMenu, NewCardTile, NotificationsPanel, OfflineGate, OverlayHeader, PageContainer, PageHeader, PageLayout, Pagination, PhotoGallery, PhotoGrid, PhotoViewer, Popover, ProfilePanel, Progress, PushControl, QrCode, QuantityStepper, RadioGroup, RangeCalendar, RecoveryKit, ResetPasswordForm, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveSurface, RootLayout, SWIPE_STACK_TRANSITION_MS, ScrollArea, SegmentedControl, Select, SessionsPanel, Sheet, SignInForm, SignUpForm, Slider, Spinner, SplitMethodSelector, SplitPane, StatusBadge, StepStrip, SuggestionInput, SwipableMobileCarousel, SwipableMobileCarouselDots, SwipableMobileCarouselSlide, SwipableMobileCarouselSlideBody, SwipableMobileCarouselSlideFooter, SwipableMobileCarouselSlideHeader, SwipeStack, SwipeStackCard, SystemBanner, THEME_PRESETS, THEME_PRESET_NAMES, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Tabs, TagInput, Textarea, ThreeColumnLayout, ToastProvider, Toggle, Tooltip, TwoFactorForm, TwoFactorPanel, Typography, UpdateNotice, UserMenu, isInstalledDisplay, recoveryKitFileName, recoveryKitFileText, shouldHandleDndEvent, useCarouselRouteSync, useCommitOnEnterOrBlur, useDoubleTapHandler, useInstallPrompt, useIsMobile, useIsOffline, useLongPress, useOfflineTileState, useOverlaySecondRow, useReorderSensors, useResponsiveLayout, useSingleOrDoubleTap, useSnapCarousel, useSwipeReveal, useSwipeStack, useToast };
4226
- export type { AccordionItem, AccordionProps, ActionResult, AlertProps, AlertVariant, AppTileProps, AppsLauncherItem, AppsLauncherProps, AspectRatioProps, AuthCardProps, AuthCodeInputProps, AuthFieldControl, AuthFieldProps, AuthFooterProps, AuthLinkRenderer, AvatarProps, AvatarStackPerson, AvatarStackProps, BadgeProps, BadgeStatus, BadgeVariant, BalanceChipProps, BannerVariant, BrandBadgeProps, BreadcrumbItem, BreadcrumbProps, ButtonGroupProps, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CardProps, CardTileGridProps, CardTileProps, ChangePasswordFormProps, CheckableListRowProps, CheckboxProps, CodeTextareaProps, CollapsibleProps, ColorPickerProps, ColorPickerSwatch, ComboboxOption, ComboboxProps, CommandItem, CommandProps, CommitOnEnterOrBlurHandlers, ConfirmDialogProps, ConsentPromptProps, ContextMenuProps, CopyButtonProps, CurrencyInputProps, DataTableColumn, DataTableProps, DatePickerProps, DateRange, DateRangePickerProps, DeviceOnlyGateProps, DeviceStorageKeyGateProps, DeviceStorageKeyGateStatus, DialogProps, DialogSize, DragHandleRowProps, DrawerProps, EmptyStateProps, ExportPanelProps, ExportPanelStatus, ExportStartResult, FileDropzoneProps, FloatingActionButtonProps, FooterIcon, ForgotPasswordFormProps, FormFieldProps, FormFieldRenderProps, GripIconProps, HeaderFooterLayoutProps, HeaderPlugin, HeaderProps, HoverCardProps, IconName, IconPickerProps, IconProps, InputProps, InstallHintProps, InstallKind, InstallPromptProps, ItemProps, KbdProps, LabelProps, LegalLinksProps, LinkOutcome, LinkSovereignPanelProps, LockedReason, LockedStateProps, LongPressHandlers, MarkdownProps, MarkerProps, MemberMultiSelectOption, MemberMultiSelectProps, MenuEntry, MenuItem, MenuLabel, MenuProps, MenuSeparator, MenubarMenu, MenubarProps, MessageProps, MessageScrollerProps, MessageSender, MobileAppsDrawerItem, MobileAppsDrawerProps, MobileFooterProps, MobileHeaderProps, NavListGroup, NavListItem, NavListLinkProps, NavListProps, NavTabItem, NavTabLinkProps, NavTabsProps, NavigationMenuItem, NavigationMenuProps, NewCardTileProps, NotificationsPanelItem, NotificationsPanelProps, OfflineGateProps, OfflineTileState, OverlayHeaderProps, PageContainerProps, PageHeaderProps, PageLayoutPadding, PageLayoutProps, PaginationProps, PanelAction, Photo, PhotoGalleryProps, PhotoGridProps, PhotoViewerProps, PopoverProps, ProfilePanelProps, ProgressProps, PushControlProps, PushControlState, QrCodeProps, QuantityStepperProps, RadioGroupItem, RadioGroupProps, RangeCalendarProps, RecoveryKitProps, ResetPasswordFormProps, ResizableDirection, ResizableHandleProps, ResizablePanelGroupProps, ResizablePanelProps, ResponsiveSurfaceProps, RootLayoutProps, RootLayoutVariant, ScrollAreaProps, SegmentedControlProps, SegmentedOption, SelectProps, SessionRow, SessionsPanelProps, SheetProps, SignInFormProps, SignUpFormProps, SignUpValues, SliderProps, SortDirection, SpinnerProps, SplitMethod, SplitMethodSelectorProps, SplitPaneProps, StatusBadgeProps, StatusBadgeStatus, StepStripItem, StepStripProps, SuggestionInputProps, SuggestionOption, SwipableMobileCarouselDotsProps, SwipableMobileCarouselIndicatorProps, SwipableMobileCarouselProps, SwipableMobileCarouselSlideBodyProps, SwipableMobileCarouselSlideFooterProps, SwipableMobileCarouselSlideHeaderProps, SwipableMobileCarouselSlideProps, SwipeDirection, SwipeDirectionMeta, SwipeStackCardProps, SwipeStackProps, SystemBannerProps, TabItem, TableProps, TabsProps, TagInputProps, TextareaProps, ThemePresetName, ThemePresetTokens, ThreeColumnLayoutProps, ToastContextValue, ToastItem, ToggleProps, TooltipProps, TwoFactorAction, TwoFactorFormProps, TwoFactorPanelProps, TwoFactorStart, TypographyProps, TypographyVariant, UpdateNoticeProps, UseCarouselRouteSyncOptions, UseCarouselRouteSyncResult, UseInstallPrompt, UseLongPressOptions, UseReorderSensorsOptions, UseResponsiveLayoutOptions, UseResponsiveLayoutResult, UseSnapCarouselOptions, UseSnapCarouselResult, UseSwipeRevealHandlers, UseSwipeRevealOptions, UseSwipeRevealResult, UseSwipeStackHandlers, UseSwipeStackOptions, UseSwipeStackResult, UserMenuItem, UserMenuProps };
4524
+ export { Accordion, Alert, AppFrame, AppSidebar, AppTile, AppsLauncher, AspectRatio, AuthButton, AuthCard, AuthCodeInput, AuthDivider, AuthError, AuthField, AuthFooter, AuthForm, AuthLink, AuthLinkButton, AuthNotice, AuthShell, Avatar, AvatarStack, Badge, BalanceChip, Barcode, BrandBadge, Breadcrumb, Button, ButtonGroup, ButtonLink, Calendar, Card, CardTile, CardTileGrid, ChangePasswordForm, CheckableListRow, Checkbox, CodeTextarea, Collapsible, ColorPicker, Combobox, Command, ConfirmDialog, ConsentPrompt, ContextMenu, CopyButton, CurrencyInput, DataTable, DatePicker, DateRangePicker, DeviceOnlyGate, DeviceStorageKeyGate, Dialog, DragHandleRow, Drawer, EmptyState, ExportPanel, FileDropzone, FloatingActionButton, ForgotPasswordForm, FormField, GripIcon, Header, HeaderFooterLayout, HoverCard, IOS_INSTALL_STEPS, Icon, IconPicker, Input, InstallHint, InstallPrompt, Item, Kbd, Label, LegalLinks, LinkSovereignPanel, LockedState, MOBILE_BREAKPOINT_PX, Markdown, Marker, MemberMultiSelect, Menu, MenuEntries, Menubar, Message, MessageScroller, MobileAppsDrawer, MobileFooter, MobileHeader, NavList, NavTabs, NavigationMenu, NewCardTile, NotificationsPanel, OfflineGate, OverlayHeader, PageContainer, PageHeader, PageLayout, Pagination, PhotoGallery, PhotoGrid, PhotoViewer, Popover, ProfilePanel, Progress, PushControl, QrCode, QuantityStepper, RadioGroup, RangeCalendar, RecoveryKit, ResetPasswordForm, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveSurface, RootLayout, SWIPE_STACK_TRANSITION_MS, ScrollArea, SegmentedControl, Select, SessionsPanel, SettingsDialog, Sheet, SignInForm, SignUpForm, Slider, Spinner, SplitMethodSelector, SplitPane, StatusBadge, StepStrip, SuggestionInput, SwipableMobileCarousel, SwipableMobileCarouselDots, SwipableMobileCarouselSlide, SwipableMobileCarouselSlideBody, SwipableMobileCarouselSlideFooter, SwipableMobileCarouselSlideHeader, SwipeStack, SwipeStackCard, SystemBanner, THEME_PRESETS, THEME_PRESET_NAMES, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Tabs, TagInput, Textarea, ThreeColumnLayout, ToastProvider, Toggle, Tooltip, TwoFactorForm, TwoFactorPanel, Typography, UpdateNotice, UserMenu, appsLauncherItems, encodeBarcode, gs1CheckDigit, isInstalledDisplay, parseSidebarStored, recoveryKitFileName, recoveryKitFileText, shouldHandleDndEvent, sidebarStateFor, sidebarStorageKey, toggleSidebarHidden, toggleSidebarRail, useAppSidebar, useCarouselRouteSync, useCommitOnEnterOrBlur, useDoubleTapHandler, useInstallPrompt, useIsMobile, useIsOffline, useLongPress, useOfflineTileState, useOverlaySecondRow, useReorderSensors, useResponsiveLayout, useSingleOrDoubleTap, useSnapCarousel, useSwipeReveal, useSwipeStack, useToast };
4525
+ export type { AccordionItem, AccordionProps, ActionResult, AlertProps, AlertVariant, AppFrameFooter, AppFrameLabels, AppFrameProps, AppSidebarAction, AppSidebarBlock, AppSidebarControl, AppSidebarItem, AppSidebarLinkProps, AppSidebarProps, AppTileProps, AppsLauncherItem, AppsLauncherProps, AspectRatioProps, AuthCardProps, AuthCodeInputProps, AuthFieldControl, AuthFieldProps, AuthFooterProps, AuthLinkRenderer, AvatarProps, AvatarStackPerson, AvatarStackProps, BadgeProps, BadgeStatus, BadgeVariant, BalanceChipProps, BannerVariant, BarcodeFormat, BarcodeProps, BrandBadgeProps, BreadcrumbItem, BreadcrumbProps, ButtonGroupProps, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CardProps, CardTileGridProps, CardTileProps, ChangePasswordFormProps, CheckableListRowProps, CheckboxProps, CodeTextareaProps, CollapsibleProps, ColorPickerProps, ColorPickerSwatch, ComboboxOption, ComboboxProps, CommandItem, CommandProps, CommitOnEnterOrBlurHandlers, ConfirmDialogProps, ConsentPromptProps, ContextMenuProps, CopyButtonProps, CurrencyInputProps, DataTableColumn, DataTableProps, DatePickerProps, DateRange, DateRangePickerProps, DeviceOnlyGateProps, DeviceStorageKeyGateProps, DeviceStorageKeyGateStatus, DialogProps, DialogSize, DragHandleRowProps, DrawerProps, EmptyStateProps, EncodedBarcode, ExportPanelProps, ExportPanelStatus, ExportStartResult, FileDropzoneProps, FloatingActionButtonProps, FooterIcon, ForgotPasswordFormProps, FormFieldProps, FormFieldRenderProps, GripIconProps, HeaderFooterLayoutProps, HeaderPlugin, HeaderProps, HoverCardProps, IconName, IconPickerProps, IconProps, InputProps, InstallHintProps, InstallKind, InstallPromptProps, ItemProps, KbdProps, LabelProps, LauncherAppTile, LegalLinksProps, LinkOutcome, LinkSovereignPanelProps, LockedReason, LockedStateProps, LongPressHandlers, MarkdownProps, MarkerProps, MemberMultiSelectOption, MemberMultiSelectProps, MenuEntry, MenuItem, MenuLabel, MenuProps, MenuSeparator, MenubarMenu, MenubarProps, MessageProps, MessageScrollerProps, MessageSender, MobileAppsDrawerItem, MobileAppsDrawerProps, MobileFooterProps, MobileHeaderProps, NavListGroup, NavListItem, NavListLinkProps, NavListProps, NavTabItem, NavTabLinkProps, NavTabsProps, NavigationMenuItem, NavigationMenuProps, NewCardTileProps, NotificationsPanelItem, NotificationsPanelProps, OfflineGateProps, OfflineTileState, OverlayHeaderProps, PageContainerProps, PageHeaderProps, PageLayoutPadding, PageLayoutProps, PaginationProps, PanelAction, Photo, PhotoGalleryProps, PhotoGridProps, PhotoViewerProps, PopoverProps, ProfilePanelProps, ProgressProps, PushControlProps, PushControlState, QrCodeProps, QuantityStepperProps, RadioGroupItem, RadioGroupProps, RangeCalendarProps, RecoveryKitProps, ResetPasswordFormProps, ResizableDirection, ResizableHandleProps, ResizablePanelGroupProps, ResizablePanelProps, ResponsiveSurfaceProps, RootLayoutProps, RootLayoutVariant, ScrollAreaProps, SegmentedControlProps, SegmentedOption, SelectProps, SessionRow, SessionsPanelProps, SettingsDialogProps, SettingsGroup, SettingsLinkProps, SettingsSection, SheetProps, SidebarMemory, SidebarState, SidebarStored, SignInFormProps, SignUpFormProps, SignUpValues, SliderProps, SortDirection, SpinnerProps, SplitMethod, SplitMethodSelectorProps, SplitPaneProps, StatusBadgeProps, StatusBadgeStatus, StepStripItem, StepStripProps, SuggestionInputProps, SuggestionOption, SwipableMobileCarouselDotsProps, SwipableMobileCarouselIndicatorProps, SwipableMobileCarouselProps, SwipableMobileCarouselSlideBodyProps, SwipableMobileCarouselSlideFooterProps, SwipableMobileCarouselSlideHeaderProps, SwipableMobileCarouselSlideProps, SwipeDirection, SwipeDirectionMeta, SwipeStackCardProps, SwipeStackProps, SystemBannerProps, TabItem, TableProps, TabsProps, TagInputProps, TextareaProps, ThemePresetName, ThemePresetTokens, ThreeColumnLayoutProps, ToastContextValue, ToastItem, ToggleProps, TooltipProps, TwoFactorAction, TwoFactorFormProps, TwoFactorPanelProps, TwoFactorStart, TypographyProps, TypographyVariant, UpdateNoticeProps, UseCarouselRouteSyncOptions, UseCarouselRouteSyncResult, UseInstallPrompt, UseLongPressOptions, UseReorderSensorsOptions, UseResponsiveLayoutOptions, UseResponsiveLayoutResult, UseSnapCarouselOptions, UseSnapCarouselResult, UseSwipeRevealHandlers, UseSwipeRevealOptions, UseSwipeRevealResult, UseSwipeStackHandlers, UseSwipeStackOptions, UseSwipeStackResult, UserMenuItem, UserMenuProps };