@loykin/designkit 0.0.1-dev.3 → 0.0.1-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -14
- package/dist/index.cjs +187 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -5
- package/dist/index.d.ts +43 -5
- package/dist/index.js +187 -111
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1756,6 +1756,9 @@ function SidebarMenuSubButton({
|
|
|
1756
1756
|
}
|
|
1757
1757
|
});
|
|
1758
1758
|
}
|
|
1759
|
+
function useSidebarOptional() {
|
|
1760
|
+
return React2__namespace.useContext(SidebarContext);
|
|
1761
|
+
}
|
|
1759
1762
|
function EmptyState({ icon: Icon, title, description, action, className }) {
|
|
1760
1763
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1761
1764
|
"div",
|
|
@@ -2010,10 +2013,10 @@ function Header({ children, className }) {
|
|
|
2010
2013
|
{
|
|
2011
2014
|
"data-slot": "data-page-header",
|
|
2012
2015
|
className: cn(
|
|
2013
|
-
"shrink-0 px-[var(--
|
|
2016
|
+
"shrink-0 px-[var(--designkit-page-padding-x)] pt-[var(--designkit-page-padding-y)]",
|
|
2014
2017
|
className
|
|
2015
2018
|
),
|
|
2016
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between gap-[var(--
|
|
2019
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center justify-between gap-[var(--designkit-panel-gap)]", children })
|
|
2017
2020
|
}
|
|
2018
2021
|
);
|
|
2019
2022
|
}
|
|
@@ -2031,7 +2034,7 @@ function Actions({ children, className }) {
|
|
|
2031
2034
|
"div",
|
|
2032
2035
|
{
|
|
2033
2036
|
"data-slot": "data-page-actions",
|
|
2034
|
-
className: cn("flex shrink-0 items-center gap-[calc(var(--
|
|
2037
|
+
className: cn("flex shrink-0 items-center gap-[calc(var(--designkit-panel-gap)*0.5)]", className),
|
|
2035
2038
|
children
|
|
2036
2039
|
}
|
|
2037
2040
|
);
|
|
@@ -2069,8 +2072,8 @@ function Content({ children, className, padding = "default" }) {
|
|
|
2069
2072
|
"data-slot": "data-page-content",
|
|
2070
2073
|
className: cn(
|
|
2071
2074
|
"min-h-0 flex-1 overflow-auto",
|
|
2072
|
-
padding === "default" && "px-[var(--
|
|
2073
|
-
padding === "compact" && "p-[calc(var(--
|
|
2075
|
+
padding === "default" && "px-[var(--designkit-page-padding-x)] pb-[var(--designkit-page-padding-y)] pt-[var(--designkit-page-padding-y)]",
|
|
2076
|
+
padding === "compact" && "p-[calc(var(--designkit-page-padding-y)*0.875)]",
|
|
2074
2077
|
padding === "none" && "p-0",
|
|
2075
2078
|
className
|
|
2076
2079
|
),
|
|
@@ -2107,7 +2110,7 @@ function GroupHeader({
|
|
|
2107
2110
|
{
|
|
2108
2111
|
"data-slot": "data-page-group-header",
|
|
2109
2112
|
className: cn(
|
|
2110
|
-
"flex items-start justify-between gap-4 px-0 pb-[calc(var(--
|
|
2113
|
+
"flex items-start justify-between gap-4 px-0 pb-[calc(var(--designkit-panel-gap)*0.75)]",
|
|
2111
2114
|
className
|
|
2112
2115
|
),
|
|
2113
2116
|
children: [
|
|
@@ -2128,7 +2131,7 @@ function GroupToolbar({ children, className }) {
|
|
|
2128
2131
|
{
|
|
2129
2132
|
"data-slot": "data-page-group-toolbar",
|
|
2130
2133
|
className: cn(
|
|
2131
|
-
"flex min-h-[var(--
|
|
2134
|
+
"flex min-h-[var(--designkit-toolbar-height)] items-center justify-between gap-[calc(var(--designkit-panel-gap)*0.75)] pb-[calc(var(--designkit-panel-gap)*0.75)]",
|
|
2132
2135
|
className
|
|
2133
2136
|
),
|
|
2134
2137
|
children
|
|
@@ -2209,15 +2212,15 @@ function DashboardBodyTemplate({
|
|
|
2209
2212
|
}) {
|
|
2210
2213
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: cn("layout-dashboard", className), style: theme, children: [
|
|
2211
2214
|
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
2212
|
-
(title || toolbar) && /* @__PURE__ */ jsxRuntime.jsx("header", { className: "shrink-0 border-b px-(--
|
|
2215
|
+
(title || toolbar) && /* @__PURE__ */ jsxRuntime.jsx("header", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
2213
2216
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2214
2217
|
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm font-semibold truncate", children: title }),
|
|
2215
2218
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description })
|
|
2216
2219
|
] }),
|
|
2217
2220
|
toolbar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 shrink-0", children: toolbar })
|
|
2218
2221
|
] }) }),
|
|
2219
|
-
variableBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 flex flex-wrap items-center gap-2 px-(--
|
|
2220
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex-1 min-h-0 overflow-auto px-[calc(var(--
|
|
2222
|
+
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("div", { className: cn("flex-1 min-h-0 overflow-auto px-[calc(var(--designkit-page-padding-x)-0.5rem)] pt-0 pb-(--designkit-page-padding-y)", contentClassName), children })
|
|
2221
2224
|
] });
|
|
2222
2225
|
}
|
|
2223
2226
|
function clamp(value, min, max) {
|
|
@@ -2293,7 +2296,9 @@ function WorkbenchBodyTemplate({
|
|
|
2293
2296
|
leftPaneClassName,
|
|
2294
2297
|
mainPaneClassName,
|
|
2295
2298
|
rightPaneClassName,
|
|
2296
|
-
bottomPaneClassName
|
|
2299
|
+
bottomPaneClassName,
|
|
2300
|
+
leftPaneLabel = "Panel",
|
|
2301
|
+
rightPaneLabel = "Inspector"
|
|
2297
2302
|
}) {
|
|
2298
2303
|
const [leftWidth, setLeftWidth] = React2.useState(leftPaneWidth);
|
|
2299
2304
|
const [rightWidth, setRightWidth] = React2.useState(rightPaneWidth);
|
|
@@ -2325,7 +2330,7 @@ function WorkbenchBodyTemplate({
|
|
|
2325
2330
|
const showBottomPane = bottomPane && !bottomPaneCollapsed;
|
|
2326
2331
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: cn("layout-workbench", className), style: theme, children: [
|
|
2327
2332
|
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
2328
|
-
showHeader && /* @__PURE__ */ jsxRuntime.jsx("header", { className: "shrink-0 border-b px-(--
|
|
2333
|
+
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: [
|
|
2329
2334
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2330
2335
|
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "truncate text-sm font-semibold", children: title }),
|
|
2331
2336
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: description })
|
|
@@ -2335,12 +2340,28 @@ function WorkbenchBodyTemplate({
|
|
|
2335
2340
|
actions
|
|
2336
2341
|
] })
|
|
2337
2342
|
] }) }),
|
|
2343
|
+
(showLeftPane || showRightPane) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-1.5 border-b px-2 py-1.5 md:hidden", children: [
|
|
2344
|
+
showLeftPane && /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
2345
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm" }), children: leftPaneLabel }),
|
|
2346
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "left", className: "flex flex-col gap-0 p-0", children: [
|
|
2347
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { className: "shrink-0 border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: leftPaneLabel }) }),
|
|
2348
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "flex-1", children: leftPane })
|
|
2349
|
+
] })
|
|
2350
|
+
] }),
|
|
2351
|
+
showRightPane && /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
2352
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm" }), children: rightPaneLabel }),
|
|
2353
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "flex flex-col gap-0 p-0", children: [
|
|
2354
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { className: "shrink-0 border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: rightPaneLabel }) }),
|
|
2355
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "flex-1", children: rightPane })
|
|
2356
|
+
] })
|
|
2357
|
+
] })
|
|
2358
|
+
] }),
|
|
2338
2359
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex min-h-0 flex-1 overflow-hidden", contentClassName), children: [
|
|
2339
2360
|
showLeftPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2340
2361
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2341
2362
|
"aside",
|
|
2342
2363
|
{
|
|
2343
|
-
className: cn("min-h-0 shrink-0 overflow-hidden border-r bg-card/45", leftPaneClassName),
|
|
2364
|
+
className: cn("hidden min-h-0 shrink-0 overflow-hidden border-r bg-card/45 md:flex md:flex-col", leftPaneClassName),
|
|
2344
2365
|
style: { width: leftWidth },
|
|
2345
2366
|
children: leftPane
|
|
2346
2367
|
}
|
|
@@ -2349,6 +2370,7 @@ function WorkbenchBodyTemplate({
|
|
|
2349
2370
|
ResizeHandle,
|
|
2350
2371
|
{
|
|
2351
2372
|
axis: "x",
|
|
2373
|
+
className: "hidden md:flex",
|
|
2352
2374
|
onPointerDown: (event) => {
|
|
2353
2375
|
const start = leftWidth;
|
|
2354
2376
|
startResize(event, "x", (delta) => {
|
|
@@ -2365,6 +2387,7 @@ function WorkbenchBodyTemplate({
|
|
|
2365
2387
|
ResizeHandle,
|
|
2366
2388
|
{
|
|
2367
2389
|
axis: "y",
|
|
2390
|
+
className: "hidden md:flex",
|
|
2368
2391
|
onPointerDown: (event) => {
|
|
2369
2392
|
const start = bottomHeight;
|
|
2370
2393
|
startResize(event, "y", (delta) => {
|
|
@@ -2376,7 +2399,7 @@ function WorkbenchBodyTemplate({
|
|
|
2376
2399
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2377
2400
|
"section",
|
|
2378
2401
|
{
|
|
2379
|
-
className: cn("min-h-0 shrink-0 overflow-
|
|
2402
|
+
className: cn("min-h-0 shrink-0 overflow-auto border-t bg-card/40 md:overflow-hidden", bottomPaneClassName),
|
|
2380
2403
|
style: { height: bottomHeight },
|
|
2381
2404
|
children: bottomPane
|
|
2382
2405
|
}
|
|
@@ -2388,6 +2411,7 @@ function WorkbenchBodyTemplate({
|
|
|
2388
2411
|
ResizeHandle,
|
|
2389
2412
|
{
|
|
2390
2413
|
axis: "x",
|
|
2414
|
+
className: "hidden md:flex",
|
|
2391
2415
|
onPointerDown: (event) => {
|
|
2392
2416
|
const start = rightWidth;
|
|
2393
2417
|
startResize(event, "x", (delta) => {
|
|
@@ -2399,7 +2423,7 @@ function WorkbenchBodyTemplate({
|
|
|
2399
2423
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2400
2424
|
"aside",
|
|
2401
2425
|
{
|
|
2402
|
-
className: cn("min-h-0 shrink-0 overflow-hidden border-l bg-card/45", rightPaneClassName),
|
|
2426
|
+
className: cn("hidden min-h-0 shrink-0 overflow-hidden border-l bg-card/45 md:flex md:flex-col", rightPaneClassName),
|
|
2403
2427
|
style: { width: rightWidth },
|
|
2404
2428
|
children: rightPane
|
|
2405
2429
|
}
|
|
@@ -2454,13 +2478,13 @@ function GroupWrapper({
|
|
|
2454
2478
|
children
|
|
2455
2479
|
}) {
|
|
2456
2480
|
if (variant === "card") {
|
|
2457
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-(--
|
|
2481
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-(--designkit-panel-gap)", children }) });
|
|
2458
2482
|
}
|
|
2459
2483
|
if (variant === "bordered") {
|
|
2460
2484
|
if (layout === "inline") {
|
|
2461
2485
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-(--radius) border divide-y", children });
|
|
2462
2486
|
}
|
|
2463
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-(--radius) border p-(--
|
|
2487
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-(--radius) border p-(--designkit-panel-gap)", children });
|
|
2464
2488
|
}
|
|
2465
2489
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
2466
2490
|
}
|
|
@@ -2486,7 +2510,7 @@ function renderGroupProps(props) {
|
|
|
2486
2510
|
const variant = variantProp ?? layoutDefaultVariant[layout];
|
|
2487
2511
|
if (layout === "split") {
|
|
2488
2512
|
const panes = React2.Children.toArray(children);
|
|
2489
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--
|
|
2513
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--designkit-panel-gap)", className), children: [
|
|
2490
2514
|
(title || description || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex items-start justify-between", children: [
|
|
2491
2515
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2492
2516
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-sm font-semibold", danger && "text-destructive"), children: title }),
|
|
@@ -2494,21 +2518,21 @@ function renderGroupProps(props) {
|
|
|
2494
2518
|
] }),
|
|
2495
2519
|
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { children: actions })
|
|
2496
2520
|
] }),
|
|
2497
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-h-104 gap-(--
|
|
2521
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-h-104 gap-(--designkit-panel-gap) lg:grid-cols-[20rem_minmax(0,1fr)]", children: panes.map((pane, i) => /* @__PURE__ */ jsxRuntime.jsx(GroupWrapper, { layout, variant, children: pane }, i)) })
|
|
2498
2522
|
] });
|
|
2499
2523
|
}
|
|
2500
2524
|
if (layout === "horizontal") {
|
|
2501
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid grid-cols-
|
|
2525
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid grid-cols-1 gap-(--designkit-panel-gap) py-(--designkit-panel-gap) sm:grid-cols-3 sm:gap-[calc(var(--designkit-panel-gap)*2)]", className), children: [
|
|
2502
2526
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2503
2527
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm font-medium", danger && "text-destructive"), children: title }),
|
|
2504
2528
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: description }),
|
|
2505
2529
|
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: actions })
|
|
2506
2530
|
] }),
|
|
2507
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(GroupWrapper, { layout, variant, children }) })
|
|
2531
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(GroupWrapper, { layout, variant, children }) })
|
|
2508
2532
|
] });
|
|
2509
2533
|
}
|
|
2510
2534
|
if (layout === "inline") {
|
|
2511
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--
|
|
2535
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--designkit-panel-gap)", className), children: [
|
|
2512
2536
|
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-start justify-between", children: [
|
|
2513
2537
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2514
2538
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-sm font-semibold", danger && "text-destructive"), children: title }),
|
|
@@ -2519,7 +2543,7 @@ function renderGroupProps(props) {
|
|
|
2519
2543
|
/* @__PURE__ */ jsxRuntime.jsx(GroupWrapper, { layout, variant, children })
|
|
2520
2544
|
] });
|
|
2521
2545
|
}
|
|
2522
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--
|
|
2546
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-(--designkit-panel-gap)", className), children: [
|
|
2523
2547
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
|
|
2524
2548
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2525
2549
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-sm font-semibold", danger && "text-destructive"), children: title }),
|
|
@@ -2534,8 +2558,8 @@ function DataBodyField({ label, description, children }) {
|
|
|
2534
2558
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2535
2559
|
"div",
|
|
2536
2560
|
{
|
|
2537
|
-
className: "grid items-start gap-x-4
|
|
2538
|
-
style: { gridTemplateColumns: "var(--
|
|
2561
|
+
className: "flex flex-col gap-y-1 px-4 py-3 sm:grid sm:items-start sm:gap-x-4 sm:gap-y-0",
|
|
2562
|
+
style: { gridTemplateColumns: "var(--designkit-form-label-w, 11rem) 1fr" },
|
|
2539
2563
|
children: [
|
|
2540
2564
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-0.5", children: [
|
|
2541
2565
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: label }),
|
|
@@ -2550,8 +2574,8 @@ function DataBodyRow({ label, description, required, children }) {
|
|
|
2550
2574
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2551
2575
|
"div",
|
|
2552
2576
|
{
|
|
2553
|
-
className: "grid items-start gap-x-4
|
|
2554
|
-
style: { gridTemplateColumns: "var(--
|
|
2577
|
+
className: "flex flex-col gap-y-1.5 px-4 py-3 sm:grid sm:items-start sm:gap-x-4 sm:gap-y-0",
|
|
2578
|
+
style: { gridTemplateColumns: "var(--designkit-form-label-w, 11rem) 1fr" },
|
|
2555
2579
|
children: [
|
|
2556
2580
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-1", children: [
|
|
2557
2581
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
@@ -2611,7 +2635,7 @@ function Root2({
|
|
|
2611
2635
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2612
2636
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2613
2637
|
] }),
|
|
2614
|
-
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--
|
|
2638
|
+
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
2615
2639
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Content, { className: contentClassName, children: /* @__PURE__ */ jsxRuntime.jsx(DataPage.Group, { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx(DataPage.GroupBody, { className: cn("h-full", bodyEl.props.className), children: bodyEl.props.children }) }) })
|
|
2616
2640
|
] });
|
|
2617
2641
|
}
|
|
@@ -2623,8 +2647,8 @@ function Root2({
|
|
|
2623
2647
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2624
2648
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2625
2649
|
] }),
|
|
2626
|
-
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--
|
|
2627
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Content, { className: contentClassName, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-(--
|
|
2650
|
+
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
2651
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Content, { className: contentClassName, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-(--designkit-panel-gap) lg:grid-cols-[16rem_minmax(0,1fr)]", children: [
|
|
2628
2652
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "space-y-1", children: sections.map((section) => {
|
|
2629
2653
|
const active = section.props.id === activeSection?.props.id;
|
|
2630
2654
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2646,7 +2670,7 @@ function Root2({
|
|
|
2646
2670
|
section.props.id
|
|
2647
2671
|
);
|
|
2648
2672
|
}) }),
|
|
2649
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 space-y-(--
|
|
2673
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 space-y-(--designkit-panel-gap)", children: renderGroups(activeSection?.props.children) })
|
|
2650
2674
|
] }) })
|
|
2651
2675
|
] });
|
|
2652
2676
|
}
|
|
@@ -2657,7 +2681,7 @@ function Root2({
|
|
|
2657
2681
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title, description }),
|
|
2658
2682
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2659
2683
|
] }),
|
|
2660
|
-
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--
|
|
2684
|
+
summaryEl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
2661
2685
|
hasTabs && /* @__PURE__ */ jsxRuntime.jsx(DataPage.Tabs, { children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2662
2686
|
DataPage.Tab,
|
|
2663
2687
|
{
|
|
@@ -2722,7 +2746,7 @@ function BrowseBodyTemplate({
|
|
|
2722
2746
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Actions, { children: actions })
|
|
2723
2747
|
] }),
|
|
2724
2748
|
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Content, { padding: "none", className: "flex flex-col overflow-hidden", children: [
|
|
2725
|
-
(toolbar || isNarrow) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b px-(--
|
|
2749
|
+
(toolbar || isNarrow) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b px-(--designkit-page-padding-x) py-2", children: [
|
|
2726
2750
|
isNarrow && /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
2727
2751
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2728
2752
|
SheetTrigger,
|
|
@@ -2747,14 +2771,14 @@ function BrowseBodyTemplate({
|
|
|
2747
2771
|
{
|
|
2748
2772
|
className: "shrink-0 overflow-hidden border-r",
|
|
2749
2773
|
style: { width: sidebarWidth },
|
|
2750
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-(--
|
|
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 }) })
|
|
2751
2775
|
}
|
|
2752
2776
|
),
|
|
2753
2777
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2754
2778
|
"div",
|
|
2755
2779
|
{
|
|
2756
2780
|
className: cn(
|
|
2757
|
-
"min-w-0 flex-1 overflow-hidden px-(--
|
|
2781
|
+
"min-w-0 flex-1 overflow-hidden px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
2758
2782
|
"[&_.gridkit-shell]:h-full [&_.gridkit-table-stack]:flex-1 [&_.gridkit-table-stack]:min-h-0",
|
|
2759
2783
|
"[&_.gridkit-frame]:flex-1 [&_.gridkit-frame]:min-h-0 [&_.gridkit-frame]:overflow-auto",
|
|
2760
2784
|
contentClassName
|
|
@@ -2807,8 +2831,8 @@ function DetailBodySection({
|
|
|
2807
2831
|
{
|
|
2808
2832
|
className: cn(
|
|
2809
2833
|
"min-h-0",
|
|
2810
|
-
surface === "card" && "rounded-(--radius) border bg-card p-(--
|
|
2811
|
-
surface === "bordered" && "rounded-(--radius) border p-(--
|
|
2834
|
+
surface === "card" && "rounded-(--radius) border bg-card p-(--designkit-panel-gap) text-card-foreground shadow-sm",
|
|
2835
|
+
surface === "bordered" && "rounded-(--radius) border p-(--designkit-panel-gap)",
|
|
2812
2836
|
className
|
|
2813
2837
|
),
|
|
2814
2838
|
children: [
|
|
@@ -2853,7 +2877,7 @@ function DetailBodyTemplateRoot({
|
|
|
2853
2877
|
const hasTabs = tabs.length > 0;
|
|
2854
2878
|
const [activeTab, setActiveTab] = React2.useState(() => tabs[0]?.props.id ?? "");
|
|
2855
2879
|
const selectedTab = tabs.find((tab) => tab.props.id === activeTab) ?? tabs[0];
|
|
2856
|
-
const summarySlot = summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 rounded-(--radius) border bg-card p-(--
|
|
2880
|
+
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;
|
|
2857
2881
|
const mediaSlot = media ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("min-h-0 overflow-hidden rounded-(--radius) border bg-card", mediaClassName), children: media }) : null;
|
|
2858
2882
|
const leadGridClass = variant === "media" ? "xl:grid-cols-[minmax(0,1.35fr)_minmax(18rem,0.65fr)]" : "xl:grid-cols-2";
|
|
2859
2883
|
const defaultHeader = eyebrow || title || description || status || actions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2866,7 +2890,7 @@ function DetailBodyTemplateRoot({
|
|
|
2866
2890
|
actions
|
|
2867
2891
|
}
|
|
2868
2892
|
) : null;
|
|
2869
|
-
const defaultLead = media || summary ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-(--
|
|
2893
|
+
const defaultLead = media || summary ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-(--designkit-panel-gap)", leadGridClass), children: [
|
|
2870
2894
|
mediaSlot,
|
|
2871
2895
|
summarySlot
|
|
2872
2896
|
] }) : null;
|
|
@@ -2882,8 +2906,8 @@ function DetailBodyTemplateRoot({
|
|
|
2882
2906
|
},
|
|
2883
2907
|
tab.props.id
|
|
2884
2908
|
)) }),
|
|
2885
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-(--
|
|
2886
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--
|
|
2909
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-(--designkit-panel-gap)", children: selectedTab?.props.children })
|
|
2910
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--designkit-panel-gap)", children: renderChildren(children) });
|
|
2887
2911
|
const leadSlot = lead ?? defaultLead;
|
|
2888
2912
|
const outsideAsideSlot = variant === "full" ? null : aside;
|
|
2889
2913
|
const insideAsideSlot = variant === "full" ? aside : null;
|
|
@@ -2891,19 +2915,19 @@ function DetailBodyTemplateRoot({
|
|
|
2891
2915
|
const hasFullLeadArea = Boolean(leadSlot || insideAsideSlot);
|
|
2892
2916
|
const layout = {
|
|
2893
2917
|
media: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2894
|
-
leadSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-(--
|
|
2918
|
+
leadSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-(--designkit-panel-gap)", children: leadSlot }),
|
|
2895
2919
|
body
|
|
2896
2920
|
] }),
|
|
2897
2921
|
record: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2898
2922
|
"div",
|
|
2899
2923
|
{
|
|
2900
2924
|
className: cn(
|
|
2901
|
-
"grid gap-(--
|
|
2925
|
+
"grid gap-(--designkit-panel-gap)",
|
|
2902
2926
|
hasRecordInspector && "xl:grid-cols-[minmax(28rem,1fr)_minmax(14rem,18rem)]"
|
|
2903
2927
|
),
|
|
2904
2928
|
children: [
|
|
2905
2929
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: body }),
|
|
2906
|
-
hasRecordInspector && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--
|
|
2930
|
+
hasRecordInspector && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--designkit-panel-gap)", children: leadSlot })
|
|
2907
2931
|
]
|
|
2908
2932
|
}
|
|
2909
2933
|
),
|
|
@@ -2912,12 +2936,12 @@ function DetailBodyTemplateRoot({
|
|
|
2912
2936
|
"div",
|
|
2913
2937
|
{
|
|
2914
2938
|
className: cn(
|
|
2915
|
-
"mb-(--
|
|
2939
|
+
"mb-(--designkit-panel-gap) grid gap-(--designkit-panel-gap)",
|
|
2916
2940
|
insideAsideSlot && "xl:grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)]"
|
|
2917
2941
|
),
|
|
2918
2942
|
children: [
|
|
2919
|
-
leadSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--
|
|
2920
|
-
insideAsideSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("min-h-0 rounded-(--radius) border bg-card p-(--
|
|
2943
|
+
leadSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-(--designkit-panel-gap)", children: leadSlot }),
|
|
2944
|
+
insideAsideSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("min-h-0 rounded-(--radius) border bg-card p-(--designkit-panel-gap)", asideClassName), children: insideAsideSlot })
|
|
2921
2945
|
]
|
|
2922
2946
|
}
|
|
2923
2947
|
),
|
|
@@ -2939,7 +2963,7 @@ function DetailBodyTemplateRoot({
|
|
|
2939
2963
|
"main",
|
|
2940
2964
|
{
|
|
2941
2965
|
className: cn(
|
|
2942
|
-
"min-h-0 overflow-auto px-(--
|
|
2966
|
+
"min-h-0 overflow-auto px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
2943
2967
|
contentClassName
|
|
2944
2968
|
),
|
|
2945
2969
|
children: layout[variant]
|
|
@@ -2949,7 +2973,7 @@ function DetailBodyTemplateRoot({
|
|
|
2949
2973
|
"div",
|
|
2950
2974
|
{
|
|
2951
2975
|
className: cn(
|
|
2952
|
-
"px-(--
|
|
2976
|
+
"px-(--designkit-page-padding-x) py-(--designkit-page-padding-y)",
|
|
2953
2977
|
stickyAside && "lg:sticky lg:top-0"
|
|
2954
2978
|
),
|
|
2955
2979
|
children: outsideAsideSlot
|
|
@@ -2974,7 +2998,9 @@ function ListDetailBodyTemplate({
|
|
|
2974
2998
|
emptyDetail,
|
|
2975
2999
|
listWidth = 320,
|
|
2976
3000
|
listClassName,
|
|
2977
|
-
detailClassName
|
|
3001
|
+
detailClassName,
|
|
3002
|
+
onBack,
|
|
3003
|
+
backLabel = "Back"
|
|
2978
3004
|
}) {
|
|
2979
3005
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2980
3006
|
DataPage,
|
|
@@ -2995,15 +3021,21 @@ function ListDetailBodyTemplate({
|
|
|
2995
3021
|
children: list
|
|
2996
3022
|
}
|
|
2997
3023
|
),
|
|
2998
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3024
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2999
3025
|
"main",
|
|
3000
3026
|
{
|
|
3001
3027
|
className: cn(
|
|
3002
|
-
"min-h-0 min-w-0 flex-1 overflow-
|
|
3003
|
-
!detail && "hidden lg:
|
|
3028
|
+
"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",
|
|
3029
|
+
!detail && "hidden lg:flex",
|
|
3004
3030
|
detailClassName
|
|
3005
3031
|
),
|
|
3006
|
-
children:
|
|
3032
|
+
children: [
|
|
3033
|
+
detail && onBack && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center border-b px-3 py-2 lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "-ml-1 gap-1", onClick: onBack, children: [
|
|
3034
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" }),
|
|
3035
|
+
backLabel
|
|
3036
|
+
] }) }),
|
|
3037
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-auto", children: detail ?? emptyDetail })
|
|
3038
|
+
]
|
|
3007
3039
|
}
|
|
3008
3040
|
)
|
|
3009
3041
|
] })
|
|
@@ -3011,6 +3043,48 @@ function ListDetailBodyTemplate({
|
|
|
3011
3043
|
}
|
|
3012
3044
|
);
|
|
3013
3045
|
}
|
|
3046
|
+
function PanelTemplateSection({
|
|
3047
|
+
title,
|
|
3048
|
+
description,
|
|
3049
|
+
actions,
|
|
3050
|
+
className,
|
|
3051
|
+
children
|
|
3052
|
+
}) {
|
|
3053
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn("space-y-2.5", className), children: [
|
|
3054
|
+
(title || description || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
3055
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
3056
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
|
|
3057
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description })
|
|
3058
|
+
] }),
|
|
3059
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: actions })
|
|
3060
|
+
] }),
|
|
3061
|
+
children
|
|
3062
|
+
] });
|
|
3063
|
+
}
|
|
3064
|
+
function PanelTemplateRoot({
|
|
3065
|
+
title,
|
|
3066
|
+
eyebrow,
|
|
3067
|
+
actions,
|
|
3068
|
+
footer,
|
|
3069
|
+
children,
|
|
3070
|
+
className,
|
|
3071
|
+
bodyClassName
|
|
3072
|
+
}) {
|
|
3073
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-full flex-col overflow-hidden", className), children: [
|
|
3074
|
+
(title || eyebrow || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 px-4 py-3", children: [
|
|
3075
|
+
eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: eyebrow }),
|
|
3076
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3077
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: title }),
|
|
3078
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-1", children: actions })
|
|
3079
|
+
] })
|
|
3080
|
+
] }),
|
|
3081
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("min-h-0 flex-1 overflow-y-auto px-4 py-4", bodyClassName), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children }) }),
|
|
3082
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-t px-4 py-3", children: footer })
|
|
3083
|
+
] });
|
|
3084
|
+
}
|
|
3085
|
+
var PanelTemplate = Object.assign(PanelTemplateRoot, {
|
|
3086
|
+
Section: PanelTemplateSection
|
|
3087
|
+
});
|
|
3014
3088
|
function FormWizardBodyTemplate({
|
|
3015
3089
|
theme,
|
|
3016
3090
|
title,
|
|
@@ -3032,7 +3106,7 @@ function FormWizardBodyTemplate({
|
|
|
3032
3106
|
return /* @__PURE__ */ jsxRuntime.jsxs(DataPage, { className: "layout-form-wizard", style: theme, children: [
|
|
3033
3107
|
topBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: topBar }),
|
|
3034
3108
|
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(DataPage.TitleBlock, { title }) }),
|
|
3035
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 px-(--
|
|
3109
|
+
/* @__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: [
|
|
3036
3110
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3037
3111
|
"div",
|
|
3038
3112
|
{
|
|
@@ -3065,7 +3139,7 @@ function FormWizardBodyTemplate({
|
|
|
3065
3139
|
)
|
|
3066
3140
|
] })
|
|
3067
3141
|
] }, step.key)) }) }),
|
|
3068
|
-
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Content, { children: current && (variant === "card" ? /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-(--
|
|
3142
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataPage.Content, { children: current && (variant === "card" ? /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-(--designkit-panel-gap)", children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: current.key, onSubmit: handleStepSubmit, children: [
|
|
3069
3143
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-5", children: [
|
|
3070
3144
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold", children: current.title }),
|
|
3071
3145
|
current.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: current.description })
|
|
@@ -3123,8 +3197,8 @@ function TypographyBodyTemplate({ theme, breadcrumb }) {
|
|
|
3123
3197
|
description: "Global type scale preview for shell, template, and grid content"
|
|
3124
3198
|
}
|
|
3125
3199
|
) }),
|
|
3126
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Content, { className: "grid gap-[var(--
|
|
3127
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-[var(--
|
|
3200
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Content, { className: "grid gap-[var(--designkit-panel-gap)] lg:grid-cols-[1fr_22rem]", children: [
|
|
3201
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-[var(--designkit-panel-gap)]", children: [
|
|
3128
3202
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "rounded-lg border border-border ring-0", children: [
|
|
3129
3203
|
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Type Scale" }) }),
|
|
3130
3204
|
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "space-y-4", children: scaleRows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[8rem_1fr] items-baseline gap-4", children: [
|
|
@@ -3315,7 +3389,7 @@ function ColorsBodyTemplate({ theme, breadcrumb }) {
|
|
|
3315
3389
|
description: "Design token color palette and derivation rules for the active theme"
|
|
3316
3390
|
}
|
|
3317
3391
|
) }),
|
|
3318
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Content, { className: "space-y-[var(--
|
|
3392
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DataPage.Content, { className: "space-y-[var(--designkit-panel-gap)]", children: [
|
|
3319
3393
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "rounded-lg border border-border ring-0", children: [
|
|
3320
3394
|
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Primary \u2014 controlled by hue & chroma" }) }),
|
|
3321
3395
|
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
|
|
@@ -3602,26 +3676,36 @@ function buildTopBar(opts) {
|
|
|
3602
3676
|
}
|
|
3603
3677
|
);
|
|
3604
3678
|
}
|
|
3679
|
+
function AutoSidebarTrigger() {
|
|
3680
|
+
const ctx = useSidebarOptional();
|
|
3681
|
+
if (!ctx?.isMobile) return null;
|
|
3682
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SidebarTrigger, { className: "-ml-1 shrink-0" });
|
|
3683
|
+
}
|
|
3605
3684
|
function PageTopBar({
|
|
3606
3685
|
left,
|
|
3607
3686
|
right,
|
|
3608
3687
|
variant = "ghost",
|
|
3609
|
-
height = "var(--
|
|
3688
|
+
height = "var(--designkit-toolbar-height)",
|
|
3610
3689
|
className,
|
|
3611
3690
|
style,
|
|
3612
|
-
children
|
|
3691
|
+
children,
|
|
3692
|
+
sidebarTrigger
|
|
3613
3693
|
}) {
|
|
3694
|
+
const trigger = sidebarTrigger === false ? null : sidebarTrigger !== void 0 ? sidebarTrigger : /* @__PURE__ */ jsxRuntime.jsx(AutoSidebarTrigger, {});
|
|
3614
3695
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3615
3696
|
"div",
|
|
3616
3697
|
{
|
|
3617
3698
|
className: cn(
|
|
3618
|
-
"flex shrink-0 items-center justify-between gap-4 px-(--
|
|
3699
|
+
"flex shrink-0 items-center justify-between gap-4 px-(--designkit-page-padding-x)",
|
|
3619
3700
|
variant === "default" && "border-b",
|
|
3620
3701
|
className
|
|
3621
3702
|
),
|
|
3622
3703
|
style: { height, ...style },
|
|
3623
3704
|
children: [
|
|
3624
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3705
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2 text-xs text-muted-foreground", children: [
|
|
3706
|
+
trigger,
|
|
3707
|
+
normalizeBreadcrumb(left ?? children)
|
|
3708
|
+
] }),
|
|
3625
3709
|
right && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: right })
|
|
3626
3710
|
]
|
|
3627
3711
|
}
|
|
@@ -3661,8 +3745,7 @@ function buildTokenMap({
|
|
|
3661
3745
|
}[density];
|
|
3662
3746
|
const c = (factor) => (primaryChroma * factor).toFixed(4);
|
|
3663
3747
|
return {
|
|
3664
|
-
"--
|
|
3665
|
-
"--gridkit-radius": `${radius}rem`,
|
|
3748
|
+
"--designkit-radius": `${radius}rem`,
|
|
3666
3749
|
"--radius": `${radius}rem`,
|
|
3667
3750
|
"--radius-sm": `${(radius * 0.6).toFixed(4)}rem`,
|
|
3668
3751
|
"--radius-md": `${(radius * 0.8).toFixed(4)}rem`,
|
|
@@ -3670,12 +3753,9 @@ function buildTokenMap({
|
|
|
3670
3753
|
"--radius-xl": `${(radius * 1.4).toFixed(4)}rem`,
|
|
3671
3754
|
"--radius-2xl": `${(radius * 1.8).toFixed(4)}rem`,
|
|
3672
3755
|
// primary — fully controlled
|
|
3673
|
-
"--
|
|
3674
|
-
"--
|
|
3675
|
-
"--
|
|
3676
|
-
"--gridkit-primary": `oklch(0.52 ${primaryChroma} ${primaryHue})`,
|
|
3677
|
-
"--gridkit-primary-foreground": "oklch(0.985 0 0)",
|
|
3678
|
-
"--gridkit-ring": `oklch(0.50 ${primaryChroma} ${primaryHue})`,
|
|
3756
|
+
"--designkit-primary": `oklch(0.52 ${primaryChroma} ${primaryHue})`,
|
|
3757
|
+
"--designkit-primary-foreground": "oklch(0.985 0 0)",
|
|
3758
|
+
"--designkit-ring": `oklch(0.50 ${primaryChroma} ${primaryHue})`,
|
|
3679
3759
|
"--primary": `oklch(0.52 ${primaryChroma} ${primaryHue})`,
|
|
3680
3760
|
"--primary-foreground": "oklch(0.985 0 0)",
|
|
3681
3761
|
"--color-primary": `oklch(0.52 ${primaryChroma} ${primaryHue})`,
|
|
@@ -3695,37 +3775,35 @@ function buildTokenMap({
|
|
|
3695
3775
|
"--color-muted": `oklch(0.970 ${c(0.02)} ${primaryHue})`,
|
|
3696
3776
|
"--color-secondary": `oklch(0.970 ${c(0.02)} ${primaryHue})`,
|
|
3697
3777
|
"--color-accent": `oklch(0.970 ${c(0.04)} ${primaryHue})`,
|
|
3698
|
-
"--
|
|
3699
|
-
"--
|
|
3700
|
-
"--
|
|
3701
|
-
"--
|
|
3702
|
-
"--
|
|
3703
|
-
"--
|
|
3704
|
-
"--
|
|
3705
|
-
"--
|
|
3706
|
-
"--
|
|
3707
|
-
"--
|
|
3708
|
-
"--
|
|
3709
|
-
"--
|
|
3710
|
-
"--
|
|
3711
|
-
"--
|
|
3712
|
-
"--
|
|
3713
|
-
"--
|
|
3714
|
-
"--
|
|
3715
|
-
"--
|
|
3716
|
-
"--
|
|
3717
|
-
"--
|
|
3718
|
-
"--
|
|
3719
|
-
"--text-
|
|
3720
|
-
"--text-
|
|
3721
|
-
"--text-
|
|
3722
|
-
"--text-
|
|
3723
|
-
"--text-
|
|
3724
|
-
"--text-
|
|
3725
|
-
"--text-
|
|
3726
|
-
"--text-
|
|
3727
|
-
"--text-lg--line-height": "var(--dk-leading-lg)",
|
|
3728
|
-
"--text-xl--line-height": "var(--dk-leading-xl)"
|
|
3778
|
+
"--designkit-border": `oklch(0.922 ${c(0.04)} ${primaryHue})`,
|
|
3779
|
+
"--designkit-input": `oklch(0.922 ${c(0.04)} ${primaryHue})`,
|
|
3780
|
+
"--designkit-muted": `oklch(0.970 ${c(0.02)} ${primaryHue})`,
|
|
3781
|
+
"--designkit-font-scale": fontScale,
|
|
3782
|
+
"--designkit-line-height": lineHeight,
|
|
3783
|
+
"--designkit-density": densityValues.density,
|
|
3784
|
+
"--designkit-page-padding-y": pagePaddingY ?? densityValues.pagePaddingY,
|
|
3785
|
+
"--designkit-panel-gap": panelGap ?? densityValues.panelGap,
|
|
3786
|
+
"--designkit-toolbar-height": toolbarHeight ?? densityValues.toolbarHeight,
|
|
3787
|
+
"--designkit-text-xs": `calc(0.75rem * ${fontScale})`,
|
|
3788
|
+
"--designkit-text-sm": `calc(0.875rem * ${fontScale})`,
|
|
3789
|
+
"--designkit-text-base": `calc(1rem * ${fontScale})`,
|
|
3790
|
+
"--designkit-text-lg": `calc(1.125rem * ${fontScale})`,
|
|
3791
|
+
"--designkit-text-xl": `calc(1.25rem * ${fontScale})`,
|
|
3792
|
+
"--designkit-leading-xs": `calc(1rem * ${lineHeight})`,
|
|
3793
|
+
"--designkit-leading-sm": `calc(1.25rem * ${lineHeight})`,
|
|
3794
|
+
"--designkit-leading-base": `calc(1.5rem * ${lineHeight})`,
|
|
3795
|
+
"--designkit-leading-lg": `calc(1.75rem * ${lineHeight})`,
|
|
3796
|
+
"--designkit-leading-xl": `calc(1.75rem * ${lineHeight})`,
|
|
3797
|
+
"--text-xs": "var(--designkit-text-xs)",
|
|
3798
|
+
"--text-sm": "var(--designkit-text-sm)",
|
|
3799
|
+
"--text-base": "var(--designkit-text-base)",
|
|
3800
|
+
"--text-lg": "var(--designkit-text-lg)",
|
|
3801
|
+
"--text-xl": "var(--designkit-text-xl)",
|
|
3802
|
+
"--text-xs--line-height": "var(--designkit-leading-xs)",
|
|
3803
|
+
"--text-sm--line-height": "var(--designkit-leading-sm)",
|
|
3804
|
+
"--text-base--line-height": "var(--designkit-leading-base)",
|
|
3805
|
+
"--text-lg--line-height": "var(--designkit-leading-lg)",
|
|
3806
|
+
"--text-xl--line-height": "var(--designkit-leading-xl)"
|
|
3729
3807
|
};
|
|
3730
3808
|
}
|
|
3731
3809
|
function buildDarkTonalTokens(primaryHue, primaryChroma) {
|
|
@@ -3741,11 +3819,9 @@ function buildDarkTonalTokens(primaryHue, primaryChroma) {
|
|
|
3741
3819
|
"--color-muted": `oklch(0.269 ${c(0.03)} ${primaryHue})`,
|
|
3742
3820
|
"--color-secondary": `oklch(0.269 ${c(0.02)} ${primaryHue})`,
|
|
3743
3821
|
"--color-accent": `oklch(0.320 ${c(0.04)} ${primaryHue})`,
|
|
3744
|
-
"--
|
|
3745
|
-
"--
|
|
3746
|
-
"--
|
|
3747
|
-
"--gridkit-border": `oklch(0.32 ${c(0.06)} ${primaryHue})`,
|
|
3748
|
-
"--gridkit-muted": `oklch(0.269 ${c(0.03)} ${primaryHue})`
|
|
3822
|
+
"--designkit-border": `oklch(0.32 ${c(0.06)} ${primaryHue})`,
|
|
3823
|
+
"--designkit-input": `oklch(0.35 ${c(0.06)} ${primaryHue})`,
|
|
3824
|
+
"--designkit-muted": `oklch(0.269 ${c(0.03)} ${primaryHue})`
|
|
3749
3825
|
};
|
|
3750
3826
|
}
|
|
3751
3827
|
function tokenMapToCss(tokens) {
|
|
@@ -3791,10 +3867,10 @@ ${tokenMapToCss(tokens)}
|
|
|
3791
3867
|
}, [g.darkMode]);
|
|
3792
3868
|
React2.useEffect(() => {
|
|
3793
3869
|
if (g.density === "default") {
|
|
3794
|
-
document.documentElement.removeAttribute("data-
|
|
3870
|
+
document.documentElement.removeAttribute("data-designkit-density");
|
|
3795
3871
|
return;
|
|
3796
3872
|
}
|
|
3797
|
-
document.documentElement.dataset.
|
|
3873
|
+
document.documentElement.dataset.designkitDensity = g.density;
|
|
3798
3874
|
}, [g.density]);
|
|
3799
3875
|
}
|
|
3800
3876
|
function buildTemplateTheme(g, ov = {}) {
|
|
@@ -3869,6 +3945,7 @@ exports.NavigationMenuPositioner = NavigationMenuPositioner;
|
|
|
3869
3945
|
exports.NavigationMenuTrigger = NavigationMenuTrigger;
|
|
3870
3946
|
exports.PageBreadcrumb = PageBreadcrumb;
|
|
3871
3947
|
exports.PageTopBar = PageTopBar;
|
|
3948
|
+
exports.PanelTemplate = PanelTemplate;
|
|
3872
3949
|
exports.Popover = Popover;
|
|
3873
3950
|
exports.PopoverContent = PopoverContent;
|
|
3874
3951
|
exports.PopoverDescription = PopoverDescription;
|
|
@@ -3949,6 +4026,7 @@ exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
|
3949
4026
|
exports.tabsListVariants = tabsListVariants;
|
|
3950
4027
|
exports.useIsMobile = useIsMobile;
|
|
3951
4028
|
exports.useSidebar = useSidebar;
|
|
4029
|
+
exports.useSidebarOptional = useSidebarOptional;
|
|
3952
4030
|
exports.useStyleInjector = useStyleInjector;
|
|
3953
4031
|
exports.useThemeStore = useThemeStore;
|
|
3954
4032
|
//# sourceMappingURL=index.cjs.map
|