@brdgapp/ui 1.6.0 → 1.6.2

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 CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  Every release of `@brdgapp/ui`. Versions follow the rules in README.md → Versions.
4
4
 
5
+ ## 1.6.2
6
+
7
+ 2026-11-17. A wider search in AppShell. Nothing changes for apps already on 1.6.
8
+
9
+ - AppShell: the search is wider, Bridge OS's own sizes: 340px, 440px from 1024px of top bar, 520px from
10
+ 1280px (it was 240px, then 280px). Where the tabs leave less room it narrows, and it's an icon under
11
+ 200px of room or a bar under 640px.
12
+
13
+ ## 1.6.1
14
+
15
+ 2026-11-17. Bridge OS's lockup. Nothing changes for apps already on 1.6.
16
+
17
+ - AppLockup: a name that starts with Bridge isn't said twice to screen readers. Bridge OS's lockup is
18
+ `<AppLockup name="Bridge OS" />`: its name is Bridge OS, so it keeps Bridge; other apps still leave it out.
19
+
5
20
  ## 1.6.0
6
21
 
7
22
  2026-11-16. AppLockup, and the shrunk side menu's logo at the right size. Nothing changes for apps already on 1.5, so they can update without changes.
@@ -1,5 +1,5 @@
1
1
  type AppLockupProps = {
2
- /** The app's name without Bridge: "OS", "Intros", "Together". */
2
+ /** The app's name: "Bridge OS", "Intros", "Together" (not "Bridge Together"). */
3
3
  name: string;
4
4
  /** The icon's height in px. 16 in a top bar and side menu, the default; the brand page's other sizes are 24, 32 and 48. */
5
5
  height?: number;
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "@brdgapp/ui/lib/utils";
3
3
  // An app's name with the Bridge icon: the logo's dot icon, then the app's name in the logo's wordmark style.
4
- // The icon says it's Bridge, so the name never repeats it: OS, not Bridge OS. Screen readers hear "Bridge OS".
4
+ // The icon says it's Bridge, so the name doesn't repeat it: Together, not Bridge Together. Bridge OS is the
5
+ // exception: its name is Bridge OS, so it's "Bridge OS" (Aman, 2026-11-17). Screen readers hear "Bridge Together".
5
6
  // At 16px (a top bar, the default): an 8px gap, then the name in SemiBold 14px, capitals, 0.1em letter
6
7
  // spacing, 16px line height (Aman, 2026-11-02). Everything scales from `height`. The icon is the logo's own
7
8
  // blue: --primary, #0038FF light and #4D7AFF dark, as in bridge-logo.svg and bridge-logo-white.svg.
@@ -10,6 +11,7 @@ import { cn } from "@brdgapp/ui/lib/utils";
10
11
  /** The dot icon from bridge-logo.svg, in its own 44 × 25 box. */
11
12
  const DOTS = "M8.94906 4.9569C7.6117 4.9569 6.52755 3.84726 6.52755 2.47845C6.52755 1.10964 7.6117 0 8.94906 0C10.2864 0 11.3706 1.10964 11.3706 2.47845C11.3706 3.84726 10.2864 4.9569 8.94906 4.9569ZM8.94906 11.6379C7.6117 11.6379 6.52755 10.5283 6.52755 9.15948C6.52755 7.79067 7.6117 6.68103 8.94906 6.68103C10.2864 6.68103 11.3706 7.79067 11.3706 9.15948C11.3706 10.5283 10.2864 11.6379 8.94906 11.6379ZM15.4766 11.6379C14.1393 11.6379 13.0551 10.5283 13.0551 9.15948C13.0551 7.79067 14.1393 6.68103 15.4766 6.68103C16.814 6.68103 17.8981 7.79067 17.8981 9.15948C17.8981 10.5283 16.814 11.6379 15.4766 11.6379ZM15.4766 18.319C14.1393 18.319 13.0551 17.2093 13.0551 15.8405C13.0551 14.4717 14.1393 13.3621 15.4766 13.3621C16.814 13.3621 17.8981 14.4717 17.8981 15.8405C17.8981 17.2093 16.814 18.319 15.4766 18.319ZM22.0042 18.319C20.6668 18.319 19.5827 17.2093 19.5827 15.8405C19.5827 14.4717 20.6668 13.3621 22.0042 13.3621C23.3415 13.3621 24.4257 14.4717 24.4257 15.8405C24.4257 17.2093 23.3415 18.319 22.0042 18.319ZM28.5317 18.319C27.1944 18.319 26.1102 17.2093 26.1102 15.8405C26.1102 14.4717 27.1944 13.3621 28.5317 13.3621C29.8691 13.3621 30.9532 14.4717 30.9532 15.8405C30.9532 17.2093 29.8691 18.319 28.5317 18.319ZM28.5317 11.6379C27.1944 11.6379 26.1102 10.5283 26.1102 9.15948C26.1102 7.79067 27.1944 6.68103 28.5317 6.68103C29.8691 6.68103 30.9532 7.79067 30.9532 9.15948C30.9532 10.5283 29.8691 11.6379 28.5317 11.6379ZM35.0593 11.6379C33.7219 11.6379 32.6378 10.5283 32.6378 9.15948C32.6378 7.79067 33.7219 6.68103 35.0593 6.68103C36.3966 6.68103 37.4808 7.79067 37.4808 9.15948C37.4808 10.5283 36.3966 11.6379 35.0593 11.6379ZM35.0593 4.9569C33.7219 4.9569 32.6378 3.84726 32.6378 2.47845C32.6378 1.10964 33.7219 0 35.0593 0C36.3966 0 37.4808 1.10964 37.4808 2.47845C37.4808 3.84726 36.3966 4.9569 35.0593 4.9569ZM35.0593 18.319C33.7219 18.319 32.6378 17.2093 32.6378 15.8405C32.6378 14.4717 33.7219 13.3621 35.0593 13.3621C36.3966 13.3621 37.4808 14.4717 37.4808 15.8405C37.4808 17.2093 36.3966 18.319 35.0593 18.319ZM35.0593 25C33.7219 25 32.6378 23.8904 32.6378 22.5216C32.6378 21.1527 33.7219 20.0431 35.0593 20.0431C36.3966 20.0431 37.4808 21.1527 37.4808 22.5216C37.4808 23.8904 36.3966 25 35.0593 25ZM8.94906 18.319C7.6117 18.319 6.52755 17.2093 6.52755 15.8405C6.52755 14.4717 7.6117 13.3621 8.94906 13.3621C10.2864 13.3621 11.3706 14.4717 11.3706 15.8405C11.3706 17.2093 10.2864 18.319 8.94906 18.319ZM2.42151 18.319C1.08415 18.319 0 17.2093 0 15.8405C0 14.4717 1.08415 13.3621 2.42151 13.3621C3.75887 13.3621 4.84302 14.4717 4.84302 15.8405C4.84302 17.2093 3.75887 18.319 2.42151 18.319ZM41.5868 18.319C40.2495 18.319 39.1653 17.2093 39.1653 15.8405C39.1653 14.4717 40.2495 13.3621 41.5868 13.3621C42.9242 13.3621 44.0083 14.4717 44.0083 15.8405C44.0083 17.2093 42.9242 18.319 41.5868 18.319ZM8.94906 25C7.6117 25 6.52755 23.8904 6.52755 22.5216C6.52755 21.1527 7.6117 20.0431 8.94906 20.0431C10.2864 20.0431 11.3706 21.1527 11.3706 22.5216C11.3706 23.8904 10.2864 25 8.94906 25Z";
12
13
  function AppLockup({ name, height = 16, mark = false, className }) {
13
- return (_jsxs("span", { "data-slot": "app-lockup", role: "img", "aria-label": `Bridge ${name}`, className: cn("inline-flex shrink-0 items-center", className), children: [_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 44 25", width: (44 / 25) * height, height: height, className: "shrink-0", children: _jsx("path", { d: DOTS, fill: "var(--primary)", fillRule: "evenodd", clipRule: "evenodd" }) }), mark ? null : (_jsx("span", { "aria-hidden": "true", className: "font-semibold whitespace-nowrap text-[var(--text-primary)] uppercase", style: { marginLeft: 0.5 * height, fontSize: 0.875 * height, letterSpacing: "0.1em", lineHeight: `${height}px` }, children: name }))] }));
14
+ const label = /^bridge\b/i.test(name) ? name : `Bridge ${name}`;
15
+ return (_jsxs("span", { "data-slot": "app-lockup", role: "img", "aria-label": label, className: cn("inline-flex shrink-0 items-center", className), children: [_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 44 25", width: (44 / 25) * height, height: height, className: "shrink-0", children: _jsx("path", { d: DOTS, fill: "var(--primary)", fillRule: "evenodd", clipRule: "evenodd" }) }), mark ? null : (_jsx("span", { "aria-hidden": "true", className: "font-semibold whitespace-nowrap text-[var(--text-primary)] uppercase", style: { marginLeft: 0.5 * height, fontSize: 0.875 * height, letterSpacing: "0.1em", lineHeight: `${height}px` }, children: name }))] }));
14
16
  }
15
17
  export { AppLockup };
@@ -22,9 +22,9 @@ type AppShellLinkProps = {
22
22
  onClick?: () => void;
23
23
  };
24
24
  type AppShellProps = {
25
- /** The app's lockup, `<AppLockup name="OS" />`: the Bridge icon and the app's name, 16px tall. Links home. */
25
+ /** The app's lockup, `<AppLockup name="Bridge OS" />`: the Bridge icon and the app's name, 16px tall. Links home. */
26
26
  logo: React.ReactNode;
27
- /** Side menu only: `<AppLockup name="OS" mark />`, the Bridge icon alone, at the top when the side menu is shrunk. The shell draws it 16px tall, as in the full logo. */
27
+ /** Side menu only: `<AppLockup name="Bridge OS" mark />`, the Bridge icon alone, at the top when the side menu is shrunk. The shell draws it 16px tall, as in the full logo. */
28
28
  logoMark?: React.ReactNode;
29
29
  /** Where the logo goes. Default "/". */
30
30
  homeHref?: string;
@@ -10,9 +10,11 @@ import { cn } from "@brdgapp/ui/lib/utils";
10
10
  const plainLink = (props) => _jsx("a", { ...props });
11
11
  // GlobalSearchTrigger sized by the top bar (see `searchSized`). The `!` beats the trigger's own window-based sizes.
12
12
  const SEARCH_SIZE = [
13
- "w-9! justify-center! px-0! [&>span]:hidden! [&>kbd]:hidden!",
14
- "@min-[760px]:w-[240px]! @min-[760px]:justify-start! @min-[760px]:px-3.5! @min-[760px]:[&>span]:block! @min-[760px]:[&>kbd]:inline-flex!",
15
- "@min-[1200px]:w-[280px]!",
13
+ // A pill as wide as the room it has, up to 340px, 440px from 1024px of bar and 520px from 1280px.
14
+ "w-full! max-w-[340px]! @min-[1024px]/bar:max-w-[440px]! @min-[1280px]/bar:max-w-[520px]!",
15
+ // An icon when the bar is under 640px, or the tabs leave it under 200px.
16
+ "@max-[639px]/bar:w-9! @max-[639px]/bar:justify-center! @max-[639px]/bar:px-0! @max-[639px]/bar:[&>span]:hidden! @max-[639px]/bar:[&>kbd]:hidden!",
17
+ "@max-[199px]/search:w-9! @max-[199px]/search:justify-center! @max-[199px]/search:px-0! @max-[199px]/search:[&>span]:hidden! @max-[199px]/search:[&>kbd]:hidden!",
16
18
  ].join(" ");
17
19
  function Dot({ className }) {
18
20
  return _jsx("span", { "aria-hidden": "true", className: cn("absolute size-2 rounded-full bg-[var(--error)] ring-2 ring-[var(--surface-primary)]", className) });
@@ -125,14 +127,15 @@ function AppShell({ logo, logoMark, homeHref = "/", items, nav = "top", breadcru
125
127
  });
126
128
  const toggle = (_jsx(Tip, { text: collapsed ? "Expand menu (⌘B)" : "Collapse menu (⌘B)", children: _jsx(IconButton, { size: "sm", "aria-label": collapsed ? "Expand menu" : "Collapse menu", "aria-keyshortcuts": "Meta+B Control+B", onClick: () => setCollapsed(!collapsed), children: collapsed ? _jsx(PanelLeftOpen, {}) : _jsx(PanelLeftClose, {}) }) }));
127
129
  // The search's size follows the top bar's own width (a container query), not the window's, so the bar
128
- // looks the same in every app and both layouts: an icon below 760px of bar, a 240px pill from 760px,
129
- // 280px from 1200px. It always sits by the launcher.
130
+ // looks the same in every app and both layouts: an icon below 640px of bar, then 340px, 440px from
131
+ // 1024px and 520px from 1280px, Bridge OS's own sizes (Aman, 2026-11-17). Where the tabs leave less
132
+ // room it narrows, and below 200px it's an icon, so the bar never runs off its edge. Always by the launcher.
130
133
  const searchSized = React.isValidElement(search)
131
134
  ? React.cloneElement(search, { className: cn(search.props.className, SEARCH_SIZE) })
132
135
  : search;
133
136
  // The right of the top bar, the same in every app: search, the launcher, your account.
134
- const right = (_jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-3 pl-4 md:gap-4 md:pl-8", children: [search ? _jsx("div", { className: "flex shrink-0 items-center", children: searchSized }) : null, actions ? _jsx("div", { className: "flex shrink-0 items-center gap-2 md:gap-4", children: actions }) : null, account ? (_jsxs(_Fragment, { children: [actions || search ? _jsx("span", { "aria-hidden": "true", className: "h-6 w-px shrink-0 bg-[var(--border-default)]" }) : null, _jsx("div", { className: "flex shrink-0 items-center", children: account })] })) : null] }));
135
- const topBar = (_jsx("header", { "data-slot": "app-shell-top-bar", className: "glass-chrome @container sticky top-0 z-50 h-14 shrink-0 border-b border-[var(--glass-border)] bg-[var(--glass-bg)] backdrop-blur-2xl backdrop-saturate-150", children: _jsxs("nav", { "aria-label": "Top bar", className: "flex h-full items-center gap-3 px-4 md:gap-5 md:px-6 lg:px-8", children: [side ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "-ml-1.5 md:hidden", children: _jsx(IconButton, { size: "sm", "aria-label": "Open menu", "aria-expanded": menuOpen, onClick: () => setMenuOpen(true), children: _jsx(Menu, {}) }) }), _jsx("span", { className: "flex min-w-0 overflow-hidden md:hidden", children: logoLink(logo) }), breadcrumbs ? _jsx("div", { className: "hidden min-w-0 shrink md:flex", children: breadcrumbs }) : null] })) : (_jsxs(_Fragment, { children: [logoLink(logo), items.length ? (_jsxs(_Fragment, { children: [divider, _jsx(TopTabs, { items: items, link: link })] })) : null] })), right] }) }));
137
+ const right = (_jsxs("div", { className: "ml-auto flex min-w-0 flex-1 items-center justify-end gap-3 pl-4 md:gap-4 md:pl-8", children: [search ? _jsx("div", { className: "@container/search flex min-w-9 flex-1 items-center justify-end", children: searchSized }) : null, actions ? _jsx("div", { className: "flex shrink-0 items-center gap-2 md:gap-4", children: actions }) : null, account ? (_jsxs(_Fragment, { children: [actions || search ? _jsx("span", { "aria-hidden": "true", className: "h-6 w-px shrink-0 bg-[var(--border-default)]" }) : null, _jsx("div", { className: "flex shrink-0 items-center", children: account })] })) : null] }));
138
+ const topBar = (_jsx("header", { "data-slot": "app-shell-top-bar", className: "glass-chrome @container/bar sticky top-0 z-50 h-14 shrink-0 border-b border-[var(--glass-border)] bg-[var(--glass-bg)] backdrop-blur-2xl backdrop-saturate-150", children: _jsxs("nav", { "aria-label": "Top bar", className: "flex h-full items-center gap-3 px-4 md:gap-5 md:px-6 lg:px-8", children: [side ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "-ml-1.5 md:hidden", children: _jsx(IconButton, { size: "sm", "aria-label": "Open menu", "aria-expanded": menuOpen, onClick: () => setMenuOpen(true), children: _jsx(Menu, {}) }) }), _jsx("span", { className: "flex min-w-0 overflow-hidden md:hidden", children: logoLink(logo) }), breadcrumbs ? _jsx("div", { className: "hidden min-w-0 shrink md:flex", children: breadcrumbs }) : null] })) : (_jsxs(_Fragment, { children: [logoLink(logo), items.length ? (_jsxs(_Fragment, { children: [divider, _jsx(TopTabs, { items: items, link: link })] })) : null] })), right] }) }));
136
139
  return (_jsxs("div", { "data-slot": "app-shell", "data-nav": nav, className: cn("flex min-h-dvh", side ? "flex-row" : "flex-col"), children: [_jsx(SkipLink, {}), side ? (_jsxs("nav", { "aria-label": "Main", "data-slot": "app-shell-side-menu", "data-collapsed": collapsed || undefined, className: cn("sticky top-0 hidden h-dvh shrink-0 flex-col border-r border-[var(--border-divider)] bg-[var(--surface-primary)] transition-[width] duration-200 ease-out motion-reduce:transition-none md:flex", collapsed ? "w-14" : "w-56"), children: [collapsed ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "flex h-14 shrink-0 items-center justify-center border-b border-[var(--glass-border)] [&_img]:h-4 [&_img]:w-auto [&_svg]:h-4 [&_svg]:w-auto", children: logoMark ? logoLink(logoMark) : null }), _jsx("div", { className: "flex shrink-0 justify-center pt-3", children: toggle })] })) : (_jsxs("div", { className: "flex h-14 shrink-0 items-center gap-2 border-b border-[var(--glass-border)] pr-3 pl-4", children: [logoLink(logo), _jsx("span", { className: "ml-auto", children: toggle })] })), _jsx(SideMenu, { items: items, link: link, collapsed: collapsed, footer: sideFooter })] })) : null, _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [topBar, _jsx("main", { id: "main", tabIndex: -1, className: cn("min-w-0 flex-1 outline-none", side ? "" : "max-md:pb-[calc(56px+env(safe-area-inset-bottom))]"), children: children })] }), !side && items.length ? _jsx(BottomBar, { items: items, link: link }) : null, side ? (_jsx(DialogPrimitive.Root, { open: menuOpen, onOpenChange: setMenuOpen, children: _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Backdrop, { className: "fixed inset-0 z-[60] bg-black/30 transition-opacity duration-300 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 md:hidden" }), _jsxs(DialogPrimitive.Popup, { "data-slot": "app-shell-menu-sheet", className: cn("fixed inset-y-0 left-0 z-[60] flex w-72 max-w-[85vw] flex-col bg-[var(--surface-elevated)] shadow-[var(--shadow-drawer)] outline-none md:hidden", "transition-[translate] duration-300 ease-out data-[ending-style]:-translate-x-full data-[starting-style]:-translate-x-full motion-reduce:transition-none"), children: [_jsxs("div", { className: "flex h-14 shrink-0 items-center justify-between gap-3 border-b border-[var(--border-divider)] px-4 pt-[env(safe-area-inset-top)]", children: [_jsx(DialogPrimitive.Title, { className: "sr-only", children: "Menu" }), link({ href: homeHref, onClick: () => setMenuOpen(false), className: "flex items-center rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]", children: logo }), _jsx(DialogPrimitive.Close, { render: _jsx(IconButton, { size: "sm", "aria-label": "Close menu", children: _jsx(X, {}) }) })] }), _jsx(SideMenu, { items: items, link: link, collapsed: false, footer: sideFooter, onNavigate: () => setMenuOpen(false) })] })] }) })) : null] }));
137
140
  }
138
141
  export { AppShell };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brdgapp/ui",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Bridge's shared components, tokens and styles. Documented at handbook.brdg.app.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://handbook.brdg.app",