@fayz-ai/ui 0.6.6 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-75EFDLST.js +274 -0
- package/dist/chunk-75EFDLST.js.map +1 -0
- package/dist/{chunk-YB5ZJKNG.cjs → chunk-7PTRAWHO.cjs} +263 -225
- package/dist/chunk-7PTRAWHO.cjs.map +1 -0
- package/dist/{chunk-LO5QZO7F.js → chunk-COC5DDFG.js} +125 -20
- package/dist/chunk-COC5DDFG.js.map +1 -0
- package/dist/{chunk-MYZT2OG7.js → chunk-FY7OZNKU.js} +24 -68
- package/dist/chunk-FY7OZNKU.js.map +1 -0
- package/dist/chunk-H6OULCHF.cjs +81 -0
- package/dist/chunk-H6OULCHF.cjs.map +1 -0
- package/dist/{chunk-DJHS2XRW.cjs → chunk-HG5RH3B3.cjs} +161 -54
- package/dist/chunk-HG5RH3B3.cjs.map +1 -0
- package/dist/{chunk-5QFB6AIQ.cjs → chunk-NWPMNPGR.cjs} +40 -40
- package/dist/{chunk-5QFB6AIQ.cjs.map → chunk-NWPMNPGR.cjs.map} +1 -1
- package/dist/{chunk-D6SXPF4F.cjs → chunk-ODY3GZ3Y.cjs} +41 -87
- package/dist/chunk-ODY3GZ3Y.cjs.map +1 -0
- package/dist/{chunk-22J2RTMN.js → chunk-OTUH4K4B.js} +196 -150
- package/dist/chunk-OTUH4K4B.js.map +1 -0
- package/dist/chunk-OW73RZOU.cjs +313 -0
- package/dist/chunk-OW73RZOU.cjs.map +1 -0
- package/dist/{chunk-XLBGB7IW.js → chunk-W5O2X277.js} +4 -4
- package/dist/{chunk-XLBGB7IW.js.map → chunk-W5O2X277.js.map} +1 -1
- package/dist/chunk-YRVE4FOD.js +57 -0
- package/dist/chunk-YRVE4FOD.js.map +1 -0
- package/dist/dashboard/index.cjs +27 -27
- package/dist/dashboard/index.js +3 -3
- package/dist/index.cjs +195 -175
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/layout/ContentSplit.d.ts +32 -0
- package/dist/layout/ContentSplit.d.ts.map +1 -0
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/Topbar.d.ts.map +1 -1
- package/dist/layout/index.cjs +31 -23
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +3 -3
- package/dist/primitives/index.cjs +126 -114
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +4 -4
- package/dist/primitives/markdown-editor.d.ts +23 -0
- package/dist/primitives/markdown-editor.d.ts.map +1 -0
- package/dist/primitives/markdown.d.ts +9 -0
- package/dist/primitives/markdown.d.ts.map +1 -0
- package/package.json +6 -3
- package/src/index.ts +9 -0
- package/src/layout/ContentSplit.tsx +153 -0
- package/src/layout/Sidebar.tsx +39 -14
- package/src/layout/Topbar.tsx +2 -1
- package/src/layout/index.ts +6 -0
- package/src/primitives/dropdown.tsx +4 -4
- package/src/primitives/index.ts +2 -0
- package/src/primitives/markdown-editor.tsx +75 -0
- package/src/primitives/markdown.tsx +169 -0
- package/src/primitives/select.tsx +1 -1
- package/dist/chunk-22J2RTMN.js.map +0 -1
- package/dist/chunk-D6SXPF4F.cjs.map +0 -1
- package/dist/chunk-DJHS2XRW.cjs.map +0 -1
- package/dist/chunk-DNYVEOAX.js +0 -11
- package/dist/chunk-DNYVEOAX.js.map +0 -1
- package/dist/chunk-E526FHZ4.js +0 -169
- package/dist/chunk-E526FHZ4.js.map +0 -1
- package/dist/chunk-LO5QZO7F.js.map +0 -1
- package/dist/chunk-MYZT2OG7.js.map +0 -1
- package/dist/chunk-VVVZO2LE.cjs +0 -13
- package/dist/chunk-VVVZO2LE.cjs.map +0 -1
- package/dist/chunk-W4XXXJRW.cjs +0 -196
- package/dist/chunk-W4XXXJRW.cjs.map +0 -1
- package/dist/chunk-YB5ZJKNG.cjs.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clsx = require('clsx');
|
|
4
|
+
var tailwindMerge = require('tailwind-merge');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
7
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
|
|
30
|
+
// src/utils/cn.ts
|
|
31
|
+
function cn(...inputs) {
|
|
32
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
33
|
+
}
|
|
34
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
35
|
+
"inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-button text-sm font-semibold ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
variant: {
|
|
39
|
+
// Polaris primary — near-black brand with the stronger primary bevel
|
|
40
|
+
default: "bg-primary text-primary-foreground border border-primary shadow-button-primary hover:bg-primary/90 active:shadow-button-inset",
|
|
41
|
+
destructive: "bg-destructive text-destructive-foreground border border-destructive shadow-button-primary hover:bg-destructive/90 active:shadow-button-inset",
|
|
42
|
+
// Default/secondary surface — white with hairline + bevel
|
|
43
|
+
outline: "border border-border bg-card text-foreground shadow-button hover:bg-muted active:shadow-button-inset",
|
|
44
|
+
secondary: "border border-border bg-card text-foreground shadow-button hover:bg-muted active:shadow-button-inset",
|
|
45
|
+
ghost: "hover:bg-muted hover:text-foreground",
|
|
46
|
+
link: "text-info underline-offset-4 hover:underline"
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
// Polaris button sizes: md 30px, sm 26px, lg 36px
|
|
50
|
+
default: "h-[30px] px-3 py-1",
|
|
51
|
+
sm: "h-[26px] rounded-button px-2.5 text-xs",
|
|
52
|
+
lg: "h-9 rounded-button px-4 text-sm",
|
|
53
|
+
icon: "h-[30px] w-[30px]"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
variant: "default",
|
|
58
|
+
size: "default"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
var Button = React__namespace.forwardRef(
|
|
63
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
64
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
65
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
+
Comp,
|
|
67
|
+
{
|
|
68
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
69
|
+
ref,
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
Button.displayName = "Button";
|
|
76
|
+
|
|
77
|
+
exports.Button = Button;
|
|
78
|
+
exports.buttonVariants = buttonVariants;
|
|
79
|
+
exports.cn = cn;
|
|
80
|
+
//# sourceMappingURL=chunk-H6OULCHF.cjs.map
|
|
81
|
+
//# sourceMappingURL=chunk-H6OULCHF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/cn.ts","../src/primitives/button.tsx"],"names":["twMerge","clsx","cva","React","Slot","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACCA,IAAM,cAAA,GAAiBC,0BAAA;AAAA,EACrB,sSAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA;AAAA,QAEP,OAAA,EACE,+HAAA;AAAA,QACF,WAAA,EACE,+IAAA;AAAA;AAAA,QAEF,OAAA,EACE,sGAAA;AAAA,QACF,SAAA,EACE,sGAAA;AAAA,QACF,KAAA,EAAO,sCAAA;AAAA,QACP,IAAA,EAAM;AAAA,OACR;AAAA,MACA,IAAA,EAAM;AAAA;AAAA,QAEJ,OAAA,EAAS,oBAAA;AAAA,QACT,EAAA,EAAI,wCAAA;AAAA,QACJ,EAAA,EAAI,iCAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAQA,IAAM,MAAA,GAAeC,gBAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,IAAA,EAAM,UAAU,KAAA,EAAO,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAChE,IAAA,MAAM,IAAA,GAAO,UAAUC,cAAA,GAAO,QAAA;AAC9B,IAAA,uBACEC,cAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,IAAA,EAAM,SAAA,EAAW,CAAC,CAAA;AAAA,QAC1D,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AACA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"chunk-H6OULCHF.cjs","sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../utils/cn'\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-button text-sm font-semibold ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n // Polaris primary — near-black brand with the stronger primary bevel\n default:\n 'bg-primary text-primary-foreground border border-primary shadow-button-primary hover:bg-primary/90 active:shadow-button-inset',\n destructive:\n 'bg-destructive text-destructive-foreground border border-destructive shadow-button-primary hover:bg-destructive/90 active:shadow-button-inset',\n // Default/secondary surface — white with hairline + bevel\n outline:\n 'border border-border bg-card text-foreground shadow-button hover:bg-muted active:shadow-button-inset',\n secondary:\n 'border border-border bg-card text-foreground shadow-button hover:bg-muted active:shadow-button-inset',\n ghost: 'hover:bg-muted hover:text-foreground',\n link: 'text-info underline-offset-4 hover:underline',\n },\n size: {\n // Polaris button sizes: md 30px, sm 26px, lg 36px\n default: 'h-[30px] px-3 py-1',\n sm: 'h-[26px] rounded-button px-2.5 text-xs',\n lg: 'h-9 rounded-button px-4 text-sm',\n icon: 'h-[30px] w-[30px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkOW73RZOU_cjs = require('./chunk-OW73RZOU.cjs');
|
|
4
|
+
var chunkH6OULCHF_cjs = require('./chunk-H6OULCHF.cjs');
|
|
5
5
|
var React3 = require('react');
|
|
6
6
|
var lucideReact = require('lucide-react');
|
|
7
7
|
var Tooltip = require('@radix-ui/react-tooltip');
|
|
@@ -144,7 +144,7 @@ function NavItem({
|
|
|
144
144
|
"button",
|
|
145
145
|
{
|
|
146
146
|
onClick: () => onNavigate(item.route),
|
|
147
|
-
className:
|
|
147
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
148
148
|
"flex w-full items-center gap-3 rounded-md px-2.5 py-1.5 text-[13px] font-medium transition-colors",
|
|
149
149
|
"hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
|
|
150
150
|
isActive ? "bg-sidebar-accent font-semibold text-sidebar-accent-foreground shadow-sm" : "text-sidebar-foreground/80",
|
|
@@ -179,26 +179,44 @@ function NavItem({
|
|
|
179
179
|
}
|
|
180
180
|
return content;
|
|
181
181
|
}
|
|
182
|
+
function routeMatchScore(route, path) {
|
|
183
|
+
if (path === route) return route.length + 1;
|
|
184
|
+
if (route !== "/" && path.startsWith(route + "/")) return route.length;
|
|
185
|
+
return -1;
|
|
186
|
+
}
|
|
187
|
+
function resolveActiveRoute(navigation, path) {
|
|
188
|
+
let best = null;
|
|
189
|
+
let bestScore = 0;
|
|
190
|
+
const consider = (route) => {
|
|
191
|
+
if (!route) return;
|
|
192
|
+
const score = routeMatchScore(route, path);
|
|
193
|
+
if (score > bestScore) {
|
|
194
|
+
bestScore = score;
|
|
195
|
+
best = route;
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
for (const item of navigation) {
|
|
199
|
+
consider(item.route);
|
|
200
|
+
for (const child of item.children ?? []) consider(child.route);
|
|
201
|
+
}
|
|
202
|
+
return best;
|
|
203
|
+
}
|
|
182
204
|
function NavGroup({
|
|
183
205
|
item,
|
|
184
206
|
collapsed,
|
|
185
|
-
|
|
207
|
+
activeRoute,
|
|
186
208
|
onNavigate
|
|
187
209
|
}) {
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
);
|
|
210
|
+
const isChildActive = item.children?.some((c) => c.route === activeRoute);
|
|
211
|
+
const [open, setOpen] = React3__namespace.useState(() => isChildActive ?? false);
|
|
191
212
|
const Icon = getIcon(item.icon);
|
|
192
|
-
const isChildActive = item.children?.some(
|
|
193
|
-
(c) => currentPath === c.route || currentPath.startsWith(c.route + "/")
|
|
194
|
-
);
|
|
195
213
|
if (collapsed) {
|
|
196
214
|
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip__namespace.Root, { delayDuration: 0, children: [
|
|
197
215
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
198
216
|
"button",
|
|
199
217
|
{
|
|
200
218
|
onClick: () => onNavigate(item.route),
|
|
201
|
-
className:
|
|
219
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
202
220
|
"flex w-full items-center justify-center rounded-md px-2 py-2 text-sm font-medium transition-colors",
|
|
203
221
|
"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
204
222
|
isChildActive ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-muted"
|
|
@@ -217,7 +235,7 @@ function NavGroup({
|
|
|
217
235
|
"button",
|
|
218
236
|
{
|
|
219
237
|
onClick: () => setOpen(!open),
|
|
220
|
-
className:
|
|
238
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
221
239
|
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",
|
|
222
240
|
"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
223
241
|
isChildActive ? "text-sidebar-accent-foreground" : "text-sidebar-muted"
|
|
@@ -225,18 +243,18 @@ function NavGroup({
|
|
|
225
243
|
children: [
|
|
226
244
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4 shrink-0" }),
|
|
227
245
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: item.label }),
|
|
228
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className:
|
|
246
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: chunkH6OULCHF_cjs.cn("h-3.5 w-3.5 shrink-0 transition-transform", open && "rotate-180") })
|
|
229
247
|
]
|
|
230
248
|
}
|
|
231
249
|
),
|
|
232
250
|
open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-4 mt-0.5 space-y-0.5 border-l border-sidebar-border/50 pl-3", children: item.children?.map((child) => {
|
|
233
251
|
const ChildIcon = getIcon(child.icon);
|
|
234
|
-
const isActive =
|
|
252
|
+
const isActive = child.route === activeRoute;
|
|
235
253
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
236
254
|
"button",
|
|
237
255
|
{
|
|
238
256
|
onClick: () => onNavigate(child.route),
|
|
239
|
-
className:
|
|
257
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
240
258
|
"flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",
|
|
241
259
|
isActive ? "font-medium text-sidebar-accent-foreground" : "text-sidebar-muted hover:text-sidebar-accent-foreground"
|
|
242
260
|
),
|
|
@@ -268,6 +286,7 @@ function Sidebar({
|
|
|
268
286
|
}) {
|
|
269
287
|
const currentPath = currentPathProp;
|
|
270
288
|
const setCommandPaletteOpen = useLayoutStore((s) => s.setCommandPaletteOpen);
|
|
289
|
+
const activeRoute = resolveActiveRoute(navigation, currentPath);
|
|
271
290
|
const mainItems = navigation.filter((item) => item.section === "main");
|
|
272
291
|
const secondaryItems = navigation.filter((item) => item.section === "secondary");
|
|
273
292
|
const settingsItems = navigation.filter((item) => item.section === "settings");
|
|
@@ -278,7 +297,7 @@ function Sidebar({
|
|
|
278
297
|
"aside",
|
|
279
298
|
{
|
|
280
299
|
"data-print": "hide",
|
|
281
|
-
className:
|
|
300
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
282
301
|
"flex h-full flex-col bg-sidebar text-sidebar-foreground transition-all duration-200",
|
|
283
302
|
!borderless && "border-r border-sidebar-border",
|
|
284
303
|
collapsed ? "w-16" : "w-64"
|
|
@@ -287,7 +306,7 @@ function Sidebar({
|
|
|
287
306
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
288
307
|
"div",
|
|
289
308
|
{
|
|
290
|
-
className:
|
|
309
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
291
310
|
"flex h-14 items-center justify-between px-4",
|
|
292
311
|
!borderless && "border-b border-sidebar-border",
|
|
293
312
|
collapsed && "justify-center px-2"
|
|
@@ -320,43 +339,43 @@ function Sidebar({
|
|
|
320
339
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex-1 space-y-1 overflow-y-auto p-2", children: [
|
|
321
340
|
topContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 space-y-2", children: topContent }),
|
|
322
341
|
mainItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: mainItems.map(
|
|
323
|
-
(item) => item.children && item.children.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavGroup, { item, collapsed,
|
|
342
|
+
(item) => item.children && item.children.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavGroup, { item, collapsed, activeRoute, onNavigate: handleNavigate }, item.id) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
324
343
|
NavItem,
|
|
325
344
|
{
|
|
326
345
|
item,
|
|
327
346
|
collapsed,
|
|
328
|
-
isActive:
|
|
347
|
+
isActive: item.route === activeRoute,
|
|
329
348
|
onNavigate: handleNavigate
|
|
330
349
|
},
|
|
331
350
|
item.id
|
|
332
351
|
)
|
|
333
352
|
) }),
|
|
334
353
|
secondaryItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 space-y-1", children: secondaryItems.map(
|
|
335
|
-
(item) => item.children && item.children.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavGroup, { item, collapsed,
|
|
354
|
+
(item) => item.children && item.children.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavGroup, { item, collapsed, activeRoute, onNavigate: handleNavigate }, item.id) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
336
355
|
NavItem,
|
|
337
356
|
{
|
|
338
357
|
item,
|
|
339
358
|
collapsed,
|
|
340
|
-
isActive:
|
|
359
|
+
isActive: item.route === activeRoute,
|
|
341
360
|
onNavigate: handleNavigate
|
|
342
361
|
},
|
|
343
362
|
item.id
|
|
344
363
|
)
|
|
345
364
|
) })
|
|
346
365
|
] }),
|
|
347
|
-
settingsItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
366
|
+
settingsItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH6OULCHF_cjs.cn("p-2 space-y-1", !borderless && "border-t border-sidebar-border"), children: settingsItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
348
367
|
NavItem,
|
|
349
368
|
{
|
|
350
369
|
item,
|
|
351
370
|
collapsed,
|
|
352
|
-
isActive:
|
|
371
|
+
isActive: item.route === activeRoute,
|
|
353
372
|
onNavigate: handleNavigate
|
|
354
373
|
},
|
|
355
374
|
item.id
|
|
356
375
|
)) }),
|
|
357
|
-
footerContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
376
|
+
footerContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH6OULCHF_cjs.cn("p-2", !borderless && "border-t border-sidebar-border"), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: footerContent }) }),
|
|
358
377
|
orgSwitcher && React3__namespace.isValidElement(orgSwitcher) ? React3__namespace.cloneElement(orgSwitcher, { collapsed }) : orgSwitcher,
|
|
359
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH6OULCHF_cjs.cn("p-2", !borderless && "border-t border-sidebar-border"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH6OULCHF_cjs.cn(
|
|
360
379
|
"flex items-center rounded-md",
|
|
361
380
|
collapsed ? "flex-col gap-1" : "gap-1 px-1"
|
|
362
381
|
), children: [
|
|
@@ -549,7 +568,8 @@ var ICON_MAP2 = {
|
|
|
549
568
|
Inbox: lucideReact.Inbox,
|
|
550
569
|
UserCheck: lucideReact.UserCheck,
|
|
551
570
|
Star: lucideReact.Star,
|
|
552
|
-
Zap: lucideReact.Zap
|
|
571
|
+
Zap: lucideReact.Zap,
|
|
572
|
+
Clapperboard: lucideReact.Clapperboard
|
|
553
573
|
};
|
|
554
574
|
function getIcon2(name) {
|
|
555
575
|
return ICON_MAP2[name] ?? lucideReact.Home;
|
|
@@ -565,14 +585,14 @@ function NavDropdown({ item, currentPath, onNavigate }) {
|
|
|
565
585
|
"button",
|
|
566
586
|
{
|
|
567
587
|
"data-nav-active": isChildActive || void 0,
|
|
568
|
-
className:
|
|
588
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
569
589
|
"flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm transition-colors",
|
|
570
590
|
isChildActive ? "border-sidebar-accent-foreground font-semibold text-sidebar-foreground" : "border-transparent text-sidebar-muted hover:text-sidebar-foreground"
|
|
571
591
|
),
|
|
572
592
|
children: [
|
|
573
593
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4" }),
|
|
574
594
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label }),
|
|
575
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className:
|
|
595
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: chunkH6OULCHF_cjs.cn("h-3 w-3 transition-transform", open && "rotate-180") })
|
|
576
596
|
]
|
|
577
597
|
}
|
|
578
598
|
) }),
|
|
@@ -592,7 +612,7 @@ function NavDropdown({ item, currentPath, onNavigate }) {
|
|
|
592
612
|
onNavigate(child.route);
|
|
593
613
|
setOpen(false);
|
|
594
614
|
},
|
|
595
|
-
className:
|
|
615
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
596
616
|
"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors",
|
|
597
617
|
isActive ? "bg-muted font-medium text-foreground" : "text-popover-foreground hover:bg-muted/70"
|
|
598
618
|
),
|
|
@@ -699,7 +719,7 @@ function Topbar({
|
|
|
699
719
|
{
|
|
700
720
|
"data-nav-active": isActive || void 0,
|
|
701
721
|
onClick: () => handleNavigate(item.route),
|
|
702
|
-
className:
|
|
722
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
703
723
|
"flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm transition-colors",
|
|
704
724
|
isActive ? "border-primary font-semibold text-sidebar-foreground" : "border-transparent text-sidebar-muted hover:text-sidebar-foreground"
|
|
705
725
|
),
|
|
@@ -752,7 +772,7 @@ function SidebarLayout({
|
|
|
752
772
|
const [mobileMenuOpen, setMobileMenuOpen] = React3__namespace.useState(false);
|
|
753
773
|
const [headerSlot, setHeaderSlot] = React3__namespace.useState(null);
|
|
754
774
|
const [actionsSlot, setActionsSlot] = React3__namespace.useState(null);
|
|
755
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
775
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SaveBarProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(ModuleHeaderSlotContext.Provider, { value: headerSlot, children: /* @__PURE__ */ jsxRuntime.jsx(ModuleHeaderActionsSlotContext.Provider, { value: actionsSlot, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH6OULCHF_cjs.cn(
|
|
756
776
|
"flex h-screen overflow-hidden bg-background",
|
|
757
777
|
// Frame mode: the inset gap around the framed card takes the sidebar (menu)
|
|
758
778
|
// color, so the white card reads as a panel floating on the same tone as the
|
|
@@ -782,11 +802,11 @@ function SidebarLayout({
|
|
|
782
802
|
unreadCount
|
|
783
803
|
}
|
|
784
804
|
) }),
|
|
785
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
805
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH6OULCHF_cjs.cn(
|
|
786
806
|
"relative flex flex-1 flex-col overflow-hidden",
|
|
787
807
|
frame && "md:m-2 md:rounded-xl md:border md:border-border md:bg-card"
|
|
788
808
|
), children: [
|
|
789
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
809
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH6OULCHF_cjs.cn(
|
|
790
810
|
"flex min-h-14 shrink-0 items-center justify-between gap-3 border-b border-border bg-card px-4 py-2",
|
|
791
811
|
mobileHeader !== "minimal" && "hidden md:flex"
|
|
792
812
|
), children: [
|
|
@@ -810,7 +830,7 @@ function SidebarLayout({
|
|
|
810
830
|
] })
|
|
811
831
|
] }),
|
|
812
832
|
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 overflow-y-auto pb-16 md:pb-0", children }),
|
|
813
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
833
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SaveBar, {})
|
|
814
834
|
] }),
|
|
815
835
|
mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
816
836
|
MobileOverlay,
|
|
@@ -853,7 +873,7 @@ function TopbarLayout({
|
|
|
853
873
|
hasBottomNav = false
|
|
854
874
|
}) {
|
|
855
875
|
const [mobileMenuOpen, setMobileMenuOpen] = React3__namespace.useState(false);
|
|
856
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
876
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SaveBarProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-screen flex-col overflow-hidden bg-background", children: [
|
|
857
877
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
858
878
|
Topbar,
|
|
859
879
|
{
|
|
@@ -872,8 +892,8 @@ function TopbarLayout({
|
|
|
872
892
|
onMenuClick: hasBottomNav ? void 0 : () => setMobileMenuOpen(true)
|
|
873
893
|
}
|
|
874
894
|
),
|
|
875
|
-
/* @__PURE__ */ jsxRuntime.jsx("main", { className:
|
|
876
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
895
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: chunkH6OULCHF_cjs.cn("flex-1 overflow-y-auto pb-16 md:pb-0", frame && "md:bg-sidebar md:p-2"), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH6OULCHF_cjs.cn("min-h-full", frame && "md:rounded-xl md:border md:border-border md:bg-card"), children }) }),
|
|
896
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SaveBar, {}),
|
|
877
897
|
mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
878
898
|
MobileOverlay,
|
|
879
899
|
{
|
|
@@ -941,7 +961,7 @@ function MobileOverlay({ onClose, onNavigate, ...sidebarProps }) {
|
|
|
941
961
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
942
962
|
"div",
|
|
943
963
|
{
|
|
944
|
-
className:
|
|
964
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
945
965
|
"absolute inset-0 bg-black/50 transition-opacity duration-300 ease-out",
|
|
946
966
|
visible ? "opacity-100" : "opacity-0"
|
|
947
967
|
),
|
|
@@ -951,7 +971,7 @@ function MobileOverlay({ onClose, onNavigate, ...sidebarProps }) {
|
|
|
951
971
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
952
972
|
"div",
|
|
953
973
|
{
|
|
954
|
-
className:
|
|
974
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
955
975
|
"absolute inset-y-0 left-0 shadow-2xl transition-transform duration-300 ease-out will-change-transform",
|
|
956
976
|
visible ? "translate-x-0" : "-translate-x-full"
|
|
957
977
|
),
|
|
@@ -1034,7 +1054,7 @@ function MobileBottomNav({
|
|
|
1034
1054
|
{
|
|
1035
1055
|
type: "button",
|
|
1036
1056
|
onClick: () => onNavigate?.(item.route),
|
|
1037
|
-
className:
|
|
1057
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
1038
1058
|
"flex flex-1 flex-col items-center justify-center gap-0.5 px-1 py-1 transition-colors",
|
|
1039
1059
|
isActive ? "text-primary" : "text-muted-foreground"
|
|
1040
1060
|
),
|
|
@@ -1175,7 +1195,7 @@ function PageTransition({
|
|
|
1175
1195
|
}) {
|
|
1176
1196
|
const transition = useNavTransition();
|
|
1177
1197
|
const animClass = resolveTransitionClass(transition, direction);
|
|
1178
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1198
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH6OULCHF_cjs.cn(animClass, className), children }, transitionKey);
|
|
1179
1199
|
}
|
|
1180
1200
|
function PageHeaderActions({ children }) {
|
|
1181
1201
|
const slot = useModuleHeaderActionsSlot();
|
|
@@ -1201,7 +1221,7 @@ function NavItem2({ item }) {
|
|
|
1201
1221
|
{
|
|
1202
1222
|
type: "button",
|
|
1203
1223
|
onClick: () => hasChildren ? setExpanded(!expanded) : item.onClick?.(),
|
|
1204
|
-
className:
|
|
1224
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
1205
1225
|
"flex items-center gap-2 w-full rounded-md px-2.5 py-1.5 text-sm transition-colors",
|
|
1206
1226
|
isActive ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
|
|
1207
1227
|
),
|
|
@@ -1217,7 +1237,7 @@ function NavItem2({ item }) {
|
|
|
1217
1237
|
{
|
|
1218
1238
|
type: "button",
|
|
1219
1239
|
onClick: child.onClick,
|
|
1220
|
-
className:
|
|
1240
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
1221
1241
|
"flex items-center w-full rounded-md px-2.5 py-1 text-xs transition-colors",
|
|
1222
1242
|
child.active ? "text-primary font-medium bg-primary/5" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
|
|
1223
1243
|
),
|
|
@@ -1258,14 +1278,14 @@ function MobileTabs({ nav }) {
|
|
|
1258
1278
|
setExpandedId(null);
|
|
1259
1279
|
}
|
|
1260
1280
|
},
|
|
1261
|
-
className:
|
|
1281
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
1262
1282
|
"flex items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1.5 text-xs font-medium transition-colors shrink-0",
|
|
1263
1283
|
isActive ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:text-foreground"
|
|
1264
1284
|
),
|
|
1265
1285
|
children: [
|
|
1266
1286
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-3 w-3" }),
|
|
1267
1287
|
item.label,
|
|
1268
|
-
hasChildren && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className:
|
|
1288
|
+
hasChildren && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: chunkH6OULCHF_cjs.cn("h-2.5 w-2.5 transition-transform", isExpanded && "rotate-180") })
|
|
1269
1289
|
]
|
|
1270
1290
|
},
|
|
1271
1291
|
item.id
|
|
@@ -1282,7 +1302,7 @@ function MobileTabs({ nav }) {
|
|
|
1282
1302
|
child.onClick?.();
|
|
1283
1303
|
setExpandedId(null);
|
|
1284
1304
|
},
|
|
1285
|
-
className:
|
|
1305
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
1286
1306
|
"whitespace-nowrap rounded-full px-2.5 py-1 text-[11px] font-medium transition-colors shrink-0",
|
|
1287
1307
|
child.active ? "bg-foreground/10 text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
1288
1308
|
),
|
|
@@ -1303,8 +1323,8 @@ function useBackStyle() {
|
|
|
1303
1323
|
function SubpageHeader({ title, subtitle, icon, onBack, parentLabel, actions, backStyle }) {
|
|
1304
1324
|
const t = core.useTranslation();
|
|
1305
1325
|
const appStyle = useBackStyle();
|
|
1306
|
-
const { onBack: effectiveOnBack, parentLabel: effectiveParentLabel } =
|
|
1307
|
-
|
|
1326
|
+
const { onBack: effectiveOnBack, parentLabel: effectiveParentLabel } = chunkOW73RZOU_cjs.useCrossModuleBack(onBack, parentLabel);
|
|
1327
|
+
chunkOW73RZOU_cjs.useBackHandler(effectiveOnBack);
|
|
1308
1328
|
const Icon = icon ? ICON_MAP2[icon] ?? null : null;
|
|
1309
1329
|
const style = !effectiveOnBack ? "icon" : backStyle ?? appStyle;
|
|
1310
1330
|
const effectiveStyle = style !== "icon" && !effectiveParentLabel ? "icon" : style;
|
|
@@ -1372,7 +1392,7 @@ function ModuleHeader({ nav }) {
|
|
|
1372
1392
|
{
|
|
1373
1393
|
type: "button",
|
|
1374
1394
|
onClick: () => hasChildren ? defaultChild(item)?.onClick?.() : item.onClick?.(),
|
|
1375
|
-
className:
|
|
1395
|
+
className: chunkH6OULCHF_cjs.cn(
|
|
1376
1396
|
"flex shrink-0 items-center gap-1.5 whitespace-nowrap border-b-2 px-2.5 py-1.5 text-sm font-medium transition-colors",
|
|
1377
1397
|
isActive ? "border-primary text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
1378
1398
|
),
|
|
@@ -1395,11 +1415,11 @@ function ModulePage({ title, subtitle, nav, children, className, headerAction, s
|
|
|
1395
1415
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1396
1416
|
/* @__PURE__ */ jsxRuntime.jsx(ModuleHeader, { nav }),
|
|
1397
1417
|
showHeader && headerAction && /* @__PURE__ */ jsxRuntime.jsx(PageHeaderActions, { children: headerAction }),
|
|
1398
|
-
/* @__PURE__ */ jsxRuntime.jsx(PageTransition, { transitionKey, direction, className:
|
|
1418
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageTransition, { transitionKey, direction, className: chunkH6OULCHF_cjs.cn("min-w-0", className), children })
|
|
1399
1419
|
] });
|
|
1400
1420
|
}
|
|
1401
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1402
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-48 shrink-0 hidden md:block no-print", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH6OULCHF_cjs.cn("flex gap-6 -mt-2", className), children: [
|
|
1422
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-48 shrink-0 hidden md:block no-print", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkH6OULCHF_cjs.cn(sidebarFooter && "sticky top-4 flex flex-col"), style: sidebarFooter ? { height: "calc(100vh - 8rem)" } : void 0, children: [
|
|
1403
1423
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1404
1424
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2.5 mb-2", children: title }),
|
|
1405
1425
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "space-y-0.5", children: nav.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavItem2, { item }, item.id)) })
|
|
@@ -1419,9 +1439,96 @@ function ModulePage({ title, subtitle, nav, children, className, headerAction, s
|
|
|
1419
1439
|
] })
|
|
1420
1440
|
] });
|
|
1421
1441
|
}
|
|
1442
|
+
var ContentSplitContext = React3__namespace.createContext(null);
|
|
1443
|
+
function ContentSplit({
|
|
1444
|
+
children,
|
|
1445
|
+
aside,
|
|
1446
|
+
asideTitle,
|
|
1447
|
+
asideDescription,
|
|
1448
|
+
asideWidth = "20rem",
|
|
1449
|
+
asideOpen,
|
|
1450
|
+
onAsideOpenChange,
|
|
1451
|
+
collapsible = false,
|
|
1452
|
+
defaultCollapsed = false,
|
|
1453
|
+
className
|
|
1454
|
+
}) {
|
|
1455
|
+
const [internalOpen, setInternalOpen] = React3__namespace.useState(false);
|
|
1456
|
+
const open = asideOpen ?? internalOpen;
|
|
1457
|
+
const setOpen = onAsideOpenChange ?? setInternalOpen;
|
|
1458
|
+
const [collapsed, setCollapsed] = React3__namespace.useState(collapsible && defaultCollapsed);
|
|
1459
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ContentSplitContext.Provider, { value: { open, setOpen }, children: [
|
|
1460
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1461
|
+
"div",
|
|
1462
|
+
{
|
|
1463
|
+
className: chunkH6OULCHF_cjs.cn("lg:grid lg:items-start lg:gap-6", className),
|
|
1464
|
+
style: { gridTemplateColumns: `minmax(0, 1fr) ${collapsed ? "auto" : asideWidth}` },
|
|
1465
|
+
children: [
|
|
1466
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children }),
|
|
1467
|
+
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: "hidden lg:block lg:sticky lg:top-4", children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1468
|
+
chunkH6OULCHF_cjs.Button,
|
|
1469
|
+
{
|
|
1470
|
+
variant: "outline",
|
|
1471
|
+
size: "sm",
|
|
1472
|
+
onClick: () => setCollapsed(false),
|
|
1473
|
+
className: "h-9 w-9 p-0",
|
|
1474
|
+
"aria-label": typeof asideTitle === "string" ? asideTitle : void 0,
|
|
1475
|
+
title: typeof asideTitle === "string" ? asideTitle : void 0,
|
|
1476
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelRightOpen, { className: "h-4 w-4" })
|
|
1477
|
+
}
|
|
1478
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-card border border-border bg-card", children: [
|
|
1479
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2 border-b border-border px-4 py-3", children: [
|
|
1480
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
1481
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: asideTitle }),
|
|
1482
|
+
asideDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: asideDescription })
|
|
1483
|
+
] }),
|
|
1484
|
+
collapsible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1485
|
+
"button",
|
|
1486
|
+
{
|
|
1487
|
+
type: "button",
|
|
1488
|
+
onClick: () => setCollapsed(true),
|
|
1489
|
+
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",
|
|
1490
|
+
"aria-label": "collapse",
|
|
1491
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelRightClose, { className: "h-4 w-4" })
|
|
1492
|
+
}
|
|
1493
|
+
)
|
|
1494
|
+
] }),
|
|
1495
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: aside })
|
|
1496
|
+
] }) })
|
|
1497
|
+
]
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.Sheet, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkOW73RZOU_cjs.SheetContent, { width: "max-w-sm", children: [
|
|
1501
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkOW73RZOU_cjs.SheetHeader, { children: [
|
|
1502
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SheetTitle, { children: asideTitle }),
|
|
1503
|
+
asideDescription && /* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SheetDescription, { children: asideDescription })
|
|
1504
|
+
] }),
|
|
1505
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkOW73RZOU_cjs.SheetBody, { children: aside })
|
|
1506
|
+
] }) }) })
|
|
1507
|
+
] });
|
|
1508
|
+
}
|
|
1509
|
+
function ContentSplitTrigger({ label, iconOnly, className }) {
|
|
1510
|
+
const ctx = React3__namespace.useContext(ContentSplitContext);
|
|
1511
|
+
if (!ctx) return null;
|
|
1512
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1513
|
+
chunkH6OULCHF_cjs.Button,
|
|
1514
|
+
{
|
|
1515
|
+
variant: "outline",
|
|
1516
|
+
size: "sm",
|
|
1517
|
+
onClick: () => ctx.setOpen(true),
|
|
1518
|
+
className: chunkH6OULCHF_cjs.cn("lg:hidden", className),
|
|
1519
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
1520
|
+
children: [
|
|
1521
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelRight, { className: chunkH6OULCHF_cjs.cn("h-4 w-4", !iconOnly && "mr-1.5") }),
|
|
1522
|
+
!iconOnly && label
|
|
1523
|
+
]
|
|
1524
|
+
}
|
|
1525
|
+
);
|
|
1526
|
+
}
|
|
1422
1527
|
|
|
1423
1528
|
exports.AppShell = AppShell;
|
|
1424
1529
|
exports.BackStyleProvider = BackStyleProvider;
|
|
1530
|
+
exports.ContentSplit = ContentSplit;
|
|
1531
|
+
exports.ContentSplitTrigger = ContentSplitTrigger;
|
|
1425
1532
|
exports.ICON_MAP = ICON_MAP;
|
|
1426
1533
|
exports.ModuleLayoutProvider = ModuleLayoutProvider;
|
|
1427
1534
|
exports.ModulePage = ModulePage;
|
|
@@ -1437,5 +1544,5 @@ exports.useModuleHeaderActionsSlot = useModuleHeaderActionsSlot;
|
|
|
1437
1544
|
exports.useModuleHeaderSlot = useModuleHeaderSlot;
|
|
1438
1545
|
exports.useModuleLayout = useModuleLayout;
|
|
1439
1546
|
exports.useNavTransition = useNavTransition;
|
|
1440
|
-
//# sourceMappingURL=chunk-
|
|
1441
|
-
//# sourceMappingURL=chunk-
|
|
1547
|
+
//# sourceMappingURL=chunk-HG5RH3B3.cjs.map
|
|
1548
|
+
//# sourceMappingURL=chunk-HG5RH3B3.cjs.map
|