@burdenoff/fe-libs 2026.1119.7 → 2026.1119.8

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.
@@ -0,0 +1,7 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ // src/chrome/shell/shellSidebarAppearance.ts
3
+ var n = e("default");
4
+ function r() {
5
+ return t(n);
6
+ }
7
+ export { n as ShellSidebarAppearanceContext, r as useShellSidebarAppearance };
@@ -0,0 +1,21 @@
1
+ import { RefObject } from 'react';
2
+ /** A popup's placement beside the floating sidebar, as Radix's content props. */
3
+ export interface SidebarPopupBeside {
4
+ side: 'left' | 'right';
5
+ align: 'start' | 'end';
6
+ sideOffset: number;
7
+ }
8
+ /**
9
+ * The placement beside the floating panel `trigger` sits in, or `null` (not in a floating
10
+ * panel, or the window is narrower than `lg`): the caller then keeps its own placement.
11
+ */
12
+ export declare function sidebarPopupBeside(trigger: HTMLElement | null, align: SidebarPopupBeside['align']): SidebarPopupBeside | null;
13
+ /**
14
+ * For a popup opened from `trigger`: `beside` is its placement while it opens beside a
15
+ * floating sidebar (else `null`: keep the placement of before). Pass `contentRef` as the
16
+ * popup content's `ref`; it measures each time the content mounts.
17
+ */
18
+ export declare function useSidebarPopupPlacement(trigger: RefObject<HTMLElement | null>, align: SidebarPopupBeside['align']): {
19
+ beside: SidebarPopupBeside | null;
20
+ contentRef: (content: HTMLElement | null) => void;
21
+ };
@@ -0,0 +1,28 @@
1
+ import { useShellSidebarAppearance as e } from "./shellSidebarAppearance.js";
2
+ import { useCallback as t, useState as n } from "react";
3
+ // src/chrome/shell/sidebarPopupPlacement.ts
4
+ var r = 8, i = "(min-width: 1024px)";
5
+ function a(e, t) {
6
+ let n = e?.closest("[data-shell-panel]");
7
+ if (!e || !n || typeof window.matchMedia != "function" || !window.matchMedia(i).matches) return null;
8
+ let a = getComputedStyle(e).direction === "rtl", o = e.getBoundingClientRect(), s = n.getBoundingClientRect(), c = a ? o.left - s.left : s.right - o.right;
9
+ return {
10
+ side: a ? "left" : "right",
11
+ align: t,
12
+ sideOffset: Math.max(0, Math.round(c)) + r
13
+ };
14
+ }
15
+ function o(r, i) {
16
+ let o = e() === "floating", [s, c] = n(null), l = t((e) => {
17
+ e && o && c(a(r.current, i));
18
+ }, [
19
+ o,
20
+ r,
21
+ i
22
+ ]);
23
+ return {
24
+ beside: o ? s : null,
25
+ contentRef: l
26
+ };
27
+ }
28
+ export { a as sidebarPopupBeside, o as useSidebarPopupPlacement };
@@ -16,13 +16,23 @@ declare function DropdownMenuSubTrigger({ ref, className, inset, indicator, chil
16
16
  declare namespace DropdownMenuSubTrigger {
17
17
  var displayName: string | undefined;
18
18
  }
19
- declare function DropdownMenuSubContent({ ref, className, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
19
+ /**
20
+ * ★ BOFF-15567: portalled to <body>, like every menu's content. Rendered inside its menu, a
21
+ * sub-menu was cut away under Glass (the menu's backdrop-filter made the menu its containing
22
+ * block, and the menu's overflow clipped everything beside it; see `./glass-surface`). Radix
23
+ * keeps it working across the portal: ArrowRight opens it and focuses its first item,
24
+ * ArrowLeft closes it and focuses its row again, the pointer's path to it keeps it open, and
25
+ * Escape closes the whole menu. At the menu's own `z-50` it is the later body child, so it
26
+ * paints over its menu, and an open sheet or shell overlay lifts it with its menu
27
+ * (`sheetLayer.ts`, `chrome/shellOverlayLayer.ts`).
28
+ */
29
+ declare function DropdownMenuSubContent({ ref, className, children, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
20
30
  ref?: React.Ref<ElementRef<typeof DropdownMenuPrimitive.SubContent>>;
21
31
  }): import('react').JSX.Element;
22
32
  declare namespace DropdownMenuSubContent {
23
33
  var displayName: string | undefined;
24
34
  }
25
- declare function DropdownMenuContent({ ref, className, sideOffset, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
35
+ declare function DropdownMenuContent({ ref, className, sideOffset, children, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
26
36
  ref?: React.Ref<ElementRef<typeof DropdownMenuPrimitive.Content>>;
27
37
  }): import('react').JSX.Element;
28
38
  declare namespace DropdownMenuContent {
@@ -1,89 +1,92 @@
1
1
  import { cn as e } from "../shared-utils.js";
2
- import { Check as t, ChevronRight as n, Circle as r } from "lucide-react";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
- import * as o from "@radix-ui/react-dropdown-menu";
2
+ import { GlassSurfaceScope as t } from "./glass-surface.js";
3
+ import { Check as n, ChevronRight as r, Circle as i } from "lucide-react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import * as s from "@radix-ui/react-dropdown-menu";
5
6
  // src/ui/dropdown-menu.tsx
6
- var s = o.Root, c = o.Trigger, l = o.Group, u = o.Portal, d = o.Sub, f = o.RadioGroup;
7
- function p({ ref: t, className: r, inset: s, indicator: c, children: l, ...u }) {
8
- return /* @__PURE__ */ a(o.SubTrigger, {
7
+ var c = s.Root, l = s.Trigger, u = s.Group, d = s.Portal, f = s.Sub, p = s.RadioGroup;
8
+ function m({ ref: t, className: n, inset: i, indicator: c, children: l, ...u }) {
9
+ return /* @__PURE__ */ o(s.SubTrigger, {
9
10
  ref: t,
10
- className: e("flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] data-[state=open]:bg-[var(--color-accent-soft)]", s && "ps-8", r),
11
+ className: e("flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] data-[state=open]:bg-[var(--color-accent-soft)]", i && "ps-8", n),
11
12
  ...u,
12
- children: [l, c ?? /* @__PURE__ */ i(n, { className: "ms-auto size-4 text-text-muted rtl:rotate-180" })]
13
+ children: [l, c ?? /* @__PURE__ */ a(r, { className: "ms-auto size-4 text-text-muted rtl:rotate-180" })]
13
14
  });
14
15
  }
15
- p.displayName = o.SubTrigger.displayName;
16
- function m({ ref: t, className: n, ...r }) {
17
- return /* @__PURE__ */ i(o.SubContent, {
18
- ref: t,
16
+ m.displayName = s.SubTrigger.displayName;
17
+ function h({ ref: n, className: r, children: i, ...o }) {
18
+ return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.SubContent, {
19
+ ref: n,
19
20
  "data-glass-surface": "elevated",
20
- className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
21
- ...r
22
- });
21
+ className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", r),
22
+ ...o,
23
+ children: o.asChild ? i : /* @__PURE__ */ a(t, { children: i })
24
+ }) });
23
25
  }
24
- m.displayName = o.SubContent.displayName;
25
- function h({ ref: t, className: n, sideOffset: r = 4, ...a }) {
26
- return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ i(o.Content, {
27
- ref: t,
26
+ h.displayName = s.SubContent.displayName;
27
+ function g({ ref: n, className: r, sideOffset: i = 4, children: o, ...c }) {
28
+ return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Content, {
29
+ ref: n,
28
30
  "data-glass-surface": "elevated",
29
- sideOffset: r,
30
- className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
31
- ...a
31
+ sideOffset: i,
32
+ className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", r),
33
+ ...c,
34
+ children: c.asChild ? o : /* @__PURE__ */ a(t, { children: o })
32
35
  }) });
33
36
  }
34
- h.displayName = o.Content.displayName;
35
- function g({ ref: t, className: n, inset: r, ...a }) {
36
- return /* @__PURE__ */ i(o.Item, {
37
+ g.displayName = s.Content.displayName;
38
+ function _({ ref: t, className: n, inset: r, ...i }) {
39
+ return /* @__PURE__ */ a(s.Item, {
37
40
  ref: t,
38
41
  className: e("relative flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r && "ps-8", n),
39
- ...a
42
+ ...i
40
43
  });
41
44
  }
42
- g.displayName = o.Item.displayName;
43
- function _({ ref: n, className: r, children: s, checked: c, ...l }) {
44
- return /* @__PURE__ */ a(o.CheckboxItem, {
45
- ref: n,
45
+ _.displayName = s.Item.displayName;
46
+ function v({ ref: t, className: r, children: i, checked: c, ...l }) {
47
+ return /* @__PURE__ */ o(s.CheckboxItem, {
48
+ ref: t,
46
49
  className: e("relative flex cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r),
47
50
  checked: c,
48
51
  ...l,
49
- children: [/* @__PURE__ */ i("span", {
52
+ children: [/* @__PURE__ */ a("span", {
50
53
  className: "absolute start-2 flex size-3.5 items-center justify-center",
51
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: /* @__PURE__ */ i(t, { className: "size-4" }) })
52
- }), s]
54
+ children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(n, { className: "size-4" }) })
55
+ }), i]
53
56
  });
54
57
  }
55
- _.displayName = o.CheckboxItem.displayName;
56
- function v({ ref: t, className: n, children: s, indicator: c, ...l }) {
57
- return /* @__PURE__ */ a(o.RadioItem, {
58
+ v.displayName = s.CheckboxItem.displayName;
59
+ function y({ ref: t, className: n, children: r, indicator: c, ...l }) {
60
+ return /* @__PURE__ */ o(s.RadioItem, {
58
61
  ref: t,
59
62
  className: e("relative flex cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n),
60
63
  ...l,
61
- children: [/* @__PURE__ */ i("span", {
64
+ children: [/* @__PURE__ */ a("span", {
62
65
  className: "absolute start-2 flex size-3.5 items-center justify-center",
63
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: c ?? /* @__PURE__ */ i(r, { className: "size-2 fill-current" }) })
64
- }), s]
66
+ children: /* @__PURE__ */ a(s.ItemIndicator, { children: c ?? /* @__PURE__ */ a(i, { className: "size-2 fill-current" }) })
67
+ }), r]
65
68
  });
66
69
  }
67
- v.displayName = o.RadioItem.displayName;
68
- function y({ ref: t, className: n, inset: r, ...a }) {
69
- return /* @__PURE__ */ i(o.Label, {
70
+ y.displayName = s.RadioItem.displayName;
71
+ function b({ ref: t, className: n, inset: r, ...i }) {
72
+ return /* @__PURE__ */ a(s.Label, {
70
73
  ref: t,
71
74
  className: e("px-2 py-1.5 text-xs font-medium uppercase tracking-wide text-text-muted", r && "ps-8", n),
72
- ...a
75
+ ...i
73
76
  });
74
77
  }
75
- y.displayName = o.Label.displayName;
76
- function b({ ref: t, className: n, ...r }) {
77
- return /* @__PURE__ */ i(o.Separator, {
78
+ b.displayName = s.Label.displayName;
79
+ function x({ ref: t, className: n, ...r }) {
80
+ return /* @__PURE__ */ a(s.Separator, {
78
81
  ref: t,
79
82
  className: e("-mx-1 my-1 h-px bg-border-subtle", n),
80
83
  ...r
81
84
  });
82
85
  }
83
- b.displayName = o.Separator.displayName;
84
- var x = ({ className: t, ...n }) => /* @__PURE__ */ i("span", {
86
+ x.displayName = s.Separator.displayName;
87
+ var S = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
85
88
  className: e("ms-auto text-xs tracking-widest text-text-muted", t),
86
89
  ...n
87
90
  });
88
- x.displayName = "DropdownMenuShortcut";
89
- export { s as DropdownMenu, _ as DropdownMenuCheckboxItem, h as DropdownMenuContent, l as DropdownMenuGroup, g as DropdownMenuItem, y as DropdownMenuLabel, u as DropdownMenuPortal, f as DropdownMenuRadioGroup, v as DropdownMenuRadioItem, b as DropdownMenuSeparator, x as DropdownMenuShortcut, d as DropdownMenuSub, m as DropdownMenuSubContent, p as DropdownMenuSubTrigger, c as DropdownMenuTrigger };
91
+ S.displayName = "DropdownMenuShortcut";
92
+ export { c as DropdownMenu, v as DropdownMenuCheckboxItem, g as DropdownMenuContent, u as DropdownMenuGroup, _ as DropdownMenuItem, b as DropdownMenuLabel, d as DropdownMenuPortal, p as DropdownMenuRadioGroup, y as DropdownMenuRadioItem, x as DropdownMenuSeparator, S as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuSubContent, m as DropdownMenuSubTrigger, l as DropdownMenuTrigger };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ /** Marks `children` as rendered inside a glass surface. Renders no element of its own. */
3
+ export declare function GlassSurfaceScope({ children }: {
4
+ children?: ReactNode;
5
+ }): import('react').JSX.Element;
6
+ /** Whether the caller renders inside a glass surface (a `GlassSurfaceScope`). */
7
+ export declare function useInsideGlassSurface(): boolean;
@@ -0,0 +1,14 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ // src/ui/glass-surface.tsx
4
+ var r = e(!1);
5
+ function i({ children: e }) {
6
+ return /* @__PURE__ */ n(r.Provider, {
7
+ value: !0,
8
+ children: e
9
+ });
10
+ }
11
+ function a() {
12
+ return t(r);
13
+ }
14
+ export { i as GlassSurfaceScope, a as useInsideGlassSurface };
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
  declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
4
4
  declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
5
- declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, children, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
6
6
  declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
7
7
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,35 +1,37 @@
1
1
  "use client";
2
2
  import { cn as e } from "../lib/utils.js";
3
+ import { GlassSurfaceScope as t } from "./glass-surface.js";
3
4
  import "react";
4
- import { jsx as t } from "react/jsx-runtime";
5
- import * as n from "@radix-ui/react-popover";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ import * as r from "@radix-ui/react-popover";
6
7
  // src/ui/popover.tsx
7
- function r({ ...e }) {
8
- return /* @__PURE__ */ t(n.Root, {
8
+ function i({ ...e }) {
9
+ return /* @__PURE__ */ n(r.Root, {
9
10
  "data-slot": "popover",
10
11
  ...e
11
12
  });
12
13
  }
13
- function i({ ...e }) {
14
- return /* @__PURE__ */ t(n.Trigger, {
14
+ function a({ ...e }) {
15
+ return /* @__PURE__ */ n(r.Trigger, {
15
16
  "data-slot": "popover-trigger",
16
17
  ...e
17
18
  });
18
19
  }
19
- function a({ className: r, align: i = "center", sideOffset: a = 4, ...o }) {
20
- return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Content, {
20
+ function o({ className: i, align: a = "center", sideOffset: o = 4, children: s, ...c }) {
21
+ return /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Content, {
21
22
  "data-slot": "popover-content",
22
23
  "data-glass-surface": "elevated",
23
- align: i,
24
- sideOffset: a,
25
- className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden", r),
26
- ...o
24
+ align: a,
25
+ sideOffset: o,
26
+ className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden", i),
27
+ ...c,
28
+ children: c.asChild ? s : /* @__PURE__ */ n(t, { children: s })
27
29
  }) });
28
30
  }
29
- function o({ ...e }) {
30
- return /* @__PURE__ */ t(n.Anchor, {
31
+ function s({ ...e }) {
32
+ return /* @__PURE__ */ n(r.Anchor, {
31
33
  "data-slot": "popover-anchor",
32
34
  ...e
33
35
  });
34
36
  }
35
- export { r as Popover, o as PopoverAnchor, a as PopoverContent, i as PopoverTrigger };
37
+ export { i as Popover, s as PopoverAnchor, o as PopoverContent, a as PopoverTrigger };
package/dist/ui/select.js CHANGED
@@ -2,126 +2,127 @@ import { nativeSelection as e } from "../shared/native/consumers.js";
2
2
  import { isNative as t } from "../shared/native/platform.js";
3
3
  import { cn as n } from "../shared-utils.js";
4
4
  import { BottomSheet as r, BottomSheetContent as i, BottomSheetHeader as a, BottomSheetTitle as o } from "./bottom-sheet.js";
5
- import { useEffect as s, useState as c } from "react";
6
- import { Check as l, ChevronDown as u, ChevronUp as d } from "lucide-react";
7
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
8
- import * as h from "@radix-ui/react-select";
5
+ import { GlassSurfaceScope as s } from "./glass-surface.js";
6
+ import { useEffect as c, useState as l } from "react";
7
+ import { Check as u, ChevronDown as d, ChevronUp as f } from "lucide-react";
8
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
9
+ import * as g from "@radix-ui/react-select";
9
10
  // src/ui/select.tsx
10
- var g = h.Root, _ = h.Group, v = h.Value;
11
- function y({ ref: e, className: t, children: r, ...i }) {
12
- return /* @__PURE__ */ m(h.Trigger, {
11
+ var _ = g.Root, v = g.Group, y = g.Value;
12
+ function b({ ref: e, className: t, children: r, ...i }) {
13
+ return /* @__PURE__ */ h(g.Trigger, {
13
14
  ref: e,
14
15
  "data-slot": "select-trigger",
15
16
  className: n("flex h-10 w-full items-center justify-between rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors duration-200 data-[placeholder]:text-text-placeholder focus:border-border-focus focus:outline-none focus:shadow-[var(--shadow-focus)] focus:ring-1 focus:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-status-error-border [&>span]:line-clamp-1", t),
16
17
  ...i,
17
- children: [r, /* @__PURE__ */ p(h.Icon, {
18
+ children: [r, /* @__PURE__ */ m(g.Icon, {
18
19
  asChild: !0,
19
- children: /* @__PURE__ */ p(u, { className: "size-4 text-text-muted" })
20
+ children: /* @__PURE__ */ m(d, { className: "size-4 text-text-muted" })
20
21
  })]
21
22
  });
22
23
  }
23
- y.displayName = h.Trigger.displayName;
24
- function b({ ref: e, className: t, ...r }) {
25
- return /* @__PURE__ */ p(h.ScrollUpButton, {
24
+ b.displayName = g.Trigger.displayName;
25
+ function x({ ref: e, className: t, ...r }) {
26
+ return /* @__PURE__ */ m(g.ScrollUpButton, {
26
27
  ref: e,
27
28
  className: n("flex cursor-default items-center justify-center py-1", t),
28
29
  ...r,
29
- children: /* @__PURE__ */ p(d, { className: "size-4" })
30
+ children: /* @__PURE__ */ m(f, { className: "size-4" })
30
31
  });
31
32
  }
32
- b.displayName = h.ScrollUpButton.displayName;
33
- function x({ ref: e, className: t, ...r }) {
34
- return /* @__PURE__ */ p(h.ScrollDownButton, {
33
+ x.displayName = g.ScrollUpButton.displayName;
34
+ function S({ ref: e, className: t, ...r }) {
35
+ return /* @__PURE__ */ m(g.ScrollDownButton, {
35
36
  ref: e,
36
37
  className: n("flex cursor-default items-center justify-center py-1", t),
37
38
  ...r,
38
- children: /* @__PURE__ */ p(u, { className: "size-4" })
39
+ children: /* @__PURE__ */ m(d, { className: "size-4" })
39
40
  });
40
41
  }
41
- x.displayName = h.ScrollDownButton.displayName;
42
- function S({ ref: e, className: t, children: r, position: i = "popper", ...a }) {
43
- return /* @__PURE__ */ p(h.Portal, { children: /* @__PURE__ */ m(h.Content, {
42
+ S.displayName = g.ScrollDownButton.displayName;
43
+ function C({ ref: e, className: t, children: r, position: i = "popper", ...a }) {
44
+ return /* @__PURE__ */ m(g.Portal, { children: /* @__PURE__ */ h(g.Content, {
44
45
  ref: e,
45
46
  "data-glass-surface": "elevated",
46
47
  className: n("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", i === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", t),
47
48
  position: i,
48
49
  ...a,
49
50
  children: [
50
- /* @__PURE__ */ p(b, {}),
51
- /* @__PURE__ */ p(h.Viewport, {
51
+ /* @__PURE__ */ m(x, {}),
52
+ /* @__PURE__ */ m(g.Viewport, {
52
53
  className: n("p-1", i === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
53
- children: r
54
+ children: /* @__PURE__ */ m(s, { children: r })
54
55
  }),
55
- /* @__PURE__ */ p(x, {})
56
+ /* @__PURE__ */ m(S, {})
56
57
  ]
57
58
  }) });
58
59
  }
59
- S.displayName = h.Content.displayName;
60
- function C({ ref: e, className: t, ...r }) {
61
- return /* @__PURE__ */ p(h.Label, {
60
+ C.displayName = g.Content.displayName;
61
+ function w({ ref: e, className: t, ...r }) {
62
+ return /* @__PURE__ */ m(g.Label, {
62
63
  ref: e,
63
64
  className: n("py-1.5 ps-8 pe-2 text-xs font-medium uppercase tracking-wide text-text-muted", t),
64
65
  ...r
65
66
  });
66
67
  }
67
- C.displayName = h.Label.displayName;
68
- function w({ ref: e, className: t, children: r, ...i }) {
69
- return /* @__PURE__ */ m(h.Item, {
68
+ w.displayName = g.Label.displayName;
69
+ function T({ ref: e, className: t, children: r, ...i }) {
70
+ return /* @__PURE__ */ h(g.Item, {
70
71
  ref: e,
71
72
  className: n("relative flex w-full cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[state=checked]:bg-[var(--color-accent-soft)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t),
72
73
  ...i,
73
- children: [/* @__PURE__ */ p("span", {
74
+ children: [/* @__PURE__ */ m("span", {
74
75
  className: "absolute start-2 flex size-3.5 items-center justify-center",
75
- children: /* @__PURE__ */ p(h.ItemIndicator, { children: /* @__PURE__ */ p(l, { className: "size-4" }) })
76
- }), /* @__PURE__ */ p(h.ItemText, { children: r })]
76
+ children: /* @__PURE__ */ m(g.ItemIndicator, { children: /* @__PURE__ */ m(u, { className: "size-4" }) })
77
+ }), /* @__PURE__ */ m(g.ItemText, { children: r })]
77
78
  });
78
79
  }
79
- w.displayName = h.Item.displayName;
80
- function T({ ref: e, className: t, ...r }) {
81
- return /* @__PURE__ */ p(h.Separator, {
80
+ T.displayName = g.Item.displayName;
81
+ function E({ ref: e, className: t, ...r }) {
82
+ return /* @__PURE__ */ m(g.Separator, {
82
83
  ref: e,
83
84
  className: n("-mx-1 my-1 h-px bg-border-subtle", t),
84
85
  ...r
85
86
  });
86
87
  }
87
- T.displayName = h.Separator.displayName;
88
- var E = "(max-width: 767px)";
89
- function D(e) {
90
- let [n, r] = c(!1);
91
- return s(() => {
88
+ E.displayName = g.Separator.displayName;
89
+ var D = "(max-width: 767px)";
90
+ function O(e) {
91
+ let [n, r] = l(!1);
92
+ return c(() => {
92
93
  if (!e || typeof window > "u" || !window.matchMedia || !t()) {
93
94
  r(!1);
94
95
  return;
95
96
  }
96
- let n = window.matchMedia(E);
97
+ let n = window.matchMedia(D);
97
98
  r(n.matches);
98
99
  let i = (e) => r(e.matches);
99
100
  return n.addEventListener("change", i), () => n.removeEventListener("change", i);
100
101
  }, [e]), n;
101
102
  }
102
- function O({ options: t, value: s, defaultValue: d, onValueChange: h, placeholder: _ = "Select…", title: b, disabled: x = !1, nativeSheet: C = !0, className: T, id: E, name: O, "aria-label": k }) {
103
- let A = D(C), [j, M] = c(d), [N, P] = c(!1), F = s ?? j, I = (e) => {
104
- s === void 0 && M(e), h?.(e);
103
+ function k({ options: t, value: s, defaultValue: c, onValueChange: f, placeholder: g = "Select…", title: v, disabled: x = !1, nativeSheet: S = !0, className: w, id: E, name: D, "aria-label": k }) {
104
+ let A = O(S), [j, M] = l(c), [N, P] = l(!1), F = s ?? j, I = (e) => {
105
+ s === void 0 && M(e), f?.(e);
105
106
  };
106
- if (!A) return /* @__PURE__ */ m(g, {
107
+ if (!A) return /* @__PURE__ */ h(_, {
107
108
  value: s,
108
- defaultValue: d,
109
+ defaultValue: c,
109
110
  onValueChange: I,
110
111
  disabled: x,
111
- name: O,
112
- children: [/* @__PURE__ */ p(y, {
112
+ name: D,
113
+ children: [/* @__PURE__ */ m(b, {
113
114
  id: E,
114
115
  "aria-label": k,
115
- className: T,
116
- children: /* @__PURE__ */ p(v, { placeholder: _ })
117
- }), /* @__PURE__ */ p(S, { children: t.map((e) => /* @__PURE__ */ p(w, {
116
+ className: w,
117
+ children: /* @__PURE__ */ m(y, { placeholder: g })
118
+ }), /* @__PURE__ */ m(C, { children: t.map((e) => /* @__PURE__ */ m(T, {
118
119
  value: e.value,
119
120
  disabled: e.disabled,
120
121
  children: e.label
121
122
  }, e.value)) })]
122
123
  });
123
124
  let L = t.find((e) => e.value === F);
124
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
125
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("button", {
125
126
  type: "button",
126
127
  id: E,
127
128
  "data-native-select-trigger": "",
@@ -131,32 +132,32 @@ function O({ options: t, value: s, defaultValue: d, onValueChange: h, placeholde
131
132
  "aria-expanded": N,
132
133
  disabled: x,
133
134
  onClick: () => P(!0),
134
- className: n("flex h-10 w-full items-center justify-between rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors duration-200 focus:border-border-focus focus:outline-none focus:shadow-[var(--shadow-focus)] focus:ring-1 focus:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50", !L && "text-text-placeholder", T),
135
- children: [/* @__PURE__ */ p("span", {
135
+ className: n("flex h-10 w-full items-center justify-between rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors duration-200 focus:border-border-focus focus:outline-none focus:shadow-[var(--shadow-focus)] focus:ring-1 focus:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50", !L && "text-text-placeholder", w),
136
+ children: [/* @__PURE__ */ m("span", {
136
137
  className: "line-clamp-1 text-start",
137
- children: L?.label ?? _
138
- }), /* @__PURE__ */ p(u, {
138
+ children: L?.label ?? g
139
+ }), /* @__PURE__ */ m(d, {
139
140
  className: "size-4 text-text-muted",
140
141
  "aria-hidden": "true"
141
142
  })]
142
- }), /* @__PURE__ */ p(r, {
143
+ }), /* @__PURE__ */ m(r, {
143
144
  open: N,
144
145
  onOpenChange: P,
145
- children: /* @__PURE__ */ m(i, {
146
+ children: /* @__PURE__ */ h(i, {
146
147
  showCloseButton: !1,
147
- children: [/* @__PURE__ */ p(a, {
148
+ children: [/* @__PURE__ */ m(a, {
148
149
  className: "px-1 text-center",
149
- children: /* @__PURE__ */ p(o, {
150
+ children: /* @__PURE__ */ m(o, {
150
151
  className: "text-base",
151
- children: b ?? _
152
+ children: v ?? g
152
153
  })
153
- }), /* @__PURE__ */ p("div", {
154
+ }), /* @__PURE__ */ m("div", {
154
155
  role: "listbox",
155
- "aria-label": k ?? b ?? _,
156
+ "aria-label": k ?? v ?? g,
156
157
  className: "flex flex-col pb-2",
157
158
  children: t.map((t) => {
158
159
  let r = t.value === F;
159
- return /* @__PURE__ */ m("button", {
160
+ return /* @__PURE__ */ h("button", {
160
161
  type: "button",
161
162
  role: "option",
162
163
  "data-native-select-option": "",
@@ -166,10 +167,10 @@ function O({ options: t, value: s, defaultValue: d, onValueChange: h, placeholde
166
167
  e(), I(t.value), P(!1);
167
168
  },
168
169
  className: n("flex h-12 w-full items-center justify-between rounded-button px-4 text-base text-text-primary transition-colors hover:bg-action-ghost-bgHover focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)] disabled:pointer-events-none disabled:opacity-50", r && "bg-[var(--color-accent-soft)] font-medium"),
169
- children: [/* @__PURE__ */ p("span", {
170
+ children: [/* @__PURE__ */ m("span", {
170
171
  className: "text-start",
171
172
  children: t.label
172
- }), r && /* @__PURE__ */ p(l, {
173
+ }), r && /* @__PURE__ */ m(u, {
173
174
  className: "size-4",
174
175
  "aria-hidden": "true"
175
176
  })]
@@ -179,4 +180,4 @@ function O({ options: t, value: s, defaultValue: d, onValueChange: h, placeholde
179
180
  })
180
181
  })] });
181
182
  }
182
- export { O as NativeSelect, g as Select, S as SelectContent, _ as SelectGroup, w as SelectItem, C as SelectLabel, x as SelectScrollDownButton, b as SelectScrollUpButton, T as SelectSeparator, y as SelectTrigger, v as SelectValue };
183
+ export { k as NativeSelect, _ as Select, C as SelectContent, v as SelectGroup, T as SelectItem, w as SelectLabel, S as SelectScrollDownButton, x as SelectScrollUpButton, E as SelectSeparator, b as SelectTrigger, y as SelectValue };
@@ -9,5 +9,11 @@ declare const TooltipProvider: import('react').FC<TooltipPrimitive.TooltipProvid
9
9
  */
10
10
  declare function Tooltip({ children, ...props }: ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>): import('react').JSX.Element;
11
11
  declare const TooltipTrigger: import('react').ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
12
+ /**
13
+ * ★ BOFF-15567: opened from inside a glass surface (the floating sidebar's panel and rail, a
14
+ * menu, a popover), the tooltip portals to <body>: rendered there, the surface's
15
+ * backdrop-filter would make the surface its containing block and the surface's overflow
16
+ * would cut it away (`./glass-surface`). Everywhere else it renders where it always did.
17
+ */
12
18
  declare const TooltipContent: import('react').ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
13
19
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -1,20 +1,24 @@
1
1
  import { cn as e } from "../shared-utils.js";
2
- import { forwardRef as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import * as r from "@radix-ui/react-tooltip";
2
+ import { useInsideGlassSurface as t } from "./glass-surface.js";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import * as i from "@radix-ui/react-tooltip";
5
6
  // src/ui/tooltip.tsx
6
- var i = r.Provider;
7
- function a({ children: e, ...t }) {
8
- return /* @__PURE__ */ n(r.Provider, { children: /* @__PURE__ */ n(r.Root, {
7
+ var a = i.Provider;
8
+ function o({ children: e, ...t }) {
9
+ return /* @__PURE__ */ r(i.Provider, { children: /* @__PURE__ */ r(i.Root, {
9
10
  ...t,
10
11
  children: e
11
12
  }) });
12
13
  }
13
- var o = r.Trigger, s = t(({ className: t, sideOffset: i = 4, ...a }, o) => /* @__PURE__ */ n(r.Content, {
14
- ref: o,
15
- sideOffset: i,
16
- className: e("z-50 overflow-hidden rounded-button bg-bg-inverse px-3 py-1.5 text-xs font-medium text-text-inverse shadow-elevation-3 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", t),
17
- ...a
18
- }));
19
- s.displayName = r.Content.displayName;
20
- export { a as Tooltip, s as TooltipContent, i as TooltipProvider, o as TooltipTrigger };
14
+ var s = i.Trigger, c = n(({ className: n, sideOffset: a = 4, ...o }, s) => {
15
+ let c = t(), l = /* @__PURE__ */ r(i.Content, {
16
+ ref: s,
17
+ sideOffset: a,
18
+ className: e("z-50 overflow-hidden rounded-button bg-bg-inverse px-3 py-1.5 text-xs font-medium text-text-inverse shadow-elevation-3 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
19
+ ...o
20
+ });
21
+ return c ? /* @__PURE__ */ r(i.Portal, { children: l }) : l;
22
+ });
23
+ c.displayName = i.Content.displayName;
24
+ export { o as Tooltip, c as TooltipContent, a as TooltipProvider, s as TooltipTrigger };