@conscia-labs/design-system 0.4.0 → 1.0.1
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 +175 -26
- package/dist/card-DmBKqvj_.d.ts +49 -0
- package/dist/chunk-UVKRO5ER.js +13 -0
- package/dist/chunk-UVKRO5ER.js.map +1 -0
- package/dist/{chunk-KYH7IZ3Z.js → chunk-WEI3PU4A.js} +668 -390
- package/dist/chunk-WEI3PU4A.js.map +1 -0
- package/dist/chunk-XQSBTQRR.js +3834 -0
- package/dist/chunk-XQSBTQRR.js.map +1 -0
- package/dist/chunk-YAJUTCGD.js +26719 -0
- package/dist/chunk-YAJUTCGD.js.map +1 -0
- package/dist/foundation/index.js +1 -0
- package/dist/foundation.css +146 -172
- package/dist/index.d.ts +16 -14
- package/dist/index.js +101 -6
- package/dist/patterns/index.d.ts +54 -14
- package/dist/patterns/index.js +7 -2
- package/dist/primitives/index.d.ts +229 -84
- package/dist/primitives/index.js +96 -5
- package/dist/standalone.css +1 -1
- package/dist/styles.css +146 -172
- package/dist/utils/index.js +1 -0
- package/package.json +8 -16
- package/dist/card-BFUHJgV-.d.ts +0 -24
- package/dist/chunk-C44RGLGF.js +0 -723
- package/dist/chunk-C44RGLGF.js.map +0 -1
- package/dist/chunk-KYH7IZ3Z.js.map +0 -1
- package/dist/chunk-RAGHGWLB.js +0 -957
- package/dist/chunk-RAGHGWLB.js.map +0 -1
|
@@ -4,6 +4,16 @@ import {
|
|
|
4
4
|
densityOptions
|
|
5
5
|
} from "./chunk-YNQWIH6V.js";
|
|
6
6
|
import {
|
|
7
|
+
AlertDialog,
|
|
8
|
+
AlertDialogAction,
|
|
9
|
+
AlertDialogBody,
|
|
10
|
+
AlertDialogCancel,
|
|
11
|
+
AlertDialogContent,
|
|
12
|
+
AlertDialogDescription,
|
|
13
|
+
AlertDialogFooter,
|
|
14
|
+
AlertDialogHeader,
|
|
15
|
+
AlertDialogTitle,
|
|
16
|
+
AlertDialogTrigger,
|
|
7
17
|
Button,
|
|
8
18
|
Card,
|
|
9
19
|
Checkbox,
|
|
@@ -12,19 +22,18 @@ import {
|
|
|
12
22
|
CollapsibleTrigger,
|
|
13
23
|
Dialog,
|
|
14
24
|
DialogBody,
|
|
15
|
-
DialogClose,
|
|
16
25
|
DialogContent,
|
|
17
26
|
DialogDescription,
|
|
18
|
-
DialogFooter,
|
|
19
27
|
DialogHeader,
|
|
20
28
|
DialogTitle,
|
|
21
29
|
DialogTrigger,
|
|
22
30
|
DropdownMenu,
|
|
23
31
|
DropdownMenuContent,
|
|
24
32
|
DropdownMenuGroup,
|
|
25
|
-
DropdownMenuItem,
|
|
26
33
|
DropdownMenuLabel,
|
|
34
|
+
DropdownMenuLinkItem,
|
|
27
35
|
DropdownMenuTrigger,
|
|
36
|
+
IconButton,
|
|
28
37
|
Input,
|
|
29
38
|
Select,
|
|
30
39
|
SelectContent,
|
|
@@ -37,9 +46,11 @@ import {
|
|
|
37
46
|
SheetDescription,
|
|
38
47
|
SheetHeader,
|
|
39
48
|
SheetTitle,
|
|
49
|
+
ShortcutHint,
|
|
40
50
|
Skeleton,
|
|
41
51
|
Table,
|
|
42
52
|
TableBody,
|
|
53
|
+
TableCaption,
|
|
43
54
|
TableCell,
|
|
44
55
|
TableHead,
|
|
45
56
|
TableHeader,
|
|
@@ -51,8 +62,10 @@ import {
|
|
|
51
62
|
Tooltip,
|
|
52
63
|
TooltipContent,
|
|
53
64
|
TooltipProvider,
|
|
54
|
-
TooltipTrigger
|
|
55
|
-
|
|
65
|
+
TooltipTrigger,
|
|
66
|
+
index_parts_exports,
|
|
67
|
+
useRender
|
|
68
|
+
} from "./chunk-YAJUTCGD.js";
|
|
56
69
|
import {
|
|
57
70
|
cn
|
|
58
71
|
} from "./chunk-JU5DQXFC.js";
|
|
@@ -77,7 +90,7 @@ function PaginationControls({
|
|
|
77
90
|
"div",
|
|
78
91
|
{
|
|
79
92
|
"data-slot": "pagination-controls",
|
|
80
|
-
className: cn("flex flex-col gap-2 border-t border-border-subtle px-5 py-3 text-sm text-
|
|
93
|
+
className: cn("flex flex-col gap-2 border-t border-border-subtle px-5 py-3 text-sm text-text-supporting sm:flex-row sm:items-center sm:justify-between", className),
|
|
81
94
|
...props,
|
|
82
95
|
children: [
|
|
83
96
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
@@ -91,14 +104,14 @@ function PaginationControls({
|
|
|
91
104
|
] }) : null
|
|
92
105
|
] }),
|
|
93
106
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
94
|
-
/* @__PURE__ */ jsx(
|
|
95
|
-
onPageChange ? pageItems(currentPage, pageCount).map((item, index) => item === "ellipsis" ? /* @__PURE__ */ jsx("span", { className: "flex size-8 items-center justify-center text-
|
|
107
|
+
/* @__PURE__ */ jsx(IconButton, { type: "button", variant: "outline", size: "sm", className: "size-8", "aria-label": "Previous page", onClick: onPrevious ?? (() => onPageChange?.(currentPage - 1)), disabled: currentPage <= 1, children: /* @__PURE__ */ jsx(ChevronLeft, {}) }),
|
|
108
|
+
onPageChange ? pageItems(currentPage, pageCount).map((item, index) => item === "ellipsis" ? /* @__PURE__ */ jsx("span", { className: "flex size-8 items-center justify-center text-text-supporting", "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`) : /* @__PURE__ */ jsx(IconButton, { type: "button", variant: item === currentPage ? "secondary" : "ghost", size: "sm", className: "size-8", "aria-label": `Page ${item}`, "aria-current": item === currentPage ? "page" : void 0, onClick: () => onPageChange(item), children: item }, item)) : /* @__PURE__ */ jsxs("span", { className: "px-2 text-[var(--ds-metadata)]", children: [
|
|
96
109
|
"Page ",
|
|
97
110
|
currentPage,
|
|
98
111
|
" of ",
|
|
99
112
|
pageCount
|
|
100
113
|
] }),
|
|
101
|
-
/* @__PURE__ */ jsx(
|
|
114
|
+
/* @__PURE__ */ jsx(IconButton, { type: "button", variant: "outline", size: "sm", className: "size-8", "aria-label": "Next page", onClick: onNext ?? (() => onPageChange?.(currentPage + 1)), disabled: currentPage >= pageCount, children: /* @__PURE__ */ jsx(ChevronRight, {}) })
|
|
102
115
|
] })
|
|
103
116
|
]
|
|
104
117
|
}
|
|
@@ -148,6 +161,7 @@ function DataTable({
|
|
|
148
161
|
pageSizeOptions,
|
|
149
162
|
totalLabel,
|
|
150
163
|
mobileRow,
|
|
164
|
+
caption,
|
|
151
165
|
empty,
|
|
152
166
|
className
|
|
153
167
|
}) {
|
|
@@ -168,7 +182,8 @@ function DataTable({
|
|
|
168
182
|
Checkbox,
|
|
169
183
|
{
|
|
170
184
|
"aria-label": "Select all rows on this page",
|
|
171
|
-
checked: table2.getIsAllPageRowsSelected()
|
|
185
|
+
checked: table2.getIsAllPageRowsSelected(),
|
|
186
|
+
indeterminate: table2.getIsSomePageRowsSelected() && !table2.getIsAllPageRowsSelected(),
|
|
172
187
|
onCheckedChange: (checked) => table2.toggleAllPageRowsSelected(Boolean(checked))
|
|
173
188
|
}
|
|
174
189
|
),
|
|
@@ -240,8 +255,9 @@ function DataTable({
|
|
|
240
255
|
if (!data.length && empty) return /* @__PURE__ */ jsx2(Fragment, { children: empty });
|
|
241
256
|
const visibleRows = table.getRowModel().rows;
|
|
242
257
|
const showPagination = Boolean(pagination && onPaginationChange);
|
|
243
|
-
return /* @__PURE__ */ jsxs2("div", { "data-slot": "data-table", className: cn("bg-
|
|
258
|
+
return /* @__PURE__ */ jsxs2("div", { "data-slot": "data-table", className: cn("bg-canvas", className), children: [
|
|
244
259
|
/* @__PURE__ */ jsx2("div", { className: mobileRow ? "hidden md:block" : void 0, children: /* @__PURE__ */ jsxs2(Table, { children: [
|
|
260
|
+
caption ? /* @__PURE__ */ jsx2(TableCaption, { children: caption }) : null,
|
|
245
261
|
/* @__PURE__ */ jsx2(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx2(TableRow, { children: headerGroup.headers.map((header) => {
|
|
246
262
|
const meta = header.column.columnDef.meta;
|
|
247
263
|
const canSort = header.column.getCanSort();
|
|
@@ -257,7 +273,7 @@ function DataTable({
|
|
|
257
273
|
type: "button",
|
|
258
274
|
variant: "ghost",
|
|
259
275
|
size: "sm",
|
|
260
|
-
className: "-ml-2 h-8 gap-1.5 px-2 text-[var(--ds-metadata)] font-semibold uppercase text-
|
|
276
|
+
className: "-ml-2 h-8 gap-1.5 px-2 text-[var(--ds-metadata)] font-semibold uppercase text-text-supporting hover:text-text-primary",
|
|
261
277
|
onClick: header.column.getToggleSortingHandler(),
|
|
262
278
|
"aria-label": `Sort by ${meta?.label ?? header.column.id}`,
|
|
263
279
|
children: [
|
|
@@ -277,10 +293,11 @@ function DataTable({
|
|
|
277
293
|
return /* @__PURE__ */ jsx2(
|
|
278
294
|
TableRow,
|
|
279
295
|
{
|
|
280
|
-
"data-
|
|
296
|
+
"data-selected": row.getIsSelected() ? "true" : void 0,
|
|
297
|
+
"aria-selected": row.getIsSelected() ? "true" : void 0,
|
|
281
298
|
tabIndex: rowClickable ? 0 : void 0,
|
|
282
299
|
"aria-label": rowClickable ? getRowLabel?.(row.original) ?? row.id : void 0,
|
|
283
|
-
className: cn(rowClickable && "cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-
|
|
300
|
+
className: cn(rowClickable && "cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-focus/45"),
|
|
284
301
|
onClick: () => {
|
|
285
302
|
if (rowClickable) onRowClick?.(row.original);
|
|
286
303
|
},
|
|
@@ -325,6 +342,7 @@ function EntityTable({
|
|
|
325
342
|
onRowClick,
|
|
326
343
|
getRowLabel,
|
|
327
344
|
rowActions,
|
|
345
|
+
caption,
|
|
328
346
|
className
|
|
329
347
|
}) {
|
|
330
348
|
return /* @__PURE__ */ jsx3(
|
|
@@ -338,37 +356,200 @@ function EntityTable({
|
|
|
338
356
|
onRowClick,
|
|
339
357
|
getRowLabel,
|
|
340
358
|
rowActions,
|
|
359
|
+
caption,
|
|
341
360
|
className
|
|
342
361
|
}
|
|
343
362
|
);
|
|
344
363
|
}
|
|
345
364
|
|
|
365
|
+
// src/patterns/command-palette.tsx
|
|
366
|
+
import * as React2 from "react";
|
|
367
|
+
import { SearchIcon } from "lucide-react";
|
|
368
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
369
|
+
function CommandPalette({
|
|
370
|
+
className,
|
|
371
|
+
closeOnSelect = true,
|
|
372
|
+
defaultOpen = false,
|
|
373
|
+
description,
|
|
374
|
+
emptyMessage = "No commands found.",
|
|
375
|
+
items,
|
|
376
|
+
onOpenChange,
|
|
377
|
+
onSelect,
|
|
378
|
+
open,
|
|
379
|
+
placeholder = "Search commands...",
|
|
380
|
+
title = "Command menu",
|
|
381
|
+
trigger,
|
|
382
|
+
...props
|
|
383
|
+
}) {
|
|
384
|
+
const [query, setQuery] = React2.useState("");
|
|
385
|
+
const [internalOpen, setInternalOpen] = React2.useState(defaultOpen);
|
|
386
|
+
const isControlled = open !== void 0;
|
|
387
|
+
const isOpen = open ?? internalOpen;
|
|
388
|
+
const filteredItems = React2.useMemo(() => {
|
|
389
|
+
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
390
|
+
if (!normalizedQuery) {
|
|
391
|
+
return items;
|
|
392
|
+
}
|
|
393
|
+
return items.filter(
|
|
394
|
+
(item) => [item.label, ...item.keywords ?? []].some(
|
|
395
|
+
(value) => value.toLocaleLowerCase().includes(normalizedQuery)
|
|
396
|
+
)
|
|
397
|
+
);
|
|
398
|
+
}, [items, query]);
|
|
399
|
+
const handleOpenChange = React2.useCallback(
|
|
400
|
+
(nextOpen) => {
|
|
401
|
+
if (!isControlled) {
|
|
402
|
+
setInternalOpen(nextOpen);
|
|
403
|
+
}
|
|
404
|
+
if (nextOpen) {
|
|
405
|
+
setQuery("");
|
|
406
|
+
}
|
|
407
|
+
onOpenChange?.(nextOpen);
|
|
408
|
+
},
|
|
409
|
+
[isControlled, onOpenChange]
|
|
410
|
+
);
|
|
411
|
+
const handleSelect = React2.useCallback(
|
|
412
|
+
(item) => {
|
|
413
|
+
onSelect(item);
|
|
414
|
+
if (closeOnSelect) {
|
|
415
|
+
handleOpenChange(false);
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
[closeOnSelect, handleOpenChange, onSelect]
|
|
419
|
+
);
|
|
420
|
+
return /* @__PURE__ */ jsx4("div", { "data-slot": "command-palette", className: cn("contents", className), ...props, children: /* @__PURE__ */ jsxs3(Dialog, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
421
|
+
trigger ? /* @__PURE__ */ jsx4(DialogTrigger, { render: trigger }) : null,
|
|
422
|
+
/* @__PURE__ */ jsxs3(
|
|
423
|
+
DialogContent,
|
|
424
|
+
{
|
|
425
|
+
showCloseButton: false,
|
|
426
|
+
size: "small",
|
|
427
|
+
"aria-label": typeof title === "string" ? void 0 : "Command menu",
|
|
428
|
+
className: "max-w-xl gap-0 p-0",
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ jsxs3(DialogHeader, { className: "sr-only", children: [
|
|
431
|
+
/* @__PURE__ */ jsx4(DialogTitle, { children: title }),
|
|
432
|
+
description ? /* @__PURE__ */ jsx4(DialogDescription, { children: description }) : null
|
|
433
|
+
] }),
|
|
434
|
+
/* @__PURE__ */ jsx4(DialogBody, { className: "overflow-hidden", children: /* @__PURE__ */ jsxs3(
|
|
435
|
+
index_parts_exports.Root,
|
|
436
|
+
{
|
|
437
|
+
items: filteredItems,
|
|
438
|
+
filter: () => true,
|
|
439
|
+
open: true,
|
|
440
|
+
autoHighlight: true,
|
|
441
|
+
inputValue: query,
|
|
442
|
+
onInputValueChange: setQuery,
|
|
443
|
+
onValueChange: (item) => {
|
|
444
|
+
if (item) {
|
|
445
|
+
handleSelect(item);
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
itemToStringLabel: (item) => [item.label, ...item.keywords ?? []].join(" "),
|
|
449
|
+
itemToStringValue: (item) => item.id,
|
|
450
|
+
children: [
|
|
451
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 border-b border-border-subtle px-4", children: [
|
|
452
|
+
/* @__PURE__ */ jsx4(SearchIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-text-supporting" }),
|
|
453
|
+
/* @__PURE__ */ jsx4(
|
|
454
|
+
index_parts_exports.Input,
|
|
455
|
+
{
|
|
456
|
+
"aria-label": "Search commands",
|
|
457
|
+
autoFocus: true,
|
|
458
|
+
className: "ds-type-control h-12 min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-supporting",
|
|
459
|
+
placeholder
|
|
460
|
+
}
|
|
461
|
+
)
|
|
462
|
+
] }),
|
|
463
|
+
filteredItems.length === 0 ? /* @__PURE__ */ jsx4("div", { role: "status", className: "px-3 py-8 text-center text-sm text-text-supporting", children: emptyMessage }) : null,
|
|
464
|
+
/* @__PURE__ */ jsx4(
|
|
465
|
+
index_parts_exports.List,
|
|
466
|
+
{
|
|
467
|
+
"aria-label": "Commands",
|
|
468
|
+
className: "max-h-[min(24rem,calc(100vh-10rem))] overflow-y-auto p-2 outline-none",
|
|
469
|
+
children: filteredItems.map((item, index) => /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
|
|
470
|
+
item.group && (index === 0 || filteredItems[index - 1]?.group !== item.group) ? /* @__PURE__ */ jsx4("div", { role: "presentation", className: "px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-text-supporting first:pt-1", children: item.group }) : null,
|
|
471
|
+
/* @__PURE__ */ jsxs3(
|
|
472
|
+
index_parts_exports.Item,
|
|
473
|
+
{
|
|
474
|
+
index,
|
|
475
|
+
value: item,
|
|
476
|
+
disabled: item.disabled,
|
|
477
|
+
className: "data-highlighted:bg-surface-muted data-highlighted:text-text-primary relative flex min-w-0 items-start gap-3 rounded-md px-3 py-2.5 text-left outline-none data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
478
|
+
children: [
|
|
479
|
+
item.icon ? /* @__PURE__ */ jsx4("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center text-text-supporting", children: item.icon }) : null,
|
|
480
|
+
/* @__PURE__ */ jsxs3("span", { className: "min-w-0 flex-1", children: [
|
|
481
|
+
/* @__PURE__ */ jsx4("span", { className: "block truncate text-sm font-medium", children: item.label }),
|
|
482
|
+
item.description ? /* @__PURE__ */ jsx4("span", { className: "mt-0.5 block truncate text-xs text-text-supporting", children: item.description }) : null
|
|
483
|
+
] }),
|
|
484
|
+
item.shortcut ? /* @__PURE__ */ jsx4("span", { className: "shrink-0 text-xs text-text-supporting", children: item.shortcut }) : null
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
] }, item.id))
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
) })
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
] }) });
|
|
498
|
+
}
|
|
499
|
+
|
|
346
500
|
// src/patterns/detail-back-link.tsx
|
|
347
501
|
import { ArrowLeft } from "lucide-react";
|
|
348
|
-
import { jsx as
|
|
502
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
349
503
|
function DetailBackLink({ label, className, ...props }) {
|
|
350
|
-
return /* @__PURE__ */
|
|
504
|
+
return /* @__PURE__ */ jsxs4(
|
|
351
505
|
"a",
|
|
352
506
|
{
|
|
353
507
|
"data-slot": "detail-back-link",
|
|
354
508
|
className: cn(
|
|
355
|
-
"inline-flex h-8 w-fit items-center gap-2 rounded-md px-2 text-sm font-medium text-
|
|
509
|
+
"inline-flex h-8 w-fit items-center gap-2 rounded-md px-2 text-sm font-medium text-text-supporting outline-none transition-colors hover:bg-surface-muted hover:text-text-primary focus-visible:ring-[3px] focus-visible:ring-focus/45",
|
|
356
510
|
className
|
|
357
511
|
),
|
|
358
512
|
...props,
|
|
359
513
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ jsx5(ArrowLeft, { className: "size-4", "aria-hidden": "true" }),
|
|
361
515
|
label
|
|
362
516
|
]
|
|
363
517
|
}
|
|
364
518
|
);
|
|
365
519
|
}
|
|
366
520
|
|
|
521
|
+
// src/patterns/filter-bar.tsx
|
|
522
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
523
|
+
function FilterBar({
|
|
524
|
+
children,
|
|
525
|
+
clearAllLabel = "Clear all",
|
|
526
|
+
className,
|
|
527
|
+
onClearAll,
|
|
528
|
+
...props
|
|
529
|
+
}) {
|
|
530
|
+
return /* @__PURE__ */ jsxs5(
|
|
531
|
+
"div",
|
|
532
|
+
{
|
|
533
|
+
"data-slot": "filter-bar",
|
|
534
|
+
className: cn(
|
|
535
|
+
"flex min-w-0 flex-wrap items-center gap-2 rounded-[var(--ds-radius-control)] border border-border-subtle bg-surface-muted/60 px-2 py-1.5",
|
|
536
|
+
className
|
|
537
|
+
),
|
|
538
|
+
role: "group",
|
|
539
|
+
"aria-label": props["aria-label"] ?? "Active filters",
|
|
540
|
+
...props,
|
|
541
|
+
children: [
|
|
542
|
+
/* @__PURE__ */ jsx6("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5", children }),
|
|
543
|
+
onClearAll ? /* @__PURE__ */ jsx6(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClearAll, className: "shrink-0", children: clearAllLabel }) : null
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
|
|
367
549
|
// src/patterns/app-shell.tsx
|
|
368
|
-
import * as
|
|
369
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
550
|
+
import * as React3 from "react";
|
|
370
551
|
import { PanelLeftIcon, Search, X } from "lucide-react";
|
|
371
|
-
import { Fragment as
|
|
552
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
372
553
|
var SIDEBAR_COOKIE_NAME = "conscia_sidebar_state";
|
|
373
554
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 30;
|
|
374
555
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
@@ -417,17 +598,17 @@ function subscribeToSidebarOpen(onStoreChange) {
|
|
|
417
598
|
window.removeEventListener("storage", onStorage);
|
|
418
599
|
};
|
|
419
600
|
}
|
|
420
|
-
var AppShellContext =
|
|
601
|
+
var AppShellContext = React3.createContext(null);
|
|
421
602
|
function useAppShell() {
|
|
422
|
-
const context =
|
|
603
|
+
const context = React3.useContext(AppShellContext);
|
|
423
604
|
if (!context) {
|
|
424
605
|
throw new Error("useAppShell must be used within AppShell.");
|
|
425
606
|
}
|
|
426
607
|
return context;
|
|
427
608
|
}
|
|
428
609
|
function useMediaQuery(query) {
|
|
429
|
-
const [matches, setMatches] =
|
|
430
|
-
|
|
610
|
+
const [matches, setMatches] = React3.useState(false);
|
|
611
|
+
React3.useEffect(() => {
|
|
431
612
|
const media = window.matchMedia(query);
|
|
432
613
|
const sync = () => setMatches(media.matches);
|
|
433
614
|
sync();
|
|
@@ -436,6 +617,44 @@ function useMediaQuery(query) {
|
|
|
436
617
|
}, [query]);
|
|
437
618
|
return matches;
|
|
438
619
|
}
|
|
620
|
+
function useSidebarOverflow() {
|
|
621
|
+
const contentRef = React3.useRef(null);
|
|
622
|
+
const subscribe = React3.useCallback((onStoreChange) => {
|
|
623
|
+
const element = contentRef.current;
|
|
624
|
+
if (!element) {
|
|
625
|
+
return () => void 0;
|
|
626
|
+
}
|
|
627
|
+
const handleScroll = () => onStoreChange();
|
|
628
|
+
element.addEventListener("scroll", handleScroll, { passive: true });
|
|
629
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(onStoreChange);
|
|
630
|
+
resizeObserver?.observe(element);
|
|
631
|
+
window.addEventListener("resize", onStoreChange);
|
|
632
|
+
return () => {
|
|
633
|
+
element.removeEventListener("scroll", handleScroll);
|
|
634
|
+
resizeObserver?.disconnect();
|
|
635
|
+
window.removeEventListener("resize", onStoreChange);
|
|
636
|
+
};
|
|
637
|
+
}, []);
|
|
638
|
+
const getSnapshot = React3.useCallback(() => {
|
|
639
|
+
const element = contentRef.current;
|
|
640
|
+
if (!element) {
|
|
641
|
+
return 0;
|
|
642
|
+
}
|
|
643
|
+
const hasScrollBefore = element.scrollTop > 1;
|
|
644
|
+
const hasScrollAfter = element.scrollHeight - element.clientHeight - element.scrollTop > 1;
|
|
645
|
+
return (hasScrollBefore ? 1 : 0) | (hasScrollAfter ? 2 : 0);
|
|
646
|
+
}, []);
|
|
647
|
+
const scrollState = React3.useSyncExternalStore(
|
|
648
|
+
subscribe,
|
|
649
|
+
getSnapshot,
|
|
650
|
+
() => 0
|
|
651
|
+
);
|
|
652
|
+
return {
|
|
653
|
+
contentRef,
|
|
654
|
+
hasScrollBefore: Boolean(scrollState & 1),
|
|
655
|
+
hasScrollAfter: Boolean(scrollState & 2)
|
|
656
|
+
};
|
|
657
|
+
}
|
|
439
658
|
function AppShell({
|
|
440
659
|
defaultSidebarOpen = true,
|
|
441
660
|
children,
|
|
@@ -444,10 +663,10 @@ function AppShell({
|
|
|
444
663
|
...props
|
|
445
664
|
}) {
|
|
446
665
|
const isMobile = useMediaQuery("(max-width: 1023px)");
|
|
447
|
-
const [sidebarOpen, setSidebarOpenState] =
|
|
448
|
-
const [sidebarSide, setSidebarSide] =
|
|
449
|
-
const [mobileOpen, setMobileOpen] =
|
|
450
|
-
|
|
666
|
+
const [sidebarOpen, setSidebarOpenState] = React3.useState(defaultSidebarOpen);
|
|
667
|
+
const [sidebarSide, setSidebarSide] = React3.useState("left");
|
|
668
|
+
const [mobileOpen, setMobileOpen] = React3.useState(false);
|
|
669
|
+
React3.useEffect(() => {
|
|
451
670
|
function syncSidebarOpen() {
|
|
452
671
|
setSidebarOpenState(readPersistedSidebarOpen() ?? defaultSidebarOpen);
|
|
453
672
|
}
|
|
@@ -455,17 +674,17 @@ function AppShell({
|
|
|
455
674
|
queueMicrotask(syncSidebarOpen);
|
|
456
675
|
return unsubscribe;
|
|
457
676
|
}, [defaultSidebarOpen]);
|
|
458
|
-
const setSidebarOpen =
|
|
677
|
+
const setSidebarOpen = React3.useCallback((open) => {
|
|
459
678
|
persistSidebarOpen(open);
|
|
460
679
|
}, []);
|
|
461
|
-
const toggleSidebar =
|
|
680
|
+
const toggleSidebar = React3.useCallback(() => {
|
|
462
681
|
if (isMobile) {
|
|
463
682
|
setMobileOpen((current) => !current);
|
|
464
683
|
return;
|
|
465
684
|
}
|
|
466
685
|
persistSidebarOpen(!sidebarOpen);
|
|
467
686
|
}, [isMobile, sidebarOpen]);
|
|
468
|
-
|
|
687
|
+
React3.useEffect(() => {
|
|
469
688
|
const onKeyDown = (event) => {
|
|
470
689
|
if (event.key.toLowerCase() === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
471
690
|
event.preventDefault();
|
|
@@ -475,7 +694,7 @@ function AppShell({
|
|
|
475
694
|
window.addEventListener("keydown", onKeyDown);
|
|
476
695
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
477
696
|
}, [toggleSidebar]);
|
|
478
|
-
const contextValue =
|
|
697
|
+
const contextValue = React3.useMemo(
|
|
479
698
|
() => ({
|
|
480
699
|
sidebarState: sidebarOpen ? "expanded" : "collapsed",
|
|
481
700
|
sidebarSide,
|
|
@@ -496,7 +715,7 @@ function AppShell({
|
|
|
496
715
|
toggleSidebar
|
|
497
716
|
]
|
|
498
717
|
);
|
|
499
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsx7(AppShellContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx7(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsx7(
|
|
500
719
|
"div",
|
|
501
720
|
{
|
|
502
721
|
"data-slot": "app-shell",
|
|
@@ -504,7 +723,7 @@ function AppShell({
|
|
|
504
723
|
"data-sidebar-side": sidebarSide,
|
|
505
724
|
suppressHydrationWarning: true,
|
|
506
725
|
className: cn(
|
|
507
|
-
"group/shell min-h-svh bg-canvas text-
|
|
726
|
+
"group/shell min-h-svh bg-canvas text-text-primary",
|
|
508
727
|
"[--ds-app-sidebar-width:var(--ds-sidebar-width)] [--ds-app-sidebar-width-mobile:var(--ds-sidebar-width-mobile)] data-[sidebar-state=collapsed]:[--ds-app-sidebar-width:3.5rem]",
|
|
509
728
|
className
|
|
510
729
|
),
|
|
@@ -516,7 +735,7 @@ function AppShell({
|
|
|
516
735
|
}
|
|
517
736
|
function AppSidebar({
|
|
518
737
|
side = "left",
|
|
519
|
-
variant = "
|
|
738
|
+
variant = "auto",
|
|
520
739
|
className,
|
|
521
740
|
children,
|
|
522
741
|
title = "Application navigation",
|
|
@@ -524,26 +743,26 @@ function AppSidebar({
|
|
|
524
743
|
...props
|
|
525
744
|
}) {
|
|
526
745
|
const { mobileOpen, setMobileOpen, setSidebarSide } = useAppShell();
|
|
527
|
-
|
|
746
|
+
React3.useEffect(() => {
|
|
528
747
|
setSidebarSide(side);
|
|
529
748
|
}, [setSidebarSide, side]);
|
|
530
|
-
return /* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
750
|
+
/* @__PURE__ */ jsx7(Sheet, { side, open: mobileOpen, onOpenChange: setMobileOpen, children: /* @__PURE__ */ jsxs6(
|
|
532
751
|
SheetContent,
|
|
533
752
|
{
|
|
534
753
|
side,
|
|
535
754
|
"data-sidebar-variant": variant,
|
|
536
755
|
className: "w-[var(--ds-sidebar-width-mobile)] border-sidebar-border bg-sidebar-canvas p-0 text-sidebar-primary-text [&>[data-slot=sheet-close]]:right-3 [&>[data-slot=sheet-close]]:top-3 [&>[data-slot=sheet-close]]:text-sidebar-secondary-text [&>[data-slot=sheet-close]]:hover:text-sidebar-primary-text",
|
|
537
756
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ jsxs6(SheetHeader, { className: "sr-only", children: [
|
|
758
|
+
/* @__PURE__ */ jsx7(SheetTitle, { children: title }),
|
|
759
|
+
/* @__PURE__ */ jsx7(SheetDescription, { children: description })
|
|
541
760
|
] }),
|
|
542
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ jsx7("div", { className: "flex h-full min-h-0 flex-col", children })
|
|
543
762
|
]
|
|
544
763
|
}
|
|
545
764
|
) }),
|
|
546
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ jsx7(
|
|
547
766
|
"aside",
|
|
548
767
|
{
|
|
549
768
|
"data-slot": "app-sidebar",
|
|
@@ -565,7 +784,7 @@ function AppSidebarHeader({
|
|
|
565
784
|
className,
|
|
566
785
|
...props
|
|
567
786
|
}) {
|
|
568
|
-
return /* @__PURE__ */
|
|
787
|
+
return /* @__PURE__ */ jsx7(
|
|
569
788
|
"div",
|
|
570
789
|
{
|
|
571
790
|
"data-slot": "app-sidebar-header",
|
|
@@ -581,12 +800,16 @@ function AppSidebarContent({
|
|
|
581
800
|
className,
|
|
582
801
|
...props
|
|
583
802
|
}) {
|
|
584
|
-
|
|
803
|
+
const { contentRef, hasScrollBefore, hasScrollAfter } = useSidebarOverflow();
|
|
804
|
+
return /* @__PURE__ */ jsx7(
|
|
585
805
|
"div",
|
|
586
806
|
{
|
|
587
807
|
"data-slot": "app-sidebar-content",
|
|
808
|
+
"data-scroll-before": hasScrollBefore ? "true" : void 0,
|
|
809
|
+
"data-scroll-after": hasScrollAfter ? "true" : void 0,
|
|
810
|
+
ref: contentRef,
|
|
588
811
|
className: cn(
|
|
589
|
-
"flex min-h-0 min-w-0 flex-1 flex-col gap-[var(--ds-sidebar-group-gap)] overflow-x-
|
|
812
|
+
"relative flex min-h-0 min-w-0 flex-1 flex-col gap-[var(--ds-sidebar-group-gap)] overflow-x-clip overflow-y-auto bg-sidebar-content px-[var(--ds-sidebar-content-padding-x)] py-[var(--ds-sidebar-content-padding-y)]",
|
|
590
813
|
className
|
|
591
814
|
),
|
|
592
815
|
...props
|
|
@@ -597,7 +820,7 @@ function AppSidebarFooter({
|
|
|
597
820
|
className,
|
|
598
821
|
...props
|
|
599
822
|
}) {
|
|
600
|
-
return /* @__PURE__ */
|
|
823
|
+
return /* @__PURE__ */ jsx7(
|
|
601
824
|
"div",
|
|
602
825
|
{
|
|
603
826
|
"data-slot": "app-sidebar-footer",
|
|
@@ -613,18 +836,20 @@ function ProductIdentity({
|
|
|
613
836
|
label,
|
|
614
837
|
description,
|
|
615
838
|
icon,
|
|
839
|
+
collapsedLabel,
|
|
616
840
|
className
|
|
617
841
|
}) {
|
|
618
|
-
return /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ jsxs6(
|
|
619
843
|
"div",
|
|
620
844
|
{
|
|
621
845
|
"data-slot": "product-identity",
|
|
622
846
|
className: cn("flex min-w-0 items-center gap-2", className),
|
|
623
847
|
children: [
|
|
624
|
-
icon ? /* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
|
|
627
|
-
|
|
848
|
+
icon ? /* @__PURE__ */ jsx7("div", { className: "flex size-7 shrink-0 items-center justify-center rounded-[var(--ds-radius-control)] bg-sidebar-hover text-sidebar-icon", children: icon }) : null,
|
|
849
|
+
collapsedLabel && !icon ? /* @__PURE__ */ jsx7("div", { className: "hidden shrink-0 items-center justify-center rounded-[var(--ds-radius-control)] bg-sidebar-hover px-2 py-1 text-xs font-semibold text-sidebar-primary-text group-data-[sidebar-state=collapsed]/shell:flex", children: collapsedLabel }) : null,
|
|
850
|
+
/* @__PURE__ */ jsxs6("div", { className: "min-w-0 group-data-[sidebar-state=collapsed]/shell:hidden", children: [
|
|
851
|
+
/* @__PURE__ */ jsx7("div", { className: "ds-type-navigation truncate font-semibold text-sidebar-primary-text", children: label }),
|
|
852
|
+
description ? /* @__PURE__ */ jsx7("div", { className: "ds-type-metadata truncate text-sidebar-metadata-text", children: description }) : null
|
|
628
853
|
] })
|
|
629
854
|
]
|
|
630
855
|
}
|
|
@@ -634,7 +859,7 @@ function SidebarSeparator({
|
|
|
634
859
|
className,
|
|
635
860
|
...props
|
|
636
861
|
}) {
|
|
637
|
-
return /* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ jsx7(
|
|
638
863
|
Separator,
|
|
639
864
|
{
|
|
640
865
|
"data-slot": "app-sidebar-separator",
|
|
@@ -649,7 +874,7 @@ function NavigationGroup({
|
|
|
649
874
|
children,
|
|
650
875
|
className
|
|
651
876
|
}) {
|
|
652
|
-
return /* @__PURE__ */
|
|
877
|
+
return /* @__PURE__ */ jsxs6(
|
|
653
878
|
"section",
|
|
654
879
|
{
|
|
655
880
|
"data-slot": "navigation-group",
|
|
@@ -658,18 +883,18 @@ function NavigationGroup({
|
|
|
658
883
|
className
|
|
659
884
|
),
|
|
660
885
|
children: [
|
|
661
|
-
label ? /* @__PURE__ */
|
|
886
|
+
label ? /* @__PURE__ */ jsxs6(
|
|
662
887
|
"div",
|
|
663
888
|
{
|
|
664
889
|
"data-slot": "navigation-group-label",
|
|
665
890
|
className: "flex min-h-6 items-center gap-2 px-2 pb-0 pt-2 text-[length:var(--ds-sidebar-group-label-size)] font-semibold uppercase leading-[var(--ds-sidebar-group-label-line-height)] tracking-[0.04em] text-sidebar-group-label group-data-[sidebar-state=collapsed]/shell:hidden",
|
|
666
891
|
children: [
|
|
667
892
|
label,
|
|
668
|
-
count !== void 0 ? /* @__PURE__ */
|
|
893
|
+
count !== void 0 ? /* @__PURE__ */ jsx7("span", { className: "ds-type-metadata ml-auto shrink-0 font-medium normal-case tracking-normal text-sidebar-group-count", children: count }) : null
|
|
669
894
|
]
|
|
670
895
|
}
|
|
671
896
|
) : null,
|
|
672
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ jsx7("div", { className: "flex min-w-0 flex-col gap-[var(--ds-sidebar-item-gap)]", children })
|
|
673
898
|
]
|
|
674
899
|
}
|
|
675
900
|
);
|
|
@@ -682,75 +907,83 @@ function navigationItemClasses(active) {
|
|
|
682
907
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
|
|
683
908
|
"group-data-[sidebar-state=collapsed]/shell:justify-center group-data-[sidebar-state=collapsed]/shell:px-0",
|
|
684
909
|
"[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75] [&>svg]:text-sidebar-icon",
|
|
685
|
-
active && "bg-sidebar-active text-sidebar-active-foreground shadow-[inset_3px_0_0_var(--sidebar-active-indicator)] hover:bg-sidebar-active hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground"
|
|
910
|
+
active && "bg-sidebar-active-background font-semibold text-sidebar-active-foreground shadow-[inset_3px_0_0_var(--sidebar-active-indicator)] hover:bg-sidebar-active-background hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground"
|
|
686
911
|
);
|
|
687
912
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
913
|
+
var NavigationItem = React3.forwardRef(
|
|
914
|
+
function NavigationItem2({
|
|
915
|
+
active = false,
|
|
916
|
+
tooltip,
|
|
917
|
+
render,
|
|
918
|
+
type,
|
|
919
|
+
"aria-expanded": ariaExpanded,
|
|
920
|
+
className,
|
|
921
|
+
children,
|
|
922
|
+
...props
|
|
923
|
+
}, ref) {
|
|
924
|
+
const { sidebarState, sidebarSide, isMobile } = useAppShell();
|
|
925
|
+
const item = useRender({
|
|
926
|
+
defaultTagName: "button",
|
|
927
|
+
render,
|
|
928
|
+
ref,
|
|
929
|
+
props: {
|
|
930
|
+
"data-slot": "navigation-item",
|
|
931
|
+
"data-active": active ? "true" : void 0,
|
|
932
|
+
"aria-expanded": ariaExpanded,
|
|
933
|
+
type: render ? void 0 : type ?? "button",
|
|
934
|
+
className: cn(navigationItemClasses(active), className),
|
|
935
|
+
...props,
|
|
936
|
+
...render ? {} : { children }
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
if (!tooltip) {
|
|
940
|
+
return item;
|
|
708
941
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
942
|
+
return /* @__PURE__ */ jsxs6(Tooltip, { children: [
|
|
943
|
+
/* @__PURE__ */ jsx7(TooltipTrigger, { render: item }),
|
|
944
|
+
/* @__PURE__ */ jsx7(
|
|
945
|
+
TooltipContent,
|
|
946
|
+
{
|
|
947
|
+
side: sidebarSide === "left" ? "right" : "left",
|
|
948
|
+
align: "center",
|
|
949
|
+
hidden: sidebarState !== "collapsed" || isMobile,
|
|
950
|
+
children: tooltip
|
|
951
|
+
}
|
|
952
|
+
)
|
|
953
|
+
] });
|
|
712
954
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
955
|
+
);
|
|
956
|
+
var NavigationSubItem = React3.forwardRef(
|
|
957
|
+
function NavigationSubItem2({
|
|
958
|
+
active = false,
|
|
959
|
+
render,
|
|
960
|
+
className,
|
|
961
|
+
...props
|
|
962
|
+
}, ref) {
|
|
963
|
+
return useRender({
|
|
964
|
+
defaultTagName: "a",
|
|
965
|
+
render,
|
|
966
|
+
ref,
|
|
967
|
+
props: {
|
|
968
|
+
"data-slot": "navigation-sub-item",
|
|
969
|
+
"data-active": active ? "true" : void 0,
|
|
970
|
+
className: cn(
|
|
971
|
+
"ds-type-navigation flex min-h-[var(--ds-sidebar-item-height-touch)] min-w-0 cursor-pointer items-center gap-2 rounded-[var(--ds-radius-control)] px-2 text-sidebar-secondary-text outline-none transition-colors duration-150 lg:h-[calc(var(--ds-sidebar-item-height)-0.25rem)] lg:min-h-0",
|
|
972
|
+
"hover:bg-sidebar-hover hover:text-sidebar-primary-text focus-visible:ring-[3px] focus-visible:ring-sidebar-focus-ring",
|
|
973
|
+
"group-data-[sidebar-state=collapsed]/shell:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75] [&>svg]:text-sidebar-icon",
|
|
974
|
+
active && "bg-sidebar-active-background text-sidebar-active-foreground shadow-[inset_3px_0_0_var(--sidebar-active-indicator)] hover:bg-sidebar-active-background hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground",
|
|
975
|
+
className
|
|
976
|
+
),
|
|
977
|
+
...props
|
|
722
978
|
}
|
|
723
|
-
)
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
function NavigationSubItem({
|
|
727
|
-
asChild = false,
|
|
728
|
-
active = false,
|
|
729
|
-
className,
|
|
730
|
-
...props
|
|
731
|
-
}) {
|
|
732
|
-
const Comp = asChild ? Slot : "a";
|
|
733
|
-
return /* @__PURE__ */ jsx5(
|
|
734
|
-
Comp,
|
|
735
|
-
{
|
|
736
|
-
"data-slot": "navigation-sub-item",
|
|
737
|
-
"data-active": active ? "true" : void 0,
|
|
738
|
-
className: cn(
|
|
739
|
-
"ds-type-navigation flex min-h-[var(--ds-sidebar-item-height-touch)] min-w-0 cursor-pointer items-center gap-2 rounded-[var(--ds-radius-control)] px-2 text-sidebar-secondary-text outline-none transition-colors duration-150 lg:h-[calc(var(--ds-sidebar-item-height)-0.25rem)] lg:min-h-0",
|
|
740
|
-
"hover:bg-sidebar-hover hover:text-sidebar-primary-text focus-visible:ring-[3px] focus-visible:ring-sidebar-focus-ring",
|
|
741
|
-
"group-data-[sidebar-state=collapsed]/shell:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75] [&>svg]:text-sidebar-icon",
|
|
742
|
-
active && "bg-sidebar-active text-sidebar-active-foreground shadow-[inset_3px_0_0_var(--sidebar-active-indicator)] hover:bg-sidebar-active hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground",
|
|
743
|
-
className
|
|
744
|
-
),
|
|
745
|
-
...props
|
|
746
|
-
}
|
|
747
|
-
);
|
|
748
|
-
}
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
);
|
|
749
982
|
function NavigationSubList({
|
|
750
983
|
className,
|
|
751
984
|
...props
|
|
752
985
|
}) {
|
|
753
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ jsx7(
|
|
754
987
|
"div",
|
|
755
988
|
{
|
|
756
989
|
"data-slot": "navigation-sub-list",
|
|
@@ -764,33 +997,31 @@ function NavigationSubList({
|
|
|
764
997
|
}
|
|
765
998
|
function SidebarTrigger({
|
|
766
999
|
className,
|
|
1000
|
+
"aria-label": ariaLabel,
|
|
767
1001
|
onClick,
|
|
768
1002
|
...props
|
|
769
1003
|
}) {
|
|
770
1004
|
const { isMobile, mobileOpen, sidebarOpen, toggleSidebar } = useAppShell();
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
className
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
onClick
|
|
784
|
-
|
|
785
|
-
toggleSidebar();
|
|
786
|
-
},
|
|
787
|
-
...props,
|
|
788
|
-
children: [
|
|
789
|
-
/* @__PURE__ */ jsx5(PanelLeftIcon, {}),
|
|
790
|
-
/* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Toggle navigation" })
|
|
791
|
-
]
|
|
1005
|
+
const triggerProps = {
|
|
1006
|
+
...props,
|
|
1007
|
+
"data-slot": "sidebar-trigger",
|
|
1008
|
+
type: "button",
|
|
1009
|
+
variant: "ghost",
|
|
1010
|
+
className: cn(
|
|
1011
|
+
"shrink-0 cursor-pointer text-text-supporting hover:bg-surface-muted hover:text-text-primary focus-visible:ring-focus",
|
|
1012
|
+
className
|
|
1013
|
+
),
|
|
1014
|
+
"aria-label": ariaLabel ?? "Toggle navigation",
|
|
1015
|
+
"aria-expanded": isMobile ? mobileOpen : sidebarOpen,
|
|
1016
|
+
onClick: (event) => {
|
|
1017
|
+
onClick?.(event);
|
|
1018
|
+
toggleSidebar();
|
|
792
1019
|
}
|
|
793
|
-
|
|
1020
|
+
};
|
|
1021
|
+
return /* @__PURE__ */ jsxs6(IconButton, { ...triggerProps, children: [
|
|
1022
|
+
/* @__PURE__ */ jsx7(PanelLeftIcon, {}),
|
|
1023
|
+
/* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Toggle navigation" })
|
|
1024
|
+
] });
|
|
794
1025
|
}
|
|
795
1026
|
function SidebarSearch({
|
|
796
1027
|
expanded: expandedProp,
|
|
@@ -802,12 +1033,12 @@ function SidebarSearch({
|
|
|
802
1033
|
onKeyDown,
|
|
803
1034
|
...props
|
|
804
1035
|
}) {
|
|
805
|
-
const [expandedState, setExpandedState] =
|
|
1036
|
+
const [expandedState, setExpandedState] = React3.useState(defaultExpanded);
|
|
806
1037
|
const expanded = expandedProp ?? expandedState;
|
|
807
|
-
const inputRef =
|
|
808
|
-
const triggerRef =
|
|
809
|
-
const mountedRef =
|
|
810
|
-
const setExpanded =
|
|
1038
|
+
const inputRef = React3.useRef(null);
|
|
1039
|
+
const triggerRef = React3.useRef(null);
|
|
1040
|
+
const mountedRef = React3.useRef(false);
|
|
1041
|
+
const setExpanded = React3.useCallback(
|
|
811
1042
|
(nextExpanded) => {
|
|
812
1043
|
if (expandedProp === void 0) {
|
|
813
1044
|
setExpandedState(nextExpanded);
|
|
@@ -816,7 +1047,7 @@ function SidebarSearch({
|
|
|
816
1047
|
},
|
|
817
1048
|
[expandedProp, onExpandedChange]
|
|
818
1049
|
);
|
|
819
|
-
|
|
1050
|
+
React3.useEffect(() => {
|
|
820
1051
|
if (expanded) {
|
|
821
1052
|
queueMicrotask(() => inputRef.current?.focus());
|
|
822
1053
|
} else if (mountedRef.current) {
|
|
@@ -825,7 +1056,7 @@ function SidebarSearch({
|
|
|
825
1056
|
mountedRef.current = true;
|
|
826
1057
|
}, [expanded]);
|
|
827
1058
|
if (!expanded) {
|
|
828
|
-
return /* @__PURE__ */
|
|
1059
|
+
return /* @__PURE__ */ jsxs6(
|
|
829
1060
|
"button",
|
|
830
1061
|
{
|
|
831
1062
|
ref: triggerRef,
|
|
@@ -839,14 +1070,14 @@ function SidebarSearch({
|
|
|
839
1070
|
onClick: () => setExpanded(true),
|
|
840
1071
|
"aria-label": triggerLabel,
|
|
841
1072
|
children: [
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
-
shortcut ? /* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ jsx7(Search, { className: "size-4 shrink-0 text-sidebar-icon" }),
|
|
1074
|
+
/* @__PURE__ */ jsx7("span", { className: "truncate group-data-[sidebar-state=collapsed]/shell:hidden", children: triggerLabel }),
|
|
1075
|
+
shortcut ? /* @__PURE__ */ jsx7(ShortcutHint, { className: "ds-type-metadata ml-auto border-sidebar-border bg-transparent text-sidebar-metadata-text group-data-[sidebar-state=collapsed]/shell:hidden", children: shortcut }) : null
|
|
845
1076
|
]
|
|
846
1077
|
}
|
|
847
1078
|
);
|
|
848
1079
|
}
|
|
849
|
-
return /* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ jsxs6(
|
|
850
1081
|
"div",
|
|
851
1082
|
{
|
|
852
1083
|
"data-slot": "sidebar-search",
|
|
@@ -856,8 +1087,8 @@ function SidebarSearch({
|
|
|
856
1087
|
className
|
|
857
1088
|
),
|
|
858
1089
|
children: [
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ jsx7(Search, { className: "size-4 shrink-0 text-sidebar-icon" }),
|
|
1091
|
+
/* @__PURE__ */ jsx7(
|
|
861
1092
|
Input,
|
|
862
1093
|
{
|
|
863
1094
|
ref: inputRef,
|
|
@@ -873,7 +1104,7 @@ function SidebarSearch({
|
|
|
873
1104
|
...props
|
|
874
1105
|
}
|
|
875
1106
|
),
|
|
876
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ jsx7(
|
|
877
1108
|
"button",
|
|
878
1109
|
{
|
|
879
1110
|
type: "button",
|
|
@@ -883,7 +1114,7 @@ function SidebarSearch({
|
|
|
883
1114
|
setExpanded(false);
|
|
884
1115
|
},
|
|
885
1116
|
"aria-label": "Close search",
|
|
886
|
-
children: /* @__PURE__ */
|
|
1117
|
+
children: /* @__PURE__ */ jsx7(X, { className: "size-4" })
|
|
887
1118
|
}
|
|
888
1119
|
)
|
|
889
1120
|
]
|
|
@@ -894,7 +1125,7 @@ function MainRegion({
|
|
|
894
1125
|
className,
|
|
895
1126
|
...props
|
|
896
1127
|
}) {
|
|
897
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ jsx7(
|
|
898
1129
|
"div",
|
|
899
1130
|
{
|
|
900
1131
|
"data-slot": "main-region",
|
|
@@ -911,13 +1142,13 @@ function TopBar({
|
|
|
911
1142
|
className,
|
|
912
1143
|
...props
|
|
913
1144
|
}) {
|
|
914
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ jsx7(
|
|
915
1146
|
"header",
|
|
916
1147
|
{
|
|
917
1148
|
"data-slot": "top-bar",
|
|
918
1149
|
className: cn(
|
|
919
|
-
"sticky top-0 z-10 flex h-[var(--ds-topbar-height)] min-h-[var(--ds-topbar-height)] shrink-0 items-center justify-between gap-3 border-b border-border-subtle bg-
|
|
920
|
-
"supports-[backdrop-filter]:bg-
|
|
1150
|
+
"sticky top-0 z-10 flex h-[var(--ds-topbar-height)] min-h-[var(--ds-topbar-height)] shrink-0 items-center justify-between gap-3 border-b border-border-subtle bg-canvas/96 px-[var(--ds-topbar-padding-x)] backdrop-blur md:px-[var(--ds-topbar-padding-x-wide)]",
|
|
1151
|
+
"supports-[backdrop-filter]:bg-canvas/88",
|
|
921
1152
|
className
|
|
922
1153
|
),
|
|
923
1154
|
...props
|
|
@@ -929,7 +1160,7 @@ function PageFrame({
|
|
|
929
1160
|
className,
|
|
930
1161
|
...props
|
|
931
1162
|
}) {
|
|
932
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ jsx7(
|
|
933
1164
|
"main",
|
|
934
1165
|
{
|
|
935
1166
|
"data-slot": "page-frame",
|
|
@@ -949,7 +1180,7 @@ function PageContent({
|
|
|
949
1180
|
className,
|
|
950
1181
|
...props
|
|
951
1182
|
}) {
|
|
952
|
-
return /* @__PURE__ */
|
|
1183
|
+
return /* @__PURE__ */ jsx7(
|
|
953
1184
|
"div",
|
|
954
1185
|
{
|
|
955
1186
|
"data-slot": "page-content",
|
|
@@ -962,7 +1193,7 @@ function PageBoundary({
|
|
|
962
1193
|
className,
|
|
963
1194
|
...props
|
|
964
1195
|
}) {
|
|
965
|
-
return /* @__PURE__ */
|
|
1196
|
+
return /* @__PURE__ */ jsx7(
|
|
966
1197
|
"div",
|
|
967
1198
|
{
|
|
968
1199
|
"data-slot": "page-boundary",
|
|
@@ -978,7 +1209,7 @@ function InspectorRegion({
|
|
|
978
1209
|
className,
|
|
979
1210
|
...props
|
|
980
1211
|
}) {
|
|
981
|
-
return /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ jsx7(
|
|
982
1213
|
"aside",
|
|
983
1214
|
{
|
|
984
1215
|
"data-slot": "inspector-region",
|
|
@@ -992,28 +1223,28 @@ function InspectorRegion({
|
|
|
992
1223
|
}
|
|
993
1224
|
|
|
994
1225
|
// src/patterns/activity-list.tsx
|
|
995
|
-
import { jsx as
|
|
1226
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
996
1227
|
function ActivityList({ className, ...props }) {
|
|
997
|
-
return /* @__PURE__ */
|
|
1228
|
+
return /* @__PURE__ */ jsx8("div", { "data-slot": "activity-list", className: cn("divide-y divide-border-subtle", className), ...props });
|
|
998
1229
|
}
|
|
999
1230
|
function ActivityItem({ icon, title, description, metadata, status, className, ...props }) {
|
|
1000
|
-
return /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
/* @__PURE__ */
|
|
1004
|
-
description ? /* @__PURE__ */
|
|
1005
|
-
metadata ? /* @__PURE__ */
|
|
1231
|
+
return /* @__PURE__ */ jsxs7("div", { "data-slot": "activity-item", className: cn("grid grid-cols-[auto_minmax(0,1fr)_auto] gap-3 py-3", className), ...props, children: [
|
|
1232
|
+
/* @__PURE__ */ jsx8("div", { className: "flex size-8 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-4", children: icon }),
|
|
1233
|
+
/* @__PURE__ */ jsxs7("div", { className: "min-w-0", children: [
|
|
1234
|
+
/* @__PURE__ */ jsx8("div", { className: "ds-type-ui font-medium text-text-primary", children: title }),
|
|
1235
|
+
description ? /* @__PURE__ */ jsx8("div", { className: "ds-type-ui mt-0.5 text-text-supporting", children: description }) : null,
|
|
1236
|
+
metadata ? /* @__PURE__ */ jsx8("div", { className: "ds-type-metadata mt-1 text-text-supporting", children: metadata }) : null
|
|
1006
1237
|
] }),
|
|
1007
|
-
status ? /* @__PURE__ */
|
|
1238
|
+
status ? /* @__PURE__ */ jsx8("div", { className: "shrink-0", children: status }) : null
|
|
1008
1239
|
] });
|
|
1009
1240
|
}
|
|
1010
1241
|
|
|
1011
1242
|
// src/patterns/confirmation-dialog.tsx
|
|
1012
|
-
import * as
|
|
1013
|
-
import { jsx as
|
|
1243
|
+
import * as React4 from "react";
|
|
1244
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1014
1245
|
function ConfirmationDialog({ trigger, title, description, children, confirmLabel = "Confirm", cancelLabel = "Cancel", confirmVariant = "destructive", pending = false, onConfirm, onError }) {
|
|
1015
|
-
const [open, setOpen] =
|
|
1016
|
-
const [confirming, setConfirming] =
|
|
1246
|
+
const [open, setOpen] = React4.useState(false);
|
|
1247
|
+
const [confirming, setConfirming] = React4.useState(false);
|
|
1017
1248
|
const isPending = pending || confirming;
|
|
1018
1249
|
async function confirm() {
|
|
1019
1250
|
if (isPending) {
|
|
@@ -1029,26 +1260,26 @@ function ConfirmationDialog({ trigger, title, description, children, confirmLabe
|
|
|
1029
1260
|
setConfirming(false);
|
|
1030
1261
|
}
|
|
1031
1262
|
}
|
|
1032
|
-
return /* @__PURE__ */
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
/* @__PURE__ */
|
|
1263
|
+
return /* @__PURE__ */ jsxs8(AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
1264
|
+
/* @__PURE__ */ jsx9(AlertDialogTrigger, { render: trigger, children: trigger }),
|
|
1265
|
+
/* @__PURE__ */ jsxs8(AlertDialogContent, { children: [
|
|
1266
|
+
/* @__PURE__ */ jsxs8(AlertDialogHeader, { children: [
|
|
1267
|
+
/* @__PURE__ */ jsx9(AlertDialogTitle, { children: title }),
|
|
1268
|
+
/* @__PURE__ */ jsx9(AlertDialogDescription, { children: description })
|
|
1038
1269
|
] }),
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1270
|
+
/* @__PURE__ */ jsx9(AlertDialogBody, { children }),
|
|
1271
|
+
/* @__PURE__ */ jsxs8(AlertDialogFooter, { children: [
|
|
1272
|
+
/* @__PURE__ */ jsx9(AlertDialogCancel, { render: /* @__PURE__ */ jsx9(Button, { type: "button", variant: "outline", disabled: isPending }), children: cancelLabel }),
|
|
1273
|
+
/* @__PURE__ */ jsx9(AlertDialogAction, { render: /* @__PURE__ */ jsx9(Button, { type: "button", variant: confirmVariant, disabled: isPending, onClick: confirm }), children: isPending ? "Working..." : confirmLabel })
|
|
1043
1274
|
] })
|
|
1044
1275
|
] })
|
|
1045
1276
|
] });
|
|
1046
1277
|
}
|
|
1047
1278
|
|
|
1048
1279
|
// src/patterns/code-block.tsx
|
|
1049
|
-
import * as
|
|
1280
|
+
import * as React5 from "react";
|
|
1050
1281
|
import { Check, Copy } from "lucide-react";
|
|
1051
|
-
import { jsx as
|
|
1282
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1052
1283
|
function CodeBlock({
|
|
1053
1284
|
snippets,
|
|
1054
1285
|
defaultValue,
|
|
@@ -1057,22 +1288,22 @@ function CodeBlock({
|
|
|
1057
1288
|
...props
|
|
1058
1289
|
}) {
|
|
1059
1290
|
const initialValue = defaultValue ?? snippets[0]?.value ?? "";
|
|
1060
|
-
const [activeValue, setActiveValue] =
|
|
1061
|
-
const [copiedValue, setCopiedValue] =
|
|
1062
|
-
const [copyError, setCopyError] =
|
|
1063
|
-
const copyStatusId =
|
|
1291
|
+
const [activeValue, setActiveValue] = React5.useState(initialValue);
|
|
1292
|
+
const [copiedValue, setCopiedValue] = React5.useState(null);
|
|
1293
|
+
const [copyError, setCopyError] = React5.useState(false);
|
|
1294
|
+
const copyStatusId = React5.useId();
|
|
1064
1295
|
const activeSnippet = snippets.find((snippet) => snippet.value === activeValue) ?? snippets[0];
|
|
1065
1296
|
if (!activeSnippet) return null;
|
|
1066
|
-
return /* @__PURE__ */
|
|
1297
|
+
return /* @__PURE__ */ jsx10(
|
|
1067
1298
|
"div",
|
|
1068
1299
|
{
|
|
1069
1300
|
"data-slot": "code-block",
|
|
1070
1301
|
className: cn("overflow-hidden rounded-lg border border-border-subtle bg-surface", className),
|
|
1071
1302
|
...props,
|
|
1072
|
-
children: /* @__PURE__ */
|
|
1073
|
-
/* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1303
|
+
children: /* @__PURE__ */ jsxs9(Tabs, { value: activeSnippet.value, onValueChange: setActiveValue, variant: "segmented", className: "gap-0", children: [
|
|
1304
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between gap-3 border-b border-border-subtle bg-surface-muted px-3 py-2", children: [
|
|
1305
|
+
/* @__PURE__ */ jsx10(TabsList, { variant: "segmented", size: "compact", "aria-label": "Code language", children: snippets.map((snippet) => /* @__PURE__ */ jsx10(TabsTrigger, { value: snippet.value, children: snippet.label }, snippet.value)) }),
|
|
1306
|
+
/* @__PURE__ */ jsxs9(
|
|
1076
1307
|
Button,
|
|
1077
1308
|
{
|
|
1078
1309
|
type: "button",
|
|
@@ -1090,23 +1321,23 @@ function CodeBlock({
|
|
|
1090
1321
|
},
|
|
1091
1322
|
"aria-describedby": copyStatusId,
|
|
1092
1323
|
children: [
|
|
1093
|
-
copiedValue === activeSnippet.value ? /* @__PURE__ */
|
|
1324
|
+
copiedValue === activeSnippet.value ? /* @__PURE__ */ jsx10(Check, {}) : /* @__PURE__ */ jsx10(Copy, {}),
|
|
1094
1325
|
copiedValue === activeSnippet.value ? "Copied" : copyLabel
|
|
1095
1326
|
]
|
|
1096
1327
|
}
|
|
1097
1328
|
),
|
|
1098
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsx10("span", { id: copyStatusId, className: "sr-only", role: "status", "aria-live": "polite", children: copyError ? "Code could not be copied. Select the code and copy it manually." : copiedValue === activeSnippet.value ? "Code copied to clipboard." : "" })
|
|
1099
1330
|
] }),
|
|
1100
|
-
snippets.map((snippet) => /* @__PURE__ */
|
|
1331
|
+
snippets.map((snippet) => /* @__PURE__ */ jsx10(TabsContent, { value: snippet.value, className: "m-0", children: /* @__PURE__ */ jsx10("pre", { className: "max-h-[32rem] overflow-auto p-4 text-sm leading-6", children: /* @__PURE__ */ jsx10("code", { children: snippet.code }) }) }, snippet.value))
|
|
1101
1332
|
] })
|
|
1102
1333
|
}
|
|
1103
1334
|
);
|
|
1104
1335
|
}
|
|
1105
1336
|
|
|
1106
1337
|
// src/patterns/inventory-surface.tsx
|
|
1107
|
-
import { jsx as
|
|
1338
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1108
1339
|
function InventorySurface({ className, ...props }) {
|
|
1109
|
-
return /* @__PURE__ */
|
|
1340
|
+
return /* @__PURE__ */ jsx11(
|
|
1110
1341
|
Card,
|
|
1111
1342
|
{
|
|
1112
1343
|
"data-slot": "inventory-surface",
|
|
@@ -1116,16 +1347,16 @@ function InventorySurface({ className, ...props }) {
|
|
|
1116
1347
|
);
|
|
1117
1348
|
}
|
|
1118
1349
|
function InventoryDesktop({ className, ...props }) {
|
|
1119
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ jsx11("div", { "data-slot": "inventory-desktop", className: cn("hidden lg:block", className), ...props });
|
|
1120
1351
|
}
|
|
1121
1352
|
function InventoryMobile({ className, ...props }) {
|
|
1122
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ jsx11("div", { "data-slot": "inventory-mobile", className: cn("divide-y divide-border-subtle lg:hidden", className), ...props });
|
|
1123
1354
|
}
|
|
1124
1355
|
|
|
1125
1356
|
// src/patterns/metric-band.tsx
|
|
1126
|
-
import { jsx as
|
|
1357
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1127
1358
|
function MetricBand({ columns = 4, className, ...props }) {
|
|
1128
|
-
return /* @__PURE__ */
|
|
1359
|
+
return /* @__PURE__ */ jsx12(
|
|
1129
1360
|
"div",
|
|
1130
1361
|
{
|
|
1131
1362
|
"data-slot": "metric-band",
|
|
@@ -1152,7 +1383,7 @@ function MetricBandItem({
|
|
|
1152
1383
|
className,
|
|
1153
1384
|
...props
|
|
1154
1385
|
}) {
|
|
1155
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ jsxs10(
|
|
1156
1387
|
"div",
|
|
1157
1388
|
{
|
|
1158
1389
|
"data-slot": "metric-band-item",
|
|
@@ -1163,7 +1394,7 @@ function MetricBandItem({
|
|
|
1163
1394
|
),
|
|
1164
1395
|
...props,
|
|
1165
1396
|
children: [
|
|
1166
|
-
icon ? /* @__PURE__ */
|
|
1397
|
+
icon ? /* @__PURE__ */ jsx12(
|
|
1167
1398
|
"div",
|
|
1168
1399
|
{
|
|
1169
1400
|
className: cn(
|
|
@@ -1173,10 +1404,10 @@ function MetricBandItem({
|
|
|
1173
1404
|
children: icon
|
|
1174
1405
|
}
|
|
1175
1406
|
) : null,
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
loading ? /* @__PURE__ */
|
|
1179
|
-
detail ? /* @__PURE__ */
|
|
1407
|
+
/* @__PURE__ */ jsxs10("div", { className: "grid min-w-0 gap-1", children: [
|
|
1408
|
+
/* @__PURE__ */ jsx12("div", { className: "ds-type-ui text-text-supporting", children: label }),
|
|
1409
|
+
loading ? /* @__PURE__ */ jsx12(Skeleton, { className: "h-7 w-14" }) : /* @__PURE__ */ jsx12("div", { className: "text-2xl font-semibold tracking-tight", children: value ?? 0 }),
|
|
1410
|
+
detail ? /* @__PURE__ */ jsx12("div", { className: "ds-type-metadata text-text-supporting", children: detail }) : null
|
|
1180
1411
|
] })
|
|
1181
1412
|
]
|
|
1182
1413
|
}
|
|
@@ -1184,7 +1415,7 @@ function MetricBandItem({
|
|
|
1184
1415
|
}
|
|
1185
1416
|
|
|
1186
1417
|
// src/patterns/page-header.tsx
|
|
1187
|
-
import { jsx as
|
|
1418
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1188
1419
|
function PageHeader({
|
|
1189
1420
|
title,
|
|
1190
1421
|
description,
|
|
@@ -1196,37 +1427,37 @@ function PageHeader({
|
|
|
1196
1427
|
className,
|
|
1197
1428
|
...props
|
|
1198
1429
|
}) {
|
|
1199
|
-
const resolvedActions = actions ?? actionNode ?? (action ? /* @__PURE__ */
|
|
1430
|
+
const resolvedActions = actions ?? actionNode ?? (action ? /* @__PURE__ */ jsx13(
|
|
1200
1431
|
"a",
|
|
1201
1432
|
{
|
|
1202
|
-
className: "ds-type-button inline-flex h-[var(--ds-control-height)] items-center justify-center gap-2 whitespace-nowrap rounded-md bg-
|
|
1433
|
+
className: "ds-type-button inline-flex h-[var(--ds-control-height)] items-center justify-center gap-2 whitespace-nowrap rounded-md bg-action px-3 py-2 text-action-foreground shadow-xs outline-none transition-colors hover:bg-action-hover focus-visible:border-focus focus-visible:ring-3 focus-visible:ring-focus/50",
|
|
1203
1434
|
href: action.href,
|
|
1204
1435
|
children: action.label
|
|
1205
1436
|
}
|
|
1206
1437
|
) : null);
|
|
1207
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ jsxs11(
|
|
1208
1439
|
"header",
|
|
1209
1440
|
{
|
|
1210
1441
|
"data-slot": "page-header",
|
|
1211
|
-
className: cn("flex flex-col gap-3 border-b border-border-subtle bg-
|
|
1442
|
+
className: cn("flex flex-col gap-3 border-b border-border-subtle bg-canvas px-5 py-4 lg:flex-row lg:items-start lg:justify-between", className),
|
|
1212
1443
|
...props,
|
|
1213
1444
|
children: [
|
|
1214
|
-
/* @__PURE__ */
|
|
1215
|
-
/* @__PURE__ */
|
|
1216
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ jsxs11("div", { className: "min-w-0", children: [
|
|
1446
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
1447
|
+
/* @__PURE__ */ jsx13("h1", { className: "ds-type-page-title truncate", children: title }),
|
|
1217
1448
|
status
|
|
1218
1449
|
] }),
|
|
1219
|
-
description ? /* @__PURE__ */
|
|
1220
|
-
metadata ? /* @__PURE__ */
|
|
1450
|
+
description ? /* @__PURE__ */ jsx13("p", { className: "ds-type-ui mt-1 max-w-3xl text-text-supporting", children: description }) : null,
|
|
1451
|
+
metadata ? /* @__PURE__ */ jsx13("div", { className: "ds-type-metadata mt-2 text-text-supporting", children: metadata }) : null
|
|
1221
1452
|
] }),
|
|
1222
|
-
resolvedActions ? /* @__PURE__ */
|
|
1453
|
+
resolvedActions ? /* @__PURE__ */ jsx13("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: resolvedActions }) : null
|
|
1223
1454
|
]
|
|
1224
1455
|
}
|
|
1225
1456
|
);
|
|
1226
1457
|
}
|
|
1227
1458
|
|
|
1228
1459
|
// src/patterns/page-toolbar.tsx
|
|
1229
|
-
import { jsx as
|
|
1460
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1230
1461
|
function PageToolbar({
|
|
1231
1462
|
search,
|
|
1232
1463
|
filters,
|
|
@@ -1236,19 +1467,19 @@ function PageToolbar({
|
|
|
1236
1467
|
children,
|
|
1237
1468
|
...props
|
|
1238
1469
|
}) {
|
|
1239
|
-
return /* @__PURE__ */
|
|
1470
|
+
return /* @__PURE__ */ jsxs12(
|
|
1240
1471
|
"div",
|
|
1241
1472
|
{
|
|
1242
1473
|
"data-slot": "page-toolbar",
|
|
1243
|
-
className: cn("grid gap-2 border-b border-border-subtle bg-
|
|
1474
|
+
className: cn("grid gap-2 border-b border-border-subtle bg-canvas px-5 py-3 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center", className),
|
|
1244
1475
|
...props,
|
|
1245
1476
|
children: [
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
search ? /* @__PURE__ */
|
|
1248
|
-
filters ? /* @__PURE__ */
|
|
1477
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center", children: [
|
|
1478
|
+
search ? /* @__PURE__ */ jsx14("div", { className: "min-w-0 flex-1 sm:min-w-48 sm:max-w-sm", children: search }) : null,
|
|
1479
|
+
filters ? /* @__PURE__ */ jsx14("div", { className: "flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:flex-wrap sm:items-center", children: filters }) : null
|
|
1249
1480
|
] }),
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
bulkActions ? /* @__PURE__ */
|
|
1481
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex min-h-[var(--ds-control-height)] flex-wrap items-center gap-2 lg:justify-end", children: [
|
|
1482
|
+
bulkActions ? /* @__PURE__ */ jsx14("div", { "data-slot": "page-toolbar-bulk-actions", className: "contents", children: bulkActions }) : null,
|
|
1252
1483
|
viewControls,
|
|
1253
1484
|
children
|
|
1254
1485
|
] })
|
|
@@ -1258,8 +1489,8 @@ function PageToolbar({
|
|
|
1258
1489
|
}
|
|
1259
1490
|
|
|
1260
1491
|
// src/patterns/preference-controls.tsx
|
|
1261
|
-
import * as
|
|
1262
|
-
import { jsx as
|
|
1492
|
+
import * as React6 from "react";
|
|
1493
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1263
1494
|
var APPEARANCE_KEY = "conscia-appearance:v1";
|
|
1264
1495
|
var DENSITY_KEY = "conscia-density:v1";
|
|
1265
1496
|
var PREFERENCE_EVENT = "conscia-preferences";
|
|
@@ -1285,7 +1516,7 @@ function writePreference(key, value) {
|
|
|
1285
1516
|
window.dispatchEvent(new Event(PREFERENCE_EVENT));
|
|
1286
1517
|
}
|
|
1287
1518
|
function useStoredPreference(key, fallback, allowedValues) {
|
|
1288
|
-
return
|
|
1519
|
+
return React6.useSyncExternalStore(
|
|
1289
1520
|
(onStoreChange) => {
|
|
1290
1521
|
window.addEventListener("storage", onStoreChange);
|
|
1291
1522
|
window.addEventListener(PREFERENCE_EVENT, onStoreChange);
|
|
@@ -1313,7 +1544,7 @@ function useConsciaPreferences() {
|
|
|
1313
1544
|
}
|
|
1314
1545
|
function DesignSystemPreferenceSync() {
|
|
1315
1546
|
const { appearance, density } = useConsciaPreferences();
|
|
1316
|
-
|
|
1547
|
+
React6.useEffect(() => {
|
|
1317
1548
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1318
1549
|
const sync = () => applyConsciaPreferences(
|
|
1319
1550
|
document.documentElement,
|
|
@@ -1329,7 +1560,7 @@ function DesignSystemPreferenceSync() {
|
|
|
1329
1560
|
}
|
|
1330
1561
|
function AppearanceControl({ className }) {
|
|
1331
1562
|
const { appearance } = useConsciaPreferences();
|
|
1332
|
-
return /* @__PURE__ */
|
|
1563
|
+
return /* @__PURE__ */ jsx15(
|
|
1333
1564
|
SegmentedControl,
|
|
1334
1565
|
{
|
|
1335
1566
|
className,
|
|
@@ -1342,7 +1573,7 @@ function AppearanceControl({ className }) {
|
|
|
1342
1573
|
}
|
|
1343
1574
|
function DensityControl({ className }) {
|
|
1344
1575
|
const { density } = useConsciaPreferences();
|
|
1345
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ jsx15(
|
|
1346
1577
|
SegmentedControl,
|
|
1347
1578
|
{
|
|
1348
1579
|
className,
|
|
@@ -1354,9 +1585,9 @@ function DensityControl({ className }) {
|
|
|
1354
1585
|
);
|
|
1355
1586
|
}
|
|
1356
1587
|
function DesignPreferenceControls({ className }) {
|
|
1357
|
-
return /* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1588
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn("flex flex-col gap-3 text-sm", className), children: [
|
|
1589
|
+
/* @__PURE__ */ jsx15(AppearanceControl, {}),
|
|
1590
|
+
/* @__PURE__ */ jsx15(DensityControl, {})
|
|
1360
1591
|
] });
|
|
1361
1592
|
}
|
|
1362
1593
|
function SegmentedControl({
|
|
@@ -1366,16 +1597,16 @@ function SegmentedControl({
|
|
|
1366
1597
|
values,
|
|
1367
1598
|
onChange
|
|
1368
1599
|
}) {
|
|
1369
|
-
return /* @__PURE__ */
|
|
1370
|
-
/* @__PURE__ */
|
|
1371
|
-
/* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsxs13("fieldset", { className: cn("flex flex-col gap-2", className), children: [
|
|
1601
|
+
/* @__PURE__ */ jsx15("legend", { className: "text-[var(--ds-metadata)] font-medium text-text-supporting", children: label }),
|
|
1602
|
+
/* @__PURE__ */ jsx15("div", { className: "inline-flex rounded-[var(--ds-radius-control)] bg-surface-muted p-1", children: values.map((item) => /* @__PURE__ */ jsx15(
|
|
1372
1603
|
"button",
|
|
1373
1604
|
{
|
|
1374
1605
|
type: "button",
|
|
1375
1606
|
"aria-pressed": value === item,
|
|
1376
1607
|
suppressHydrationWarning: true,
|
|
1377
1608
|
onClick: () => onChange(item),
|
|
1378
|
-
className: "h-7 rounded-[calc(var(--ds-radius-control)-2px)] px-2.5 text-[var(--ds-metadata)] font-medium capitalize text-
|
|
1609
|
+
className: "h-7 rounded-[calc(var(--ds-radius-control)-2px)] px-2.5 text-[var(--ds-metadata)] font-medium capitalize text-text-supporting outline-none transition-colors hover:text-text-primary focus-visible:ring-[3px] focus-visible:ring-focus/50 aria-pressed:bg-canvas aria-pressed:text-text-primary aria-pressed:shadow-xs",
|
|
1379
1610
|
children: item
|
|
1380
1611
|
},
|
|
1381
1612
|
item
|
|
@@ -1384,29 +1615,29 @@ function SegmentedControl({
|
|
|
1384
1615
|
}
|
|
1385
1616
|
|
|
1386
1617
|
// src/patterns/provider-mark.tsx
|
|
1387
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1388
1619
|
function ProviderMark({ name, shortName, description, size = "default", className, ...props }) {
|
|
1389
|
-
return /* @__PURE__ */
|
|
1390
|
-
/* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ jsxs14("div", { "data-slot": "provider-mark", className: cn("flex min-w-0 items-center gap-3", className), ...props, children: [
|
|
1621
|
+
/* @__PURE__ */ jsx16(
|
|
1391
1622
|
"div",
|
|
1392
1623
|
{
|
|
1393
1624
|
"aria-hidden": "true",
|
|
1394
1625
|
className: cn(
|
|
1395
|
-
"flex shrink-0 items-center justify-center rounded-md border border-border-subtle bg-surface-muted font-semibold tracking-tight text-
|
|
1626
|
+
"flex shrink-0 items-center justify-center rounded-md border border-border-subtle bg-surface-muted font-semibold tracking-tight text-text-primary",
|
|
1396
1627
|
size === "sm" ? "size-8 text-[10px]" : "size-10 text-xs"
|
|
1397
1628
|
),
|
|
1398
1629
|
children: shortName
|
|
1399
1630
|
}
|
|
1400
1631
|
),
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
description ? /* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0", children: [
|
|
1633
|
+
/* @__PURE__ */ jsx16("div", { className: "ds-type-ui truncate font-medium text-text-primary", children: name }),
|
|
1634
|
+
description ? /* @__PURE__ */ jsx16("div", { className: "ds-type-metadata mt-0.5 truncate text-text-supporting", children: description }) : null
|
|
1404
1635
|
] })
|
|
1405
1636
|
] });
|
|
1406
1637
|
}
|
|
1407
1638
|
|
|
1408
1639
|
// src/patterns/resource-detail.tsx
|
|
1409
|
-
import { jsx as
|
|
1640
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1410
1641
|
function ResourceSummary({
|
|
1411
1642
|
variant = "plain",
|
|
1412
1643
|
title,
|
|
@@ -1418,30 +1649,30 @@ function ResourceSummary({
|
|
|
1418
1649
|
children,
|
|
1419
1650
|
...props
|
|
1420
1651
|
}) {
|
|
1421
|
-
return /* @__PURE__ */
|
|
1652
|
+
return /* @__PURE__ */ jsxs15(
|
|
1422
1653
|
"section",
|
|
1423
1654
|
{
|
|
1424
1655
|
"data-slot": "resource-summary",
|
|
1425
1656
|
className: cn(
|
|
1426
1657
|
"px-5 py-4",
|
|
1427
|
-
variant === "plain" && "border-b border-border-subtle bg-
|
|
1658
|
+
variant === "plain" && "border-b border-border-subtle bg-canvas",
|
|
1428
1659
|
variant === "surface" && "rounded-[var(--ds-radius-surface)] border border-border-subtle bg-surface",
|
|
1429
1660
|
className
|
|
1430
1661
|
),
|
|
1431
1662
|
...props,
|
|
1432
1663
|
children: [
|
|
1433
|
-
/* @__PURE__ */
|
|
1434
|
-
/* @__PURE__ */
|
|
1435
|
-
title || status ? /* @__PURE__ */
|
|
1436
|
-
title ? /* @__PURE__ */
|
|
1664
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between", children: [
|
|
1665
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
1666
|
+
title || status ? /* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
1667
|
+
title ? /* @__PURE__ */ jsx17("h2", { className: "ds-type-section-title truncate", children: title }) : null,
|
|
1437
1668
|
status
|
|
1438
1669
|
] }) : null,
|
|
1439
|
-
description ? /* @__PURE__ */
|
|
1440
|
-
metadata ? /* @__PURE__ */
|
|
1670
|
+
description ? /* @__PURE__ */ jsx17("p", { className: "ds-type-ui mt-1 max-w-3xl text-text-supporting", children: description }) : null,
|
|
1671
|
+
metadata ? /* @__PURE__ */ jsx17("div", { className: "ds-type-metadata mt-2 text-text-supporting", children: metadata }) : null
|
|
1441
1672
|
] }),
|
|
1442
|
-
actions ? /* @__PURE__ */
|
|
1673
|
+
actions ? /* @__PURE__ */ jsx17("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions }) : null
|
|
1443
1674
|
] }),
|
|
1444
|
-
children ? /* @__PURE__ */
|
|
1675
|
+
children ? /* @__PURE__ */ jsx17("div", { className: "mt-4", children }) : null
|
|
1445
1676
|
]
|
|
1446
1677
|
}
|
|
1447
1678
|
);
|
|
@@ -1450,7 +1681,7 @@ function DetailSections({
|
|
|
1450
1681
|
className,
|
|
1451
1682
|
...props
|
|
1452
1683
|
}) {
|
|
1453
|
-
return /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ jsx17(
|
|
1454
1685
|
"div",
|
|
1455
1686
|
{
|
|
1456
1687
|
"data-slot": "detail-sections",
|
|
@@ -1468,7 +1699,7 @@ function DetailSection({
|
|
|
1468
1699
|
children,
|
|
1469
1700
|
...props
|
|
1470
1701
|
}) {
|
|
1471
|
-
return /* @__PURE__ */
|
|
1702
|
+
return /* @__PURE__ */ jsxs15(
|
|
1472
1703
|
"section",
|
|
1473
1704
|
{
|
|
1474
1705
|
"data-slot": "detail-section",
|
|
@@ -1479,14 +1710,14 @@ function DetailSection({
|
|
|
1479
1710
|
),
|
|
1480
1711
|
...props,
|
|
1481
1712
|
children: [
|
|
1482
|
-
/* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
description ? /* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
1714
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
1715
|
+
/* @__PURE__ */ jsx17("h2", { className: "ds-type-section-title", children: title }),
|
|
1716
|
+
description ? /* @__PURE__ */ jsx17("p", { className: "ds-type-ui mt-1 max-w-3xl text-text-supporting", children: description }) : null
|
|
1486
1717
|
] }),
|
|
1487
|
-
actions ? /* @__PURE__ */
|
|
1718
|
+
actions ? /* @__PURE__ */ jsx17("div", { className: "flex shrink-0 items-center gap-2", children: actions }) : null
|
|
1488
1719
|
] }),
|
|
1489
|
-
children ? /* @__PURE__ */
|
|
1720
|
+
children ? /* @__PURE__ */ jsx17("div", { className: "mt-4", children }) : null
|
|
1490
1721
|
]
|
|
1491
1722
|
}
|
|
1492
1723
|
);
|
|
@@ -1495,7 +1726,7 @@ function KeyValueList({
|
|
|
1495
1726
|
className,
|
|
1496
1727
|
...props
|
|
1497
1728
|
}) {
|
|
1498
|
-
return /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsx17(
|
|
1499
1730
|
"dl",
|
|
1500
1731
|
{
|
|
1501
1732
|
"data-slot": "key-value-list",
|
|
@@ -1509,9 +1740,9 @@ function KeyValueItem({
|
|
|
1509
1740
|
value,
|
|
1510
1741
|
breakValue = false
|
|
1511
1742
|
}) {
|
|
1512
|
-
return /* @__PURE__ */
|
|
1513
|
-
/* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ jsxs15("div", { "data-slot": "key-value-item", className: "flex justify-between gap-4", children: [
|
|
1744
|
+
/* @__PURE__ */ jsx17("dt", { className: "text-text-supporting", children: label }),
|
|
1745
|
+
/* @__PURE__ */ jsx17(
|
|
1515
1746
|
"dd",
|
|
1516
1747
|
{
|
|
1517
1748
|
className: cn(
|
|
@@ -1525,12 +1756,35 @@ function KeyValueItem({
|
|
|
1525
1756
|
}
|
|
1526
1757
|
|
|
1527
1758
|
// src/patterns/sidebar-navigation.tsx
|
|
1528
|
-
import * as
|
|
1759
|
+
import * as React7 from "react";
|
|
1529
1760
|
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
1530
|
-
import { Fragment as
|
|
1761
|
+
import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1531
1762
|
function isSection(entry) {
|
|
1532
1763
|
return "items" in entry;
|
|
1533
1764
|
}
|
|
1765
|
+
function getNavigationAccessibleLabel(item) {
|
|
1766
|
+
const metadata = [item.badgeLabel, item.countLabel].filter(Boolean);
|
|
1767
|
+
return metadata.length > 0 ? `${item.label}, ${metadata.join(", ")}` : item.label;
|
|
1768
|
+
}
|
|
1769
|
+
function NavigationMetadata({
|
|
1770
|
+
badge,
|
|
1771
|
+
count
|
|
1772
|
+
}) {
|
|
1773
|
+
if (badge === void 0 && count === void 0) {
|
|
1774
|
+
return null;
|
|
1775
|
+
}
|
|
1776
|
+
return /* @__PURE__ */ jsxs16(
|
|
1777
|
+
"span",
|
|
1778
|
+
{
|
|
1779
|
+
"aria-hidden": "true",
|
|
1780
|
+
className: "ml-auto flex min-w-0 shrink-0 items-center gap-1.5 text-sidebar-metadata-text",
|
|
1781
|
+
children: [
|
|
1782
|
+
badge !== void 0 ? /* @__PURE__ */ jsx18("span", { className: "max-w-28 truncate rounded-full bg-sidebar-hover px-1.5 py-0.5 text-[length:var(--ds-metadata)] font-semibold leading-none", children: badge }) : null,
|
|
1783
|
+
count !== void 0 ? /* @__PURE__ */ jsx18("span", { className: "ds-type-metadata tabular-nums", children: count }) : null
|
|
1784
|
+
]
|
|
1785
|
+
}
|
|
1786
|
+
);
|
|
1787
|
+
}
|
|
1534
1788
|
function readOpenSections(storageKey) {
|
|
1535
1789
|
if (!storageKey || typeof window === "undefined") {
|
|
1536
1790
|
return {};
|
|
@@ -1553,10 +1807,10 @@ function SidebarNavigation({
|
|
|
1553
1807
|
storageKey,
|
|
1554
1808
|
className
|
|
1555
1809
|
}) {
|
|
1556
|
-
const { isMobile, sidebarSide, sidebarState } = useAppShell();
|
|
1557
|
-
const [openSections, setOpenSections] =
|
|
1558
|
-
const storageReady =
|
|
1559
|
-
|
|
1810
|
+
const { isMobile, setMobileOpen, sidebarSide, sidebarState } = useAppShell();
|
|
1811
|
+
const [openSections, setOpenSections] = React7.useState({});
|
|
1812
|
+
const storageReady = React7.useRef(false);
|
|
1813
|
+
React7.useEffect(() => {
|
|
1560
1814
|
storageReady.current = false;
|
|
1561
1815
|
const storedSections = readOpenSections(storageKey);
|
|
1562
1816
|
queueMicrotask(() => {
|
|
@@ -1564,7 +1818,7 @@ function SidebarNavigation({
|
|
|
1564
1818
|
setOpenSections(storedSections);
|
|
1565
1819
|
});
|
|
1566
1820
|
}, [storageKey]);
|
|
1567
|
-
|
|
1821
|
+
React7.useEffect(() => {
|
|
1568
1822
|
if (!storageReady.current || !storageKey || !entries.some(isSection)) {
|
|
1569
1823
|
return;
|
|
1570
1824
|
}
|
|
@@ -1573,10 +1827,13 @@ function SidebarNavigation({
|
|
|
1573
1827
|
} catch {
|
|
1574
1828
|
}
|
|
1575
1829
|
}, [entries, openSections, storageKey]);
|
|
1576
|
-
const handleNavigate =
|
|
1830
|
+
const handleNavigate = React7.useCallback(() => {
|
|
1831
|
+
if (isMobile) {
|
|
1832
|
+
setMobileOpen(false);
|
|
1833
|
+
}
|
|
1577
1834
|
onNavigate?.();
|
|
1578
|
-
}, [onNavigate]);
|
|
1579
|
-
return /* @__PURE__ */
|
|
1835
|
+
}, [isMobile, onNavigate, setMobileOpen]);
|
|
1836
|
+
return /* @__PURE__ */ jsx18(
|
|
1580
1837
|
"nav",
|
|
1581
1838
|
{
|
|
1582
1839
|
"data-slot": "sidebar-navigation",
|
|
@@ -1587,44 +1844,57 @@ function SidebarNavigation({
|
|
|
1587
1844
|
),
|
|
1588
1845
|
children: entries.map((entry) => {
|
|
1589
1846
|
if (!isSection(entry)) {
|
|
1590
|
-
return /* @__PURE__ */
|
|
1847
|
+
return /* @__PURE__ */ jsx18(
|
|
1591
1848
|
NavigationGroup,
|
|
1592
1849
|
{
|
|
1593
1850
|
className: entry.startsSection ? "mt-[var(--ds-sidebar-group-gap)]" : void 0,
|
|
1594
|
-
children: /* @__PURE__ */
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
entry
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1851
|
+
children: /* @__PURE__ */ jsx18(
|
|
1852
|
+
NavigationItem,
|
|
1853
|
+
{
|
|
1854
|
+
active: entry.active,
|
|
1855
|
+
tooltip: entry.label,
|
|
1856
|
+
render: renderLink(entry, {
|
|
1857
|
+
"aria-current": entry.active ? "page" : void 0,
|
|
1858
|
+
"aria-label": getNavigationAccessibleLabel(entry),
|
|
1859
|
+
onClick: handleNavigate,
|
|
1860
|
+
children: /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
1861
|
+
entry.icon,
|
|
1862
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate group-data-[sidebar-state=collapsed]/shell:hidden", children: entry.label }),
|
|
1863
|
+
/* @__PURE__ */ jsx18(NavigationMetadata, { badge: entry.badge, count: entry.count })
|
|
1864
|
+
] })
|
|
1865
|
+
})
|
|
1866
|
+
}
|
|
1867
|
+
)
|
|
1603
1868
|
},
|
|
1604
1869
|
entry.id
|
|
1605
1870
|
);
|
|
1606
1871
|
}
|
|
1607
1872
|
const sectionOpen = (openSections[entry.id] ?? false) || entry.active;
|
|
1608
1873
|
if (sidebarState === "collapsed" && !isMobile) {
|
|
1609
|
-
return /* @__PURE__ */
|
|
1610
|
-
/* @__PURE__ */
|
|
1874
|
+
return /* @__PURE__ */ jsxs16(DropdownMenu, { children: [
|
|
1875
|
+
/* @__PURE__ */ jsx18(
|
|
1611
1876
|
NavigationGroup,
|
|
1612
1877
|
{
|
|
1613
1878
|
className: entry.startsSection ? "mt-[var(--ds-sidebar-group-gap)]" : void 0,
|
|
1614
|
-
children: /* @__PURE__ */
|
|
1615
|
-
|
|
1879
|
+
children: /* @__PURE__ */ jsx18(
|
|
1880
|
+
DropdownMenuTrigger,
|
|
1616
1881
|
{
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1882
|
+
render: /* @__PURE__ */ jsxs16(
|
|
1883
|
+
NavigationItem,
|
|
1884
|
+
{
|
|
1885
|
+
active: entry.active,
|
|
1886
|
+
"aria-label": `${getNavigationAccessibleLabel(entry)} menu`,
|
|
1887
|
+
children: [
|
|
1888
|
+
entry.icon,
|
|
1889
|
+
/* @__PURE__ */ jsx18("span", { className: "sr-only", children: entry.label })
|
|
1890
|
+
]
|
|
1891
|
+
}
|
|
1892
|
+
)
|
|
1623
1893
|
}
|
|
1624
|
-
)
|
|
1894
|
+
)
|
|
1625
1895
|
}
|
|
1626
1896
|
),
|
|
1627
|
-
/* @__PURE__ */
|
|
1897
|
+
/* @__PURE__ */ jsxs16(
|
|
1628
1898
|
DropdownMenuContent,
|
|
1629
1899
|
{
|
|
1630
1900
|
side: sidebarSide === "left" ? "right" : "left",
|
|
@@ -1632,24 +1902,25 @@ function SidebarNavigation({
|
|
|
1632
1902
|
sideOffset: 8,
|
|
1633
1903
|
className: "min-w-56 rounded-[var(--ds-radius-surface)] p-1.5",
|
|
1634
1904
|
children: [
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
|
|
1905
|
+
/* @__PURE__ */ jsx18(DropdownMenuLabel, { className: "px-2 py-1.5 font-semibold text-text-supporting", children: entry.label }),
|
|
1906
|
+
/* @__PURE__ */ jsx18(DropdownMenuGroup, { children: entry.items.map((item) => /* @__PURE__ */ jsx18(
|
|
1907
|
+
DropdownMenuLinkItem,
|
|
1638
1908
|
{
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
"min-h-9 cursor-pointer rounded-[var(--ds-radius-control)] [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75]",
|
|
1642
|
-
item.active && "bg-selection-background text-selection-foreground shadow-[inset_2px_0_0_var(--selection-indicator)] focus:bg-selection-background focus:text-selection-foreground"
|
|
1643
|
-
),
|
|
1644
|
-
children: renderLink(item, {
|
|
1909
|
+
closeOnClick: true,
|
|
1910
|
+
render: renderLink(item, {
|
|
1645
1911
|
"aria-current": item.active ? "page" : void 0,
|
|
1646
|
-
"aria-label": item
|
|
1912
|
+
"aria-label": getNavigationAccessibleLabel(item),
|
|
1647
1913
|
onClick: handleNavigate,
|
|
1648
|
-
children: /* @__PURE__ */
|
|
1914
|
+
children: /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
1649
1915
|
item.icon,
|
|
1650
|
-
/* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate", children: item.label }),
|
|
1917
|
+
/* @__PURE__ */ jsx18(NavigationMetadata, { badge: item.badge, count: item.count })
|
|
1651
1918
|
] })
|
|
1652
|
-
})
|
|
1919
|
+
}),
|
|
1920
|
+
className: cn(
|
|
1921
|
+
"min-h-9 cursor-pointer rounded-[var(--ds-radius-control)] [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75]",
|
|
1922
|
+
item.active && "bg-selection-background text-selection-foreground shadow-[inset_2px_0_0_var(--selection-indicator)] focus:bg-selection-background focus:text-selection-foreground"
|
|
1923
|
+
)
|
|
1653
1924
|
},
|
|
1654
1925
|
item.id
|
|
1655
1926
|
)) })
|
|
@@ -1658,7 +1929,7 @@ function SidebarNavigation({
|
|
|
1658
1929
|
)
|
|
1659
1930
|
] }, entry.id);
|
|
1660
1931
|
}
|
|
1661
|
-
return /* @__PURE__ */
|
|
1932
|
+
return /* @__PURE__ */ jsx18(
|
|
1662
1933
|
Collapsible,
|
|
1663
1934
|
{
|
|
1664
1935
|
open: sectionOpen,
|
|
@@ -1670,38 +1941,43 @@ function SidebarNavigation({
|
|
|
1670
1941
|
"group/collapsible",
|
|
1671
1942
|
entry.startsSection && "mt-2"
|
|
1672
1943
|
),
|
|
1673
|
-
children: /* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
|
|
1944
|
+
children: /* @__PURE__ */ jsxs16(NavigationGroup, { children: [
|
|
1945
|
+
/* @__PURE__ */ jsx18(
|
|
1946
|
+
CollapsibleTrigger,
|
|
1676
1947
|
{
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1948
|
+
render: /* @__PURE__ */ jsxs16(
|
|
1949
|
+
NavigationItem,
|
|
1950
|
+
{
|
|
1951
|
+
active: entry.active,
|
|
1952
|
+
tooltip: entry.label,
|
|
1953
|
+
"aria-label": getNavigationAccessibleLabel(entry),
|
|
1954
|
+
children: [
|
|
1955
|
+
entry.icon,
|
|
1956
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate group-data-[sidebar-state=collapsed]/shell:hidden", children: entry.label }),
|
|
1957
|
+
/* @__PURE__ */ jsx18(NavigationMetadata, { badge: entry.badge, count: entry.count }),
|
|
1958
|
+
/* @__PURE__ */ jsx18(ChevronRight2, { className: "ml-auto transition-transform duration-150 ease-out group-data-[sidebar-state=collapsed]/shell:hidden group-data-[open]/collapsible:rotate-90" })
|
|
1959
|
+
]
|
|
1960
|
+
}
|
|
1961
|
+
)
|
|
1686
1962
|
}
|
|
1687
|
-
)
|
|
1688
|
-
/* @__PURE__ */
|
|
1963
|
+
),
|
|
1964
|
+
/* @__PURE__ */ jsx18(
|
|
1689
1965
|
CollapsibleContent,
|
|
1690
1966
|
{
|
|
1691
1967
|
"data-slot": "sidebar-collapsible-content",
|
|
1692
1968
|
className: "overflow-hidden",
|
|
1693
|
-
children: /* @__PURE__ */
|
|
1969
|
+
children: /* @__PURE__ */ jsx18(NavigationSubList, { children: entry.items.map((item) => /* @__PURE__ */ jsx18(
|
|
1694
1970
|
NavigationSubItem,
|
|
1695
1971
|
{
|
|
1696
|
-
asChild: true,
|
|
1697
1972
|
active: item.active,
|
|
1698
|
-
|
|
1973
|
+
render: renderLink(item, {
|
|
1699
1974
|
"aria-current": item.active ? "page" : void 0,
|
|
1700
|
-
"aria-label": item
|
|
1975
|
+
"aria-label": getNavigationAccessibleLabel(item),
|
|
1701
1976
|
onClick: handleNavigate,
|
|
1702
|
-
children: /* @__PURE__ */
|
|
1977
|
+
children: /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
1703
1978
|
item.icon,
|
|
1704
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate", children: item.label }),
|
|
1980
|
+
/* @__PURE__ */ jsx18(NavigationMetadata, { badge: item.badge, count: item.count })
|
|
1705
1981
|
] })
|
|
1706
1982
|
})
|
|
1707
1983
|
},
|
|
@@ -1719,19 +1995,19 @@ function SidebarNavigation({
|
|
|
1719
1995
|
}
|
|
1720
1996
|
|
|
1721
1997
|
// src/patterns/state-views.tsx
|
|
1722
|
-
import { jsx as
|
|
1998
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1723
1999
|
function StateView({ title, description, action, icon, className, ...props }) {
|
|
1724
|
-
return /* @__PURE__ */
|
|
2000
|
+
return /* @__PURE__ */ jsxs17(
|
|
1725
2001
|
"div",
|
|
1726
2002
|
{
|
|
1727
2003
|
"data-slot": "state-view",
|
|
1728
2004
|
className: cn("flex min-h-72 flex-col items-center justify-center gap-3 border-b px-6 py-12 text-center", className),
|
|
1729
2005
|
...props,
|
|
1730
2006
|
children: [
|
|
1731
|
-
icon ? /* @__PURE__ */
|
|
1732
|
-
/* @__PURE__ */
|
|
1733
|
-
description ? /* @__PURE__ */
|
|
1734
|
-
action ? /* @__PURE__ */
|
|
2007
|
+
icon ? /* @__PURE__ */ jsx19("div", { className: "flex size-10 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-5", children: icon }) : null,
|
|
2008
|
+
/* @__PURE__ */ jsx19("h2", { className: "ds-type-section-title", children: title }),
|
|
2009
|
+
description ? /* @__PURE__ */ jsx19("p", { className: "ds-type-ui max-w-md text-text-supporting", children: description }) : null,
|
|
2010
|
+
action ? /* @__PURE__ */ jsx19("div", { className: "mt-1", children: action }) : null
|
|
1735
2011
|
]
|
|
1736
2012
|
}
|
|
1737
2013
|
);
|
|
@@ -1740,16 +2016,16 @@ function LoadingRows({
|
|
|
1740
2016
|
rows = 6,
|
|
1741
2017
|
columns = 5
|
|
1742
2018
|
}) {
|
|
1743
|
-
return /* @__PURE__ */
|
|
2019
|
+
return /* @__PURE__ */ jsx19("div", { "data-slot": "loading-rows", className: "border-b", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ jsx19(
|
|
1744
2020
|
"div",
|
|
1745
2021
|
{
|
|
1746
2022
|
className: "grid h-[var(--ds-row-height)] items-center gap-4 border-b px-5 last:border-b-0",
|
|
1747
2023
|
style: { gridTemplateColumns: `2fr repeat(${Math.max(columns - 1, 1)}, minmax(5rem, 1fr))` },
|
|
1748
|
-
children: Array.from({ length: columns }).map((_2, columnIndex) => /* @__PURE__ */
|
|
2024
|
+
children: Array.from({ length: columns }).map((_2, columnIndex) => /* @__PURE__ */ jsx19(
|
|
1749
2025
|
"div",
|
|
1750
2026
|
{
|
|
1751
2027
|
className: cn(
|
|
1752
|
-
"h-3 rounded bg-muted",
|
|
2028
|
+
"h-3 rounded bg-surface-muted",
|
|
1753
2029
|
columnIndex === 0 ? "w-44" : "w-24"
|
|
1754
2030
|
)
|
|
1755
2031
|
},
|
|
@@ -1760,7 +2036,7 @@ function LoadingRows({
|
|
|
1760
2036
|
)) });
|
|
1761
2037
|
}
|
|
1762
2038
|
function ErrorState({ title, description, action, className, ...props }) {
|
|
1763
|
-
return /* @__PURE__ */
|
|
2039
|
+
return /* @__PURE__ */ jsx19(
|
|
1764
2040
|
StateView,
|
|
1765
2041
|
{
|
|
1766
2042
|
title,
|
|
@@ -1775,8 +2051,8 @@ function ErrorState({ title, description, action, className, ...props }) {
|
|
|
1775
2051
|
}
|
|
1776
2052
|
|
|
1777
2053
|
// src/patterns/value-meter.tsx
|
|
1778
|
-
import * as
|
|
1779
|
-
import { jsx as
|
|
2054
|
+
import * as React8 from "react";
|
|
2055
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1780
2056
|
function ValueMeter({
|
|
1781
2057
|
label,
|
|
1782
2058
|
value,
|
|
@@ -1787,23 +2063,23 @@ function ValueMeter({
|
|
|
1787
2063
|
className,
|
|
1788
2064
|
...props
|
|
1789
2065
|
}) {
|
|
1790
|
-
const labelId =
|
|
2066
|
+
const labelId = React8.useId();
|
|
1791
2067
|
const hasMaximum = typeof maximum === "number" && maximum > 0;
|
|
1792
2068
|
const boundedValue = hasMaximum ? Math.min(maximum, Math.max(0, value)) : value;
|
|
1793
2069
|
const percentage = hasMaximum ? boundedValue / maximum * 100 : null;
|
|
1794
2070
|
const resolvedValueLabel = valueLabel ?? (hasMaximum ? `${boundedValue} of ${maximum}` : String(boundedValue));
|
|
1795
|
-
return /* @__PURE__ */
|
|
2071
|
+
return /* @__PURE__ */ jsxs18(
|
|
1796
2072
|
"div",
|
|
1797
2073
|
{
|
|
1798
2074
|
"data-slot": "value-meter",
|
|
1799
2075
|
className: cn("grid gap-2", className),
|
|
1800
2076
|
...props,
|
|
1801
2077
|
children: [
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
/* @__PURE__ */
|
|
2078
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-baseline justify-between gap-4 text-sm", children: [
|
|
2079
|
+
/* @__PURE__ */ jsx20("span", { id: labelId, className: "font-medium text-text-primary", children: label }),
|
|
2080
|
+
/* @__PURE__ */ jsx20("span", { className: "text-text-supporting", children: resolvedValueLabel })
|
|
1805
2081
|
] }),
|
|
1806
|
-
percentage === null ? null : /* @__PURE__ */
|
|
2082
|
+
percentage === null ? null : /* @__PURE__ */ jsx20(
|
|
1807
2083
|
"div",
|
|
1808
2084
|
{
|
|
1809
2085
|
role: "progressbar",
|
|
@@ -1812,7 +2088,7 @@ function ValueMeter({
|
|
|
1812
2088
|
"aria-valuemax": maximum ?? void 0,
|
|
1813
2089
|
"aria-valuenow": boundedValue,
|
|
1814
2090
|
className: "h-2 overflow-hidden rounded-full bg-surface-muted",
|
|
1815
|
-
children: /* @__PURE__ */
|
|
2091
|
+
children: /* @__PURE__ */ jsx20(
|
|
1816
2092
|
"div",
|
|
1817
2093
|
{
|
|
1818
2094
|
className: cn(
|
|
@@ -1826,20 +2102,20 @@ function ValueMeter({
|
|
|
1826
2102
|
)
|
|
1827
2103
|
}
|
|
1828
2104
|
),
|
|
1829
|
-
detail ? /* @__PURE__ */
|
|
2105
|
+
detail ? /* @__PURE__ */ jsx20("div", { className: "text-xs text-text-supporting", children: detail }) : null
|
|
1830
2106
|
]
|
|
1831
2107
|
}
|
|
1832
2108
|
);
|
|
1833
2109
|
}
|
|
1834
2110
|
|
|
1835
2111
|
// src/patterns/workbench.tsx
|
|
1836
|
-
import * as
|
|
1837
|
-
import { jsx as
|
|
2112
|
+
import * as React9 from "react";
|
|
2113
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1838
2114
|
function WorkbenchShell({ className, ...props }) {
|
|
1839
|
-
return /* @__PURE__ */
|
|
2115
|
+
return /* @__PURE__ */ jsx21("div", { "data-slot": "workbench-shell", className: cn("min-w-0", className), ...props });
|
|
1840
2116
|
}
|
|
1841
2117
|
function WorkbenchRail({ variant = "secondary", open = true, className, ...props }) {
|
|
1842
|
-
return /* @__PURE__ */
|
|
2118
|
+
return /* @__PURE__ */ jsx21(
|
|
1843
2119
|
"aside",
|
|
1844
2120
|
{
|
|
1845
2121
|
"data-slot": "workbench-rail",
|
|
@@ -1851,16 +2127,16 @@ function WorkbenchRail({ variant = "secondary", open = true, className, ...props
|
|
|
1851
2127
|
);
|
|
1852
2128
|
}
|
|
1853
2129
|
function WorkbenchMain({ className, ...props }) {
|
|
1854
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ jsx21("main", { "data-slot": "workbench-main", className: cn("min-w-0", className), ...props });
|
|
1855
2131
|
}
|
|
1856
2132
|
function WorkbenchInspector({ className, ...props }) {
|
|
1857
|
-
return /* @__PURE__ */
|
|
2133
|
+
return /* @__PURE__ */ jsx21("aside", { "data-slot": "workbench-inspector", className: cn("min-w-0", className), ...props });
|
|
1858
2134
|
}
|
|
1859
2135
|
function WorkbenchMobileToolbar({ className, ...props }) {
|
|
1860
|
-
return /* @__PURE__ */
|
|
2136
|
+
return /* @__PURE__ */ jsx21("div", { "data-slot": "workbench-mobile-toolbar", className: cn(className), ...props });
|
|
1861
2137
|
}
|
|
1862
2138
|
function WorkbenchBackdrop({ open = true, className, ...props }) {
|
|
1863
|
-
return /* @__PURE__ */
|
|
2139
|
+
return /* @__PURE__ */ jsx21(
|
|
1864
2140
|
"button",
|
|
1865
2141
|
{
|
|
1866
2142
|
type: "button",
|
|
@@ -1872,19 +2148,19 @@ function WorkbenchBackdrop({ open = true, className, ...props }) {
|
|
|
1872
2148
|
);
|
|
1873
2149
|
}
|
|
1874
2150
|
function WorkbenchSection({ className, ...props }) {
|
|
1875
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsx21("section", { "data-slot": "workbench-section", className: cn(className), ...props });
|
|
1876
2152
|
}
|
|
1877
2153
|
function WorkbenchSectionHeader({ title, metadata, action, className, ...props }) {
|
|
1878
|
-
return /* @__PURE__ */
|
|
1879
|
-
/* @__PURE__ */
|
|
1880
|
-
/* @__PURE__ */
|
|
1881
|
-
metadata ? /* @__PURE__ */
|
|
2154
|
+
return /* @__PURE__ */ jsxs19("div", { "data-slot": "workbench-section-header", className: cn(className), ...props, children: [
|
|
2155
|
+
/* @__PURE__ */ jsxs19("div", { "data-slot": "workbench-section-heading", children: [
|
|
2156
|
+
/* @__PURE__ */ jsx21("h2", { children: title }),
|
|
2157
|
+
metadata ? /* @__PURE__ */ jsx21("span", { children: metadata }) : null
|
|
1882
2158
|
] }),
|
|
1883
|
-
action ? /* @__PURE__ */
|
|
2159
|
+
action ? /* @__PURE__ */ jsx21("div", { "data-slot": "workbench-section-action", children: action }) : null
|
|
1884
2160
|
] });
|
|
1885
2161
|
}
|
|
1886
2162
|
function ResourceRow({ as = "div", href, selected = false, className, children, ...props }) {
|
|
1887
|
-
return
|
|
2163
|
+
return React9.createElement(
|
|
1888
2164
|
as,
|
|
1889
2165
|
{
|
|
1890
2166
|
...props,
|
|
@@ -1898,35 +2174,35 @@ function ResourceRow({ as = "div", href, selected = false, className, children,
|
|
|
1898
2174
|
);
|
|
1899
2175
|
}
|
|
1900
2176
|
function ResourceRowIcon({ className, ...props }) {
|
|
1901
|
-
return /* @__PURE__ */
|
|
2177
|
+
return /* @__PURE__ */ jsx21("span", { "data-slot": "resource-row-icon", className: cn(className), ...props });
|
|
1902
2178
|
}
|
|
1903
2179
|
function ResourceRowContent({ className, ...props }) {
|
|
1904
|
-
return /* @__PURE__ */
|
|
2180
|
+
return /* @__PURE__ */ jsx21("span", { "data-slot": "resource-row-content", className: cn(className), ...props });
|
|
1905
2181
|
}
|
|
1906
2182
|
function ResourceRowTitle({ className, ...props }) {
|
|
1907
|
-
return /* @__PURE__ */
|
|
2183
|
+
return /* @__PURE__ */ jsx21("strong", { "data-slot": "resource-row-title", className: cn(className), ...props });
|
|
1908
2184
|
}
|
|
1909
2185
|
function ResourceRowDescription({ className, ...props }) {
|
|
1910
|
-
return /* @__PURE__ */
|
|
2186
|
+
return /* @__PURE__ */ jsx21("span", { "data-slot": "resource-row-description", className: cn(className), ...props });
|
|
1911
2187
|
}
|
|
1912
2188
|
function ResourceRowMeta({ className, ...props }) {
|
|
1913
|
-
return /* @__PURE__ */
|
|
2189
|
+
return /* @__PURE__ */ jsx21("span", { "data-slot": "resource-row-meta", className: cn(className), ...props });
|
|
1914
2190
|
}
|
|
1915
2191
|
function WorkbenchInspectorSection({ label, action, className, children, ...props }) {
|
|
1916
|
-
return /* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */
|
|
1918
|
-
/* @__PURE__ */
|
|
1919
|
-
action ? /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ jsxs19("section", { "data-slot": "workbench-inspector-section", className: cn(className), ...props, children: [
|
|
2193
|
+
/* @__PURE__ */ jsxs19("div", { "data-slot": "workbench-inspector-label", children: [
|
|
2194
|
+
/* @__PURE__ */ jsx21("h3", { children: label }),
|
|
2195
|
+
action ? /* @__PURE__ */ jsx21("div", { children: action }) : null
|
|
1920
2196
|
] }),
|
|
1921
2197
|
children
|
|
1922
2198
|
] });
|
|
1923
2199
|
}
|
|
1924
2200
|
function IdentityRow({ initials, name, detail, compact = false, className, ...props }) {
|
|
1925
|
-
return /* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */
|
|
1927
|
-
/* @__PURE__ */
|
|
1928
|
-
/* @__PURE__ */
|
|
1929
|
-
detail ? /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ jsxs19("div", { "data-slot": "identity-row", "data-compact": compact ? "true" : "false", className: cn(className), ...props, children: [
|
|
2202
|
+
/* @__PURE__ */ jsx21("span", { "data-slot": "identity-avatar", children: initials }),
|
|
2203
|
+
/* @__PURE__ */ jsxs19("span", { "data-slot": "identity-copy", children: [
|
|
2204
|
+
/* @__PURE__ */ jsx21("strong", { children: name }),
|
|
2205
|
+
detail ? /* @__PURE__ */ jsx21("small", { children: detail }) : null
|
|
1930
2206
|
] })
|
|
1931
2207
|
] });
|
|
1932
2208
|
}
|
|
@@ -1935,7 +2211,9 @@ export {
|
|
|
1935
2211
|
PaginationControls,
|
|
1936
2212
|
DataTable,
|
|
1937
2213
|
EntityTable,
|
|
2214
|
+
CommandPalette,
|
|
1938
2215
|
DetailBackLink,
|
|
2216
|
+
FilterBar,
|
|
1939
2217
|
useAppShell,
|
|
1940
2218
|
AppShell,
|
|
1941
2219
|
AppSidebar,
|
|
@@ -2000,4 +2278,4 @@ export {
|
|
|
2000
2278
|
WorkbenchInspectorSection,
|
|
2001
2279
|
IdentityRow
|
|
2002
2280
|
};
|
|
2003
|
-
//# sourceMappingURL=chunk-
|
|
2281
|
+
//# sourceMappingURL=chunk-WEI3PU4A.js.map
|