@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/README.md
CHANGED
|
@@ -13,21 +13,28 @@ npm install @loykin/designkit
|
|
|
13
13
|
|
|
14
14
|
Requires React 19 and Tailwind CSS v4. UI components are based on [shadcn/ui](https://ui.shadcn.com) — if your app has shadcn set up, theming integrates automatically via shared CSS variables (`--primary`, `--background`, `--radius`, etc.).
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
shadcn/ui is the component and semantic-token convention, not a runtime
|
|
17
|
+
dependency. Consumers do not need to install the shadcn CLI, but they must use
|
|
18
|
+
Tailwind CSS v4 and should define the shared semantic variables they want to
|
|
19
|
+
customize.
|
|
20
|
+
|
|
21
|
+
Import Tailwind and DesignKit from the same global CSS entry:
|
|
17
22
|
|
|
18
23
|
```css
|
|
19
24
|
/* globals.css */
|
|
25
|
+
@import "tailwindcss";
|
|
20
26
|
@import "@loykin/designkit/styles";
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
`@loykin/designkit/styles` registers the package's compiled JavaScript as a
|
|
30
|
+
Tailwind source. The consuming application's Tailwind v4 build generates the
|
|
31
|
+
utilities for both the application and DesignKit in one cascade. DesignKit does
|
|
32
|
+
not ship a second, pre-built copy of Tailwind utilities.
|
|
24
33
|
|
|
25
34
|
## Quick Start
|
|
26
35
|
|
|
27
36
|
```tsx
|
|
28
37
|
import { DataBodyTemplate, PageTopBar, Button } from '@loykin/designkit'
|
|
29
|
-
import '@loykin/designkit/styles'
|
|
30
|
-
|
|
31
38
|
export function UsersPage() {
|
|
32
39
|
return (
|
|
33
40
|
<DataBodyTemplate
|
package/dist/index.cjs
CHANGED
|
@@ -2020,11 +2020,14 @@ function Header({ children, className }) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
);
|
|
2022
2022
|
}
|
|
2023
|
-
function TitleBlock({ title, description, breadcrumb, className }) {
|
|
2024
|
-
if (!title && !description && !breadcrumb) return null;
|
|
2023
|
+
function TitleBlock({ title, description, breadcrumb, status, className }) {
|
|
2024
|
+
if (!title && !description && !breadcrumb && !status) return null;
|
|
2025
2025
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "data-page-title-block", className: cn("min-w-0 flex-1", className), children: [
|
|
2026
2026
|
breadcrumb && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2 text-xs text-muted-foreground", children: breadcrumb }),
|
|
2027
|
-
title && /* @__PURE__ */ jsxRuntime.
|
|
2027
|
+
(title || status) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2028
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "min-w-0 truncate text-xl font-semibold", children: title }),
|
|
2029
|
+
status && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: status })
|
|
2030
|
+
] }),
|
|
2028
2031
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground", children: description })
|
|
2029
2032
|
] });
|
|
2030
2033
|
}
|
|
@@ -2034,7 +2037,10 @@ function Actions({ children, className }) {
|
|
|
2034
2037
|
"div",
|
|
2035
2038
|
{
|
|
2036
2039
|
"data-slot": "data-page-actions",
|
|
2037
|
-
className: cn(
|
|
2040
|
+
className: cn(
|
|
2041
|
+
"flex shrink-0 items-center gap-[calc(var(--designkit-panel-gap)*0.5)]",
|
|
2042
|
+
className
|
|
2043
|
+
),
|
|
2038
2044
|
children
|
|
2039
2045
|
}
|
|
2040
2046
|
);
|
|
@@ -2158,47 +2164,49 @@ var DataPage = Object.assign(Root, {
|
|
|
2158
2164
|
GroupBody,
|
|
2159
2165
|
Footer
|
|
2160
2166
|
});
|
|
2161
|
-
var DashboardPanel = React2.forwardRef(
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
editable && /* @__PURE__ */ jsxRuntime.
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2167
|
+
var DashboardPanel = React2.forwardRef(
|
|
2168
|
+
function DashboardPanel2({
|
|
2169
|
+
title,
|
|
2170
|
+
description,
|
|
2171
|
+
loading,
|
|
2172
|
+
error,
|
|
2173
|
+
transparent,
|
|
2174
|
+
editable,
|
|
2175
|
+
className,
|
|
2176
|
+
style,
|
|
2177
|
+
children,
|
|
2178
|
+
headerRight
|
|
2179
|
+
}, ref) {
|
|
2180
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2181
|
+
"div",
|
|
2182
|
+
{
|
|
2183
|
+
ref,
|
|
2184
|
+
className: cn(
|
|
2185
|
+
"group flex h-full flex-col overflow-hidden",
|
|
2186
|
+
transparent ? "" : "rounded-(--radius) border bg-card text-card-foreground",
|
|
2187
|
+
editable && "ring-1 ring-border/60 ring-inset",
|
|
2188
|
+
className
|
|
2189
|
+
),
|
|
2190
|
+
style,
|
|
2191
|
+
children: [
|
|
2192
|
+
(title || headerRight || editable) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2 pl-3 pr-1.5 py-2", children: [
|
|
2193
|
+
editable && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(lucideReact.GripHorizontal, { className: "h-3.5 w-3.5" }) }),
|
|
2194
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2195
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-card-foreground", children: title }),
|
|
2196
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[11px] text-muted-foreground", children: description })
|
|
2197
|
+
] }),
|
|
2198
|
+
headerRight && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-150", children: headerRight })
|
|
2190
2199
|
] }),
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
});
|
|
2200
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 min-h-0 p-3", children: [
|
|
2201
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-card/70 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }) }),
|
|
2202
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: error }) }),
|
|
2203
|
+
!error && children
|
|
2204
|
+
] })
|
|
2205
|
+
]
|
|
2206
|
+
}
|
|
2207
|
+
);
|
|
2208
|
+
}
|
|
2209
|
+
);
|
|
2202
2210
|
function DashboardBodyTemplate({
|
|
2203
2211
|
theme,
|
|
2204
2212
|
className,
|
|
@@ -2220,7 +2228,16 @@ function DashboardBodyTemplate({
|
|
|
2220
2228
|
toolbar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 shrink-0", children: toolbar })
|
|
2221
2229
|
] }) }),
|
|
2222
2230
|
variableBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 flex flex-wrap items-center gap-2 px-(--designkit-page-padding-x) py-1.5", children: variableBar }),
|
|
2223
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2231
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2232
|
+
"div",
|
|
2233
|
+
{
|
|
2234
|
+
className: cn(
|
|
2235
|
+
"flex-1 min-h-0 overflow-auto px-[calc(var(--designkit-page-padding-x)-0.5rem)] pt-0 pb-(--designkit-page-padding-y)",
|
|
2236
|
+
contentClassName
|
|
2237
|
+
),
|
|
2238
|
+
children
|
|
2239
|
+
}
|
|
2240
|
+
)
|
|
2224
2241
|
] });
|
|
2225
2242
|
}
|
|
2226
2243
|
function clamp(value, min, max) {
|
|
@@ -2271,6 +2288,7 @@ function WorkbenchBodyTemplate({
|
|
|
2271
2288
|
contentClassName,
|
|
2272
2289
|
title,
|
|
2273
2290
|
description,
|
|
2291
|
+
status,
|
|
2274
2292
|
topBar,
|
|
2275
2293
|
headerRight,
|
|
2276
2294
|
toolbar,
|
|
@@ -2303,28 +2321,31 @@ function WorkbenchBodyTemplate({
|
|
|
2303
2321
|
const [leftWidth, setLeftWidth] = React2.useState(leftPaneWidth);
|
|
2304
2322
|
const [rightWidth, setRightWidth] = React2.useState(rightPaneWidth);
|
|
2305
2323
|
const [bottomHeight, setBottomHeight] = React2.useState(bottomPaneHeight);
|
|
2306
|
-
const startResize = React2.useCallback(
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2324
|
+
const startResize = React2.useCallback(
|
|
2325
|
+
(event, axis, applyDelta) => {
|
|
2326
|
+
if (!resizable) return;
|
|
2327
|
+
const start = axis === "x" ? event.clientX : event.clientY;
|
|
2328
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
2329
|
+
const previousCursor = document.body.style.cursor;
|
|
2330
|
+
const previousUserSelect = document.body.style.userSelect;
|
|
2331
|
+
document.body.style.cursor = axis === "x" ? "col-resize" : "row-resize";
|
|
2332
|
+
document.body.style.userSelect = "none";
|
|
2333
|
+
const onPointerMove = (moveEvent) => {
|
|
2334
|
+
applyDelta((axis === "x" ? moveEvent.clientX : moveEvent.clientY) - start);
|
|
2335
|
+
};
|
|
2336
|
+
const onPointerUp = () => {
|
|
2337
|
+
document.body.style.cursor = previousCursor;
|
|
2338
|
+
document.body.style.userSelect = previousUserSelect;
|
|
2339
|
+
window.removeEventListener("pointermove", onPointerMove);
|
|
2340
|
+
window.removeEventListener("pointerup", onPointerUp);
|
|
2341
|
+
};
|
|
2342
|
+
window.addEventListener("pointermove", onPointerMove);
|
|
2343
|
+
window.addEventListener("pointerup", onPointerUp, { once: true });
|
|
2344
|
+
},
|
|
2345
|
+
[resizable]
|
|
2346
|
+
);
|
|
2326
2347
|
const headerRightContent = headerRight ?? toolbar;
|
|
2327
|
-
const showHeader = title || description || headerRightContent || actions;
|
|
2348
|
+
const showHeader = title || description || status || headerRightContent || actions;
|
|
2328
2349
|
const showLeftPane = leftPane && !leftPaneCollapsed;
|
|
2329
2350
|
const showRightPane = rightPane && !rightPaneCollapsed;
|
|
2330
2351
|
const showBottomPane = bottomPane && !bottomPaneCollapsed;
|
|
@@ -2332,7 +2353,10 @@ function WorkbenchBodyTemplate({
|
|
|
2332
2353
|
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
2333
2354
|
showHeader && /* @__PURE__ */ jsxRuntime.jsx("header", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-[calc(var(--designkit-page-padding-y)*0.75)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-[var(--designkit-toolbar-height)] items-center justify-between gap-3", children: [
|
|
2334
2355
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2335
|
-
title && /* @__PURE__ */ jsxRuntime.
|
|
2356
|
+
(title || status) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2357
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "min-w-0 truncate text-sm font-semibold", children: title }),
|
|
2358
|
+
status && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: status })
|
|
2359
|
+
] }),
|
|
2336
2360
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: description })
|
|
2337
2361
|
] }),
|
|
2338
2362
|
(headerRightContent || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
@@ -2361,7 +2385,10 @@ function WorkbenchBodyTemplate({
|
|
|
2361
2385
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2362
2386
|
"aside",
|
|
2363
2387
|
{
|
|
2364
|
-
className: cn(
|
|
2388
|
+
className: cn(
|
|
2389
|
+
"hidden min-h-0 shrink-0 overflow-hidden border-r bg-card/45 md:flex md:flex-col",
|
|
2390
|
+
leftPaneClassName
|
|
2391
|
+
),
|
|
2365
2392
|
style: { width: leftWidth },
|
|
2366
2393
|
children: leftPane
|
|
2367
2394
|
}
|
|
@@ -2391,7 +2418,9 @@ function WorkbenchBodyTemplate({
|
|
|
2391
2418
|
onPointerDown: (event) => {
|
|
2392
2419
|
const start = bottomHeight;
|
|
2393
2420
|
startResize(event, "y", (delta) => {
|
|
2394
|
-
setBottomHeight(
|
|
2421
|
+
setBottomHeight(
|
|
2422
|
+
clamp(start - delta, minBottomPaneHeight, maxBottomPaneHeight)
|
|
2423
|
+
);
|
|
2395
2424
|
});
|
|
2396
2425
|
}
|
|
2397
2426
|
}
|
|
@@ -2399,7 +2428,10 @@ function WorkbenchBodyTemplate({
|
|
|
2399
2428
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2400
2429
|
"section",
|
|
2401
2430
|
{
|
|
2402
|
-
className: cn(
|
|
2431
|
+
className: cn(
|
|
2432
|
+
"min-h-0 shrink-0 overflow-auto border-t bg-card/40 md:overflow-hidden",
|
|
2433
|
+
bottomPaneClassName
|
|
2434
|
+
),
|
|
2403
2435
|
style: { height: bottomHeight },
|
|
2404
2436
|
children: bottomPane
|
|
2405
2437
|
}
|
|
@@ -2423,7 +2455,10 @@ function WorkbenchBodyTemplate({
|
|
|
2423
2455
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2424
2456
|
"aside",
|
|
2425
2457
|
{
|
|
2426
|
-
className: cn(
|
|
2458
|
+
className: cn(
|
|
2459
|
+
"hidden min-h-0 shrink-0 overflow-hidden border-l bg-card/45 md:flex md:flex-col",
|
|
2460
|
+
rightPaneClassName
|
|
2461
|
+
),
|
|
2427
2462
|
style: { width: rightWidth },
|
|
2428
2463
|
children: rightPane
|
|
2429
2464
|
}
|
|
@@ -2522,14 +2557,23 @@ function renderGroupProps(props) {
|
|
|
2522
2557
|
] });
|
|
2523
2558
|
}
|
|
2524
2559
|
if (layout === "horizontal") {
|
|
2525
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2560
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2561
|
+
"div",
|
|
2562
|
+
{
|
|
2563
|
+
className: cn(
|
|
2564
|
+
"grid grid-cols-1 gap-(--designkit-panel-gap) py-(--designkit-panel-gap) sm:grid-cols-3 sm:gap-[calc(var(--designkit-panel-gap)*2)]",
|
|
2565
|
+
className
|
|
2566
|
+
),
|
|
2567
|
+
children: [
|
|
2568
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2569
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm font-medium", danger && "text-destructive"), children: title }),
|
|
2570
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: description }),
|
|
2571
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: actions })
|
|
2572
|
+
] }),
|
|
2573
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(GroupWrapper, { layout, variant, children }) })
|
|
2574
|
+
]
|
|
2575
|
+
}
|
|
2576
|
+
);
|
|
2533
2577
|
}
|
|
2534
2578
|
if (layout === "inline") {
|
|
2535
2579
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--designkit-panel-gap)", className), children: [
|
|
@@ -2599,6 +2643,7 @@ function Root2({
|
|
|
2599
2643
|
topBar,
|
|
2600
2644
|
title,
|
|
2601
2645
|
description,
|
|
2646
|
+
status,
|
|
2602
2647
|
actions,
|
|
2603
2648
|
toolbarLeft,
|
|
2604
2649
|
toolbarRight,
|
|
@@ -2632,7 +2677,7 @@ function Root2({
|
|
|
2632
2677
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: cn("layout-databody", className), style: theme, children: [
|
|
2633
2678
|
/* @__PURE__ */ jsxRuntime.jsx(TopBarSlot, { topBar }),
|
|
2634
2679
|
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Header, { children: [
|
|
2635
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2680
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2636
2681
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2637
2682
|
] }),
|
|
2638
2683
|
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
@@ -2644,7 +2689,7 @@ function Root2({
|
|
|
2644
2689
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: cn("layout-sectioned", className), style: theme, children: [
|
|
2645
2690
|
/* @__PURE__ */ jsxRuntime.jsx(TopBarSlot, { topBar }),
|
|
2646
2691
|
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Header, { children: [
|
|
2647
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2692
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2648
2693
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2649
2694
|
] }),
|
|
2650
2695
|
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
@@ -2678,7 +2723,7 @@ function Root2({
|
|
|
2678
2723
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: cn("layout-databody", className), style: theme, children: [
|
|
2679
2724
|
/* @__PURE__ */ jsxRuntime.jsx(TopBarSlot, { topBar }),
|
|
2680
2725
|
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Header, { children: [
|
|
2681
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2726
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2682
2727
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2683
2728
|
] }),
|
|
2684
2729
|
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
@@ -2728,6 +2773,7 @@ function BrowseBodyTemplate({
|
|
|
2728
2773
|
topBar,
|
|
2729
2774
|
title,
|
|
2730
2775
|
description,
|
|
2776
|
+
status,
|
|
2731
2777
|
actions,
|
|
2732
2778
|
sidebar,
|
|
2733
2779
|
sidebarTitle = "Filters",
|
|
@@ -2738,11 +2784,11 @@ function BrowseBodyTemplate({
|
|
|
2738
2784
|
children
|
|
2739
2785
|
}) {
|
|
2740
2786
|
const isNarrow = useIsNarrow();
|
|
2741
|
-
const hasHeader = title || description || actions;
|
|
2787
|
+
const hasHeader = title || description || status || actions;
|
|
2742
2788
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: cn("layout-browse", className), style: theme, children: [
|
|
2743
2789
|
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
2744
2790
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs(DataPage.Header, { children: [
|
|
2745
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2791
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description, status }),
|
|
2746
2792
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2747
2793
|
] }),
|
|
2748
2794
|
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Content, { padding: "none", className: "flex flex-col overflow-hidden", children: [
|
|
@@ -2766,14 +2812,7 @@ function BrowseBodyTemplate({
|
|
|
2766
2812
|
toolbar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: toolbar })
|
|
2767
2813
|
] }),
|
|
2768
2814
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
2769
|
-
!isNarrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2770
|
-
"aside",
|
|
2771
|
-
{
|
|
2772
|
-
className: "shrink-0 overflow-hidden border-r",
|
|
2773
|
-
style: { width: sidebarWidth },
|
|
2774
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)", children: sidebar }) })
|
|
2775
|
-
}
|
|
2776
|
-
),
|
|
2815
|
+
!isNarrow && /* @__PURE__ */ jsxRuntime.jsx("aside", { className: "shrink-0 overflow-hidden border-r", style: { width: sidebarWidth }, children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)", children: sidebar }) }) }),
|
|
2777
2816
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2778
2817
|
"div",
|
|
2779
2818
|
{
|
|
@@ -2878,7 +2917,13 @@ function DetailBodyTemplateRoot({
|
|
|
2878
2917
|
const [activeTab, setActiveTab] = React2.useState(() => tabs[0]?.props.id ?? "");
|
|
2879
2918
|
const selectedTab = tabs.find((tab) => tab.props.id === activeTab) ?? tabs[0];
|
|
2880
2919
|
const summarySlot = summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 rounded-(--radius) border bg-card p-(--designkit-panel-gap) text-card-foreground", children: summary }) : null;
|
|
2881
|
-
const mediaSlot = media ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2920
|
+
const mediaSlot = media ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2921
|
+
"div",
|
|
2922
|
+
{
|
|
2923
|
+
className: cn("min-h-0 overflow-hidden rounded-(--radius) border bg-card", mediaClassName),
|
|
2924
|
+
children: media
|
|
2925
|
+
}
|
|
2926
|
+
) : null;
|
|
2882
2927
|
const leadGridClass = variant === "media" ? "xl:grid-cols-[minmax(0,1.35fr)_minmax(18rem,0.65fr)]" : "xl:grid-cols-2";
|
|
2883
2928
|
const defaultHeader = eyebrow || title || description || status || actions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2884
2929
|
DetailBodyHeader,
|
|
@@ -2941,48 +2986,74 @@ function DetailBodyTemplateRoot({
|
|
|
2941
2986
|
),
|
|
2942
2987
|
children: [
|
|
2943
2988
|
leadSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--designkit-panel-gap)", children: leadSlot }),
|
|
2944
|
-
insideAsideSlot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2989
|
+
insideAsideSlot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2990
|
+
"div",
|
|
2991
|
+
{
|
|
2992
|
+
className: cn(
|
|
2993
|
+
"min-h-0 rounded-(--radius) border bg-card p-(--designkit-panel-gap)",
|
|
2994
|
+
asideClassName
|
|
2995
|
+
),
|
|
2996
|
+
children: insideAsideSlot
|
|
2997
|
+
}
|
|
2998
|
+
)
|
|
2945
2999
|
]
|
|
2946
3000
|
}
|
|
2947
3001
|
),
|
|
2948
3002
|
body
|
|
2949
3003
|
] })
|
|
2950
3004
|
};
|
|
2951
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
stickyAside && "lg:sticky lg:top-0"
|
|
3005
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3006
|
+
DataPage,
|
|
3007
|
+
{
|
|
3008
|
+
className: cn("layout-detail", className),
|
|
3009
|
+
style: theme,
|
|
3010
|
+
"data-detail-variant": variant,
|
|
3011
|
+
children: [
|
|
3012
|
+
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
3013
|
+
header ?? defaultHeader,
|
|
3014
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Content, { padding: "none", className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3015
|
+
"div",
|
|
3016
|
+
{
|
|
3017
|
+
className: cn(
|
|
3018
|
+
"grid h-full min-h-0 grid-cols-1 overflow-hidden",
|
|
3019
|
+
outsideAsideSlot && "lg:grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)]"
|
|
3020
|
+
),
|
|
3021
|
+
children: [
|
|
3022
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3023
|
+
"main",
|
|
3024
|
+
{
|
|
3025
|
+
className: cn(
|
|
3026
|
+
"min-h-0 overflow-auto px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
3027
|
+
contentClassName
|
|
3028
|
+
),
|
|
3029
|
+
children: layout[variant]
|
|
3030
|
+
}
|
|
2978
3031
|
),
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
3032
|
+
outsideAsideSlot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3033
|
+
"aside",
|
|
3034
|
+
{
|
|
3035
|
+
className: cn(
|
|
3036
|
+
"min-h-0 border-t bg-background lg:border-l lg:border-t-0",
|
|
3037
|
+
asideClassName
|
|
3038
|
+
),
|
|
3039
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3040
|
+
"div",
|
|
3041
|
+
{
|
|
3042
|
+
className: cn(
|
|
3043
|
+
"px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
3044
|
+
stickyAside && "lg:sticky lg:top-0"
|
|
3045
|
+
),
|
|
3046
|
+
children: outsideAsideSlot
|
|
3047
|
+
}
|
|
3048
|
+
)
|
|
3049
|
+
}
|
|
3050
|
+
)
|
|
3051
|
+
]
|
|
3052
|
+
}
|
|
3053
|
+
) })
|
|
3054
|
+
]
|
|
3055
|
+
}
|
|
3056
|
+
);
|
|
2986
3057
|
}
|
|
2987
3058
|
var DetailBodyTemplate = Object.assign(DetailBodyTemplateRoot, {
|
|
2988
3059
|
Header: DetailBodyHeader,
|
|
@@ -3064,6 +3135,7 @@ function PanelTemplateSection({
|
|
|
3064
3135
|
function PanelTemplateRoot({
|
|
3065
3136
|
title,
|
|
3066
3137
|
eyebrow,
|
|
3138
|
+
status,
|
|
3067
3139
|
actions,
|
|
3068
3140
|
footer,
|
|
3069
3141
|
children,
|
|
@@ -3074,7 +3146,10 @@ function PanelTemplateRoot({
|
|
|
3074
3146
|
(title || eyebrow || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 px-4 py-3", children: [
|
|
3075
3147
|
eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: eyebrow }),
|
|
3076
3148
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3077
|
-
|
|
3149
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
3150
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "min-w-0 truncate text-sm font-semibold", children: title }),
|
|
3151
|
+
status && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: status })
|
|
3152
|
+
] }),
|
|
3078
3153
|
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-1", children: actions })
|
|
3079
3154
|
] })
|
|
3080
3155
|
] }),
|
|
@@ -3088,6 +3163,7 @@ var PanelTemplate = Object.assign(PanelTemplateRoot, {
|
|
|
3088
3163
|
function FormWizardBodyTemplate({
|
|
3089
3164
|
theme,
|
|
3090
3165
|
title,
|
|
3166
|
+
status,
|
|
3091
3167
|
topBar,
|
|
3092
3168
|
variant = "plain",
|
|
3093
3169
|
steps,
|
|
@@ -3105,7 +3181,7 @@ function FormWizardBodyTemplate({
|
|
|
3105
3181
|
}
|
|
3106
3182
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: "layout-form-wizard", style: theme, children: [
|
|
3107
3183
|
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
3108
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title }) }),
|
|
3184
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, status }) }),
|
|
3109
3185
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 px-(--designkit-page-padding-x) pb-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: steps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsxs(React2.Fragment, { children: [
|
|
3110
3186
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3111
3187
|
"div",
|
|
@@ -3559,15 +3635,7 @@ function LoginBodyTemplate({
|
|
|
3559
3635
|
);
|
|
3560
3636
|
}
|
|
3561
3637
|
function Breadcrumb({ className, ...props }) {
|
|
3562
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3563
|
-
"nav",
|
|
3564
|
-
{
|
|
3565
|
-
"aria-label": "breadcrumb",
|
|
3566
|
-
"data-slot": "breadcrumb",
|
|
3567
|
-
className: cn(className),
|
|
3568
|
-
...props
|
|
3569
|
-
}
|
|
3570
|
-
);
|
|
3638
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", className: cn(className), ...props });
|
|
3571
3639
|
}
|
|
3572
3640
|
function BreadcrumbList({ className, ...props }) {
|
|
3573
3641
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3592,11 +3660,7 @@ function BreadcrumbItem({ className, ...props }) {
|
|
|
3592
3660
|
}
|
|
3593
3661
|
);
|
|
3594
3662
|
}
|
|
3595
|
-
function BreadcrumbLink({
|
|
3596
|
-
className,
|
|
3597
|
-
render,
|
|
3598
|
-
...props
|
|
3599
|
-
}) {
|
|
3663
|
+
function BreadcrumbLink({ className, render, ...props }) {
|
|
3600
3664
|
return useRender.useRender({
|
|
3601
3665
|
defaultTagName: "a",
|
|
3602
3666
|
props: mergeProps.mergeProps(
|
|
@@ -3624,11 +3688,7 @@ function BreadcrumbPage({ className, ...props }) {
|
|
|
3624
3688
|
}
|
|
3625
3689
|
);
|
|
3626
3690
|
}
|
|
3627
|
-
function BreadcrumbSeparator({
|
|
3628
|
-
children,
|
|
3629
|
-
className,
|
|
3630
|
-
...props
|
|
3631
|
-
}) {
|
|
3691
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
3632
3692
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3633
3693
|
"li",
|
|
3634
3694
|
{
|