@loykin/designkit 0.0.1-dev.1 → 0.0.1-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +174 -99
- package/dist/index.cjs +347 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -3
- package/dist/index.d.ts +104 -3
- package/dist/index.js +347 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import {
|
|
4
|
+
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
5
5
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
6
6
|
import { useRender } from '@base-ui/react/use-render';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import { Button as Button$1 } from '@base-ui/react/button';
|
|
9
9
|
import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
10
|
-
import { CheckIcon, ChevronRightIcon, ChevronDownIcon, ChevronUpIcon, XIcon, PanelLeftIcon, Check } from 'lucide-react';
|
|
10
|
+
import { GripHorizontal, CheckIcon, ChevronRightIcon, ChevronDownIcon, ChevronUpIcon, XIcon, PanelLeftIcon, SlidersHorizontal, Check } from 'lucide-react';
|
|
11
11
|
import { Menu } from '@base-ui/react/menu';
|
|
12
12
|
import { Input as Input$1 } from '@base-ui/react/input';
|
|
13
13
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
@@ -17,7 +17,7 @@ import { Select as Select$1 } from '@base-ui/react/select';
|
|
|
17
17
|
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
18
18
|
import { Dialog } from '@base-ui/react/dialog';
|
|
19
19
|
import * as React2 from 'react';
|
|
20
|
-
import React2__default, { useMemo, Children, useState, Fragment, useEffect } from 'react';
|
|
20
|
+
import React2__default, { forwardRef, useMemo, Children, useState, Fragment, useEffect } from 'react';
|
|
21
21
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
22
22
|
import { Slider as Slider$1 } from '@base-ui/react/slider';
|
|
23
23
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
@@ -2130,6 +2130,71 @@ var DataPage = Object.assign(Root, {
|
|
|
2130
2130
|
GroupBody,
|
|
2131
2131
|
Footer
|
|
2132
2132
|
});
|
|
2133
|
+
var DashboardPanel = forwardRef(function DashboardPanel2({
|
|
2134
|
+
title,
|
|
2135
|
+
description,
|
|
2136
|
+
loading,
|
|
2137
|
+
error,
|
|
2138
|
+
transparent,
|
|
2139
|
+
editable,
|
|
2140
|
+
className,
|
|
2141
|
+
style,
|
|
2142
|
+
children,
|
|
2143
|
+
headerRight
|
|
2144
|
+
}, ref) {
|
|
2145
|
+
return /* @__PURE__ */ jsxs(
|
|
2146
|
+
"div",
|
|
2147
|
+
{
|
|
2148
|
+
ref,
|
|
2149
|
+
className: cn(
|
|
2150
|
+
"group flex h-full flex-col overflow-hidden",
|
|
2151
|
+
transparent ? "" : "rounded-(--radius) border bg-card text-card-foreground",
|
|
2152
|
+
editable && "ring-1 ring-border/60 ring-inset",
|
|
2153
|
+
className
|
|
2154
|
+
),
|
|
2155
|
+
style,
|
|
2156
|
+
children: [
|
|
2157
|
+
(title || headerRight || editable) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 pl-3 pr-1.5 py-2", children: [
|
|
2158
|
+
editable && /* @__PURE__ */ jsx("div", { className: "shrink-0 cursor-grab active:cursor-grabbing select-none text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors -ml-1 px-0.5", children: /* @__PURE__ */ jsx(GripHorizontal, { className: "h-3.5 w-3.5" }) }),
|
|
2159
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2160
|
+
title && /* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-card-foreground", children: title }),
|
|
2161
|
+
description && /* @__PURE__ */ jsx("p", { className: "truncate text-[11px] text-muted-foreground", children: description })
|
|
2162
|
+
] }),
|
|
2163
|
+
headerRight && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-150", children: headerRight })
|
|
2164
|
+
] }),
|
|
2165
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex-1 min-h-0 p-3", children: [
|
|
2166
|
+
loading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-card/70 z-10", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }) }),
|
|
2167
|
+
error && /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: error }) }),
|
|
2168
|
+
!error && children
|
|
2169
|
+
] })
|
|
2170
|
+
]
|
|
2171
|
+
}
|
|
2172
|
+
);
|
|
2173
|
+
});
|
|
2174
|
+
function DashboardBodyTemplate({
|
|
2175
|
+
theme,
|
|
2176
|
+
className,
|
|
2177
|
+
title,
|
|
2178
|
+
description,
|
|
2179
|
+
topBar,
|
|
2180
|
+
toolbar,
|
|
2181
|
+
variableBar,
|
|
2182
|
+
children,
|
|
2183
|
+
contentClassName
|
|
2184
|
+
}) {
|
|
2185
|
+
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-dashboard", className), style: theme, children: [
|
|
2186
|
+
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
2187
|
+
(title || toolbar) && /* @__PURE__ */ jsx("header", { className: "shrink-0 border-b px-(--dk-page-padding-x) py-(--dk-page-padding-y)", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
2188
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2189
|
+
title && /* @__PURE__ */ jsx("h1", { className: "text-sm font-semibold truncate", children: title }),
|
|
2190
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description })
|
|
2191
|
+
] }),
|
|
2192
|
+
toolbar && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 shrink-0", children: toolbar })
|
|
2193
|
+
] }) }),
|
|
2194
|
+
variableBar && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex flex-wrap items-center gap-2 px-(--dk-page-padding-x) py-1.5", children: variableBar }),
|
|
2195
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex-1 min-h-0 overflow-auto px-[calc(var(--dk-page-padding-x)-0.5rem)] pt-0 pb-(--dk-page-padding-y)", contentClassName), children })
|
|
2196
|
+
] });
|
|
2197
|
+
}
|
|
2133
2198
|
function DataBodyTab(_props) {
|
|
2134
2199
|
return null;
|
|
2135
2200
|
}
|
|
@@ -2408,6 +2473,284 @@ var DataBodyTemplate = Object.assign(Root2, {
|
|
|
2408
2473
|
Row: DataBodyRow,
|
|
2409
2474
|
Field: DataBodyField
|
|
2410
2475
|
});
|
|
2476
|
+
function useIsNarrow() {
|
|
2477
|
+
const [narrow, setNarrow] = useState(false);
|
|
2478
|
+
useEffect(() => {
|
|
2479
|
+
const mql = window.matchMedia("(max-width: 1023px)");
|
|
2480
|
+
setNarrow(mql.matches);
|
|
2481
|
+
const handler = (e) => setNarrow(e.matches);
|
|
2482
|
+
mql.addEventListener("change", handler);
|
|
2483
|
+
return () => mql.removeEventListener("change", handler);
|
|
2484
|
+
}, []);
|
|
2485
|
+
return narrow;
|
|
2486
|
+
}
|
|
2487
|
+
function BrowseBodyTemplate({
|
|
2488
|
+
theme,
|
|
2489
|
+
className,
|
|
2490
|
+
topBar,
|
|
2491
|
+
title,
|
|
2492
|
+
description,
|
|
2493
|
+
actions,
|
|
2494
|
+
sidebar,
|
|
2495
|
+
sidebarTitle = "Filters",
|
|
2496
|
+
sidebarWidth = "18rem",
|
|
2497
|
+
toolbar,
|
|
2498
|
+
footer,
|
|
2499
|
+
contentClassName,
|
|
2500
|
+
children
|
|
2501
|
+
}) {
|
|
2502
|
+
const isNarrow = useIsNarrow();
|
|
2503
|
+
const hasHeader = title || description || actions;
|
|
2504
|
+
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-browse", className), style: theme, children: [
|
|
2505
|
+
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
2506
|
+
hasHeader && /* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
2507
|
+
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description }),
|
|
2508
|
+
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2509
|
+
] }),
|
|
2510
|
+
/* @__PURE__ */ jsxs(DataPage.Content, { padding: "none", className: "flex flex-col overflow-hidden", children: [
|
|
2511
|
+
(toolbar || isNarrow) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b px-(--dk-page-padding-x) py-2", children: [
|
|
2512
|
+
isNarrow && /* @__PURE__ */ jsxs(Sheet, { children: [
|
|
2513
|
+
/* @__PURE__ */ jsxs(
|
|
2514
|
+
SheetTrigger,
|
|
2515
|
+
{
|
|
2516
|
+
render: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", className: "shrink-0 gap-1.5" }),
|
|
2517
|
+
children: [
|
|
2518
|
+
/* @__PURE__ */ jsx(SlidersHorizontal, { className: "h-3.5 w-3.5" }),
|
|
2519
|
+
sidebarTitle
|
|
2520
|
+
]
|
|
2521
|
+
}
|
|
2522
|
+
),
|
|
2523
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "flex flex-col gap-0 p-0", children: [
|
|
2524
|
+
/* @__PURE__ */ jsx(SheetHeader, { className: "shrink-0 border-b px-4 py-3", children: /* @__PURE__ */ jsx(SheetTitle, { children: sidebarTitle }) }),
|
|
2525
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsx("div", { className: "p-4", children: sidebar }) })
|
|
2526
|
+
] })
|
|
2527
|
+
] }),
|
|
2528
|
+
toolbar && /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: toolbar })
|
|
2529
|
+
] }),
|
|
2530
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
2531
|
+
!isNarrow && /* @__PURE__ */ jsx(
|
|
2532
|
+
"aside",
|
|
2533
|
+
{
|
|
2534
|
+
className: "shrink-0 overflow-hidden border-r",
|
|
2535
|
+
style: { width: sidebarWidth },
|
|
2536
|
+
children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "px-(--dk-page-padding-x) py-(--dk-page-padding-y)", children: sidebar }) })
|
|
2537
|
+
}
|
|
2538
|
+
),
|
|
2539
|
+
/* @__PURE__ */ jsx(
|
|
2540
|
+
"div",
|
|
2541
|
+
{
|
|
2542
|
+
className: cn(
|
|
2543
|
+
"min-w-0 flex-1 overflow-hidden px-(--dk-page-padding-x) py-(--dk-page-padding-y)",
|
|
2544
|
+
"[&_.dg-shell]:h-full [&_.dg-table-stack]:flex-1 [&_.dg-table-stack]:min-h-0",
|
|
2545
|
+
"[&_.dg-card-container]:flex-1 [&_.dg-card-container]:min-h-0 [&_.dg-card-container]:overflow-auto",
|
|
2546
|
+
contentClassName
|
|
2547
|
+
),
|
|
2548
|
+
children
|
|
2549
|
+
}
|
|
2550
|
+
)
|
|
2551
|
+
] })
|
|
2552
|
+
] }),
|
|
2553
|
+
footer && /* @__PURE__ */ jsx(DataPage.Footer, { children: footer })
|
|
2554
|
+
] });
|
|
2555
|
+
}
|
|
2556
|
+
function DetailBodyHeader({
|
|
2557
|
+
eyebrow,
|
|
2558
|
+
title,
|
|
2559
|
+
description,
|
|
2560
|
+
status,
|
|
2561
|
+
actions,
|
|
2562
|
+
compact,
|
|
2563
|
+
className
|
|
2564
|
+
}) {
|
|
2565
|
+
return /* @__PURE__ */ jsxs(DataPage.Header, { className, children: [
|
|
2566
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2567
|
+
eyebrow && /* @__PURE__ */ jsx("div", { className: "mb-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: eyebrow }),
|
|
2568
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
2569
|
+
title && /* @__PURE__ */ jsx("h1", { className: cn("min-w-0 truncate font-semibold", compact ? "text-base" : "text-lg"), children: title }),
|
|
2570
|
+
status && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: status })
|
|
2571
|
+
] }),
|
|
2572
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
|
|
2573
|
+
] }),
|
|
2574
|
+
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2575
|
+
] });
|
|
2576
|
+
}
|
|
2577
|
+
function DetailBodyTab(_props) {
|
|
2578
|
+
return null;
|
|
2579
|
+
}
|
|
2580
|
+
function isDetailBodyTab(node) {
|
|
2581
|
+
return Boolean(node && typeof node === "object" && "type" in node && node.type === DetailBodyTab);
|
|
2582
|
+
}
|
|
2583
|
+
function DetailBodySection({
|
|
2584
|
+
title,
|
|
2585
|
+
description,
|
|
2586
|
+
actions,
|
|
2587
|
+
surface = "plain",
|
|
2588
|
+
className,
|
|
2589
|
+
children
|
|
2590
|
+
}) {
|
|
2591
|
+
return /* @__PURE__ */ jsxs(
|
|
2592
|
+
"section",
|
|
2593
|
+
{
|
|
2594
|
+
className: cn(
|
|
2595
|
+
"min-h-0",
|
|
2596
|
+
surface === "card" && "rounded-(--radius) border bg-card p-(--dk-panel-gap) text-card-foreground shadow-sm",
|
|
2597
|
+
surface === "bordered" && "rounded-(--radius) border p-(--dk-panel-gap)",
|
|
2598
|
+
className
|
|
2599
|
+
),
|
|
2600
|
+
children: [
|
|
2601
|
+
(title || description || actions) && /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-start justify-between gap-3", children: [
|
|
2602
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2603
|
+
title && /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold", children: title }),
|
|
2604
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description })
|
|
2605
|
+
] }),
|
|
2606
|
+
actions && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: actions })
|
|
2607
|
+
] }),
|
|
2608
|
+
children
|
|
2609
|
+
]
|
|
2610
|
+
}
|
|
2611
|
+
);
|
|
2612
|
+
}
|
|
2613
|
+
function renderChildren(nodes) {
|
|
2614
|
+
return Children.toArray(nodes).map((child, i) => /* @__PURE__ */ jsx(Fragment, { children: child }, i));
|
|
2615
|
+
}
|
|
2616
|
+
function DetailBodyTemplateRoot({
|
|
2617
|
+
variant = "record",
|
|
2618
|
+
theme,
|
|
2619
|
+
className,
|
|
2620
|
+
topBar,
|
|
2621
|
+
header,
|
|
2622
|
+
lead,
|
|
2623
|
+
eyebrow,
|
|
2624
|
+
title,
|
|
2625
|
+
description,
|
|
2626
|
+
status,
|
|
2627
|
+
actions,
|
|
2628
|
+
media,
|
|
2629
|
+
aside,
|
|
2630
|
+
summary,
|
|
2631
|
+
stickyAside = true,
|
|
2632
|
+
contentClassName,
|
|
2633
|
+
mediaClassName,
|
|
2634
|
+
asideClassName,
|
|
2635
|
+
children
|
|
2636
|
+
}) {
|
|
2637
|
+
const childArray = useMemo(() => Children.toArray(children), [children]);
|
|
2638
|
+
const tabs = childArray.filter(isDetailBodyTab);
|
|
2639
|
+
const hasTabs = tabs.length > 0;
|
|
2640
|
+
const [activeTab, setActiveTab] = useState(() => tabs[0]?.props.id ?? "");
|
|
2641
|
+
const selectedTab = tabs.find((tab) => tab.props.id === activeTab) ?? tabs[0];
|
|
2642
|
+
const summarySlot = summary ? /* @__PURE__ */ jsx("div", { className: "min-h-0 rounded-(--radius) border bg-card p-(--dk-panel-gap) text-card-foreground", children: summary }) : null;
|
|
2643
|
+
const mediaSlot = media ? /* @__PURE__ */ jsx("div", { className: cn("min-h-0 overflow-hidden rounded-(--radius) border bg-card", mediaClassName), children: media }) : null;
|
|
2644
|
+
const leadGridClass = variant === "media" ? "xl:grid-cols-[minmax(0,1.35fr)_minmax(18rem,0.65fr)]" : "xl:grid-cols-2";
|
|
2645
|
+
const defaultHeader = eyebrow || title || description || status || actions ? /* @__PURE__ */ jsx(
|
|
2646
|
+
DetailBodyHeader,
|
|
2647
|
+
{
|
|
2648
|
+
eyebrow,
|
|
2649
|
+
title,
|
|
2650
|
+
description,
|
|
2651
|
+
status,
|
|
2652
|
+
actions
|
|
2653
|
+
}
|
|
2654
|
+
) : null;
|
|
2655
|
+
const defaultLead = media || summary ? /* @__PURE__ */ jsxs("div", { className: cn("grid gap-(--dk-panel-gap)", leadGridClass), children: [
|
|
2656
|
+
mediaSlot,
|
|
2657
|
+
summarySlot
|
|
2658
|
+
] }) : null;
|
|
2659
|
+
const body = hasTabs ? /* @__PURE__ */ jsxs("div", { className: "min-h-0", children: [
|
|
2660
|
+
/* @__PURE__ */ jsx(DataPage.Tabs, { children: tabs.map((tab) => /* @__PURE__ */ jsx(
|
|
2661
|
+
DataPage.Tab,
|
|
2662
|
+
{
|
|
2663
|
+
active: (selectedTab?.props.id ?? "") === tab.props.id,
|
|
2664
|
+
count: tab.props.count,
|
|
2665
|
+
disabled: tab.props.disabled,
|
|
2666
|
+
onClick: () => setActiveTab(tab.props.id),
|
|
2667
|
+
children: tab.props.label
|
|
2668
|
+
},
|
|
2669
|
+
tab.props.id
|
|
2670
|
+
)) }),
|
|
2671
|
+
/* @__PURE__ */ jsx("div", { className: "pt-(--dk-panel-gap)", children: selectedTab?.props.children })
|
|
2672
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "space-y-(--dk-panel-gap)", children: renderChildren(children) });
|
|
2673
|
+
const leadSlot = lead ?? defaultLead;
|
|
2674
|
+
const outsideAsideSlot = variant === "full" ? null : aside;
|
|
2675
|
+
const insideAsideSlot = variant === "full" ? aside : null;
|
|
2676
|
+
const hasRecordInspector = Boolean(leadSlot);
|
|
2677
|
+
const hasFullLeadArea = Boolean(leadSlot || insideAsideSlot);
|
|
2678
|
+
const layout = {
|
|
2679
|
+
media: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2680
|
+
leadSlot && /* @__PURE__ */ jsx("div", { className: "mb-(--dk-panel-gap)", children: leadSlot }),
|
|
2681
|
+
body
|
|
2682
|
+
] }),
|
|
2683
|
+
record: /* @__PURE__ */ jsxs(
|
|
2684
|
+
"div",
|
|
2685
|
+
{
|
|
2686
|
+
className: cn(
|
|
2687
|
+
"grid gap-(--dk-panel-gap)",
|
|
2688
|
+
hasRecordInspector && "xl:grid-cols-[minmax(28rem,1fr)_minmax(14rem,18rem)]"
|
|
2689
|
+
),
|
|
2690
|
+
children: [
|
|
2691
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0", children: body }),
|
|
2692
|
+
hasRecordInspector && /* @__PURE__ */ jsx("div", { className: "space-y-(--dk-panel-gap)", children: leadSlot })
|
|
2693
|
+
]
|
|
2694
|
+
}
|
|
2695
|
+
),
|
|
2696
|
+
full: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2697
|
+
hasFullLeadArea && /* @__PURE__ */ jsxs(
|
|
2698
|
+
"div",
|
|
2699
|
+
{
|
|
2700
|
+
className: cn(
|
|
2701
|
+
"mb-(--dk-panel-gap) grid gap-(--dk-panel-gap)",
|
|
2702
|
+
insideAsideSlot && "xl:grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)]"
|
|
2703
|
+
),
|
|
2704
|
+
children: [
|
|
2705
|
+
leadSlot && /* @__PURE__ */ jsx("div", { className: "space-y-(--dk-panel-gap)", children: leadSlot }),
|
|
2706
|
+
insideAsideSlot && /* @__PURE__ */ jsx("div", { className: cn("min-h-0 rounded-(--radius) border bg-card p-(--dk-panel-gap)", asideClassName), children: insideAsideSlot })
|
|
2707
|
+
]
|
|
2708
|
+
}
|
|
2709
|
+
),
|
|
2710
|
+
body
|
|
2711
|
+
] })
|
|
2712
|
+
};
|
|
2713
|
+
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-detail", className), style: theme, "data-detail-variant": variant, children: [
|
|
2714
|
+
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
2715
|
+
header ?? defaultHeader,
|
|
2716
|
+
/* @__PURE__ */ jsx(DataPage.Content, { padding: "none", className: "overflow-hidden", children: /* @__PURE__ */ jsxs(
|
|
2717
|
+
"div",
|
|
2718
|
+
{
|
|
2719
|
+
className: cn(
|
|
2720
|
+
"grid h-full min-h-0 grid-cols-1 overflow-hidden",
|
|
2721
|
+
outsideAsideSlot && "lg:grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)]"
|
|
2722
|
+
),
|
|
2723
|
+
children: [
|
|
2724
|
+
/* @__PURE__ */ jsx(
|
|
2725
|
+
"main",
|
|
2726
|
+
{
|
|
2727
|
+
className: cn(
|
|
2728
|
+
"min-h-0 overflow-auto px-(--dk-page-padding-x) py-(--dk-page-padding-y)",
|
|
2729
|
+
contentClassName
|
|
2730
|
+
),
|
|
2731
|
+
children: layout[variant]
|
|
2732
|
+
}
|
|
2733
|
+
),
|
|
2734
|
+
outsideAsideSlot && /* @__PURE__ */ jsx("aside", { className: cn("min-h-0 border-t bg-background lg:border-l lg:border-t-0", asideClassName), children: /* @__PURE__ */ jsx(
|
|
2735
|
+
"div",
|
|
2736
|
+
{
|
|
2737
|
+
className: cn(
|
|
2738
|
+
"px-(--dk-page-padding-x) py-(--dk-page-padding-y)",
|
|
2739
|
+
stickyAside && "lg:sticky lg:top-0"
|
|
2740
|
+
),
|
|
2741
|
+
children: outsideAsideSlot
|
|
2742
|
+
}
|
|
2743
|
+
) })
|
|
2744
|
+
]
|
|
2745
|
+
}
|
|
2746
|
+
) })
|
|
2747
|
+
] });
|
|
2748
|
+
}
|
|
2749
|
+
var DetailBodyTemplate = Object.assign(DetailBodyTemplateRoot, {
|
|
2750
|
+
Header: DetailBodyHeader,
|
|
2751
|
+
Tab: DetailBodyTab,
|
|
2752
|
+
Section: DetailBodySection
|
|
2753
|
+
});
|
|
2411
2754
|
function FormWizardBodyTemplate({
|
|
2412
2755
|
theme,
|
|
2413
2756
|
title,
|
|
@@ -3208,6 +3551,6 @@ function buildTemplateTheme(g, ov = {}) {
|
|
|
3208
3551
|
});
|
|
3209
3552
|
}
|
|
3210
3553
|
|
|
3211
|
-
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, DataBodyTemplate, DataPage, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FormWizardBodyTemplate, Input, Label, LoginBodyTemplate, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, PageBreadcrumb, PageTopBar, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TypographyBodyTemplate, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useStyleInjector, useThemeStore };
|
|
3554
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BrowseBodyTemplate, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, DashboardBodyTemplate, DashboardPanel, DataBodyTemplate, DataPage, DetailBodyTemplate, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FormWizardBodyTemplate, Input, Label, LoginBodyTemplate, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, PageBreadcrumb, PageTopBar, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TypographyBodyTemplate, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useStyleInjector, useThemeStore };
|
|
3212
3555
|
//# sourceMappingURL=index.js.map
|
|
3213
3556
|
//# sourceMappingURL=index.js.map
|