@loykin/designkit 0.0.1-dev.4 → 0.0.1-dev.5
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 +11 -4
- package/dist/index.cjs +209 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +209 -149
- package/dist/index.js.map +1 -1
- package/dist/styles.css +133 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1999,11 +1999,14 @@ function Header({ children, className }) {
|
|
|
1999
1999
|
}
|
|
2000
2000
|
);
|
|
2001
2001
|
}
|
|
2002
|
-
function TitleBlock({ title, description, breadcrumb, className }) {
|
|
2003
|
-
if (!title && !description && !breadcrumb) return null;
|
|
2002
|
+
function TitleBlock({ title, description, breadcrumb, status, className }) {
|
|
2003
|
+
if (!title && !description && !breadcrumb && !status) return null;
|
|
2004
2004
|
return /* @__PURE__ */ jsxs("div", { "data-slot": "data-page-title-block", className: cn("min-w-0 flex-1", className), children: [
|
|
2005
2005
|
breadcrumb && /* @__PURE__ */ jsx("div", { className: "mb-2 text-xs text-muted-foreground", children: breadcrumb }),
|
|
2006
|
-
title && /* @__PURE__ */
|
|
2006
|
+
(title || status) && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2007
|
+
title && /* @__PURE__ */ jsx("h1", { className: "min-w-0 truncate text-xl font-semibold", children: title }),
|
|
2008
|
+
status && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: status })
|
|
2009
|
+
] }),
|
|
2007
2010
|
description && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-muted-foreground", children: description })
|
|
2008
2011
|
] });
|
|
2009
2012
|
}
|
|
@@ -2013,7 +2016,10 @@ function Actions({ children, className }) {
|
|
|
2013
2016
|
"div",
|
|
2014
2017
|
{
|
|
2015
2018
|
"data-slot": "data-page-actions",
|
|
2016
|
-
className: cn(
|
|
2019
|
+
className: cn(
|
|
2020
|
+
"flex shrink-0 items-center gap-[calc(var(--designkit-panel-gap)*0.5)]",
|
|
2021
|
+
className
|
|
2022
|
+
),
|
|
2017
2023
|
children
|
|
2018
2024
|
}
|
|
2019
2025
|
);
|
|
@@ -2137,47 +2143,49 @@ var DataPage = Object.assign(Root, {
|
|
|
2137
2143
|
GroupBody,
|
|
2138
2144
|
Footer
|
|
2139
2145
|
});
|
|
2140
|
-
var DashboardPanel = forwardRef(
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
editable && /* @__PURE__ */
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2146
|
+
var DashboardPanel = forwardRef(
|
|
2147
|
+
function DashboardPanel2({
|
|
2148
|
+
title,
|
|
2149
|
+
description,
|
|
2150
|
+
loading,
|
|
2151
|
+
error,
|
|
2152
|
+
transparent,
|
|
2153
|
+
editable,
|
|
2154
|
+
className,
|
|
2155
|
+
style,
|
|
2156
|
+
children,
|
|
2157
|
+
headerRight
|
|
2158
|
+
}, ref) {
|
|
2159
|
+
return /* @__PURE__ */ jsxs(
|
|
2160
|
+
"div",
|
|
2161
|
+
{
|
|
2162
|
+
ref,
|
|
2163
|
+
className: cn(
|
|
2164
|
+
"group flex h-full flex-col overflow-hidden",
|
|
2165
|
+
transparent ? "" : "rounded-(--radius) border bg-card text-card-foreground",
|
|
2166
|
+
editable && "ring-1 ring-border/60 ring-inset",
|
|
2167
|
+
className
|
|
2168
|
+
),
|
|
2169
|
+
style,
|
|
2170
|
+
children: [
|
|
2171
|
+
(title || headerRight || editable) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 pl-3 pr-1.5 py-2", children: [
|
|
2172
|
+
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" }) }),
|
|
2173
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2174
|
+
title && /* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-card-foreground", children: title }),
|
|
2175
|
+
description && /* @__PURE__ */ jsx("p", { className: "truncate text-[11px] text-muted-foreground", children: description })
|
|
2176
|
+
] }),
|
|
2177
|
+
headerRight && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-150", children: headerRight })
|
|
2169
2178
|
] }),
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
});
|
|
2179
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex-1 min-h-0 p-3", children: [
|
|
2180
|
+
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" }) }),
|
|
2181
|
+
error && /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: error }) }),
|
|
2182
|
+
!error && children
|
|
2183
|
+
] })
|
|
2184
|
+
]
|
|
2185
|
+
}
|
|
2186
|
+
);
|
|
2187
|
+
}
|
|
2188
|
+
);
|
|
2181
2189
|
function DashboardBodyTemplate({
|
|
2182
2190
|
theme,
|
|
2183
2191
|
className,
|
|
@@ -2199,7 +2207,16 @@ function DashboardBodyTemplate({
|
|
|
2199
2207
|
toolbar && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 shrink-0", children: toolbar })
|
|
2200
2208
|
] }) }),
|
|
2201
2209
|
variableBar && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex flex-wrap items-center gap-2 px-(--designkit-page-padding-x) py-1.5", children: variableBar }),
|
|
2202
|
-
/* @__PURE__ */ jsx(
|
|
2210
|
+
/* @__PURE__ */ jsx(
|
|
2211
|
+
"div",
|
|
2212
|
+
{
|
|
2213
|
+
className: cn(
|
|
2214
|
+
"flex-1 min-h-0 overflow-auto px-[calc(var(--designkit-page-padding-x)-0.5rem)] pt-0 pb-(--designkit-page-padding-y)",
|
|
2215
|
+
contentClassName
|
|
2216
|
+
),
|
|
2217
|
+
children
|
|
2218
|
+
}
|
|
2219
|
+
)
|
|
2203
2220
|
] });
|
|
2204
2221
|
}
|
|
2205
2222
|
function clamp(value, min, max) {
|
|
@@ -2250,6 +2267,7 @@ function WorkbenchBodyTemplate({
|
|
|
2250
2267
|
contentClassName,
|
|
2251
2268
|
title,
|
|
2252
2269
|
description,
|
|
2270
|
+
status,
|
|
2253
2271
|
topBar,
|
|
2254
2272
|
headerRight,
|
|
2255
2273
|
toolbar,
|
|
@@ -2282,28 +2300,31 @@ function WorkbenchBodyTemplate({
|
|
|
2282
2300
|
const [leftWidth, setLeftWidth] = useState(leftPaneWidth);
|
|
2283
2301
|
const [rightWidth, setRightWidth] = useState(rightPaneWidth);
|
|
2284
2302
|
const [bottomHeight, setBottomHeight] = useState(bottomPaneHeight);
|
|
2285
|
-
const startResize = useCallback(
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2303
|
+
const startResize = useCallback(
|
|
2304
|
+
(event, axis, applyDelta) => {
|
|
2305
|
+
if (!resizable) return;
|
|
2306
|
+
const start = axis === "x" ? event.clientX : event.clientY;
|
|
2307
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
2308
|
+
const previousCursor = document.body.style.cursor;
|
|
2309
|
+
const previousUserSelect = document.body.style.userSelect;
|
|
2310
|
+
document.body.style.cursor = axis === "x" ? "col-resize" : "row-resize";
|
|
2311
|
+
document.body.style.userSelect = "none";
|
|
2312
|
+
const onPointerMove = (moveEvent) => {
|
|
2313
|
+
applyDelta((axis === "x" ? moveEvent.clientX : moveEvent.clientY) - start);
|
|
2314
|
+
};
|
|
2315
|
+
const onPointerUp = () => {
|
|
2316
|
+
document.body.style.cursor = previousCursor;
|
|
2317
|
+
document.body.style.userSelect = previousUserSelect;
|
|
2318
|
+
window.removeEventListener("pointermove", onPointerMove);
|
|
2319
|
+
window.removeEventListener("pointerup", onPointerUp);
|
|
2320
|
+
};
|
|
2321
|
+
window.addEventListener("pointermove", onPointerMove);
|
|
2322
|
+
window.addEventListener("pointerup", onPointerUp, { once: true });
|
|
2323
|
+
},
|
|
2324
|
+
[resizable]
|
|
2325
|
+
);
|
|
2305
2326
|
const headerRightContent = headerRight ?? toolbar;
|
|
2306
|
-
const showHeader = title || description || headerRightContent || actions;
|
|
2327
|
+
const showHeader = title || description || status || headerRightContent || actions;
|
|
2307
2328
|
const showLeftPane = leftPane && !leftPaneCollapsed;
|
|
2308
2329
|
const showRightPane = rightPane && !rightPaneCollapsed;
|
|
2309
2330
|
const showBottomPane = bottomPane && !bottomPaneCollapsed;
|
|
@@ -2311,7 +2332,10 @@ function WorkbenchBodyTemplate({
|
|
|
2311
2332
|
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
2312
2333
|
showHeader && /* @__PURE__ */ jsx("header", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-[calc(var(--designkit-page-padding-y)*0.75)]", children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-[var(--designkit-toolbar-height)] items-center justify-between gap-3", children: [
|
|
2313
2334
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2314
|
-
title && /* @__PURE__ */
|
|
2335
|
+
(title || status) && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2336
|
+
title && /* @__PURE__ */ jsx("h1", { className: "min-w-0 truncate text-sm font-semibold", children: title }),
|
|
2337
|
+
status && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: status })
|
|
2338
|
+
] }),
|
|
2315
2339
|
description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: description })
|
|
2316
2340
|
] }),
|
|
2317
2341
|
(headerRightContent || actions) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
@@ -2340,7 +2364,10 @@ function WorkbenchBodyTemplate({
|
|
|
2340
2364
|
/* @__PURE__ */ jsx(
|
|
2341
2365
|
"aside",
|
|
2342
2366
|
{
|
|
2343
|
-
className: cn(
|
|
2367
|
+
className: cn(
|
|
2368
|
+
"hidden min-h-0 shrink-0 overflow-hidden border-r bg-card/45 md:flex md:flex-col",
|
|
2369
|
+
leftPaneClassName
|
|
2370
|
+
),
|
|
2344
2371
|
style: { width: leftWidth },
|
|
2345
2372
|
children: leftPane
|
|
2346
2373
|
}
|
|
@@ -2370,7 +2397,9 @@ function WorkbenchBodyTemplate({
|
|
|
2370
2397
|
onPointerDown: (event) => {
|
|
2371
2398
|
const start = bottomHeight;
|
|
2372
2399
|
startResize(event, "y", (delta) => {
|
|
2373
|
-
setBottomHeight(
|
|
2400
|
+
setBottomHeight(
|
|
2401
|
+
clamp(start - delta, minBottomPaneHeight, maxBottomPaneHeight)
|
|
2402
|
+
);
|
|
2374
2403
|
});
|
|
2375
2404
|
}
|
|
2376
2405
|
}
|
|
@@ -2378,7 +2407,10 @@ function WorkbenchBodyTemplate({
|
|
|
2378
2407
|
/* @__PURE__ */ jsx(
|
|
2379
2408
|
"section",
|
|
2380
2409
|
{
|
|
2381
|
-
className: cn(
|
|
2410
|
+
className: cn(
|
|
2411
|
+
"min-h-0 shrink-0 overflow-auto border-t bg-card/40 md:overflow-hidden",
|
|
2412
|
+
bottomPaneClassName
|
|
2413
|
+
),
|
|
2382
2414
|
style: { height: bottomHeight },
|
|
2383
2415
|
children: bottomPane
|
|
2384
2416
|
}
|
|
@@ -2402,7 +2434,10 @@ function WorkbenchBodyTemplate({
|
|
|
2402
2434
|
/* @__PURE__ */ jsx(
|
|
2403
2435
|
"aside",
|
|
2404
2436
|
{
|
|
2405
|
-
className: cn(
|
|
2437
|
+
className: cn(
|
|
2438
|
+
"hidden min-h-0 shrink-0 overflow-hidden border-l bg-card/45 md:flex md:flex-col",
|
|
2439
|
+
rightPaneClassName
|
|
2440
|
+
),
|
|
2406
2441
|
style: { width: rightWidth },
|
|
2407
2442
|
children: rightPane
|
|
2408
2443
|
}
|
|
@@ -2501,14 +2536,23 @@ function renderGroupProps(props) {
|
|
|
2501
2536
|
] });
|
|
2502
2537
|
}
|
|
2503
2538
|
if (layout === "horizontal") {
|
|
2504
|
-
return /* @__PURE__ */ jsxs(
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2539
|
+
return /* @__PURE__ */ jsxs(
|
|
2540
|
+
"div",
|
|
2541
|
+
{
|
|
2542
|
+
className: cn(
|
|
2543
|
+
"grid grid-cols-1 gap-(--designkit-panel-gap) py-(--designkit-panel-gap) sm:grid-cols-3 sm:gap-[calc(var(--designkit-panel-gap)*2)]",
|
|
2544
|
+
className
|
|
2545
|
+
),
|
|
2546
|
+
children: [
|
|
2547
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2548
|
+
/* @__PURE__ */ jsx("p", { className: cn("text-sm font-medium", danger && "text-destructive"), children: title }),
|
|
2549
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: description }),
|
|
2550
|
+
actions && /* @__PURE__ */ jsx("div", { className: "mt-2", children: actions })
|
|
2551
|
+
] }),
|
|
2552
|
+
/* @__PURE__ */ jsx("div", { className: "sm:col-span-2", children: /* @__PURE__ */ jsx(GroupWrapper, { layout, variant, children }) })
|
|
2553
|
+
]
|
|
2554
|
+
}
|
|
2555
|
+
);
|
|
2512
2556
|
}
|
|
2513
2557
|
if (layout === "inline") {
|
|
2514
2558
|
return /* @__PURE__ */ jsxs("div", { className: cn("py-(--designkit-panel-gap)", className), children: [
|
|
@@ -2578,6 +2622,7 @@ function Root2({
|
|
|
2578
2622
|
topBar,
|
|
2579
2623
|
title,
|
|
2580
2624
|
description,
|
|
2625
|
+
status,
|
|
2581
2626
|
actions,
|
|
2582
2627
|
toolbarLeft,
|
|
2583
2628
|
toolbarRight,
|
|
@@ -2611,7 +2656,7 @@ function Root2({
|
|
|
2611
2656
|
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-databody", className), style: theme, children: [
|
|
2612
2657
|
/* @__PURE__ */ jsx(TopBarSlot, { topBar }),
|
|
2613
2658
|
/* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
2614
|
-
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description }),
|
|
2659
|
+
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2615
2660
|
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2616
2661
|
] }),
|
|
2617
2662
|
summaryEl && /* @__PURE__ */ jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
@@ -2623,7 +2668,7 @@ function Root2({
|
|
|
2623
2668
|
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-sectioned", className), style: theme, children: [
|
|
2624
2669
|
/* @__PURE__ */ jsx(TopBarSlot, { topBar }),
|
|
2625
2670
|
/* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
2626
|
-
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description }),
|
|
2671
|
+
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2627
2672
|
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2628
2673
|
] }),
|
|
2629
2674
|
summaryEl && /* @__PURE__ */ jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
@@ -2657,7 +2702,7 @@ function Root2({
|
|
|
2657
2702
|
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-databody", className), style: theme, children: [
|
|
2658
2703
|
/* @__PURE__ */ jsx(TopBarSlot, { topBar }),
|
|
2659
2704
|
/* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
2660
|
-
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description }),
|
|
2705
|
+
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2661
2706
|
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2662
2707
|
] }),
|
|
2663
2708
|
summaryEl && /* @__PURE__ */ jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
@@ -2707,6 +2752,7 @@ function BrowseBodyTemplate({
|
|
|
2707
2752
|
topBar,
|
|
2708
2753
|
title,
|
|
2709
2754
|
description,
|
|
2755
|
+
status,
|
|
2710
2756
|
actions,
|
|
2711
2757
|
sidebar,
|
|
2712
2758
|
sidebarTitle = "Filters",
|
|
@@ -2717,11 +2763,11 @@ function BrowseBodyTemplate({
|
|
|
2717
2763
|
children
|
|
2718
2764
|
}) {
|
|
2719
2765
|
const isNarrow = useIsNarrow();
|
|
2720
|
-
const hasHeader = title || description || actions;
|
|
2766
|
+
const hasHeader = title || description || status || actions;
|
|
2721
2767
|
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-browse", className), style: theme, children: [
|
|
2722
2768
|
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
2723
2769
|
hasHeader && /* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
2724
|
-
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description }),
|
|
2770
|
+
/* @__PURE__ */ jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2725
2771
|
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2726
2772
|
] }),
|
|
2727
2773
|
/* @__PURE__ */ jsxs(DataPage.Content, { padding: "none", className: "flex flex-col overflow-hidden", children: [
|
|
@@ -2745,14 +2791,7 @@ function BrowseBodyTemplate({
|
|
|
2745
2791
|
toolbar && /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: toolbar })
|
|
2746
2792
|
] }),
|
|
2747
2793
|
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
2748
|
-
!isNarrow && /* @__PURE__ */ jsx(
|
|
2749
|
-
"aside",
|
|
2750
|
-
{
|
|
2751
|
-
className: "shrink-0 overflow-hidden border-r",
|
|
2752
|
-
style: { width: sidebarWidth },
|
|
2753
|
-
children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)", children: sidebar }) })
|
|
2754
|
-
}
|
|
2755
|
-
),
|
|
2794
|
+
!isNarrow && /* @__PURE__ */ jsx("aside", { className: "shrink-0 overflow-hidden border-r", style: { width: sidebarWidth }, children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)", children: sidebar }) }) }),
|
|
2756
2795
|
/* @__PURE__ */ jsx(
|
|
2757
2796
|
"div",
|
|
2758
2797
|
{
|
|
@@ -2857,7 +2896,13 @@ function DetailBodyTemplateRoot({
|
|
|
2857
2896
|
const [activeTab, setActiveTab] = useState(() => tabs[0]?.props.id ?? "");
|
|
2858
2897
|
const selectedTab = tabs.find((tab) => tab.props.id === activeTab) ?? tabs[0];
|
|
2859
2898
|
const summarySlot = summary ? /* @__PURE__ */ jsx("div", { className: "min-h-0 rounded-(--radius) border bg-card p-(--designkit-panel-gap) text-card-foreground", children: summary }) : null;
|
|
2860
|
-
const mediaSlot = media ? /* @__PURE__ */ jsx(
|
|
2899
|
+
const mediaSlot = media ? /* @__PURE__ */ jsx(
|
|
2900
|
+
"div",
|
|
2901
|
+
{
|
|
2902
|
+
className: cn("min-h-0 overflow-hidden rounded-(--radius) border bg-card", mediaClassName),
|
|
2903
|
+
children: media
|
|
2904
|
+
}
|
|
2905
|
+
) : null;
|
|
2861
2906
|
const leadGridClass = variant === "media" ? "xl:grid-cols-[minmax(0,1.35fr)_minmax(18rem,0.65fr)]" : "xl:grid-cols-2";
|
|
2862
2907
|
const defaultHeader = eyebrow || title || description || status || actions ? /* @__PURE__ */ jsx(
|
|
2863
2908
|
DetailBodyHeader,
|
|
@@ -2920,48 +2965,74 @@ function DetailBodyTemplateRoot({
|
|
|
2920
2965
|
),
|
|
2921
2966
|
children: [
|
|
2922
2967
|
leadSlot && /* @__PURE__ */ jsx("div", { className: "space-y-(--designkit-panel-gap)", children: leadSlot }),
|
|
2923
|
-
insideAsideSlot && /* @__PURE__ */ jsx(
|
|
2968
|
+
insideAsideSlot && /* @__PURE__ */ jsx(
|
|
2969
|
+
"div",
|
|
2970
|
+
{
|
|
2971
|
+
className: cn(
|
|
2972
|
+
"min-h-0 rounded-(--radius) border bg-card p-(--designkit-panel-gap)",
|
|
2973
|
+
asideClassName
|
|
2974
|
+
),
|
|
2975
|
+
children: insideAsideSlot
|
|
2976
|
+
}
|
|
2977
|
+
)
|
|
2924
2978
|
]
|
|
2925
2979
|
}
|
|
2926
2980
|
),
|
|
2927
2981
|
body
|
|
2928
2982
|
] })
|
|
2929
2983
|
};
|
|
2930
|
-
return /* @__PURE__ */ jsxs(
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
stickyAside && "lg:sticky lg:top-0"
|
|
2984
|
+
return /* @__PURE__ */ jsxs(
|
|
2985
|
+
DataPage,
|
|
2986
|
+
{
|
|
2987
|
+
className: cn("layout-detail", className),
|
|
2988
|
+
style: theme,
|
|
2989
|
+
"data-detail-variant": variant,
|
|
2990
|
+
children: [
|
|
2991
|
+
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
2992
|
+
header ?? defaultHeader,
|
|
2993
|
+
/* @__PURE__ */ jsx(DataPage.Content, { padding: "none", className: "overflow-hidden", children: /* @__PURE__ */ jsxs(
|
|
2994
|
+
"div",
|
|
2995
|
+
{
|
|
2996
|
+
className: cn(
|
|
2997
|
+
"grid h-full min-h-0 grid-cols-1 overflow-hidden",
|
|
2998
|
+
outsideAsideSlot && "lg:grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)]"
|
|
2999
|
+
),
|
|
3000
|
+
children: [
|
|
3001
|
+
/* @__PURE__ */ jsx(
|
|
3002
|
+
"main",
|
|
3003
|
+
{
|
|
3004
|
+
className: cn(
|
|
3005
|
+
"min-h-0 overflow-auto px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
3006
|
+
contentClassName
|
|
3007
|
+
),
|
|
3008
|
+
children: layout[variant]
|
|
3009
|
+
}
|
|
2957
3010
|
),
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
3011
|
+
outsideAsideSlot && /* @__PURE__ */ jsx(
|
|
3012
|
+
"aside",
|
|
3013
|
+
{
|
|
3014
|
+
className: cn(
|
|
3015
|
+
"min-h-0 border-t bg-background lg:border-l lg:border-t-0",
|
|
3016
|
+
asideClassName
|
|
3017
|
+
),
|
|
3018
|
+
children: /* @__PURE__ */ jsx(
|
|
3019
|
+
"div",
|
|
3020
|
+
{
|
|
3021
|
+
className: cn(
|
|
3022
|
+
"px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
3023
|
+
stickyAside && "lg:sticky lg:top-0"
|
|
3024
|
+
),
|
|
3025
|
+
children: outsideAsideSlot
|
|
3026
|
+
}
|
|
3027
|
+
)
|
|
3028
|
+
}
|
|
3029
|
+
)
|
|
3030
|
+
]
|
|
3031
|
+
}
|
|
3032
|
+
) })
|
|
3033
|
+
]
|
|
3034
|
+
}
|
|
3035
|
+
);
|
|
2965
3036
|
}
|
|
2966
3037
|
var DetailBodyTemplate = Object.assign(DetailBodyTemplateRoot, {
|
|
2967
3038
|
Header: DetailBodyHeader,
|
|
@@ -3043,6 +3114,7 @@ function PanelTemplateSection({
|
|
|
3043
3114
|
function PanelTemplateRoot({
|
|
3044
3115
|
title,
|
|
3045
3116
|
eyebrow,
|
|
3117
|
+
status,
|
|
3046
3118
|
actions,
|
|
3047
3119
|
footer,
|
|
3048
3120
|
children,
|
|
@@ -3053,7 +3125,10 @@ function PanelTemplateRoot({
|
|
|
3053
3125
|
(title || eyebrow || actions) && /* @__PURE__ */ jsxs("div", { className: "shrink-0 px-4 py-3", children: [
|
|
3054
3126
|
eyebrow && /* @__PURE__ */ jsx("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: eyebrow }),
|
|
3055
3127
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3056
|
-
|
|
3128
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
3129
|
+
title && /* @__PURE__ */ jsx("h2", { className: "min-w-0 truncate text-sm font-semibold", children: title }),
|
|
3130
|
+
status && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: status })
|
|
3131
|
+
] }),
|
|
3057
3132
|
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-1", children: actions })
|
|
3058
3133
|
] })
|
|
3059
3134
|
] }),
|
|
@@ -3067,6 +3142,7 @@ var PanelTemplate = Object.assign(PanelTemplateRoot, {
|
|
|
3067
3142
|
function FormWizardBodyTemplate({
|
|
3068
3143
|
theme,
|
|
3069
3144
|
title,
|
|
3145
|
+
status,
|
|
3070
3146
|
topBar,
|
|
3071
3147
|
variant = "plain",
|
|
3072
3148
|
steps,
|
|
@@ -3084,7 +3160,7 @@ function FormWizardBodyTemplate({
|
|
|
3084
3160
|
}
|
|
3085
3161
|
return /* @__PURE__ */ jsxs(DataPage, { className: "layout-form-wizard", style: theme, children: [
|
|
3086
3162
|
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
3087
|
-
/* @__PURE__ */ jsx(DataPage.Header, { children: /* @__PURE__ */ jsx(DataPage.TitleBlock, { title }) }),
|
|
3163
|
+
/* @__PURE__ */ jsx(DataPage.Header, { children: /* @__PURE__ */ jsx(DataPage.TitleBlock, { title, status }) }),
|
|
3088
3164
|
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-(--designkit-page-padding-x) pb-4", children: /* @__PURE__ */ jsx("div", { className: "flex items-center", children: steps.map((step, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3089
3165
|
i > 0 && /* @__PURE__ */ jsx(
|
|
3090
3166
|
"div",
|
|
@@ -3538,15 +3614,7 @@ function LoginBodyTemplate({
|
|
|
3538
3614
|
);
|
|
3539
3615
|
}
|
|
3540
3616
|
function Breadcrumb({ className, ...props }) {
|
|
3541
|
-
return /* @__PURE__ */ jsx(
|
|
3542
|
-
"nav",
|
|
3543
|
-
{
|
|
3544
|
-
"aria-label": "breadcrumb",
|
|
3545
|
-
"data-slot": "breadcrumb",
|
|
3546
|
-
className: cn(className),
|
|
3547
|
-
...props
|
|
3548
|
-
}
|
|
3549
|
-
);
|
|
3617
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", className: cn(className), ...props });
|
|
3550
3618
|
}
|
|
3551
3619
|
function BreadcrumbList({ className, ...props }) {
|
|
3552
3620
|
return /* @__PURE__ */ jsx(
|
|
@@ -3571,11 +3639,7 @@ function BreadcrumbItem({ className, ...props }) {
|
|
|
3571
3639
|
}
|
|
3572
3640
|
);
|
|
3573
3641
|
}
|
|
3574
|
-
function BreadcrumbLink({
|
|
3575
|
-
className,
|
|
3576
|
-
render,
|
|
3577
|
-
...props
|
|
3578
|
-
}) {
|
|
3642
|
+
function BreadcrumbLink({ className, render, ...props }) {
|
|
3579
3643
|
return useRender({
|
|
3580
3644
|
defaultTagName: "a",
|
|
3581
3645
|
props: mergeProps(
|
|
@@ -3603,11 +3667,7 @@ function BreadcrumbPage({ className, ...props }) {
|
|
|
3603
3667
|
}
|
|
3604
3668
|
);
|
|
3605
3669
|
}
|
|
3606
|
-
function BreadcrumbSeparator({
|
|
3607
|
-
children,
|
|
3608
|
-
className,
|
|
3609
|
-
...props
|
|
3610
|
-
}) {
|
|
3670
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
3611
3671
|
return /* @__PURE__ */ jsx(
|
|
3612
3672
|
"li",
|
|
3613
3673
|
{
|