@brdgapp/ui 1.6.1 → 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,14 @@
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
+
5
13
  ## 1.6.1
6
14
 
7
15
  2026-11-17. Bridge OS's lockup. Nothing changes for apps already on 1.6.
@@ -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.1",
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",