@nocoo/basalt 3.2.1 → 3.2.4
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/README.md +25 -19
- package/ai/COMPATIBILITY.md +41 -36
- package/ai/DESIGN.md +53 -47
- package/ai/INTEGRATION.md +814 -820
- package/ai/RECIPES.md +334 -135
- package/ai/USAGE.md +2 -2
- package/ai/registry.json +384 -27
- package/ai/sources.json +2 -2
- package/dist/assets/brand-mark.js +1 -2
- package/dist/charts/area.js +1 -2
- package/dist/charts/bar.js +1 -2
- package/dist/charts/bullet.js +1 -2
- package/dist/charts/chart-colors.js +1 -2
- package/dist/charts/charts.js +1 -2
- package/dist/charts/config.js +1 -2
- package/dist/charts/custom-chart.js +1 -2
- package/dist/charts/date-navigation.js +1 -2
- package/dist/charts/donut.js +1 -2
- package/dist/charts/frame.js +1 -2
- package/dist/charts/frame.js.map +1 -1
- package/dist/charts/funnel.js +1 -2
- package/dist/charts/gauge.js +1 -2
- package/dist/charts/grouped-bar.js +1 -2
- package/dist/charts/heatmap-calendar.js +3 -7
- package/dist/charts/heatmap-calendar.js.map +1 -1
- package/dist/charts/heatmap-matrix.js +1 -2
- package/dist/charts/item-list.js +1 -2
- package/dist/charts/legend.js +1 -2
- package/dist/charts/line.js +1 -2
- package/dist/charts/palette.js +1 -2
- package/dist/charts/radar.js +1 -2
- package/dist/charts/sample.js +1 -2
- package/dist/charts/sankey.js +1 -2
- package/dist/charts/series.js +1 -2
- package/dist/charts/slot-bar.js +1 -2
- package/dist/charts/sparkline.js +1 -2
- package/dist/charts/stacked-bar.js +1 -2
- package/dist/charts/stat-card.js +1 -2
- package/dist/charts/timeline.js +1 -2
- package/dist/charts/timeseries.js +1 -2
- package/dist/charts/tooltip.js +31 -27
- package/dist/charts/tooltip.js.map +1 -1
- package/dist/components/accordion.js +1 -2
- package/dist/components/alert-dialog.js +1 -2
- package/dist/components/app-header.js +1 -2
- package/dist/components/app-shell.js +1 -2
- package/dist/components/approval-card.js +1 -2
- package/dist/components/autocomplete.js +1 -2
- package/dist/components/avatar.js +1 -2
- package/dist/components/badge.js +1 -2
- package/dist/components/banner.js +1 -2
- package/dist/components/basalt-mark.js +1 -2
- package/dist/components/battery-meter.js +1 -2
- package/dist/components/breadcrumbs.js +1 -2
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +3 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/chat-bubble.js +1 -2
- package/dist/components/chat-composer.js +1 -2
- package/dist/components/chat-header.js +1 -2
- package/dist/components/chat-inbox.js +1 -2
- package/dist/components/chat-markdown.js +1 -2
- package/dist/components/chat-message.js +1 -2
- package/dist/components/checkbox.js +1 -2
- package/dist/components/clipboard-text.js +1 -2
- package/dist/components/code.js +1 -2
- package/dist/components/collapsible.js +1 -2
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.js +1 -2
- package/dist/components/command-palette.js +1 -2
- package/dist/components/confirm-dialog.js +3 -12
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/context-cards.js +1 -2
- package/dist/components/context-menu.js +1 -2
- package/dist/components/data-table.js +2 -7
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.js +7 -18
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/delete-resource.js +1 -2
- package/dist/components/description-list.js +1 -2
- package/dist/components/dialog.js +1 -2
- package/dist/components/diff-table.js +1 -2
- package/dist/components/dock.js +1 -2
- package/dist/components/dock.js.map +1 -1
- package/dist/components/dropdown-menu.js +1 -2
- package/dist/components/editable-nav-item.js +1 -2
- package/dist/components/empty.js +1 -2
- package/dist/components/fab.js +1 -2
- package/dist/components/field.js +1 -2
- package/dist/components/file-dropzone.js +1 -2
- package/dist/components/filter-bar.js +1 -2
- package/dist/components/flow.js +1 -2
- package/dist/components/grid.js +1 -2
- package/dist/components/hover-card.js +1 -2
- package/dist/components/icon-picker.js +1 -2
- package/dist/components/inline-editable.js +1 -2
- package/dist/components/input-area.js +1 -2
- package/dist/components/input-group.js +2 -3
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.js +1 -2
- package/dist/components/label.js +1 -2
- package/dist/components/layer-card.js +1 -2
- package/dist/components/link.js +1 -2
- package/dist/components/loader.js +1 -2
- package/dist/components/loading-screen.js +1 -2
- package/dist/components/menu-bar.js +1 -2
- package/dist/components/meter.js +1 -2
- package/dist/components/multi-select.js +1 -2
- package/dist/components/navigation-menu.js +1 -2
- package/dist/components/overlay.js +1 -2
- package/dist/components/page-header.js +1 -2
- package/dist/components/pagination.js +1 -2
- package/dist/components/popover.js +1 -2
- package/dist/components/prompt-bar.js +1 -2
- package/dist/components/radio.js +2 -7
- package/dist/components/radio.js.map +1 -1
- package/dist/components/recommendation-card.js +1 -2
- package/dist/components/resource-list.js +1 -2
- package/dist/components/responsive-master-detail.js +1 -2
- package/dist/components/scroll-area.js +1 -2
- package/dist/components/section-rule.js +1 -2
- package/dist/components/segment-control.js +1 -2
- package/dist/components/select.js +1 -2
- package/dist/components/sensitive-input.js +1 -2
- package/dist/components/separator.js +1 -2
- package/dist/components/sheet.js +1 -2
- package/dist/components/sidebar.d.ts +53 -19
- package/dist/components/sidebar.js +201 -100
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton-line.js +1 -2
- package/dist/components/slider.js +1 -2
- package/dist/components/stat-strip.js +1 -2
- package/dist/components/switch.js +1 -2
- package/dist/components/table-of-contents.js +1 -2
- package/dist/components/table-pager.js +1 -2
- package/dist/components/table.js +1 -2
- package/dist/components/tabs.js +1 -2
- package/dist/components/tag-badge.js +1 -2
- package/dist/components/tag-color-picker.js +1 -2
- package/dist/components/text.js +1 -2
- package/dist/components/theme-toggle.js +1 -2
- package/dist/components/thinking.js +1 -2
- package/dist/components/toast.js +1 -2
- package/dist/components/toggle-group.js +1 -2
- package/dist/components/toggle.js +1 -2
- package/dist/components/tool-chips.js +1 -2
- package/dist/components/toolbar.js +1 -2
- package/dist/components/tooltip.js +1 -2
- package/dist/components/typeahead-field.js +6 -21
- package/dist/components/typeahead-field.js.map +1 -1
- package/dist/components/upload-queue.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/models/agent-feedback.js +1 -2
- package/dist/models/avatar.js +1 -2
- package/dist/models/code.js +1 -2
- package/dist/models/context-cards.js +1 -2
- package/dist/models/diff-table.js +1 -2
- package/dist/models/recommendation.js +1 -2
- package/dist/providers/accent.js +2 -7
- package/dist/providers/accent.js.map +1 -1
- package/dist/providers/link.js +1 -2
- package/dist/providers/theme.js +2 -7
- package/dist/providers/theme.js.map +1 -1
- package/dist/styles/standalone.css +55 -11
- package/dist/styles/tailwind.css +2 -0
- package/dist/styles/tokens.css +51 -6
- package/dist/utils/cn.js +1 -2
- package/dist/utils/control-surface.js +1 -2
- package/dist/utils/navigation.d.ts +1 -1
- package/dist/utils/navigation.js +2 -3
- package/dist/utils/navigation.js.map +1 -1
- package/dist/utils/preference-store.js +1 -2
- package/dist/utils/selection-indicator.js +1 -2
- package/dist/utils/use-checkable-group.js +1 -2
- package/dist/utils/use-hover-highlight.js +2 -3
- package/dist/utils/use-hover-highlight.js.map +1 -1
- package/dist/viewmodels/use-approval-card.js +11 -13
- package/dist/viewmodels/use-approval-card.js.map +1 -1
- package/dist/viewmodels/use-chat-composer.js +1 -2
- package/dist/viewmodels/use-chat-message.js +1 -2
- package/dist/viewmodels/use-code-block.js +1 -2
- package/dist/viewmodels/use-code-block.js.map +1 -1
- package/dist/viewmodels/use-context-cards.js +1 -2
- package/dist/viewmodels/use-diff-table.js +1 -2
- package/dist/viewmodels/use-diff-table.js.map +1 -1
- package/dist/viewmodels/use-loader.js +1 -2
- package/dist/viewmodels/use-recommendation-card.js +1 -2
- package/dist/viewmodels/use-recommendation-card.js.map +1 -1
- package/dist/viewmodels/use-thinking.js +1 -2
- package/dist/viewmodels/use-tool-chips.js +1 -2
- package/package.json +1 -1
|
@@ -2,36 +2,40 @@
|
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
4
4
|
import { FOCUS_INSET as n, OVERLAY_LAYER as r, OVERLAY_MOTION as i } from "./overlay.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
import { Button as a } from "./button.js";
|
|
6
|
+
import { Dialog as o, DialogOverlay as s, DialogPortal as c } from "./dialog.js";
|
|
7
|
+
import { Collapsible as l, CollapsibleContent as u, CollapsibleTrigger as d } from "./collapsible.js";
|
|
8
|
+
import { useHoverHighlight as f } from "../utils/use-hover-highlight.js";
|
|
9
|
+
import { Tooltip as p, TooltipContent as m, TooltipProvider as h, TooltipTrigger as g } from "./tooltip.js";
|
|
10
|
+
import { SkeletonLine as _ } from "./skeleton-line.js";
|
|
11
|
+
import { Link as v } from "./link.js";
|
|
12
|
+
import { NAV_ITEM_CLASS as y, NAV_LIST_CLASS as b, NAV_ROW_CLASS as x } from "../utils/navigation.js";
|
|
13
|
+
import { createContext as S, useCallback as C, useContext as w, useLayoutEffect as T, useRef as E, useState as D } from "react";
|
|
14
|
+
import { Slot as O } from "@radix-ui/react-slot";
|
|
15
|
+
import { ChevronUp as k, PanelLeft as A, Search as j } from "lucide-react";
|
|
16
|
+
import { jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
17
|
+
import * as P from "@radix-ui/react-dialog";
|
|
18
|
+
// src/components/sidebar.tsx
|
|
19
|
+
var F = S(null);
|
|
20
|
+
function I() {
|
|
21
|
+
let e = w(F);
|
|
18
22
|
if (!e) throw Error("useSidebar must be used within SidebarProvider");
|
|
19
23
|
return e;
|
|
20
24
|
}
|
|
21
|
-
function
|
|
22
|
-
let [l, u] =
|
|
23
|
-
m(
|
|
24
|
-
}, []), g =
|
|
25
|
-
|
|
26
|
-
o && !
|
|
25
|
+
function L({ collapsed: e, defaultCollapsed: t = !1, onCollapsedChange: n, side: r = "left", loading: i = !1, peek: a = !1, overlay: o = !1, defaultWidth: s = 260, children: c }) {
|
|
26
|
+
let [l, u] = D(t), [d, f] = D(!1), [p, m] = D(() => R(s)), h = C((e) => {
|
|
27
|
+
m(R(e));
|
|
28
|
+
}, []), g = E(null), _ = E(e ?? t), v = E(o), y = e ?? l;
|
|
29
|
+
T(() => {
|
|
30
|
+
o && !y && (_.current || !v.current) && document.activeElement instanceof HTMLElement && (g.current = document.activeElement), _.current = y, v.current = o;
|
|
27
31
|
});
|
|
28
|
-
let
|
|
32
|
+
let b = C((t) => {
|
|
29
33
|
!t && document.activeElement instanceof HTMLElement && (g.current = document.activeElement), e === void 0 && u(t), n?.(t);
|
|
30
34
|
}, [e, n]);
|
|
31
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ M(F.Provider, {
|
|
32
36
|
value: {
|
|
33
|
-
collapsed:
|
|
34
|
-
setCollapsed:
|
|
37
|
+
collapsed: y,
|
|
38
|
+
setCollapsed: b,
|
|
35
39
|
side: r,
|
|
36
40
|
loading: i,
|
|
37
41
|
peek: a,
|
|
@@ -45,11 +49,11 @@ function k({ collapsed: e, defaultCollapsed: t = !1, onCollapsedChange: n, side:
|
|
|
45
49
|
children: c
|
|
46
50
|
});
|
|
47
51
|
}
|
|
48
|
-
function
|
|
52
|
+
function R(e) {
|
|
49
53
|
return Math.min(400, Math.max(180, e));
|
|
50
54
|
}
|
|
51
|
-
function
|
|
52
|
-
return /* @__PURE__ */
|
|
55
|
+
function z({ side: t, width: n, onWidth: r }) {
|
|
56
|
+
return /* @__PURE__ */ M("div", {
|
|
53
57
|
role: "separator",
|
|
54
58
|
"aria-orientation": "vertical",
|
|
55
59
|
"aria-valuenow": n,
|
|
@@ -62,7 +66,7 @@ function j({ side: t, width: n, onWidth: r }) {
|
|
|
62
66
|
e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId);
|
|
63
67
|
let i = e.clientX, a = n, o = e.currentTarget, s = (e) => {
|
|
64
68
|
let n = t === "right" ? i - e.clientX : e.clientX - i;
|
|
65
|
-
r(
|
|
69
|
+
r(R(a + n));
|
|
66
70
|
}, c = () => {
|
|
67
71
|
o.removeEventListener("pointermove", s), o.removeEventListener("pointerup", c), o.removeEventListener("pointercancel", c);
|
|
68
72
|
};
|
|
@@ -72,47 +76,47 @@ function j({ side: t, width: n, onWidth: r }) {
|
|
|
72
76
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
73
77
|
e.preventDefault();
|
|
74
78
|
let i = e.key === "ArrowRight" ? 1 : -1;
|
|
75
|
-
r(
|
|
79
|
+
r(R(n + (t === "right" ? -i * 8 : i * 8)));
|
|
76
80
|
}
|
|
77
81
|
});
|
|
78
82
|
}
|
|
79
|
-
function
|
|
80
|
-
let h =
|
|
81
|
-
className: "flex flex-col gap-basalt-space-lg
|
|
83
|
+
function B({ collapsed: n, resizable: a = !0, className: l, children: u, onMouseEnter: d, onMouseLeave: f, style: p, ...m }) {
|
|
84
|
+
let h = w(F), g = h ? h.collapsed && !(h.peek && h.peeking) : n ?? !1, v = h?.side ?? "left", y = h?.overlay ?? !1, b = h?.width ?? 260, x = h?.loading ? /* @__PURE__ */ N("div", {
|
|
85
|
+
className: "flex flex-col gap-basalt-space-lg px-basalt-layout-lg py-basalt-space-lg",
|
|
82
86
|
role: "status",
|
|
83
87
|
"aria-live": "polite",
|
|
84
88
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ M(_, {}),
|
|
90
|
+
/* @__PURE__ */ M(_, {}),
|
|
91
|
+
/* @__PURE__ */ M(_, {})
|
|
88
92
|
]
|
|
89
|
-
}) :
|
|
90
|
-
side:
|
|
93
|
+
}) : u, S = h && a && !g ? /* @__PURE__ */ M(z, {
|
|
94
|
+
side: v,
|
|
91
95
|
width: h.width,
|
|
92
96
|
onWidth: h.setWidth
|
|
93
|
-
}) : null, C = e(t, "relative flex shrink-0 flex-col bg-basalt-background text-basalt-base text-basalt-foreground", i,
|
|
94
|
-
return y && h ? /* @__PURE__ */
|
|
97
|
+
}) : null, C = e(t, "relative flex shrink-0 flex-col bg-basalt-background text-basalt-base text-basalt-foreground", i, l);
|
|
98
|
+
return y && h ? /* @__PURE__ */ M(o, {
|
|
95
99
|
open: !h.collapsed,
|
|
96
100
|
onOpenChange: (e) => h.setCollapsed(!e),
|
|
97
|
-
children: /* @__PURE__ */
|
|
101
|
+
children: /* @__PURE__ */ N(c, { children: [/* @__PURE__ */ M(s, {}), /* @__PURE__ */ N(P.Content, {
|
|
98
102
|
"data-basalt-sidebar": "",
|
|
99
103
|
"aria-label": "Sidebar",
|
|
100
104
|
"data-overlay": "",
|
|
101
|
-
"data-side":
|
|
105
|
+
"data-side": v,
|
|
102
106
|
"aria-busy": h.loading || void 0,
|
|
103
|
-
onMouseEnter:
|
|
104
|
-
onMouseLeave:
|
|
107
|
+
onMouseEnter: d,
|
|
108
|
+
onMouseLeave: f,
|
|
105
109
|
ref: (e) => {
|
|
106
110
|
e && document.activeElement instanceof HTMLElement && !e.contains(document.activeElement) && (h.lastFocusRef.current = document.activeElement);
|
|
107
111
|
},
|
|
108
112
|
onOpenAutoFocus: (e) => {
|
|
109
113
|
let t = "relatedTarget" in e ? e.relatedTarget : null;
|
|
110
|
-
t instanceof HTMLElement && (h.lastFocusRef.current = t);
|
|
114
|
+
t instanceof HTMLElement && (h.lastFocusRef.current = t), e.target instanceof HTMLElement && (e.preventDefault(), e.target.focus());
|
|
111
115
|
},
|
|
112
116
|
onCloseAutoFocus: (e) => {
|
|
113
117
|
e.preventDefault(), h.lastFocusRef.current?.focus();
|
|
114
118
|
},
|
|
115
|
-
className: e(C, r, "fixed inset-y-0 overflow-hidden shadow-md",
|
|
119
|
+
className: e(C, r, "fixed inset-y-0 overflow-hidden shadow-md", v === "right" ? "right-0" : "left-0"),
|
|
116
120
|
style: {
|
|
117
121
|
width: b,
|
|
118
122
|
...p
|
|
@@ -120,18 +124,18 @@ function M({ collapsed: n, className: c, children: l, onMouseEnter: u, onMouseLe
|
|
|
120
124
|
...m,
|
|
121
125
|
children: [x, S]
|
|
122
126
|
})] })
|
|
123
|
-
}) : /* @__PURE__ */
|
|
127
|
+
}) : /* @__PURE__ */ N("aside", {
|
|
124
128
|
"data-basalt-sidebar": "",
|
|
125
129
|
"data-collapsed": g ? "" : void 0,
|
|
126
|
-
"data-side":
|
|
130
|
+
"data-side": v,
|
|
127
131
|
"aria-busy": h?.loading || void 0,
|
|
128
132
|
onMouseEnter: (e) => {
|
|
129
|
-
h?.peek && h.collapsed && h.setPeeking(!0),
|
|
133
|
+
h?.peek && h.collapsed && h.setPeeking(!0), d?.(e);
|
|
130
134
|
},
|
|
131
135
|
onMouseLeave: (e) => {
|
|
132
|
-
h?.peek && h.setPeeking(!1),
|
|
136
|
+
h?.peek && h.setPeeking(!1), f?.(e);
|
|
133
137
|
},
|
|
134
|
-
className: e(C, "sticky overflow-hidden transition-[width] basalt-motion duration-basalt-normal ease-basalt",
|
|
138
|
+
className: e(C, "sticky overflow-hidden transition-[width] basalt-motion duration-basalt-normal ease-basalt", v === "right" ? "order-last" : void 0, g && "w-basalt-rail"),
|
|
135
139
|
style: g ? p : {
|
|
136
140
|
width: b,
|
|
137
141
|
...p
|
|
@@ -140,121 +144,219 @@ function M({ collapsed: n, className: c, children: l, onMouseEnter: u, onMouseLe
|
|
|
140
144
|
children: [x, S]
|
|
141
145
|
});
|
|
142
146
|
}
|
|
143
|
-
var
|
|
144
|
-
function
|
|
145
|
-
return /* @__PURE__ */
|
|
147
|
+
var V = "min-h-[calc(var(--basalt-line-row)+2*var(--basalt-space-lg))] py-basalt-space-lg";
|
|
148
|
+
function H({ className: t, ...n }) {
|
|
149
|
+
return /* @__PURE__ */ M("div", {
|
|
146
150
|
"data-slot": "sidebar-header",
|
|
147
|
-
className: e("flex h-basalt-14 shrink-0 items-center gap-basalt-row-gap px-basalt-
|
|
151
|
+
className: e("flex h-basalt-14 shrink-0 items-center gap-basalt-row-gap px-basalt-layout-lg", t),
|
|
148
152
|
...n
|
|
149
153
|
});
|
|
150
154
|
}
|
|
151
|
-
function
|
|
152
|
-
return /* @__PURE__ */
|
|
155
|
+
function U({ logo: t, name: n, version: r, action: i, className: a, ...o }) {
|
|
156
|
+
return /* @__PURE__ */ N("div", {
|
|
157
|
+
"data-slot": "sidebar-brand",
|
|
158
|
+
className: e("relative flex h-full min-w-0 flex-1 items-center gap-basalt-row-gap", a),
|
|
159
|
+
...o,
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ M("span", {
|
|
162
|
+
"data-slot": "sidebar-brand-logo",
|
|
163
|
+
className: "flex w-basalt-sidebar-brand-slot shrink-0 items-center justify-center",
|
|
164
|
+
children: t
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ N("div", {
|
|
167
|
+
className: "flex min-w-0 flex-1 items-center gap-basalt-row-gap overflow-hidden whitespace-nowrap",
|
|
168
|
+
children: [/* @__PURE__ */ M("span", {
|
|
169
|
+
className: "min-w-0 flex-1 truncate text-basalt-base font-semibold",
|
|
170
|
+
children: n
|
|
171
|
+
}), r == null ? null : /* @__PURE__ */ M("span", {
|
|
172
|
+
className: "shrink-0 text-basalt-sm text-basalt-muted-foreground",
|
|
173
|
+
children: r
|
|
174
|
+
})]
|
|
175
|
+
}),
|
|
176
|
+
i ? /* @__PURE__ */ M("div", {
|
|
177
|
+
"data-slot": "sidebar-brand-action",
|
|
178
|
+
className: "basalt-sidebar-brand-action",
|
|
179
|
+
children: i
|
|
180
|
+
}) : null
|
|
181
|
+
]
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function W({ "aria-label": e, expandLabel: t = "Expand sidebar", collapseLabel: n = "Collapse sidebar", onClick: r, variant: i = "ghost", ...o }) {
|
|
185
|
+
let { collapsed: s, setCollapsed: c, side: l } = I(), u = e ?? (s ? t : n);
|
|
186
|
+
return /* @__PURE__ */ M(h, { children: /* @__PURE__ */ N(p, { children: [/* @__PURE__ */ M(g, {
|
|
187
|
+
asChild: !0,
|
|
188
|
+
children: /* @__PURE__ */ M(a, {
|
|
189
|
+
...o,
|
|
190
|
+
variant: i,
|
|
191
|
+
size: "icon-sm",
|
|
192
|
+
"aria-expanded": !s,
|
|
193
|
+
"aria-label": u,
|
|
194
|
+
onClick: (e) => {
|
|
195
|
+
r?.(e), e.defaultPrevented || c(!s);
|
|
196
|
+
},
|
|
197
|
+
children: /* @__PURE__ */ M(A, { "aria-hidden": "true" })
|
|
198
|
+
})
|
|
199
|
+
}), /* @__PURE__ */ M(m, {
|
|
200
|
+
side: l === "right" ? "left" : "right",
|
|
201
|
+
children: u
|
|
202
|
+
})] }) });
|
|
203
|
+
}
|
|
204
|
+
function G({ shortcut: n = "⌘K", className: r, children: i, ...a }) {
|
|
205
|
+
return /* @__PURE__ */ N("button", {
|
|
153
206
|
type: "button",
|
|
154
|
-
className: e(t,
|
|
207
|
+
className: e(t, x, V, "w-full cursor-pointer bg-basalt-secondary transition-colors basalt-motion hover:bg-basalt-hover", r),
|
|
155
208
|
...a,
|
|
156
209
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ M(j, {
|
|
158
211
|
className: "h-basalt-4 w-basalt-4 text-basalt-muted-foreground",
|
|
159
212
|
strokeWidth: 1.5
|
|
160
213
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ M("span", {
|
|
162
215
|
className: "flex-1 text-left text-basalt-base text-basalt-muted-foreground",
|
|
163
216
|
children: i
|
|
164
217
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ M("kbd", {
|
|
166
219
|
className: "pointer-events-none hidden rounded-basalt-sm border border-basalt-border bg-basalt-card px-basalt-space-md py-basalt-space-xs text-basalt-sm font-medium text-basalt-muted-foreground sm:inline-block",
|
|
167
220
|
children: n
|
|
168
221
|
})
|
|
169
222
|
]
|
|
170
223
|
});
|
|
171
224
|
}
|
|
172
|
-
function
|
|
173
|
-
let r =
|
|
174
|
-
return /* @__PURE__ */
|
|
225
|
+
function K({ className: t, ...n }) {
|
|
226
|
+
let r = f(void 0, { restoreOnPointerLeave: !1 });
|
|
227
|
+
return /* @__PURE__ */ M("nav", {
|
|
175
228
|
ref: r,
|
|
176
229
|
"data-slot": "sidebar-nav",
|
|
177
|
-
className: e(
|
|
230
|
+
className: e(b, "basalt-sidebar-nav min-h-0 flex-1 flex-col overflow-y-auto overscroll-y-contain", t),
|
|
178
231
|
...n
|
|
179
232
|
});
|
|
180
233
|
}
|
|
181
|
-
function
|
|
182
|
-
return /* @__PURE__ */
|
|
234
|
+
function q({ className: t, ...n }) {
|
|
235
|
+
return /* @__PURE__ */ M("p", {
|
|
183
236
|
"data-slot": "sidebar-partition",
|
|
184
237
|
className: e("shrink-0 px-basalt-row-x pt-basalt-layout pb-basalt-space-lg text-basalt-sm font-semibold tracking-wide text-basalt-foreground uppercase", t),
|
|
185
238
|
...n
|
|
186
239
|
});
|
|
187
240
|
}
|
|
188
|
-
function
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
241
|
+
function J(e) {
|
|
242
|
+
if (e.asChild && e.disabled) throw Error("Sidebar asChild rows do not support disabled; use a native button row");
|
|
243
|
+
}
|
|
244
|
+
function Y(t) {
|
|
245
|
+
J(t);
|
|
246
|
+
let n = e(y, V, "w-full text-inherit no-underline hover:no-underline", t.className);
|
|
247
|
+
if (typeof t.href == "string") {
|
|
248
|
+
let { href: e, active: r = !1, children: i, className: a, ...o } = t;
|
|
249
|
+
return /* @__PURE__ */ M(v, {
|
|
250
|
+
...o,
|
|
251
|
+
href: e,
|
|
252
|
+
"aria-current": r ? "page" : void 0,
|
|
253
|
+
"data-basalt-hover-item": "",
|
|
254
|
+
"data-sidebar-row": "",
|
|
255
|
+
"data-hover-selected": r,
|
|
256
|
+
className: n,
|
|
257
|
+
children: i
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
let { asChild: r = !1, type: i = "button", active: a = !1, children: o, className: s, ...c } = t, l = {
|
|
261
|
+
"aria-current": a ? "page" : void 0,
|
|
192
262
|
"data-basalt-hover-item": "",
|
|
193
263
|
"data-sidebar-row": "",
|
|
194
|
-
"data-hover-selected":
|
|
195
|
-
className:
|
|
196
|
-
|
|
264
|
+
"data-hover-selected": a,
|
|
265
|
+
className: n
|
|
266
|
+
};
|
|
267
|
+
return r ? /* @__PURE__ */ M(O, {
|
|
268
|
+
...c,
|
|
269
|
+
...l,
|
|
270
|
+
children: o
|
|
271
|
+
}) : /* @__PURE__ */ M("button", {
|
|
272
|
+
...c,
|
|
273
|
+
type: i,
|
|
274
|
+
...l,
|
|
275
|
+
children: o
|
|
197
276
|
});
|
|
198
277
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
278
|
+
function X(t) {
|
|
279
|
+
J(t);
|
|
280
|
+
let n = e(y, V, "relative w-basalt-control justify-center text-inherit no-underline hover:no-underline", t.className);
|
|
281
|
+
if (typeof t.href == "string") {
|
|
282
|
+
let { href: e, active: r = !1, children: i, className: a, ...o } = t;
|
|
283
|
+
return /* @__PURE__ */ M(v, {
|
|
284
|
+
...o,
|
|
285
|
+
href: e,
|
|
286
|
+
"aria-current": r ? "page" : void 0,
|
|
287
|
+
"data-basalt-hover-item": "",
|
|
288
|
+
"data-sidebar-row": "",
|
|
289
|
+
"data-hover-selected": r,
|
|
290
|
+
className: n,
|
|
291
|
+
children: i
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
let { asChild: r = !1, type: i = "button", active: a = !1, children: o, className: s, ...c } = t, l = {
|
|
295
|
+
"aria-current": a ? "page" : void 0,
|
|
203
296
|
"data-basalt-hover-item": "",
|
|
204
297
|
"data-sidebar-row": "",
|
|
205
|
-
"data-hover-selected":
|
|
206
|
-
className:
|
|
207
|
-
|
|
298
|
+
"data-hover-selected": a,
|
|
299
|
+
className: n
|
|
300
|
+
};
|
|
301
|
+
return r ? /* @__PURE__ */ M(O, {
|
|
302
|
+
...c,
|
|
303
|
+
...l,
|
|
304
|
+
children: o
|
|
305
|
+
}) : /* @__PURE__ */ M("button", {
|
|
306
|
+
...c,
|
|
307
|
+
type: i,
|
|
308
|
+
...l,
|
|
309
|
+
children: o
|
|
208
310
|
});
|
|
209
311
|
}
|
|
210
|
-
function
|
|
211
|
-
let [o, s] =
|
|
212
|
-
return /* @__PURE__ */
|
|
312
|
+
function Z({ label: t, defaultOpen: r = !0, children: a }) {
|
|
313
|
+
let [o, s] = D(r);
|
|
314
|
+
return /* @__PURE__ */ N(l, {
|
|
213
315
|
open: o,
|
|
214
316
|
onOpenChange: s,
|
|
215
317
|
"data-slot": "sidebar-group",
|
|
216
318
|
className: "shrink-0 pt-basalt-layout-sm",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ M(d, {
|
|
218
320
|
asChild: !0,
|
|
219
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ N("button", {
|
|
220
322
|
type: "button",
|
|
221
323
|
"data-slot": "sidebar-group-label",
|
|
222
324
|
className: e("flex w-full cursor-pointer items-center justify-between gap-basalt-row-gap rounded-basalt-md px-basalt-row-x py-basalt-space-lg text-left text-basalt-sm font-semibold leading-basalt-row tracking-wide text-basalt-muted-foreground uppercase transition-colors basalt-motion hover:text-basalt-foreground", n),
|
|
223
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ M("span", {
|
|
224
326
|
className: "min-w-0 truncate",
|
|
225
327
|
children: t
|
|
226
|
-
}), /* @__PURE__ */
|
|
328
|
+
}), /* @__PURE__ */ M(k, {
|
|
227
329
|
className: e("h-basalt-4 w-basalt-4 text-basalt-muted-foreground transition-transform basalt-motion duration-basalt-normal", i, !o && "rotate-180"),
|
|
228
330
|
strokeWidth: 1.5
|
|
229
331
|
})]
|
|
230
332
|
})
|
|
231
|
-
}), /* @__PURE__ */
|
|
333
|
+
}), /* @__PURE__ */ M(u, {
|
|
232
334
|
unstyled: !0,
|
|
233
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ M("div", {
|
|
234
336
|
className: "flex flex-col gap-basalt-nav-gap pt-basalt-nav-gap",
|
|
235
337
|
children: a
|
|
236
338
|
})
|
|
237
339
|
})]
|
|
238
340
|
});
|
|
239
341
|
}
|
|
240
|
-
function
|
|
241
|
-
return /* @__PURE__ */
|
|
342
|
+
function Q({ className: t, ...n }) {
|
|
343
|
+
return /* @__PURE__ */ M("div", {
|
|
242
344
|
"data-slot": "sidebar-footer",
|
|
243
|
-
className: e("flex shrink-0 flex-col gap-basalt-content-gap px-basalt-layout pt-basalt-space-lg pb-basalt-layout", t),
|
|
345
|
+
className: e("flex shrink-0 flex-col gap-basalt-content-gap px-basalt-layout-lg pt-basalt-space-lg pb-basalt-layout", t),
|
|
244
346
|
...n
|
|
245
347
|
});
|
|
246
348
|
}
|
|
247
|
-
function
|
|
248
|
-
return /* @__PURE__ */
|
|
349
|
+
function $({ name: t, email: n, avatar: r, action: i, className: a }) {
|
|
350
|
+
return /* @__PURE__ */ N("div", {
|
|
249
351
|
className: e("flex items-center gap-basalt-space-lg", a),
|
|
250
352
|
children: [
|
|
251
353
|
r,
|
|
252
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ N("div", {
|
|
253
355
|
className: "min-w-0 flex-1",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ M("p", {
|
|
255
357
|
className: "truncate text-basalt-base font-medium text-basalt-foreground",
|
|
256
358
|
children: t
|
|
257
|
-
}), n ? /* @__PURE__ */
|
|
359
|
+
}), n ? /* @__PURE__ */ M("p", {
|
|
258
360
|
className: "truncate text-basalt-sm text-basalt-muted-foreground",
|
|
259
361
|
children: n
|
|
260
362
|
}) : null]
|
|
@@ -263,15 +365,14 @@ function H({ name: t, email: n, avatar: r, action: i, className: a }) {
|
|
|
263
365
|
]
|
|
264
366
|
});
|
|
265
367
|
}
|
|
266
|
-
function
|
|
267
|
-
return /* @__PURE__ */
|
|
368
|
+
function ee({ mobileSurface: t = "inset", className: n, ...r }) {
|
|
369
|
+
return /* @__PURE__ */ M("div", {
|
|
268
370
|
"data-basalt-surface-root": "",
|
|
269
371
|
"data-basalt-island": t,
|
|
270
372
|
className: e("min-h-0 min-w-0 flex-1 bg-basalt-card text-basalt-card-foreground md:rounded-basalt-island md:p-basalt-layout-lg lg:px-basalt-layout-xl", t === "inset" ? "rounded-basalt-lg p-basalt-layout shadow-sm ring-1 ring-basalt-border/40" : "md:shadow-sm md:ring-1 md:ring-basalt-border/40", n),
|
|
271
373
|
...r
|
|
272
374
|
});
|
|
273
375
|
}
|
|
274
|
-
|
|
275
|
-
export { U as ContentIsland, M as Sidebar, V as SidebarFooter, B as SidebarGroup, P as SidebarHeader, z as SidebarIconItem, R as SidebarItem, I as SidebarNav, L as SidebarPartition, k as SidebarProvider, F as SidebarSearch, H as SidebarUser, O as useSidebar };
|
|
376
|
+
export { ee as ContentIsland, B as Sidebar, U as SidebarBrand, Q as SidebarFooter, Z as SidebarGroup, H as SidebarHeader, X as SidebarIconItem, Y as SidebarItem, K as SidebarNav, q as SidebarPartition, L as SidebarProvider, G as SidebarSearch, W as SidebarToggle, $ as SidebarUser, I as useSidebar };
|
|
276
377
|
|
|
277
378
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","names":["DialogPrimitive","SidebarContext","createContext","useSidebar","context","useContext","SidebarProvider","uncontrolled","setUncontrolled","useState","defaultCollapsed","peeking","setPeeking","width","setWidthState","clampSidebarWidth","defaultWidth","setWidth","useCallback","next","lastFocusRef","useRef","prevCollapsed","collapsed","prevOverlay","overlay","resolved","setCollapsed","onCollapsedChange","SidebarResize","cn","side","event","startX","startWidth","target","onMove","delta","move","onUp","dir","Sidebar","collapsedProp","props","body","SkeletonLine","children","resize","frameClass","BASALT_UI_CLASS","OVERLAY_MOTION","className","Dialog","open","DialogPortal","DialogOverlay","node","from","OVERLAY_LAYER","style","onMouseEnter","onMouseLeave","SIDEBAR_ROW_CLASS","SidebarHeader","SidebarSearch","NAV_ROW_CLASS","Search","shortcut","SidebarNav","highlightRef","useHoverHighlight","NAV_LIST_CLASS","SidebarPartition","SidebarItem","active","NAV_ITEM_CLASS","SidebarIconItem","SidebarGroup","setOpen","defaultOpen","Collapsible","CollapsibleTrigger","FOCUS_INSET","label","ChevronUp","CollapsibleContent","SidebarFooter","SidebarUser","avatar","name","email","action","ContentIsland","mobileSurface"],"sources":["../../src/components/sidebar.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { ChevronUp, Search } from \"lucide-react\";\nimport {\n\ttype ButtonHTMLAttributes,\n\tcreateContext,\n\ttype HTMLAttributes,\n\ttype ReactNode,\n\ttype PointerEvent as ReactPointerEvent,\n\ttype RefObject,\n\tuseCallback,\n\tuseContext,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { BASALT_UI_CLASS } from \"../utils/control-surface\";\nimport { NAV_ITEM_CLASS, NAV_LIST_CLASS, NAV_ROW_CLASS } from \"../utils/navigation\";\nimport { useHoverHighlight } from \"../utils/use-hover-highlight\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"./collapsible\";\nimport { Dialog, DialogOverlay, DialogPortal } from \"./dialog\";\nimport { FOCUS_INSET, OVERLAY_LAYER, OVERLAY_MOTION } from \"./overlay\";\nimport { SkeletonLine } from \"./skeleton-line\";\n\nexport type SidebarSide = \"left\" | \"right\";\n\nexport interface SidebarContextValue {\n\t/**\n\t * Whether the sidebar is currently collapsed.\n\t */\n\tcollapsed: boolean;\n\t/**\n\t * Callback to update the collapsed state.\n\t */\n\tsetCollapsed: (next: boolean) => void;\n\t/**\n\t * Which edge the sidebar occupies.\n\t */\n\tside: SidebarSide;\n\t/**\n\t * Whether the sidebar is currently displaying a loading skeleton.\n\t */\n\tloading: boolean;\n\t/**\n\t * Whether the sidebar rail expands on pointer hover.\n\t */\n\tpeek: boolean;\n\t/**\n\t * Whether the sidebar is actively hovering in peek preview mode.\n\t */\n\tpeeking: boolean;\n\t/**\n\t * Callback to update the peek preview state.\n\t */\n\tsetPeeking: (next: boolean) => void;\n\t/**\n\t * Whether the sidebar is rendering as a modal overlay drawer instead of in-flow layout chrome.\n\t */\n\toverlay: boolean;\n\t/**\n\t * Current expanded width in pixels, clamped between 180 and 400.\n\t */\n\twidth: number;\n\t/**\n\t * Callback to update the sidebar width. Value is clamped between 180 and 400 pixels.\n\t */\n\tsetWidth: (next: number) => void;\n\t/**\n\t * Reference to the last active element that held focus before opening the sidebar drawer.\n\t */\n\tlastFocusRef: RefObject<HTMLElement | null>;\n}\n\nconst SidebarContext = createContext<SidebarContextValue | null>(null);\n\n/**\n * Accesses the sidebar context value. Must be used within a `SidebarProvider`; throws an error if called outside.\n * Returns the active sidebar state and control callbacks.\n */\nexport function useSidebar(): SidebarContextValue {\n\tconst context = useContext(SidebarContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSidebar must be used within SidebarProvider\");\n\t}\n\treturn context;\n}\n\nexport type SidebarProviderProps = {\n\t/**\n\t * The controlled collapsed state.\n\t */\n\tcollapsed?: boolean;\n\t/**\n\t * The uncontrolled initial collapsed state.\n\t * @default false\n\t */\n\tdefaultCollapsed?: boolean;\n\t/**\n\t * Called when the collapsed state changes.\n\t */\n\tonCollapsedChange?: (collapsed: boolean) => void;\n\t/**\n\t * Which edge the sidebar occupies.\n\t * @default left\n\t */\n\tside?: SidebarSide;\n\t/**\n\t * Replace the nav with a loading skeleton.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * Expand the collapsed rail on hover.\n\t * @default false\n\t */\n\tpeek?: boolean;\n\t/**\n\t * Render as an overlay instead of in-flow chrome.\n\t * @default false\n\t */\n\toverlay?: boolean;\n\t/**\n\t * Initial expanded width in pixels, clamped between 180 and 400.\n\t * @default 260\n\t */\n\tdefaultWidth?: number;\n\t/**\n\t * Sidebar chrome and page content.\n\t */\n\tchildren: ReactNode;\n};\n\nexport function SidebarProvider({\n\tcollapsed,\n\tdefaultCollapsed = false,\n\tonCollapsedChange,\n\tside = \"left\",\n\tloading = false,\n\tpeek = false,\n\toverlay = false,\n\tdefaultWidth = 260,\n\tchildren,\n}: SidebarProviderProps) {\n\tconst [uncontrolled, setUncontrolled] = useState(defaultCollapsed);\n\tconst [peeking, setPeeking] = useState(false);\n\tconst [width, setWidthState] = useState(() => clampSidebarWidth(defaultWidth));\n\tconst setWidth = useCallback((next: number) => {\n\t\tsetWidthState(clampSidebarWidth(next));\n\t}, []);\n\tconst lastFocusRef = useRef<HTMLElement | null>(null);\n\tconst prevCollapsed = useRef(collapsed ?? defaultCollapsed);\n\tconst prevOverlay = useRef(overlay);\n\tconst resolved = collapsed ?? uncontrolled;\n\tuseLayoutEffect(() => {\n\t\tif (\n\t\t\toverlay &&\n\t\t\t!resolved &&\n\t\t\t(prevCollapsed.current || !prevOverlay.current) &&\n\t\t\tdocument.activeElement instanceof HTMLElement\n\t\t) {\n\t\t\tlastFocusRef.current = document.activeElement;\n\t\t}\n\t\tprevCollapsed.current = resolved;\n\t\tprevOverlay.current = overlay;\n\t});\n\tconst setCollapsed = useCallback(\n\t\t(next: boolean) => {\n\t\t\tif (!next && document.activeElement instanceof HTMLElement) {\n\t\t\t\tlastFocusRef.current = document.activeElement;\n\t\t\t}\n\t\t\tif (collapsed === undefined) {\n\t\t\t\tsetUncontrolled(next);\n\t\t\t}\n\t\t\tonCollapsedChange?.(next);\n\t\t},\n\t\t[collapsed, onCollapsedChange],\n\t);\n\treturn (\n\t\t<SidebarContext.Provider\n\t\t\tvalue={{\n\t\t\t\tcollapsed: resolved,\n\t\t\t\tsetCollapsed,\n\t\t\t\tside,\n\t\t\t\tloading,\n\t\t\t\tpeek,\n\t\t\t\tpeeking,\n\t\t\t\tsetPeeking,\n\t\t\t\toverlay,\n\t\t\t\twidth,\n\t\t\t\tsetWidth,\n\t\t\t\tlastFocusRef,\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</SidebarContext.Provider>\n\t);\n}\n\nexport type SidebarProps = HTMLAttributes<HTMLElement> & {\n\t/**\n\t * Collapse the rail when no provider is present.\n\t * @default false\n\t */\n\tcollapsed?: boolean;\n};\n\nfunction clampSidebarWidth(next: number) {\n\treturn Math.min(400, Math.max(180, next));\n}\n\nfunction SidebarResize({\n\tside,\n\twidth,\n\tonWidth,\n}: {\n\tside: SidebarSide;\n\twidth: number;\n\tonWidth: (next: number) => void;\n}) {\n\tconst onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n\t\tevent.preventDefault();\n\t\tevent.currentTarget.setPointerCapture(event.pointerId);\n\t\tconst startX = event.clientX;\n\t\tconst startWidth = width;\n\t\tconst target = event.currentTarget;\n\t\tconst onMove = (move: PointerEvent) => {\n\t\t\tconst delta = side === \"right\" ? startX - move.clientX : move.clientX - startX;\n\t\t\tonWidth(clampSidebarWidth(startWidth + delta));\n\t\t};\n\t\tconst onUp = () => {\n\t\t\ttarget.removeEventListener(\"pointermove\", onMove);\n\t\t\ttarget.removeEventListener(\"pointerup\", onUp);\n\t\t\ttarget.removeEventListener(\"pointercancel\", onUp);\n\t\t};\n\t\ttarget.addEventListener(\"pointermove\", onMove);\n\t\ttarget.addEventListener(\"pointerup\", onUp);\n\t\ttarget.addEventListener(\"pointercancel\", onUp);\n\t};\n\treturn (\n\t\t<div\n\t\t\trole=\"separator\"\n\t\t\taria-orientation=\"vertical\"\n\t\t\taria-valuenow={width}\n\t\t\taria-valuemin={180}\n\t\t\taria-valuemax={400}\n\t\t\taria-label=\"Resize sidebar\"\n\t\t\ttabIndex={0}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute top-0 h-full w-basalt-1 cursor-col-resize bg-transparent\",\n\t\t\t\tside === \"right\" ? \"left-0\" : \"right-0\",\n\t\t\t)}\n\t\t\tonPointerDown={onPointerDown}\n\t\t\tonKeyDown={(event) => {\n\t\t\t\tif (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst dir = event.key === \"ArrowRight\" ? 1 : -1;\n\t\t\t\tconst delta = side === \"right\" ? -dir * 8 : dir * 8;\n\t\t\t\tonWidth(clampSidebarWidth(width + delta));\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nexport function Sidebar({\n\tcollapsed: collapsedProp,\n\tclassName,\n\tchildren,\n\tonMouseEnter,\n\tonMouseLeave,\n\tstyle,\n\t...props\n}: SidebarProps) {\n\tconst context = useContext(SidebarContext);\n\tconst collapsed = context\n\t\t? context.collapsed && !(context.peek && context.peeking)\n\t\t: (collapsedProp ?? false);\n\tconst side = context?.side ?? \"left\";\n\tconst overlay = context?.overlay ?? false;\n\tconst width = context?.width ?? 260;\n\tconst body = context?.loading ? (\n\t\t<div\n\t\t\tclassName=\"flex flex-col gap-basalt-space-lg p-basalt-space-lg\"\n\t\t\trole=\"status\"\n\t\t\taria-live=\"polite\"\n\t\t>\n\t\t\t<SkeletonLine />\n\t\t\t<SkeletonLine />\n\t\t\t<SkeletonLine />\n\t\t</div>\n\t) : (\n\t\tchildren\n\t);\n\tconst resize =\n\t\tcontext && !collapsed ? (\n\t\t\t<SidebarResize side={side} width={context.width} onWidth={context.setWidth} />\n\t\t) : null;\n\tconst frameClass = cn(\n\t\tBASALT_UI_CLASS,\n\t\t\"relative flex shrink-0 flex-col bg-basalt-background text-basalt-base text-basalt-foreground\",\n\t\tOVERLAY_MOTION,\n\t\tclassName,\n\t);\n\tif (overlay && context) {\n\t\treturn (\n\t\t\t<Dialog open={!context.collapsed} onOpenChange={(open) => context.setCollapsed(!open)}>\n\t\t\t\t<DialogPortal>\n\t\t\t\t\t<DialogOverlay />\n\t\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\t\tdata-basalt-sidebar=\"\"\n\t\t\t\t\t\taria-label=\"Sidebar\"\n\t\t\t\t\t\tdata-overlay=\"\"\n\t\t\t\t\t\tdata-side={side}\n\t\t\t\t\t\taria-busy={context.loading || undefined}\n\t\t\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tnode &&\n\t\t\t\t\t\t\t\tdocument.activeElement instanceof HTMLElement &&\n\t\t\t\t\t\t\t\t!node.contains(document.activeElement)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcontext.lastFocusRef.current = document.activeElement;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonOpenAutoFocus={(event) => {\n\t\t\t\t\t\t\tconst from = \"relatedTarget\" in event ? event.relatedTarget : null;\n\t\t\t\t\t\t\tif (from instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tcontext.lastFocusRef.current = from;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonCloseAutoFocus={(event) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcontext.lastFocusRef.current?.focus();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tframeClass,\n\t\t\t\t\t\t\tOVERLAY_LAYER,\n\t\t\t\t\t\t\t\"fixed inset-y-0 overflow-hidden shadow-md\",\n\t\t\t\t\t\t\tside === \"right\" ? \"right-0\" : \"left-0\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tstyle={{ width, ...style }}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t\t{resize}\n\t\t\t\t\t</DialogPrimitive.Content>\n\t\t\t\t</DialogPortal>\n\t\t\t</Dialog>\n\t\t);\n\t}\n\treturn (\n\t\t<aside\n\t\t\tdata-basalt-sidebar=\"\"\n\t\t\tdata-collapsed={collapsed ? \"\" : undefined}\n\t\t\tdata-side={side}\n\t\t\taria-busy={context?.loading || undefined}\n\t\t\tonMouseEnter={(event) => {\n\t\t\t\tif (context?.peek && context.collapsed) {\n\t\t\t\t\tcontext.setPeeking(true);\n\t\t\t\t}\n\t\t\t\tonMouseEnter?.(event);\n\t\t\t}}\n\t\t\tonMouseLeave={(event) => {\n\t\t\t\tif (context?.peek) {\n\t\t\t\t\tcontext.setPeeking(false);\n\t\t\t\t}\n\t\t\t\tonMouseLeave?.(event);\n\t\t\t}}\n\t\t\tclassName={cn(\n\t\t\t\tframeClass,\n\t\t\t\t\"sticky overflow-hidden transition-[width] basalt-motion duration-basalt-normal ease-basalt\",\n\t\t\t\tside === \"right\" ? \"order-last\" : undefined,\n\t\t\t\tcollapsed && \"w-basalt-rail\",\n\t\t\t)}\n\t\t\tstyle={!collapsed ? { width, ...style } : style}\n\t\t\t{...props}\n\t\t>\n\t\t\t{body}\n\t\t\t{resize}\n\t\t</aside>\n\t);\n}\n\nconst SIDEBAR_ROW_CLASS =\n\t\"min-h-[calc(var(--basalt-line-row)+2*var(--basalt-space-lg))] py-basalt-space-lg\";\n\nexport interface SidebarHeaderProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport function SidebarHeader({ className, ...props }: SidebarHeaderProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sidebar-header\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-basalt-14 shrink-0 items-center gap-basalt-row-gap px-basalt-nav-inset\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * Props for `SidebarSearch`. Renders a native `<button>` element and accepts all standard button HTML attributes and click handlers.\n */\nexport interface SidebarSearchProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n\t/**\n\t * Shortcut key display label rendered inside the trailing kbd tag. Note: this is a visual label only and does not register a global keyboard shortcut.\n\t * @default \"⌘K\"\n\t */\n\tshortcut?: string;\n}\n\nexport function SidebarSearch({\n\tshortcut = \"⌘K\",\n\tclassName,\n\tchildren,\n\t...props\n}: SidebarSearchProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={cn(\n\t\t\t\tBASALT_UI_CLASS,\n\t\t\t\tNAV_ROW_CLASS,\n\t\t\t\tSIDEBAR_ROW_CLASS,\n\t\t\t\t\"w-full cursor-pointer bg-basalt-secondary transition-colors basalt-motion hover:bg-basalt-hover\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Search className=\"h-basalt-4 w-basalt-4 text-basalt-muted-foreground\" strokeWidth={1.5} />\n\t\t\t<span className=\"flex-1 text-left text-basalt-base text-basalt-muted-foreground\">\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t<kbd className=\"pointer-events-none hidden rounded-basalt-sm border border-basalt-border bg-basalt-card px-basalt-space-md py-basalt-space-xs text-basalt-sm font-medium text-basalt-muted-foreground sm:inline-block\">\n\t\t\t\t{shortcut}\n\t\t\t</kbd>\n\t\t</button>\n\t);\n}\n\nexport interface SidebarNavProps extends HTMLAttributes<HTMLElement> {}\n\nexport function SidebarNav({ className, ...props }: SidebarNavProps) {\n\tconst highlightRef = useHoverHighlight(undefined, { restoreOnPointerLeave: false });\n\treturn (\n\t\t<nav\n\t\t\tref={highlightRef}\n\t\t\tdata-slot=\"sidebar-nav\"\n\t\t\tclassName={cn(\n\t\t\t\tNAV_LIST_CLASS,\n\t\t\t\t\"min-h-0 flex-1 flex-col overflow-y-auto overscroll-y-contain\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport interface SidebarPartitionProps extends HTMLAttributes<HTMLParagraphElement> {}\n\nexport function SidebarPartition({ className, ...props }: SidebarPartitionProps) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"sidebar-partition\"\n\t\t\tclassName={cn(\n\t\t\t\t\"shrink-0 px-basalt-row-x pt-basalt-layout pb-basalt-space-lg text-basalt-sm font-semibold tracking-wide text-basalt-foreground uppercase\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport type SidebarItemProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n\t/**\n\t * Mark the item as the current page.\n\t * @default false\n\t */\n\tactive?: boolean;\n};\n\nexport function SidebarItem({ active = false, className, ...props }: SidebarItemProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\taria-current={active ? \"page\" : undefined}\n\t\t\tdata-basalt-hover-item=\"\"\n\t\t\tdata-sidebar-row=\"\"\n\t\t\tdata-hover-selected={active}\n\t\t\tclassName={cn(NAV_ITEM_CLASS, SIDEBAR_ROW_CLASS, \"w-full\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * Props for `SidebarIconItem`. Accepts standard button HTML attributes. The caller is responsible for providing accessible labeling via `aria-label` or `aria-labelledby` as icon buttons do not automatically generate accessible names.\n */\nexport interface SidebarIconItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n\t/**\n\t * Mark the icon button as active page item.\n\t * @default false\n\t */\n\tactive?: boolean;\n}\n\nexport function SidebarIconItem({ active = false, className, ...props }: SidebarIconItemProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\taria-current={active ? \"page\" : undefined}\n\t\t\tdata-basalt-hover-item=\"\"\n\t\t\tdata-sidebar-row=\"\"\n\t\t\tdata-hover-selected={active}\n\t\t\tclassName={cn(\n\t\t\t\tNAV_ITEM_CLASS,\n\t\t\t\tSIDEBAR_ROW_CLASS,\n\t\t\t\t\"relative w-basalt-control justify-center\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * Props for `SidebarGroup`. Uncontrolled collapsible section that accepts only the documented properties. It does not accept controlled open props or arbitrary DOM attributes.\n */\nexport interface SidebarGroupProps {\n\t/**\n\t * Section label displayed on the group trigger.\n\t */\n\tlabel: ReactNode;\n\t/**\n\t * Uncontrolled initial open state for the collapsible group.\n\t * @default true\n\t */\n\tdefaultOpen?: boolean;\n\t/**\n\t * Navigation items rendered inside the group.\n\t */\n\tchildren: ReactNode;\n}\n\nexport function SidebarGroup({ label, defaultOpen = true, children }: SidebarGroupProps) {\n\tconst [open, setOpen] = useState(defaultOpen);\n\treturn (\n\t\t<Collapsible\n\t\t\topen={open}\n\t\t\tonOpenChange={setOpen}\n\t\t\tdata-slot=\"sidebar-group\"\n\t\t\tclassName=\"shrink-0 pt-basalt-layout-sm\"\n\t\t>\n\t\t\t<CollapsibleTrigger asChild>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-slot=\"sidebar-group-label\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex w-full cursor-pointer items-center justify-between gap-basalt-row-gap rounded-basalt-md px-basalt-row-x py-basalt-space-lg text-left text-basalt-sm font-semibold leading-basalt-row tracking-wide text-basalt-muted-foreground uppercase transition-colors basalt-motion hover:text-basalt-foreground\",\n\t\t\t\t\t\tFOCUS_INSET,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"min-w-0 truncate\">{label}</span>\n\t\t\t\t\t<ChevronUp\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"h-basalt-4 w-basalt-4 text-basalt-muted-foreground transition-transform basalt-motion duration-basalt-normal\",\n\t\t\t\t\t\t\tOVERLAY_MOTION,\n\t\t\t\t\t\t\t!open && \"rotate-180\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t/>\n\t\t\t\t</button>\n\t\t\t</CollapsibleTrigger>\n\t\t\t<CollapsibleContent unstyled>\n\t\t\t\t<div className=\"flex flex-col gap-basalt-nav-gap pt-basalt-nav-gap\">{children}</div>\n\t\t\t</CollapsibleContent>\n\t\t</Collapsible>\n\t);\n}\n\nexport interface SidebarFooterProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport function SidebarFooter({ className, ...props }: SidebarFooterProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sidebar-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex shrink-0 flex-col gap-basalt-content-gap px-basalt-layout pt-basalt-space-lg pb-basalt-layout\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport interface SidebarUserProps {\n\t/**\n\t * User display name.\n\t */\n\tname: ReactNode;\n\t/**\n\t * Optional user email or secondary text.\n\t */\n\temail?: ReactNode;\n\t/**\n\t * Avatar element slot.\n\t */\n\tavatar?: ReactNode;\n\t/**\n\t * Trailing action slot (e.g. settings or logout button).\n\t */\n\taction?: ReactNode;\n\t/**\n\t * Additional CSS class name.\n\t */\n\tclassName?: string;\n}\n\nexport function SidebarUser({ name, email, avatar, action, className }: SidebarUserProps) {\n\treturn (\n\t\t<div className={cn(\"flex items-center gap-basalt-space-lg\", className)}>\n\t\t\t{avatar}\n\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t<p className=\"truncate text-basalt-base font-medium text-basalt-foreground\">{name}</p>\n\t\t\t\t{email ? (\n\t\t\t\t\t<p className=\"truncate text-basalt-sm text-basalt-muted-foreground\">{email}</p>\n\t\t\t\t) : null}\n\t\t\t</div>\n\t\t\t{action}\n\t\t</div>\n\t);\n}\n\nexport interface ContentIslandProps extends HTMLAttributes<HTMLDivElement> {\n\t/** Mobile surface treatment; desktop remains an inset L1 island. @default \"inset\" */\n\tmobileSurface?: \"inset\" | \"edge-to-edge\";\n}\n\nexport function ContentIsland({\n\tmobileSurface = \"inset\",\n\tclassName,\n\t...props\n}: ContentIslandProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-basalt-surface-root=\"\"\n\t\t\tdata-basalt-island={mobileSurface}\n\t\t\tclassName={cn(\n\t\t\t\t\"min-h-0 min-w-0 flex-1 bg-basalt-card text-basalt-card-foreground md:rounded-basalt-island md:p-basalt-layout-lg lg:px-basalt-layout-xl\",\n\t\t\t\tmobileSurface === \"inset\"\n\t\t\t\t\t? \"rounded-basalt-lg p-basalt-layout shadow-sm ring-1 ring-basalt-border/40\"\n\t\t\t\t\t: \"md:shadow-sm md:ring-1 md:ring-basalt-border/40\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;AAyEA,IAAMC,IAAiBC,EAA0C,IAAI;AAMrE,SAAgBC,IAAkC;CACjD,IAAMC,IAAUC,EAAWJ,CAAc;CACzC,IAAI,CAACG,GACJ,MAAU,MAAM,gDAAgD;CAEjE,OAAOA;AACR;AA+CA,SAAgBE,EAAgB,EAC/B,cACA,sBAAmB,IACnB,sBACA,UAAO,QACP,aAAU,IACV,UAAO,IACP,aAAU,IACV,kBAAe,KACf,eACwB;CACxB,IAAM,CAACC,GAAcC,KAAmBC,EAASC,CAAgB,GAC3D,CAACC,GAASC,KAAcH,EAAS,EAAK,GACtC,CAACI,GAAOC,KAAiBL,QAAeM,EAAkBC,CAAY,CAAC,GACvEC,IAAWC,GAAa,MAAiB;EAC9C,EAAcH,EAAkBI,CAAI,CAAC;CACtC,GAAG,CAAC,CAAC,GACCC,IAAeC,EAA2B,IAAI,GAC9CC,IAAgBD,EAAOE,KAAab,CAAgB,GACpDc,IAAcH,EAAOI,CAAO,GAC5BC,IAAWH,KAAahB;CAC9B,QAAsB;EAUrB,AARCkB,KACA,CAACC,MACAJ,EAAc,WAAW,CAACE,EAAY,YACvC,SAAS,yBAAyB,gBAElC,EAAa,UAAU,SAAS,gBAEjC,EAAc,UAAUE,GACxB,EAAY,UAAUD;CACvB,CAAC;CACD,IAAME,IAAe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,UAAA,CAMC,kBAACG,GAAD;GAAoB,SAAA;GACnB,UAAA,kBAAC,UAAD;IACC,MAAK;IACL,aAAU;IACV,WAAWnD,EACV,+SACAoD,CACD;IAND,UAAA,CAQC,kBAAC,QAAD;KAAM,WAAU;KAAoB,UAAAC;IAAY,CAAA,GAChD,kBAACC,GAAD;KACC,WAAWtD,EACV,gHACAoB,GACA,CAACG,KAAQ,YACV;KACA,aAAa;IACb,CAAA,CACM;;EACW,CAAA,GACpB,kBAACgC,GAAD;GAAoB,UAAA;GACnB,UAAA,kBAAC,OAAD;IAAK,WAAU;IAAsD;GAAc,CAAA;EAChE,CAAA,CACR;;AAEf;AAIA,SAAgBC,EAAc,EAAE,cAAW,GAAG3C,KAA6B;CAC1E,OACC,kBAAC,OAAD;EACC,aAAU;EACV,WAAWb,EACV,sGACAqB,CACD;EACA,GAAIR;CACJ,CAAA;AAEH;AAyBA,SAAgB4C,EAAY,EAAE,SAAM,UAAO,WAAQ,WAAQ,gBAA+B;CACzF,OACC,kBAAC,OAAD;EAAK,WAAWzD,EAAG,yCAAyCqB,CAAS;EAArE,UAAA;GACEqC;GACD,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,kBAAC,KAAD;KAAG,WAAU;KAAgE,UAAAC;IAAQ,CAAA,GACpFC,IACA,kBAAC,KAAD;KAAG,WAAU;KAAwD,UAAAA;IAAS,CAAA,IAC3E,IACA;;GACJC;EACG;;AAEP;AAOA,SAAgBC,EAAc,EAC7B,mBAAgB,SAChB,cACA,GAAGjD,KACmB;CACtB,OACC,kBAAC,OAAD;EACC,4BAAyB;EACzB,sBAAoBkD;EACpB,WAAW/D,EACV,2IACA+D,MAAkB,UACf,6EACA,mDACH1C,CACD;EACA,GAAIR;CACJ,CAAA;AAEH"}
|
|
1
|
+
{"version":3,"file":"sidebar.js","names":["DialogPrimitive","SidebarContext","createContext","useSidebar","context","useContext","SidebarProvider","uncontrolled","setUncontrolled","useState","defaultCollapsed","peeking","setPeeking","width","setWidthState","clampSidebarWidth","defaultWidth","setWidth","useCallback","next","lastFocusRef","useRef","prevCollapsed","collapsed","prevOverlay","overlay","resolved","setCollapsed","onCollapsedChange","SidebarResize","cn","side","event","startX","startWidth","target","onMove","delta","move","onUp","dir","Sidebar","collapsedProp","props","body","SkeletonLine","children","resize","resizable","frameClass","BASALT_UI_CLASS","OVERLAY_MOTION","className","Dialog","open","DialogPortal","DialogOverlay","node","from","OVERLAY_LAYER","style","onMouseEnter","onMouseLeave","SIDEBAR_ROW_CLASS","SidebarHeader","SidebarBrand","logo","name","version","action","SidebarToggle","ariaLabel","label","expandLabel","collapseLabel","TooltipProvider","Tooltip","TooltipTrigger","Button","onClick","PanelLeft","TooltipContent","SidebarSearch","NAV_ROW_CLASS","Search","shortcut","SidebarNav","highlightRef","useHoverHighlight","NAV_LIST_CLASS","SidebarPartition","rejectDisabledAsChild","SidebarItem","rowClass","NAV_ITEM_CLASS","_className","linkProps","Link","active","buttonProps","sharedProps","asChild","Slot","SidebarIconItem","SidebarGroup","setOpen","defaultOpen","Collapsible","CollapsibleTrigger","FOCUS_INSET","ChevronUp","CollapsibleContent","SidebarFooter","SidebarUser","avatar","email","ContentIsland","mobileSurface"],"sources":["../../src/components/sidebar.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronUp, PanelLeft, Search } from \"lucide-react\";\nimport {\n\ttype AnchorHTMLAttributes,\n\ttype ButtonHTMLAttributes,\n\tcreateContext,\n\ttype HTMLAttributes,\n\ttype ReactNode,\n\ttype PointerEvent as ReactPointerEvent,\n\ttype RefObject,\n\tuseCallback,\n\tuseContext,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { BASALT_UI_CLASS } from \"../utils/control-surface\";\nimport { NAV_ITEM_CLASS, NAV_LIST_CLASS, NAV_ROW_CLASS } from \"../utils/navigation\";\nimport { useHoverHighlight } from \"../utils/use-hover-highlight\";\nimport { Button, type ButtonProps } from \"./button\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"./collapsible\";\nimport { Dialog, DialogOverlay, DialogPortal } from \"./dialog\";\nimport { Link } from \"./link\";\nimport { FOCUS_INSET, OVERLAY_LAYER, OVERLAY_MOTION } from \"./overlay\";\nimport { SkeletonLine } from \"./skeleton-line\";\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"./tooltip\";\n\nexport type SidebarSide = \"left\" | \"right\";\n\nexport interface SidebarContextValue {\n\t/**\n\t * Whether the sidebar is currently collapsed.\n\t */\n\tcollapsed: boolean;\n\t/**\n\t * Callback to update the collapsed state.\n\t */\n\tsetCollapsed: (next: boolean) => void;\n\t/**\n\t * Which edge the sidebar occupies.\n\t */\n\tside: SidebarSide;\n\t/**\n\t * Whether the sidebar is currently displaying a loading skeleton.\n\t */\n\tloading: boolean;\n\t/**\n\t * Whether the sidebar rail expands on pointer hover.\n\t */\n\tpeek: boolean;\n\t/**\n\t * Whether the sidebar is actively hovering in peek preview mode.\n\t */\n\tpeeking: boolean;\n\t/**\n\t * Callback to update the peek preview state.\n\t */\n\tsetPeeking: (next: boolean) => void;\n\t/**\n\t * Whether the sidebar is rendering as a modal overlay drawer instead of in-flow layout chrome.\n\t */\n\toverlay: boolean;\n\t/**\n\t * Current expanded width in pixels, clamped between 180 and 400.\n\t */\n\twidth: number;\n\t/**\n\t * Callback to update the sidebar width. Value is clamped between 180 and 400 pixels.\n\t */\n\tsetWidth: (next: number) => void;\n\t/**\n\t * Reference to the last active element that held focus before opening the sidebar drawer.\n\t */\n\tlastFocusRef: RefObject<HTMLElement | null>;\n}\n\nconst SidebarContext = createContext<SidebarContextValue | null>(null);\n\n/**\n * Accesses the sidebar context value. Must be used within a `SidebarProvider`; throws an error if called outside.\n * Returns the active sidebar state and control callbacks.\n */\nexport function useSidebar(): SidebarContextValue {\n\tconst context = useContext(SidebarContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSidebar must be used within SidebarProvider\");\n\t}\n\treturn context;\n}\n\nexport type SidebarProviderProps = {\n\t/**\n\t * The controlled collapsed state.\n\t */\n\tcollapsed?: boolean;\n\t/**\n\t * The uncontrolled initial collapsed state.\n\t * @default false\n\t */\n\tdefaultCollapsed?: boolean;\n\t/**\n\t * Called when the collapsed state changes.\n\t */\n\tonCollapsedChange?: (collapsed: boolean) => void;\n\t/**\n\t * Which edge the sidebar occupies.\n\t * @default left\n\t */\n\tside?: SidebarSide;\n\t/**\n\t * Replace the nav with a loading skeleton.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * Expand the collapsed rail on hover.\n\t * @default false\n\t */\n\tpeek?: boolean;\n\t/**\n\t * Render as an overlay instead of in-flow chrome.\n\t * @default false\n\t */\n\toverlay?: boolean;\n\t/**\n\t * Initial expanded width in pixels, clamped between 180 and 400.\n\t * @default 260\n\t */\n\tdefaultWidth?: number;\n\t/**\n\t * Sidebar chrome and page content.\n\t */\n\tchildren: ReactNode;\n};\n\nexport function SidebarProvider({\n\tcollapsed,\n\tdefaultCollapsed = false,\n\tonCollapsedChange,\n\tside = \"left\",\n\tloading = false,\n\tpeek = false,\n\toverlay = false,\n\tdefaultWidth = 260,\n\tchildren,\n}: SidebarProviderProps) {\n\tconst [uncontrolled, setUncontrolled] = useState(defaultCollapsed);\n\tconst [peeking, setPeeking] = useState(false);\n\tconst [width, setWidthState] = useState(() => clampSidebarWidth(defaultWidth));\n\tconst setWidth = useCallback((next: number) => {\n\t\tsetWidthState(clampSidebarWidth(next));\n\t}, []);\n\tconst lastFocusRef = useRef<HTMLElement | null>(null);\n\tconst prevCollapsed = useRef(collapsed ?? defaultCollapsed);\n\tconst prevOverlay = useRef(overlay);\n\tconst resolved = collapsed ?? uncontrolled;\n\tuseLayoutEffect(() => {\n\t\tif (\n\t\t\toverlay &&\n\t\t\t!resolved &&\n\t\t\t(prevCollapsed.current || !prevOverlay.current) &&\n\t\t\tdocument.activeElement instanceof HTMLElement\n\t\t) {\n\t\t\tlastFocusRef.current = document.activeElement;\n\t\t}\n\t\tprevCollapsed.current = resolved;\n\t\tprevOverlay.current = overlay;\n\t});\n\tconst setCollapsed = useCallback(\n\t\t(next: boolean) => {\n\t\t\tif (!next && document.activeElement instanceof HTMLElement) {\n\t\t\t\tlastFocusRef.current = document.activeElement;\n\t\t\t}\n\t\t\tif (collapsed === undefined) {\n\t\t\t\tsetUncontrolled(next);\n\t\t\t}\n\t\t\tonCollapsedChange?.(next);\n\t\t},\n\t\t[collapsed, onCollapsedChange],\n\t);\n\treturn (\n\t\t<SidebarContext.Provider\n\t\t\tvalue={{\n\t\t\t\tcollapsed: resolved,\n\t\t\t\tsetCollapsed,\n\t\t\t\tside,\n\t\t\t\tloading,\n\t\t\t\tpeek,\n\t\t\t\tpeeking,\n\t\t\t\tsetPeeking,\n\t\t\t\toverlay,\n\t\t\t\twidth,\n\t\t\t\tsetWidth,\n\t\t\t\tlastFocusRef,\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</SidebarContext.Provider>\n\t);\n}\n\nexport type SidebarProps = HTMLAttributes<HTMLElement> & {\n\t/**\n\t * Collapse the rail when no provider is present.\n\t * @default false\n\t */\n\tcollapsed?: boolean;\n\t/**\n\t * Show the resize handle for an expanded provider-backed sidebar.\n\t * @default true\n\t */\n\tresizable?: boolean;\n};\n\nfunction clampSidebarWidth(next: number) {\n\treturn Math.min(400, Math.max(180, next));\n}\n\nfunction SidebarResize({\n\tside,\n\twidth,\n\tonWidth,\n}: {\n\tside: SidebarSide;\n\twidth: number;\n\tonWidth: (next: number) => void;\n}) {\n\tconst onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n\t\tevent.preventDefault();\n\t\tevent.currentTarget.setPointerCapture(event.pointerId);\n\t\tconst startX = event.clientX;\n\t\tconst startWidth = width;\n\t\tconst target = event.currentTarget;\n\t\tconst onMove = (move: PointerEvent) => {\n\t\t\tconst delta = side === \"right\" ? startX - move.clientX : move.clientX - startX;\n\t\t\tonWidth(clampSidebarWidth(startWidth + delta));\n\t\t};\n\t\tconst onUp = () => {\n\t\t\ttarget.removeEventListener(\"pointermove\", onMove);\n\t\t\ttarget.removeEventListener(\"pointerup\", onUp);\n\t\t\ttarget.removeEventListener(\"pointercancel\", onUp);\n\t\t};\n\t\ttarget.addEventListener(\"pointermove\", onMove);\n\t\ttarget.addEventListener(\"pointerup\", onUp);\n\t\ttarget.addEventListener(\"pointercancel\", onUp);\n\t};\n\treturn (\n\t\t<div\n\t\t\trole=\"separator\"\n\t\t\taria-orientation=\"vertical\"\n\t\t\taria-valuenow={width}\n\t\t\taria-valuemin={180}\n\t\t\taria-valuemax={400}\n\t\t\taria-label=\"Resize sidebar\"\n\t\t\ttabIndex={0}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute top-0 h-full w-basalt-1 cursor-col-resize bg-transparent\",\n\t\t\t\tside === \"right\" ? \"left-0\" : \"right-0\",\n\t\t\t)}\n\t\t\tonPointerDown={onPointerDown}\n\t\t\tonKeyDown={(event) => {\n\t\t\t\tif (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst dir = event.key === \"ArrowRight\" ? 1 : -1;\n\t\t\t\tconst delta = side === \"right\" ? -dir * 8 : dir * 8;\n\t\t\t\tonWidth(clampSidebarWidth(width + delta));\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nexport function Sidebar({\n\tcollapsed: collapsedProp,\n\tresizable = true,\n\tclassName,\n\tchildren,\n\tonMouseEnter,\n\tonMouseLeave,\n\tstyle,\n\t...props\n}: SidebarProps) {\n\tconst context = useContext(SidebarContext);\n\tconst collapsed = context\n\t\t? context.collapsed && !(context.peek && context.peeking)\n\t\t: (collapsedProp ?? false);\n\tconst side = context?.side ?? \"left\";\n\tconst overlay = context?.overlay ?? false;\n\tconst width = context?.width ?? 260;\n\tconst body = context?.loading ? (\n\t\t<div\n\t\t\tclassName=\"flex flex-col gap-basalt-space-lg px-basalt-layout-lg py-basalt-space-lg\"\n\t\t\trole=\"status\"\n\t\t\taria-live=\"polite\"\n\t\t>\n\t\t\t<SkeletonLine />\n\t\t\t<SkeletonLine />\n\t\t\t<SkeletonLine />\n\t\t</div>\n\t) : (\n\t\tchildren\n\t);\n\tconst resize =\n\t\tcontext && resizable && !collapsed ? (\n\t\t\t<SidebarResize side={side} width={context.width} onWidth={context.setWidth} />\n\t\t) : null;\n\tconst frameClass = cn(\n\t\tBASALT_UI_CLASS,\n\t\t\"relative flex shrink-0 flex-col bg-basalt-background text-basalt-base text-basalt-foreground\",\n\t\tOVERLAY_MOTION,\n\t\tclassName,\n\t);\n\tif (overlay && context) {\n\t\treturn (\n\t\t\t<Dialog open={!context.collapsed} onOpenChange={(open) => context.setCollapsed(!open)}>\n\t\t\t\t<DialogPortal>\n\t\t\t\t\t<DialogOverlay />\n\t\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\t\tdata-basalt-sidebar=\"\"\n\t\t\t\t\t\taria-label=\"Sidebar\"\n\t\t\t\t\t\tdata-overlay=\"\"\n\t\t\t\t\t\tdata-side={side}\n\t\t\t\t\t\taria-busy={context.loading || undefined}\n\t\t\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tnode &&\n\t\t\t\t\t\t\t\tdocument.activeElement instanceof HTMLElement &&\n\t\t\t\t\t\t\t\t!node.contains(document.activeElement)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcontext.lastFocusRef.current = document.activeElement;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonOpenAutoFocus={(event) => {\n\t\t\t\t\t\t\tconst from = \"relatedTarget\" in event ? event.relatedTarget : null;\n\t\t\t\t\t\t\tif (from instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tcontext.lastFocusRef.current = from;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (event.target instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tevent.target.focus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonCloseAutoFocus={(event) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcontext.lastFocusRef.current?.focus();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tframeClass,\n\t\t\t\t\t\t\tOVERLAY_LAYER,\n\t\t\t\t\t\t\t\"fixed inset-y-0 overflow-hidden shadow-md\",\n\t\t\t\t\t\t\tside === \"right\" ? \"right-0\" : \"left-0\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tstyle={{ width, ...style }}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t\t{resize}\n\t\t\t\t\t</DialogPrimitive.Content>\n\t\t\t\t</DialogPortal>\n\t\t\t</Dialog>\n\t\t);\n\t}\n\treturn (\n\t\t<aside\n\t\t\tdata-basalt-sidebar=\"\"\n\t\t\tdata-collapsed={collapsed ? \"\" : undefined}\n\t\t\tdata-side={side}\n\t\t\taria-busy={context?.loading || undefined}\n\t\t\tonMouseEnter={(event) => {\n\t\t\t\tif (context?.peek && context.collapsed) {\n\t\t\t\t\tcontext.setPeeking(true);\n\t\t\t\t}\n\t\t\t\tonMouseEnter?.(event);\n\t\t\t}}\n\t\t\tonMouseLeave={(event) => {\n\t\t\t\tif (context?.peek) {\n\t\t\t\t\tcontext.setPeeking(false);\n\t\t\t\t}\n\t\t\t\tonMouseLeave?.(event);\n\t\t\t}}\n\t\t\tclassName={cn(\n\t\t\t\tframeClass,\n\t\t\t\t\"sticky overflow-hidden transition-[width] basalt-motion duration-basalt-normal ease-basalt\",\n\t\t\t\tside === \"right\" ? \"order-last\" : undefined,\n\t\t\t\tcollapsed && \"w-basalt-rail\",\n\t\t\t)}\n\t\t\tstyle={!collapsed ? { width, ...style } : style}\n\t\t\t{...props}\n\t\t>\n\t\t\t{body}\n\t\t\t{resize}\n\t\t</aside>\n\t);\n}\n\nconst SIDEBAR_ROW_CLASS =\n\t\"min-h-[calc(var(--basalt-line-row)+2*var(--basalt-space-lg))] py-basalt-space-lg\";\n\nexport interface SidebarHeaderProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport function SidebarHeader({ className, ...props }: SidebarHeaderProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sidebar-header\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-basalt-14 shrink-0 items-center gap-basalt-row-gap px-basalt-layout-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport interface SidebarBrandProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n\t/** Brand mark rendered in the fixed collapsed-rail slot. */\n\tlogo: ReactNode;\n\t/** Product or workspace name. */\n\tname: ReactNode;\n\t/** Optional version or release metadata, rendered at the auxiliary type size. */\n\tversion?: ReactNode;\n\t/** Optional trailing action, conventionally a `SidebarToggle`. */\n\taction?: ReactNode;\n}\n\nexport function SidebarBrand({\n\tlogo,\n\tname,\n\tversion,\n\taction,\n\tclassName,\n\t...props\n}: SidebarBrandProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sidebar-brand\"\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex h-full min-w-0 flex-1 items-center gap-basalt-row-gap\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\tdata-slot=\"sidebar-brand-logo\"\n\t\t\t\tclassName=\"flex w-basalt-sidebar-brand-slot shrink-0 items-center justify-center\"\n\t\t\t>\n\t\t\t\t{logo}\n\t\t\t</span>\n\t\t\t<div className=\"flex min-w-0 flex-1 items-center gap-basalt-row-gap overflow-hidden whitespace-nowrap\">\n\t\t\t\t<span className=\"min-w-0 flex-1 truncate text-basalt-base font-semibold\">{name}</span>\n\t\t\t\t{version != null ? (\n\t\t\t\t\t<span className=\"shrink-0 text-basalt-sm text-basalt-muted-foreground\">{version}</span>\n\t\t\t\t) : null}\n\t\t\t</div>\n\t\t\t{action ? (\n\t\t\t\t<div data-slot=\"sidebar-brand-action\" className=\"basalt-sidebar-brand-action\">\n\t\t\t\t\t{action}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n}\n\nexport interface SidebarToggleProps\n\textends Omit<ButtonProps, \"children\" | \"size\" | \"aria-expanded\"> {\n\t/** Accessible label while the sidebar is collapsed. @default \"Expand sidebar\" */\n\texpandLabel?: string;\n\t/** Accessible label while the sidebar is expanded. @default \"Collapse sidebar\" */\n\tcollapseLabel?: string;\n}\n\nexport function SidebarToggle({\n\t\"aria-label\": ariaLabel,\n\texpandLabel = \"Expand sidebar\",\n\tcollapseLabel = \"Collapse sidebar\",\n\tonClick,\n\tvariant = \"ghost\",\n\t...props\n}: SidebarToggleProps) {\n\tconst { collapsed, setCollapsed, side } = useSidebar();\n\tconst label = ariaLabel ?? (collapsed ? expandLabel : collapseLabel);\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\tsize=\"icon-sm\"\n\t\t\t\t\t\taria-expanded={!collapsed}\n\t\t\t\t\t\taria-label={label}\n\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\tonClick?.(event);\n\t\t\t\t\t\t\tif (!event.defaultPrevented) setCollapsed(!collapsed);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PanelLeft aria-hidden=\"true\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent side={side === \"right\" ? \"left\" : \"right\"}>{label}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n}\n\n/**\n * Props for `SidebarSearch`. Renders a native `<button>` element and accepts all standard button HTML attributes and click handlers.\n */\nexport interface SidebarSearchProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n\t/**\n\t * Shortcut key display label rendered inside the trailing kbd tag. Note: this is a visual label only and does not register a global keyboard shortcut.\n\t * @default \"⌘K\"\n\t */\n\tshortcut?: string;\n}\n\nexport function SidebarSearch({\n\tshortcut = \"⌘K\",\n\tclassName,\n\tchildren,\n\t...props\n}: SidebarSearchProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={cn(\n\t\t\t\tBASALT_UI_CLASS,\n\t\t\t\tNAV_ROW_CLASS,\n\t\t\t\tSIDEBAR_ROW_CLASS,\n\t\t\t\t\"w-full cursor-pointer bg-basalt-secondary transition-colors basalt-motion hover:bg-basalt-hover\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Search className=\"h-basalt-4 w-basalt-4 text-basalt-muted-foreground\" strokeWidth={1.5} />\n\t\t\t<span className=\"flex-1 text-left text-basalt-base text-basalt-muted-foreground\">\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t<kbd className=\"pointer-events-none hidden rounded-basalt-sm border border-basalt-border bg-basalt-card px-basalt-space-md py-basalt-space-xs text-basalt-sm font-medium text-basalt-muted-foreground sm:inline-block\">\n\t\t\t\t{shortcut}\n\t\t\t</kbd>\n\t\t</button>\n\t);\n}\n\nexport interface SidebarNavProps extends HTMLAttributes<HTMLElement> {}\n\nexport function SidebarNav({ className, ...props }: SidebarNavProps) {\n\tconst highlightRef = useHoverHighlight(undefined, { restoreOnPointerLeave: false });\n\treturn (\n\t\t<nav\n\t\t\tref={highlightRef}\n\t\t\tdata-slot=\"sidebar-nav\"\n\t\t\tclassName={cn(\n\t\t\t\tNAV_LIST_CLASS,\n\t\t\t\t\"basalt-sidebar-nav min-h-0 flex-1 flex-col overflow-y-auto overscroll-y-contain\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport interface SidebarPartitionProps extends HTMLAttributes<HTMLParagraphElement> {}\n\nexport function SidebarPartition({ className, ...props }: SidebarPartitionProps) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"sidebar-partition\"\n\t\t\tclassName={cn(\n\t\t\t\t\"shrink-0 px-basalt-row-x pt-basalt-layout pb-basalt-space-lg text-basalt-sm font-semibold tracking-wide text-basalt-foreground uppercase\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype SidebarRowProps = {\n\t/** Mark the item as the current page. @default false */\n\tactive?: boolean;\n\t/** Item content. */\n\tchildren?: ReactNode;\n\t/** Additional CSS classes. */\n\tclassName?: string;\n};\n\ntype SidebarButtonRowProps = Omit<\n\tButtonHTMLAttributes<HTMLButtonElement>,\n\t\"children\" | \"className\" | \"disabled\"\n> &\n\tSidebarRowProps & {\n\t\tasChild?: false;\n\t\tdisabled?: boolean;\n\t\thref?: never;\n\t};\n\ntype SidebarSlotRowProps = Omit<\n\tButtonHTMLAttributes<HTMLButtonElement>,\n\t\"children\" | \"className\" | \"disabled\"\n> &\n\tSidebarRowProps & {\n\t\t/** Render the item onto its single enabled child element. */\n\t\tasChild: true;\n\t\tdisabled?: never;\n\t\thref?: never;\n\t};\n\ntype SidebarLinkRowProps = Omit<\n\tAnchorHTMLAttributes<HTMLAnchorElement>,\n\t\"children\" | \"className\" | \"href\"\n> &\n\tSidebarRowProps & {\n\t\t/** Application route interpreted by LinkProvider. */\n\t\thref: string;\n\t\tasChild?: never;\n\t};\n\nexport type SidebarItemProps = SidebarButtonRowProps | SidebarSlotRowProps | SidebarLinkRowProps;\n\nfunction rejectDisabledAsChild(props: { asChild?: boolean; disabled?: boolean }) {\n\tif (props.asChild && props.disabled) {\n\t\tthrow new Error(\"Sidebar asChild rows do not support disabled; use a native button row\");\n\t}\n}\n\nexport function SidebarItem(props: SidebarItemProps) {\n\trejectDisabledAsChild(props);\n\tconst rowClass = cn(\n\t\tNAV_ITEM_CLASS,\n\t\tSIDEBAR_ROW_CLASS,\n\t\t\"w-full text-inherit no-underline hover:no-underline\",\n\t\tprops.className,\n\t);\n\tif (typeof props.href === \"string\") {\n\t\tconst { href, active = false, children, className: _className, ...linkProps } = props;\n\t\treturn (\n\t\t\t<Link\n\t\t\t\t{...linkProps}\n\t\t\t\thref={href}\n\t\t\t\taria-current={active ? \"page\" : undefined}\n\t\t\t\tdata-basalt-hover-item=\"\"\n\t\t\t\tdata-sidebar-row=\"\"\n\t\t\t\tdata-hover-selected={active}\n\t\t\t\tclassName={rowClass}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t);\n\t}\n\tconst {\n\t\tasChild = false,\n\t\ttype = \"button\",\n\t\tactive = false,\n\t\tchildren,\n\t\tclassName: _className,\n\t\t...buttonProps\n\t} = props;\n\tconst sharedProps = {\n\t\t\"aria-current\": active ? (\"page\" as const) : undefined,\n\t\t\"data-basalt-hover-item\": \"\",\n\t\t\"data-sidebar-row\": \"\",\n\t\t\"data-hover-selected\": active,\n\t\tclassName: rowClass,\n\t};\n\tif (asChild) {\n\t\treturn (\n\t\t\t<Slot {...buttonProps} {...sharedProps}>\n\t\t\t\t{children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\treturn (\n\t\t<button {...buttonProps} type={type} {...sharedProps}>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\nexport type SidebarIconItemProps =\n\t| SidebarButtonRowProps\n\t| SidebarSlotRowProps\n\t| SidebarLinkRowProps;\n\nexport function SidebarIconItem(props: SidebarIconItemProps) {\n\trejectDisabledAsChild(props);\n\tconst rowClass = cn(\n\t\tNAV_ITEM_CLASS,\n\t\tSIDEBAR_ROW_CLASS,\n\t\t\"relative w-basalt-control justify-center text-inherit no-underline hover:no-underline\",\n\t\tprops.className,\n\t);\n\tif (typeof props.href === \"string\") {\n\t\tconst { href, active = false, children, className: _className, ...linkProps } = props;\n\t\treturn (\n\t\t\t<Link\n\t\t\t\t{...linkProps}\n\t\t\t\thref={href}\n\t\t\t\taria-current={active ? \"page\" : undefined}\n\t\t\t\tdata-basalt-hover-item=\"\"\n\t\t\t\tdata-sidebar-row=\"\"\n\t\t\t\tdata-hover-selected={active}\n\t\t\t\tclassName={rowClass}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t);\n\t}\n\tconst {\n\t\tasChild = false,\n\t\ttype = \"button\",\n\t\tactive = false,\n\t\tchildren,\n\t\tclassName: _className,\n\t\t...buttonProps\n\t} = props;\n\tconst sharedProps = {\n\t\t\"aria-current\": active ? (\"page\" as const) : undefined,\n\t\t\"data-basalt-hover-item\": \"\",\n\t\t\"data-sidebar-row\": \"\",\n\t\t\"data-hover-selected\": active,\n\t\tclassName: rowClass,\n\t};\n\tif (asChild) {\n\t\treturn (\n\t\t\t<Slot {...buttonProps} {...sharedProps}>\n\t\t\t\t{children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\treturn (\n\t\t<button {...buttonProps} type={type} {...sharedProps}>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\n/**\n * Props for `SidebarGroup`. Uncontrolled collapsible section that accepts only the documented properties. It does not accept controlled open props or arbitrary DOM attributes.\n */\nexport interface SidebarGroupProps {\n\t/**\n\t * Section label displayed on the group trigger.\n\t */\n\tlabel: ReactNode;\n\t/**\n\t * Uncontrolled initial open state for the collapsible group.\n\t * @default true\n\t */\n\tdefaultOpen?: boolean;\n\t/**\n\t * Navigation items rendered inside the group.\n\t */\n\tchildren: ReactNode;\n}\n\nexport function SidebarGroup({ label, defaultOpen = true, children }: SidebarGroupProps) {\n\tconst [open, setOpen] = useState(defaultOpen);\n\treturn (\n\t\t<Collapsible\n\t\t\topen={open}\n\t\t\tonOpenChange={setOpen}\n\t\t\tdata-slot=\"sidebar-group\"\n\t\t\tclassName=\"shrink-0 pt-basalt-layout-sm\"\n\t\t>\n\t\t\t<CollapsibleTrigger asChild>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-slot=\"sidebar-group-label\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex w-full cursor-pointer items-center justify-between gap-basalt-row-gap rounded-basalt-md px-basalt-row-x py-basalt-space-lg text-left text-basalt-sm font-semibold leading-basalt-row tracking-wide text-basalt-muted-foreground uppercase transition-colors basalt-motion hover:text-basalt-foreground\",\n\t\t\t\t\t\tFOCUS_INSET,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"min-w-0 truncate\">{label}</span>\n\t\t\t\t\t<ChevronUp\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"h-basalt-4 w-basalt-4 text-basalt-muted-foreground transition-transform basalt-motion duration-basalt-normal\",\n\t\t\t\t\t\t\tOVERLAY_MOTION,\n\t\t\t\t\t\t\t!open && \"rotate-180\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t/>\n\t\t\t\t</button>\n\t\t\t</CollapsibleTrigger>\n\t\t\t<CollapsibleContent unstyled>\n\t\t\t\t<div className=\"flex flex-col gap-basalt-nav-gap pt-basalt-nav-gap\">{children}</div>\n\t\t\t</CollapsibleContent>\n\t\t</Collapsible>\n\t);\n}\n\nexport interface SidebarFooterProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport function SidebarFooter({ className, ...props }: SidebarFooterProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sidebar-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex shrink-0 flex-col gap-basalt-content-gap px-basalt-layout-lg pt-basalt-space-lg pb-basalt-layout\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport interface SidebarUserProps {\n\t/**\n\t * User display name.\n\t */\n\tname: ReactNode;\n\t/**\n\t * Optional user email or secondary text.\n\t */\n\temail?: ReactNode;\n\t/**\n\t * Avatar element slot.\n\t */\n\tavatar?: ReactNode;\n\t/**\n\t * Trailing action slot (e.g. settings or logout button).\n\t */\n\taction?: ReactNode;\n\t/**\n\t * Additional CSS class name.\n\t */\n\tclassName?: string;\n}\n\nexport function SidebarUser({ name, email, avatar, action, className }: SidebarUserProps) {\n\treturn (\n\t\t<div className={cn(\"flex items-center gap-basalt-space-lg\", className)}>\n\t\t\t{avatar}\n\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t<p className=\"truncate text-basalt-base font-medium text-basalt-foreground\">{name}</p>\n\t\t\t\t{email ? (\n\t\t\t\t\t<p className=\"truncate text-basalt-sm text-basalt-muted-foreground\">{email}</p>\n\t\t\t\t) : null}\n\t\t\t</div>\n\t\t\t{action}\n\t\t</div>\n\t);\n}\n\nexport interface ContentIslandProps extends HTMLAttributes<HTMLDivElement> {\n\t/** Mobile surface treatment; desktop remains an inset L1 island. @default \"inset\" */\n\tmobileSurface?: \"inset\" | \"edge-to-edge\";\n}\n\nexport function ContentIsland({\n\tmobileSurface = \"inset\",\n\tclassName,\n\t...props\n}: ContentIslandProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-basalt-surface-root=\"\"\n\t\t\tdata-basalt-island={mobileSurface}\n\t\t\tclassName={cn(\n\t\t\t\t\"min-h-0 min-w-0 flex-1 bg-basalt-card text-basalt-card-foreground md:rounded-basalt-island md:p-basalt-layout-lg lg:px-basalt-layout-xl\",\n\t\t\t\tmobileSurface === \"inset\"\n\t\t\t\t\t? \"rounded-basalt-lg p-basalt-layout shadow-sm ring-1 ring-basalt-border/40\"\n\t\t\t\t\t: \"md:shadow-sm md:ring-1 md:ring-basalt-border/40\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mapp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