@conscia-labs/design-system 1.0.3 → 1.2.0
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/AGENT_GUIDE.md +222 -0
- package/README.md +113 -837
- package/agent-manifest.json +472 -0
- package/bin/conscia-design-system.mjs +109 -0
- package/dist/{chunk-HAJMOT3P.js → chunk-HWUUODVE.js} +2 -2
- package/dist/chunk-HWUUODVE.js.map +1 -0
- package/dist/{chunk-LPUWW7XF.js → chunk-OYJH5CVD.js} +545 -252
- package/dist/chunk-OYJH5CVD.js.map +1 -0
- package/dist/{chunk-QP3SEL2Z.js → chunk-SIRISAFC.js} +2 -2
- package/dist/foundation.css +76 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27 -3
- package/dist/patterns/index.d.ts +86 -7
- package/dist/patterns/index.js +26 -2
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.js +2 -2
- package/dist/standalone.css +1 -1
- package/dist/styles.css +76 -19
- package/package.json +19 -6
- package/dist/chunk-HAJMOT3P.js.map +0 -1
- package/dist/chunk-LPUWW7XF.js.map +0 -1
- /package/dist/{chunk-QP3SEL2Z.js.map → chunk-SIRISAFC.js.map} +0 -0
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
TooltipTrigger,
|
|
66
66
|
index_parts_exports,
|
|
67
67
|
useRender
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-HWUUODVE.js";
|
|
69
69
|
import {
|
|
70
70
|
cn
|
|
71
71
|
} from "./chunk-JU5DQXFC.js";
|
|
@@ -456,6 +456,12 @@ function CommandPalette({
|
|
|
456
456
|
"aria-label": "Search commands",
|
|
457
457
|
autoFocus: true,
|
|
458
458
|
className: "ds-type-control h-12 min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-supporting",
|
|
459
|
+
onKeyDown: (event) => {
|
|
460
|
+
if (event.key === "Escape") {
|
|
461
|
+
event.preventDefault();
|
|
462
|
+
handleOpenChange(false);
|
|
463
|
+
}
|
|
464
|
+
},
|
|
459
465
|
placeholder
|
|
460
466
|
}
|
|
461
467
|
)
|
|
@@ -497,11 +503,35 @@ function CommandPalette({
|
|
|
497
503
|
] }) });
|
|
498
504
|
}
|
|
499
505
|
|
|
506
|
+
// src/patterns/data-panel.tsx
|
|
507
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
508
|
+
function DataPanel({ className, ...props }) {
|
|
509
|
+
return /* @__PURE__ */ jsx5("section", { "data-slot": "data-panel", className: cn("min-w-0 overflow-hidden rounded-[var(--ds-radius-surface)] border border-border-default bg-surface text-text-primary shadow-[var(--ds-shadow-raised)]", className), ...props });
|
|
510
|
+
}
|
|
511
|
+
function DataPanelHeader({ title, description, status, actions, className, ...props }) {
|
|
512
|
+
return /* @__PURE__ */ jsxs4("header", { "data-slot": "data-panel-header", className: cn("flex min-w-0 items-start justify-between gap-4 border-b border-border-subtle px-[var(--ds-surface-padding)] py-3", className), ...props, children: [
|
|
513
|
+
/* @__PURE__ */ jsxs4("div", { className: "min-w-0", children: [
|
|
514
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
515
|
+
/* @__PURE__ */ jsx5("h2", { className: "ds-type-card-title", children: title }),
|
|
516
|
+
status
|
|
517
|
+
] }),
|
|
518
|
+
description ? /* @__PURE__ */ jsx5("p", { className: "ds-type-metadata mt-0.5 text-text-supporting", children: description }) : null
|
|
519
|
+
] }),
|
|
520
|
+
actions ? /* @__PURE__ */ jsx5("div", { className: "shrink-0", children: actions }) : null
|
|
521
|
+
] });
|
|
522
|
+
}
|
|
523
|
+
function DataPanelContent({ padded = false, className, ...props }) {
|
|
524
|
+
return /* @__PURE__ */ jsx5("div", { "data-slot": "data-panel-content", "data-padded": padded ? "true" : void 0, className: cn(padded && "p-[var(--ds-surface-padding)]", className), ...props });
|
|
525
|
+
}
|
|
526
|
+
function DataPanelFooter({ className, ...props }) {
|
|
527
|
+
return /* @__PURE__ */ jsx5("footer", { "data-slot": "data-panel-footer", className: cn("border-t border-border-subtle px-[var(--ds-surface-padding)] py-3 ds-type-metadata text-text-supporting", className), ...props });
|
|
528
|
+
}
|
|
529
|
+
|
|
500
530
|
// src/patterns/detail-back-link.tsx
|
|
501
531
|
import { ArrowLeft } from "lucide-react";
|
|
502
|
-
import { jsx as
|
|
532
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
503
533
|
function DetailBackLink({ label, className, ...props }) {
|
|
504
|
-
return /* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ jsxs5(
|
|
505
535
|
"a",
|
|
506
536
|
{
|
|
507
537
|
"data-slot": "detail-back-link",
|
|
@@ -511,7 +541,7 @@ function DetailBackLink({ label, className, ...props }) {
|
|
|
511
541
|
),
|
|
512
542
|
...props,
|
|
513
543
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ jsx6(ArrowLeft, { className: "size-4", "aria-hidden": "true" }),
|
|
515
545
|
label
|
|
516
546
|
]
|
|
517
547
|
}
|
|
@@ -519,7 +549,7 @@ function DetailBackLink({ label, className, ...props }) {
|
|
|
519
549
|
}
|
|
520
550
|
|
|
521
551
|
// src/patterns/filter-bar.tsx
|
|
522
|
-
import { jsx as
|
|
552
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
523
553
|
function FilterBar({
|
|
524
554
|
children,
|
|
525
555
|
clearAllLabel = "Clear all",
|
|
@@ -527,7 +557,7 @@ function FilterBar({
|
|
|
527
557
|
onClearAll,
|
|
528
558
|
...props
|
|
529
559
|
}) {
|
|
530
|
-
return /* @__PURE__ */
|
|
560
|
+
return /* @__PURE__ */ jsxs6(
|
|
531
561
|
"div",
|
|
532
562
|
{
|
|
533
563
|
"data-slot": "filter-bar",
|
|
@@ -539,8 +569,8 @@ function FilterBar({
|
|
|
539
569
|
"aria-label": props["aria-label"] ?? "Active filters",
|
|
540
570
|
...props,
|
|
541
571
|
children: [
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
onClearAll ? /* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ jsx7("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5", children }),
|
|
573
|
+
onClearAll ? /* @__PURE__ */ jsx7(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClearAll, className: "shrink-0", children: clearAllLabel }) : null
|
|
544
574
|
]
|
|
545
575
|
}
|
|
546
576
|
);
|
|
@@ -549,7 +579,7 @@ function FilterBar({
|
|
|
549
579
|
// src/patterns/app-shell.tsx
|
|
550
580
|
import * as React3 from "react";
|
|
551
581
|
import { PanelLeftIcon, Search, X } from "lucide-react";
|
|
552
|
-
import { Fragment as Fragment3, jsx as
|
|
582
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
553
583
|
var SIDEBAR_COOKIE_NAME = "conscia_sidebar_state";
|
|
554
584
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 30;
|
|
555
585
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
@@ -657,6 +687,7 @@ function useSidebarOverflow() {
|
|
|
657
687
|
}
|
|
658
688
|
function AppShell({
|
|
659
689
|
defaultSidebarOpen = true,
|
|
690
|
+
headerLayout = "split",
|
|
660
691
|
children,
|
|
661
692
|
className,
|
|
662
693
|
style,
|
|
@@ -715,12 +746,13 @@ function AppShell({
|
|
|
715
746
|
toggleSidebar
|
|
716
747
|
]
|
|
717
748
|
);
|
|
718
|
-
return /* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ jsx8(AppShellContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx8(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsx8(
|
|
719
750
|
"div",
|
|
720
751
|
{
|
|
721
752
|
"data-slot": "app-shell",
|
|
722
753
|
"data-sidebar-state": sidebarOpen ? "expanded" : "collapsed",
|
|
723
754
|
"data-sidebar-side": sidebarSide,
|
|
755
|
+
"data-header-layout": headerLayout,
|
|
724
756
|
suppressHydrationWarning: true,
|
|
725
757
|
className: cn(
|
|
726
758
|
"group/shell min-h-svh bg-canvas text-text-primary",
|
|
@@ -746,23 +778,23 @@ function AppSidebar({
|
|
|
746
778
|
React3.useEffect(() => {
|
|
747
779
|
setSidebarSide(side);
|
|
748
780
|
}, [setSidebarSide, side]);
|
|
749
|
-
return /* @__PURE__ */
|
|
750
|
-
/* @__PURE__ */
|
|
781
|
+
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
782
|
+
/* @__PURE__ */ jsx8(Sheet, { side, open: mobileOpen, onOpenChange: setMobileOpen, children: /* @__PURE__ */ jsxs7(
|
|
751
783
|
SheetContent,
|
|
752
784
|
{
|
|
753
785
|
side,
|
|
754
786
|
"data-sidebar-variant": variant,
|
|
755
787
|
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",
|
|
756
788
|
children: [
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ jsxs7(SheetHeader, { className: "sr-only", children: [
|
|
790
|
+
/* @__PURE__ */ jsx8(SheetTitle, { children: title }),
|
|
791
|
+
/* @__PURE__ */ jsx8(SheetDescription, { children: description })
|
|
760
792
|
] }),
|
|
761
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ jsx8("div", { className: "flex h-full min-h-0 flex-col", children })
|
|
762
794
|
]
|
|
763
795
|
}
|
|
764
796
|
) }),
|
|
765
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ jsx8(
|
|
766
798
|
"aside",
|
|
767
799
|
{
|
|
768
800
|
"data-slot": "app-sidebar",
|
|
@@ -772,6 +804,7 @@ function AppSidebar({
|
|
|
772
804
|
"fixed inset-y-0 z-20 hidden w-[var(--ds-app-sidebar-width)] shrink-0 flex-col border-sidebar-border bg-sidebar-canvas text-sidebar-primary-text transition-[width] duration-200 ease-linear lg:flex",
|
|
773
805
|
side === "left" ? "left-0 border-r" : "right-0 border-l",
|
|
774
806
|
"group-data-[sidebar-state=collapsed]/shell:w-[var(--ds-app-sidebar-width)]",
|
|
807
|
+
"group-data-[header-layout=integrated]/shell:top-[var(--ds-topbar-height)]",
|
|
775
808
|
className
|
|
776
809
|
),
|
|
777
810
|
...props,
|
|
@@ -784,7 +817,7 @@ function AppSidebarHeader({
|
|
|
784
817
|
className,
|
|
785
818
|
...props
|
|
786
819
|
}) {
|
|
787
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ jsx8(
|
|
788
821
|
"div",
|
|
789
822
|
{
|
|
790
823
|
"data-slot": "app-sidebar-header",
|
|
@@ -801,7 +834,7 @@ function AppSidebarContent({
|
|
|
801
834
|
...props
|
|
802
835
|
}) {
|
|
803
836
|
const { contentRef, hasScrollBefore, hasScrollAfter } = useSidebarOverflow();
|
|
804
|
-
return /* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ jsx8(
|
|
805
838
|
"div",
|
|
806
839
|
{
|
|
807
840
|
"data-slot": "app-sidebar-content",
|
|
@@ -820,7 +853,7 @@ function AppSidebarFooter({
|
|
|
820
853
|
className,
|
|
821
854
|
...props
|
|
822
855
|
}) {
|
|
823
|
-
return /* @__PURE__ */
|
|
856
|
+
return /* @__PURE__ */ jsx8(
|
|
824
857
|
"div",
|
|
825
858
|
{
|
|
826
859
|
"data-slot": "app-sidebar-footer",
|
|
@@ -839,17 +872,17 @@ function ProductIdentity({
|
|
|
839
872
|
collapsedLabel,
|
|
840
873
|
className
|
|
841
874
|
}) {
|
|
842
|
-
return /* @__PURE__ */
|
|
875
|
+
return /* @__PURE__ */ jsxs7(
|
|
843
876
|
"div",
|
|
844
877
|
{
|
|
845
878
|
"data-slot": "product-identity",
|
|
846
879
|
className: cn("flex min-w-0 items-center gap-2", className),
|
|
847
880
|
children: [
|
|
848
|
-
icon ? /* @__PURE__ */
|
|
849
|
-
collapsedLabel && !icon ? /* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
description ? /* @__PURE__ */
|
|
881
|
+
icon ? /* @__PURE__ */ jsx8("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,
|
|
882
|
+
collapsedLabel && !icon ? /* @__PURE__ */ jsx8("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,
|
|
883
|
+
/* @__PURE__ */ jsxs7("div", { className: "min-w-0 group-data-[sidebar-state=collapsed]/shell:hidden", children: [
|
|
884
|
+
/* @__PURE__ */ jsx8("div", { className: "ds-type-navigation truncate font-semibold text-sidebar-primary-text", children: label }),
|
|
885
|
+
description ? /* @__PURE__ */ jsx8("div", { className: "ds-type-metadata truncate text-sidebar-metadata-text", children: description }) : null
|
|
853
886
|
] })
|
|
854
887
|
]
|
|
855
888
|
}
|
|
@@ -859,7 +892,7 @@ function SidebarSeparator({
|
|
|
859
892
|
className,
|
|
860
893
|
...props
|
|
861
894
|
}) {
|
|
862
|
-
return /* @__PURE__ */
|
|
895
|
+
return /* @__PURE__ */ jsx8(
|
|
863
896
|
Separator,
|
|
864
897
|
{
|
|
865
898
|
"data-slot": "app-sidebar-separator",
|
|
@@ -874,27 +907,30 @@ function NavigationGroup({
|
|
|
874
907
|
children,
|
|
875
908
|
className
|
|
876
909
|
}) {
|
|
877
|
-
|
|
910
|
+
const labelId = React3.useId();
|
|
911
|
+
return /* @__PURE__ */ jsxs7(
|
|
878
912
|
"section",
|
|
879
913
|
{
|
|
880
914
|
"data-slot": "navigation-group",
|
|
915
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
881
916
|
className: cn(
|
|
882
917
|
"flex min-w-0 flex-col gap-[var(--ds-sidebar-label-gap)]",
|
|
883
918
|
className
|
|
884
919
|
),
|
|
885
920
|
children: [
|
|
886
|
-
label ? /* @__PURE__ */
|
|
921
|
+
label ? /* @__PURE__ */ jsxs7(
|
|
887
922
|
"div",
|
|
888
923
|
{
|
|
889
924
|
"data-slot": "navigation-group-label",
|
|
925
|
+
id: labelId,
|
|
890
926
|
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",
|
|
891
927
|
children: [
|
|
892
928
|
label,
|
|
893
|
-
count !== void 0 ? /* @__PURE__ */
|
|
929
|
+
count !== void 0 ? /* @__PURE__ */ jsx8("span", { className: "ds-type-metadata ml-auto shrink-0 font-medium normal-case tracking-normal text-sidebar-group-count", children: count }) : null
|
|
894
930
|
]
|
|
895
931
|
}
|
|
896
932
|
) : null,
|
|
897
|
-
/* @__PURE__ */
|
|
933
|
+
/* @__PURE__ */ jsx8("div", { className: "flex min-w-0 flex-col gap-[var(--ds-sidebar-item-gap)]", children })
|
|
898
934
|
]
|
|
899
935
|
}
|
|
900
936
|
);
|
|
@@ -907,7 +943,7 @@ function navigationItemClasses(active) {
|
|
|
907
943
|
"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",
|
|
908
944
|
"group-data-[sidebar-state=collapsed]/shell:justify-center group-data-[sidebar-state=collapsed]/shell:px-0",
|
|
909
945
|
"[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75] [&>svg]:text-sidebar-icon",
|
|
910
|
-
active && "bg-sidebar-active-background font-semibold text-sidebar-active-foreground
|
|
946
|
+
active && "bg-sidebar-active-background font-semibold text-sidebar-active-foreground hover:bg-sidebar-active-background hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground"
|
|
911
947
|
);
|
|
912
948
|
}
|
|
913
949
|
var NavigationItem = React3.forwardRef(
|
|
@@ -939,9 +975,9 @@ var NavigationItem = React3.forwardRef(
|
|
|
939
975
|
if (!tooltip) {
|
|
940
976
|
return item;
|
|
941
977
|
}
|
|
942
|
-
return /* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */
|
|
944
|
-
/* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ jsxs7(Tooltip, { children: [
|
|
979
|
+
/* @__PURE__ */ jsx8(TooltipTrigger, { render: item }),
|
|
980
|
+
/* @__PURE__ */ jsx8(
|
|
945
981
|
TooltipContent,
|
|
946
982
|
{
|
|
947
983
|
side: sidebarSide === "left" ? "right" : "left",
|
|
@@ -971,7 +1007,7 @@ var NavigationSubItem = React3.forwardRef(
|
|
|
971
1007
|
"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
1008
|
"hover:bg-sidebar-hover hover:text-sidebar-primary-text focus-visible:ring-[3px] focus-visible:ring-sidebar-focus-ring",
|
|
973
1009
|
"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
|
|
1010
|
+
active && "bg-sidebar-active-background font-semibold text-sidebar-active-foreground hover:bg-sidebar-active-background hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground",
|
|
975
1011
|
className
|
|
976
1012
|
),
|
|
977
1013
|
...props
|
|
@@ -983,7 +1019,7 @@ function NavigationSubList({
|
|
|
983
1019
|
className,
|
|
984
1020
|
...props
|
|
985
1021
|
}) {
|
|
986
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsx8(
|
|
987
1023
|
"div",
|
|
988
1024
|
{
|
|
989
1025
|
"data-slot": "navigation-sub-list",
|
|
@@ -1018,9 +1054,9 @@ function SidebarTrigger({
|
|
|
1018
1054
|
toggleSidebar();
|
|
1019
1055
|
}
|
|
1020
1056
|
};
|
|
1021
|
-
return /* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ jsxs7(IconButton, { ...triggerProps, children: [
|
|
1058
|
+
/* @__PURE__ */ jsx8(PanelLeftIcon, {}),
|
|
1059
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Toggle navigation" })
|
|
1024
1060
|
] });
|
|
1025
1061
|
}
|
|
1026
1062
|
function SidebarSearch({
|
|
@@ -1056,7 +1092,7 @@ function SidebarSearch({
|
|
|
1056
1092
|
mountedRef.current = true;
|
|
1057
1093
|
}, [expanded]);
|
|
1058
1094
|
if (!expanded) {
|
|
1059
|
-
return /* @__PURE__ */
|
|
1095
|
+
return /* @__PURE__ */ jsxs7(
|
|
1060
1096
|
"button",
|
|
1061
1097
|
{
|
|
1062
1098
|
ref: triggerRef,
|
|
@@ -1070,14 +1106,14 @@ function SidebarSearch({
|
|
|
1070
1106
|
onClick: () => setExpanded(true),
|
|
1071
1107
|
"aria-label": triggerLabel,
|
|
1072
1108
|
children: [
|
|
1073
|
-
/* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
shortcut ? /* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ jsx8(Search, { className: "size-4 shrink-0 text-sidebar-icon" }),
|
|
1110
|
+
/* @__PURE__ */ jsx8("span", { className: "truncate group-data-[sidebar-state=collapsed]/shell:hidden", children: triggerLabel }),
|
|
1111
|
+
shortcut ? /* @__PURE__ */ jsx8(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
|
|
1076
1112
|
]
|
|
1077
1113
|
}
|
|
1078
1114
|
);
|
|
1079
1115
|
}
|
|
1080
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ jsxs7(
|
|
1081
1117
|
"div",
|
|
1082
1118
|
{
|
|
1083
1119
|
"data-slot": "sidebar-search",
|
|
@@ -1087,8 +1123,8 @@ function SidebarSearch({
|
|
|
1087
1123
|
className
|
|
1088
1124
|
),
|
|
1089
1125
|
children: [
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ jsx8(Search, { className: "size-4 shrink-0 text-sidebar-icon" }),
|
|
1127
|
+
/* @__PURE__ */ jsx8(
|
|
1092
1128
|
Input,
|
|
1093
1129
|
{
|
|
1094
1130
|
ref: inputRef,
|
|
@@ -1104,7 +1140,7 @@ function SidebarSearch({
|
|
|
1104
1140
|
...props
|
|
1105
1141
|
}
|
|
1106
1142
|
),
|
|
1107
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ jsx8(
|
|
1108
1144
|
"button",
|
|
1109
1145
|
{
|
|
1110
1146
|
type: "button",
|
|
@@ -1114,7 +1150,7 @@ function SidebarSearch({
|
|
|
1114
1150
|
setExpanded(false);
|
|
1115
1151
|
},
|
|
1116
1152
|
"aria-label": "Close search",
|
|
1117
|
-
children: /* @__PURE__ */
|
|
1153
|
+
children: /* @__PURE__ */ jsx8(X, { className: "size-4" })
|
|
1118
1154
|
}
|
|
1119
1155
|
)
|
|
1120
1156
|
]
|
|
@@ -1125,24 +1161,86 @@ function MainRegion({
|
|
|
1125
1161
|
className,
|
|
1126
1162
|
...props
|
|
1127
1163
|
}) {
|
|
1128
|
-
return /* @__PURE__ */
|
|
1164
|
+
return /* @__PURE__ */ jsx8(
|
|
1129
1165
|
"div",
|
|
1130
1166
|
{
|
|
1131
1167
|
"data-slot": "main-region",
|
|
1132
1168
|
className: cn(
|
|
1133
1169
|
"flex min-h-svh min-w-0 w-full flex-1 flex-col transition-[padding] duration-200 ease-linear",
|
|
1134
1170
|
"group-data-[sidebar-side=left]/shell:lg:pl-[var(--ds-app-sidebar-width)] group-data-[sidebar-side=right]/shell:lg:pr-[var(--ds-app-sidebar-width)]",
|
|
1171
|
+
"group-data-[header-layout=integrated]/shell:pt-[var(--ds-topbar-height)]",
|
|
1172
|
+
className
|
|
1173
|
+
),
|
|
1174
|
+
...props
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
function AppHeader({
|
|
1179
|
+
className,
|
|
1180
|
+
...props
|
|
1181
|
+
}) {
|
|
1182
|
+
return /* @__PURE__ */ jsx8(
|
|
1183
|
+
"header",
|
|
1184
|
+
{
|
|
1185
|
+
"data-slot": "app-header",
|
|
1186
|
+
className: cn(
|
|
1187
|
+
"fixed inset-x-0 top-0 z-30 flex h-[var(--ds-topbar-height)] min-h-[var(--ds-topbar-height)] items-center gap-2 border-b border-border-subtle bg-canvas/96 px-[var(--ds-topbar-padding-x)] backdrop-blur supports-[backdrop-filter]:bg-canvas/88 md:gap-3 md:px-[var(--ds-topbar-padding-x-wide)]",
|
|
1135
1188
|
className
|
|
1136
1189
|
),
|
|
1137
1190
|
...props
|
|
1138
1191
|
}
|
|
1139
1192
|
);
|
|
1140
1193
|
}
|
|
1194
|
+
function AppHeaderStart({
|
|
1195
|
+
className,
|
|
1196
|
+
...props
|
|
1197
|
+
}) {
|
|
1198
|
+
return /* @__PURE__ */ jsx8(
|
|
1199
|
+
"div",
|
|
1200
|
+
{
|
|
1201
|
+
"data-slot": "app-header-start",
|
|
1202
|
+
className: cn("flex min-w-0 flex-1 items-center gap-2", className),
|
|
1203
|
+
...props
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
}
|
|
1207
|
+
function AppHeaderSearch({
|
|
1208
|
+
mobileTrigger,
|
|
1209
|
+
children,
|
|
1210
|
+
className,
|
|
1211
|
+
...props
|
|
1212
|
+
}) {
|
|
1213
|
+
return /* @__PURE__ */ jsxs7(
|
|
1214
|
+
"div",
|
|
1215
|
+
{
|
|
1216
|
+
"data-slot": "app-header-search",
|
|
1217
|
+
className: cn("ml-auto flex shrink-0 items-center", className),
|
|
1218
|
+
...props,
|
|
1219
|
+
children: [
|
|
1220
|
+
/* @__PURE__ */ jsx8("div", { className: "hidden w-[min(22rem,32vw)] md:block", children }),
|
|
1221
|
+
/* @__PURE__ */ jsx8("div", { className: "md:hidden", children: mobileTrigger })
|
|
1222
|
+
]
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
function AppHeaderActions({
|
|
1227
|
+
className,
|
|
1228
|
+
...props
|
|
1229
|
+
}) {
|
|
1230
|
+
return /* @__PURE__ */ jsx8(
|
|
1231
|
+
"div",
|
|
1232
|
+
{
|
|
1233
|
+
"data-slot": "app-header-actions",
|
|
1234
|
+
className: cn("flex shrink-0 items-center gap-1", className),
|
|
1235
|
+
...props
|
|
1236
|
+
}
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1141
1239
|
function TopBar({
|
|
1142
1240
|
className,
|
|
1143
1241
|
...props
|
|
1144
1242
|
}) {
|
|
1145
|
-
return /* @__PURE__ */
|
|
1243
|
+
return /* @__PURE__ */ jsx8(
|
|
1146
1244
|
"header",
|
|
1147
1245
|
{
|
|
1148
1246
|
"data-slot": "top-bar",
|
|
@@ -1160,7 +1258,7 @@ function PageFrame({
|
|
|
1160
1258
|
className,
|
|
1161
1259
|
...props
|
|
1162
1260
|
}) {
|
|
1163
|
-
return /* @__PURE__ */
|
|
1261
|
+
return /* @__PURE__ */ jsx8(
|
|
1164
1262
|
"main",
|
|
1165
1263
|
{
|
|
1166
1264
|
"data-slot": "page-frame",
|
|
@@ -1180,7 +1278,7 @@ function PageContent({
|
|
|
1180
1278
|
className,
|
|
1181
1279
|
...props
|
|
1182
1280
|
}) {
|
|
1183
|
-
return /* @__PURE__ */
|
|
1281
|
+
return /* @__PURE__ */ jsx8(
|
|
1184
1282
|
"div",
|
|
1185
1283
|
{
|
|
1186
1284
|
"data-slot": "page-content",
|
|
@@ -1193,7 +1291,7 @@ function PageBoundary({
|
|
|
1193
1291
|
className,
|
|
1194
1292
|
...props
|
|
1195
1293
|
}) {
|
|
1196
|
-
return /* @__PURE__ */
|
|
1294
|
+
return /* @__PURE__ */ jsx8(
|
|
1197
1295
|
"div",
|
|
1198
1296
|
{
|
|
1199
1297
|
"data-slot": "page-boundary",
|
|
@@ -1209,7 +1307,7 @@ function InspectorRegion({
|
|
|
1209
1307
|
className,
|
|
1210
1308
|
...props
|
|
1211
1309
|
}) {
|
|
1212
|
-
return /* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ jsx8(
|
|
1213
1311
|
"aside",
|
|
1214
1312
|
{
|
|
1215
1313
|
"data-slot": "inspector-region",
|
|
@@ -1223,25 +1321,85 @@ function InspectorRegion({
|
|
|
1223
1321
|
}
|
|
1224
1322
|
|
|
1225
1323
|
// src/patterns/activity-list.tsx
|
|
1226
|
-
import { jsx as
|
|
1324
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1227
1325
|
function ActivityList({ className, ...props }) {
|
|
1228
|
-
return /* @__PURE__ */
|
|
1229
|
-
}
|
|
1230
|
-
function ActivityItem({
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1326
|
+
return /* @__PURE__ */ jsx9("div", { "data-slot": "activity-list", className: cn("divide-y divide-border-subtle", className), ...props });
|
|
1327
|
+
}
|
|
1328
|
+
function ActivityItem({
|
|
1329
|
+
leading,
|
|
1330
|
+
icon,
|
|
1331
|
+
title,
|
|
1332
|
+
description,
|
|
1333
|
+
metadata,
|
|
1334
|
+
trailing,
|
|
1335
|
+
status,
|
|
1336
|
+
layout = "standard",
|
|
1337
|
+
className,
|
|
1338
|
+
...props
|
|
1339
|
+
}) {
|
|
1340
|
+
const hasLeading = leading !== void 0 || icon !== void 0;
|
|
1341
|
+
const resolvedTrailing = trailing ?? status;
|
|
1342
|
+
return /* @__PURE__ */ jsxs8(
|
|
1343
|
+
"div",
|
|
1344
|
+
{
|
|
1345
|
+
"data-slot": "activity-item",
|
|
1346
|
+
"data-layout": layout,
|
|
1347
|
+
className: cn(
|
|
1348
|
+
"grid gap-3 py-3",
|
|
1349
|
+
hasLeading && resolvedTrailing && "grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
1350
|
+
hasLeading && !resolvedTrailing && "grid-cols-[auto_minmax(0,1fr)]",
|
|
1351
|
+
!hasLeading && resolvedTrailing && "grid-cols-[minmax(0,1fr)_auto]",
|
|
1352
|
+
!hasLeading && !resolvedTrailing && "grid-cols-1",
|
|
1353
|
+
layout === "compact" && "py-2",
|
|
1354
|
+
className
|
|
1355
|
+
),
|
|
1356
|
+
...props,
|
|
1357
|
+
children: [
|
|
1358
|
+
leading !== void 0 ? /* @__PURE__ */ jsx9("div", { "data-slot": "activity-item-leading", className: "shrink-0", children: leading }) : icon !== void 0 ? /* @__PURE__ */ jsx9("div", { "data-slot": "activity-item-leading", className: "flex size-8 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-4", children: icon }) : null,
|
|
1359
|
+
/* @__PURE__ */ jsxs8("div", { className: "min-w-0", children: [
|
|
1360
|
+
/* @__PURE__ */ jsx9("div", { className: "ds-type-ui font-medium text-text-primary", children: title }),
|
|
1361
|
+
description ? /* @__PURE__ */ jsx9("div", { className: "ds-type-ui mt-0.5 text-text-supporting", children: description }) : null,
|
|
1362
|
+
metadata ? /* @__PURE__ */ jsx9("div", { className: "ds-type-metadata mt-1 text-text-supporting", children: metadata }) : null
|
|
1363
|
+
] }),
|
|
1364
|
+
resolvedTrailing ? /* @__PURE__ */ jsx9("div", { "data-slot": "activity-item-trailing", className: "shrink-0", children: resolvedTrailing }) : null
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
// src/patterns/attention-list.tsx
|
|
1371
|
+
import { CheckCircle2, CircleAlert, CircleX, Info } from "lucide-react";
|
|
1372
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1373
|
+
function AttentionList({ className, ...props }) {
|
|
1374
|
+
return /* @__PURE__ */ jsx10("ul", { "data-slot": "attention-list", className: cn("grid gap-2", className), ...props });
|
|
1375
|
+
}
|
|
1376
|
+
var toneClasses = {
|
|
1377
|
+
neutral: "border-neutral-border bg-neutral-background text-neutral-foreground",
|
|
1378
|
+
information: "border-information-border bg-information-background text-information-foreground",
|
|
1379
|
+
success: "border-success-border bg-success-background text-success-foreground",
|
|
1380
|
+
warning: "border-warning-border bg-warning-background text-warning-foreground",
|
|
1381
|
+
danger: "border-danger-border bg-danger-background text-danger-foreground"
|
|
1382
|
+
};
|
|
1383
|
+
function AttentionItem({ title, description, metadata, action, tone = "neutral", severityLabel = `${tone[0].toUpperCase()}${tone.slice(1)}`, icon, className, ...props }) {
|
|
1384
|
+
const Icon = tone === "danger" ? CircleX : tone === "warning" ? CircleAlert : tone === "success" ? CheckCircle2 : Info;
|
|
1385
|
+
return /* @__PURE__ */ jsxs9("li", { "data-slot": "attention-item", "data-tone": tone, className: cn("grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-3 rounded-[var(--ds-radius-control)] border px-3 py-2.5", toneClasses[tone], className), ...props, children: [
|
|
1386
|
+
/* @__PURE__ */ jsx10("span", { className: "mt-0.5 [&>svg]:size-4", "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx10(Icon, {}) }),
|
|
1387
|
+
/* @__PURE__ */ jsxs9("div", { className: "min-w-0", children: [
|
|
1388
|
+
/* @__PURE__ */ jsxs9("span", { className: "sr-only", children: [
|
|
1389
|
+
severityLabel,
|
|
1390
|
+
": "
|
|
1391
|
+
] }),
|
|
1392
|
+
/* @__PURE__ */ jsx10("div", { className: "ds-type-ui font-medium", children: title }),
|
|
1393
|
+
description ? /* @__PURE__ */ jsx10("div", { className: "ds-type-metadata mt-0.5 opacity-85", children: description }) : null,
|
|
1394
|
+
metadata ? /* @__PURE__ */ jsx10("div", { className: "ds-type-metadata mt-1 opacity-85", children: metadata }) : null
|
|
1237
1395
|
] }),
|
|
1238
|
-
|
|
1396
|
+
action ? /* @__PURE__ */ jsx10("div", { className: "shrink-0", children: action }) : null
|
|
1239
1397
|
] });
|
|
1240
1398
|
}
|
|
1241
1399
|
|
|
1242
1400
|
// src/patterns/confirmation-dialog.tsx
|
|
1243
1401
|
import * as React4 from "react";
|
|
1244
|
-
import { jsx as
|
|
1402
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1245
1403
|
function ConfirmationDialog({ trigger, title, description, children, confirmLabel = "Confirm", cancelLabel = "Cancel", confirmVariant = "destructive", pending = false, onConfirm, onError }) {
|
|
1246
1404
|
const [open, setOpen] = React4.useState(false);
|
|
1247
1405
|
const [confirming, setConfirming] = React4.useState(false);
|
|
@@ -1260,17 +1418,17 @@ function ConfirmationDialog({ trigger, title, description, children, confirmLabe
|
|
|
1260
1418
|
setConfirming(false);
|
|
1261
1419
|
}
|
|
1262
1420
|
}
|
|
1263
|
-
return /* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsxs10(AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
1422
|
+
/* @__PURE__ */ jsx11(AlertDialogTrigger, { render: trigger, children: trigger }),
|
|
1423
|
+
/* @__PURE__ */ jsxs10(AlertDialogContent, { children: [
|
|
1424
|
+
/* @__PURE__ */ jsxs10(AlertDialogHeader, { children: [
|
|
1425
|
+
/* @__PURE__ */ jsx11(AlertDialogTitle, { children: title }),
|
|
1426
|
+
/* @__PURE__ */ jsx11(AlertDialogDescription, { children: description })
|
|
1269
1427
|
] }),
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ jsx11(AlertDialogBody, { children }),
|
|
1429
|
+
/* @__PURE__ */ jsxs10(AlertDialogFooter, { children: [
|
|
1430
|
+
/* @__PURE__ */ jsx11(AlertDialogCancel, { render: /* @__PURE__ */ jsx11(Button, { type: "button", variant: "outline", disabled: isPending }), children: cancelLabel }),
|
|
1431
|
+
/* @__PURE__ */ jsx11(AlertDialogAction, { render: /* @__PURE__ */ jsx11(Button, { type: "button", variant: confirmVariant, disabled: isPending, onClick: confirm }), children: isPending ? "Working..." : confirmLabel })
|
|
1274
1432
|
] })
|
|
1275
1433
|
] })
|
|
1276
1434
|
] });
|
|
@@ -1279,7 +1437,7 @@ function ConfirmationDialog({ trigger, title, description, children, confirmLabe
|
|
|
1279
1437
|
// src/patterns/code-block.tsx
|
|
1280
1438
|
import * as React5 from "react";
|
|
1281
1439
|
import { Check, Copy } from "lucide-react";
|
|
1282
|
-
import { jsx as
|
|
1440
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1283
1441
|
function CodeBlock({
|
|
1284
1442
|
snippets,
|
|
1285
1443
|
defaultValue,
|
|
@@ -1294,16 +1452,16 @@ function CodeBlock({
|
|
|
1294
1452
|
const copyStatusId = React5.useId();
|
|
1295
1453
|
const activeSnippet = snippets.find((snippet) => snippet.value === activeValue) ?? snippets[0];
|
|
1296
1454
|
if (!activeSnippet) return null;
|
|
1297
|
-
return /* @__PURE__ */
|
|
1455
|
+
return /* @__PURE__ */ jsx12(
|
|
1298
1456
|
"div",
|
|
1299
1457
|
{
|
|
1300
1458
|
"data-slot": "code-block",
|
|
1301
1459
|
className: cn("overflow-hidden rounded-lg border border-border-subtle bg-surface", className),
|
|
1302
1460
|
...props,
|
|
1303
|
-
children: /* @__PURE__ */
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
/* @__PURE__ */
|
|
1461
|
+
children: /* @__PURE__ */ jsxs11(Tabs, { value: activeSnippet.value, onValueChange: setActiveValue, variant: "segmented", className: "gap-0", children: [
|
|
1462
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-3 border-b border-border-subtle bg-surface-muted px-3 py-2", children: [
|
|
1463
|
+
/* @__PURE__ */ jsx12(TabsList, { variant: "segmented", size: "compact", "aria-label": "Code language", children: snippets.map((snippet) => /* @__PURE__ */ jsx12(TabsTrigger, { value: snippet.value, children: snippet.label }, snippet.value)) }),
|
|
1464
|
+
/* @__PURE__ */ jsxs11(
|
|
1307
1465
|
Button,
|
|
1308
1466
|
{
|
|
1309
1467
|
type: "button",
|
|
@@ -1321,23 +1479,31 @@ function CodeBlock({
|
|
|
1321
1479
|
},
|
|
1322
1480
|
"aria-describedby": copyStatusId,
|
|
1323
1481
|
children: [
|
|
1324
|
-
copiedValue === activeSnippet.value ? /* @__PURE__ */
|
|
1482
|
+
copiedValue === activeSnippet.value ? /* @__PURE__ */ jsx12(Check, {}) : /* @__PURE__ */ jsx12(Copy, {}),
|
|
1325
1483
|
copiedValue === activeSnippet.value ? "Copied" : copyLabel
|
|
1326
1484
|
]
|
|
1327
1485
|
}
|
|
1328
1486
|
),
|
|
1329
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ jsx12("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." : "" })
|
|
1330
1488
|
] }),
|
|
1331
|
-
snippets.map((snippet) => /* @__PURE__ */
|
|
1489
|
+
snippets.map((snippet) => /* @__PURE__ */ jsx12(TabsContent, { value: snippet.value, className: "m-0", children: /* @__PURE__ */ jsx12(
|
|
1490
|
+
"pre",
|
|
1491
|
+
{
|
|
1492
|
+
"aria-label": `${snippet.label} code example`,
|
|
1493
|
+
tabIndex: 0,
|
|
1494
|
+
className: "max-h-[32rem] overflow-auto p-4 text-sm leading-6 outline-none focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-focus/50",
|
|
1495
|
+
children: /* @__PURE__ */ jsx12("code", { children: snippet.code })
|
|
1496
|
+
}
|
|
1497
|
+
) }, snippet.value))
|
|
1332
1498
|
] })
|
|
1333
1499
|
}
|
|
1334
1500
|
);
|
|
1335
1501
|
}
|
|
1336
1502
|
|
|
1337
1503
|
// src/patterns/inventory-surface.tsx
|
|
1338
|
-
import { jsx as
|
|
1504
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1339
1505
|
function InventorySurface({ className, ...props }) {
|
|
1340
|
-
return /* @__PURE__ */
|
|
1506
|
+
return /* @__PURE__ */ jsx13(
|
|
1341
1507
|
Card,
|
|
1342
1508
|
{
|
|
1343
1509
|
"data-slot": "inventory-surface",
|
|
@@ -1347,16 +1513,16 @@ function InventorySurface({ className, ...props }) {
|
|
|
1347
1513
|
);
|
|
1348
1514
|
}
|
|
1349
1515
|
function InventoryDesktop({ className, ...props }) {
|
|
1350
|
-
return /* @__PURE__ */
|
|
1516
|
+
return /* @__PURE__ */ jsx13("div", { "data-slot": "inventory-desktop", className: cn("hidden lg:block", className), ...props });
|
|
1351
1517
|
}
|
|
1352
1518
|
function InventoryMobile({ className, ...props }) {
|
|
1353
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ jsx13("div", { "data-slot": "inventory-mobile", className: cn("divide-y divide-border-subtle lg:hidden", className), ...props });
|
|
1354
1520
|
}
|
|
1355
1521
|
|
|
1356
1522
|
// src/patterns/metric-band.tsx
|
|
1357
|
-
import { jsx as
|
|
1523
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1358
1524
|
function MetricBand({ columns = 4, className, ...props }) {
|
|
1359
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ jsx14(
|
|
1360
1526
|
"div",
|
|
1361
1527
|
{
|
|
1362
1528
|
"data-slot": "metric-band",
|
|
@@ -1383,7 +1549,7 @@ function MetricBandItem({
|
|
|
1383
1549
|
className,
|
|
1384
1550
|
...props
|
|
1385
1551
|
}) {
|
|
1386
|
-
return /* @__PURE__ */
|
|
1552
|
+
return /* @__PURE__ */ jsxs12(
|
|
1387
1553
|
"div",
|
|
1388
1554
|
{
|
|
1389
1555
|
"data-slot": "metric-band-item",
|
|
@@ -1394,7 +1560,7 @@ function MetricBandItem({
|
|
|
1394
1560
|
),
|
|
1395
1561
|
...props,
|
|
1396
1562
|
children: [
|
|
1397
|
-
icon ? /* @__PURE__ */
|
|
1563
|
+
icon ? /* @__PURE__ */ jsx14(
|
|
1398
1564
|
"div",
|
|
1399
1565
|
{
|
|
1400
1566
|
className: cn(
|
|
@@ -1404,18 +1570,104 @@ function MetricBandItem({
|
|
|
1404
1570
|
children: icon
|
|
1405
1571
|
}
|
|
1406
1572
|
) : null,
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
/* @__PURE__ */
|
|
1409
|
-
loading ? /* @__PURE__ */
|
|
1410
|
-
detail ? /* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsxs12("div", { className: "grid min-w-0 gap-1", children: [
|
|
1574
|
+
/* @__PURE__ */ jsx14("div", { className: "ds-type-ui text-text-supporting", children: label }),
|
|
1575
|
+
loading ? /* @__PURE__ */ jsx14(Skeleton, { className: "h-7 w-14" }) : /* @__PURE__ */ jsx14("div", { className: "text-2xl font-semibold tracking-tight", children: value ?? 0 }),
|
|
1576
|
+
detail ? /* @__PURE__ */ jsx14("div", { className: "ds-type-metadata text-text-supporting", children: detail }) : null
|
|
1411
1577
|
] })
|
|
1412
1578
|
]
|
|
1413
1579
|
}
|
|
1414
1580
|
);
|
|
1415
1581
|
}
|
|
1416
1582
|
|
|
1583
|
+
// src/patterns/metric-card.tsx
|
|
1584
|
+
import * as React6 from "react";
|
|
1585
|
+
import { ArrowDown as ArrowDown2, ArrowUp as ArrowUp2, Minus } from "lucide-react";
|
|
1586
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1587
|
+
function MetricTrend({
|
|
1588
|
+
direction,
|
|
1589
|
+
sentiment = "neutral",
|
|
1590
|
+
value,
|
|
1591
|
+
accessibleLabel,
|
|
1592
|
+
className,
|
|
1593
|
+
...props
|
|
1594
|
+
}) {
|
|
1595
|
+
const Icon = direction === "up" ? ArrowUp2 : direction === "down" ? ArrowDown2 : Minus;
|
|
1596
|
+
return /* @__PURE__ */ jsxs13(
|
|
1597
|
+
"span",
|
|
1598
|
+
{
|
|
1599
|
+
"data-slot": "metric-trend",
|
|
1600
|
+
"data-direction": direction,
|
|
1601
|
+
"data-sentiment": sentiment,
|
|
1602
|
+
role: "img",
|
|
1603
|
+
"aria-label": accessibleLabel,
|
|
1604
|
+
className: cn(
|
|
1605
|
+
"inline-flex items-center gap-1 ds-type-metadata font-medium text-trend-neutral",
|
|
1606
|
+
sentiment === "positive" && "text-trend-positive",
|
|
1607
|
+
sentiment === "negative" && "text-trend-negative",
|
|
1608
|
+
className
|
|
1609
|
+
),
|
|
1610
|
+
...props,
|
|
1611
|
+
children: [
|
|
1612
|
+
/* @__PURE__ */ jsx15(Icon, { "aria-hidden": "true", className: "size-3.5 stroke-[2]" }),
|
|
1613
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: value })
|
|
1614
|
+
]
|
|
1615
|
+
}
|
|
1616
|
+
);
|
|
1617
|
+
}
|
|
1618
|
+
function MetricCard({
|
|
1619
|
+
label,
|
|
1620
|
+
description,
|
|
1621
|
+
value,
|
|
1622
|
+
unit,
|
|
1623
|
+
trend,
|
|
1624
|
+
status,
|
|
1625
|
+
emphasis = "supporting",
|
|
1626
|
+
loading = false,
|
|
1627
|
+
visualization,
|
|
1628
|
+
visualizationSummary,
|
|
1629
|
+
className,
|
|
1630
|
+
...props
|
|
1631
|
+
}) {
|
|
1632
|
+
const labelId = React6.useId();
|
|
1633
|
+
return /* @__PURE__ */ jsxs13(
|
|
1634
|
+
"section",
|
|
1635
|
+
{
|
|
1636
|
+
"data-slot": "metric-card",
|
|
1637
|
+
"data-emphasis": emphasis,
|
|
1638
|
+
"aria-labelledby": labelId,
|
|
1639
|
+
className: cn(
|
|
1640
|
+
"flex min-w-0 flex-col overflow-hidden rounded-[var(--ds-radius-surface)] border border-border-default bg-surface text-text-primary shadow-[var(--ds-shadow-raised)]",
|
|
1641
|
+
emphasis === "primary" ? "min-h-80" : "min-h-40",
|
|
1642
|
+
className
|
|
1643
|
+
),
|
|
1644
|
+
...props,
|
|
1645
|
+
children: [
|
|
1646
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-start justify-between gap-4 px-[var(--ds-surface-padding)] pt-[var(--ds-surface-padding)]", children: [
|
|
1647
|
+
/* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
|
|
1648
|
+
/* @__PURE__ */ jsx15("h2", { id: labelId, className: "ds-type-card-title", children: label }),
|
|
1649
|
+
description ? /* @__PURE__ */ jsx15("p", { className: "ds-type-metadata mt-0.5 text-text-supporting", children: description }) : null
|
|
1650
|
+
] }),
|
|
1651
|
+
status ? /* @__PURE__ */ jsx15("div", { className: "shrink-0", children: status }) : null
|
|
1652
|
+
] }),
|
|
1653
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1 px-[var(--ds-surface-padding)] pt-3", children: [
|
|
1654
|
+
loading ? /* @__PURE__ */ jsx15(Skeleton, { className: cn("h-8", emphasis === "primary" ? "w-24" : "w-16") }) : /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
1655
|
+
/* @__PURE__ */ jsx15("span", { className: cn("font-semibold tabular-nums tracking-tight", emphasis === "primary" ? "text-4xl" : "text-2xl"), children: value ?? 0 }),
|
|
1656
|
+
unit ? /* @__PURE__ */ jsx15("span", { className: "ds-type-ui text-text-supporting", children: unit }) : null
|
|
1657
|
+
] }),
|
|
1658
|
+
trend ? /* @__PURE__ */ jsx15("div", { className: "ml-1", children: trend }) : null
|
|
1659
|
+
] }),
|
|
1660
|
+
visualization ? /* @__PURE__ */ jsxs13("figure", { className: "mt-auto min-h-0 flex-1 pt-4", children: [
|
|
1661
|
+
/* @__PURE__ */ jsx15("div", { "data-slot": "metric-card-visualization", className: "h-full min-h-20 w-full", children: visualization }),
|
|
1662
|
+
/* @__PURE__ */ jsx15("figcaption", { className: "sr-only", children: visualizationSummary })
|
|
1663
|
+
] }) : null
|
|
1664
|
+
]
|
|
1665
|
+
}
|
|
1666
|
+
);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1417
1669
|
// src/patterns/page-header.tsx
|
|
1418
|
-
import { jsx as
|
|
1670
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1419
1671
|
function PageHeader({
|
|
1420
1672
|
title,
|
|
1421
1673
|
description,
|
|
@@ -1427,7 +1679,7 @@ function PageHeader({
|
|
|
1427
1679
|
className,
|
|
1428
1680
|
...props
|
|
1429
1681
|
}) {
|
|
1430
|
-
const resolvedActions = actions ?? actionNode ?? (action ? /* @__PURE__ */
|
|
1682
|
+
const resolvedActions = actions ?? actionNode ?? (action ? /* @__PURE__ */ jsx16(
|
|
1431
1683
|
"a",
|
|
1432
1684
|
{
|
|
1433
1685
|
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",
|
|
@@ -1435,29 +1687,29 @@ function PageHeader({
|
|
|
1435
1687
|
children: action.label
|
|
1436
1688
|
}
|
|
1437
1689
|
) : null);
|
|
1438
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ jsxs14(
|
|
1439
1691
|
"header",
|
|
1440
1692
|
{
|
|
1441
1693
|
"data-slot": "page-header",
|
|
1442
1694
|
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),
|
|
1443
1695
|
...props,
|
|
1444
1696
|
children: [
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */
|
|
1697
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0", children: [
|
|
1698
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
1699
|
+
/* @__PURE__ */ jsx16("h1", { className: "ds-type-page-title truncate", children: title }),
|
|
1448
1700
|
status
|
|
1449
1701
|
] }),
|
|
1450
|
-
description ? /* @__PURE__ */
|
|
1451
|
-
metadata ? /* @__PURE__ */
|
|
1702
|
+
description ? /* @__PURE__ */ jsx16("p", { className: "ds-type-ui mt-1 max-w-3xl text-text-supporting", children: description }) : null,
|
|
1703
|
+
metadata ? /* @__PURE__ */ jsx16("div", { className: "ds-type-metadata mt-2 text-text-supporting", children: metadata }) : null
|
|
1452
1704
|
] }),
|
|
1453
|
-
resolvedActions ? /* @__PURE__ */
|
|
1705
|
+
resolvedActions ? /* @__PURE__ */ jsx16("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: resolvedActions }) : null
|
|
1454
1706
|
]
|
|
1455
1707
|
}
|
|
1456
1708
|
);
|
|
1457
1709
|
}
|
|
1458
1710
|
|
|
1459
1711
|
// src/patterns/page-toolbar.tsx
|
|
1460
|
-
import { jsx as
|
|
1712
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1461
1713
|
function PageToolbar({
|
|
1462
1714
|
search,
|
|
1463
1715
|
filters,
|
|
@@ -1467,19 +1719,19 @@ function PageToolbar({
|
|
|
1467
1719
|
children,
|
|
1468
1720
|
...props
|
|
1469
1721
|
}) {
|
|
1470
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ jsxs15(
|
|
1471
1723
|
"div",
|
|
1472
1724
|
{
|
|
1473
1725
|
"data-slot": "page-toolbar",
|
|
1474
1726
|
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),
|
|
1475
1727
|
...props,
|
|
1476
1728
|
children: [
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
search ? /* @__PURE__ */
|
|
1479
|
-
filters ? /* @__PURE__ */
|
|
1729
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center", children: [
|
|
1730
|
+
search ? /* @__PURE__ */ jsx17("div", { className: "min-w-0 flex-1 sm:min-w-48 sm:max-w-sm", children: search }) : null,
|
|
1731
|
+
filters ? /* @__PURE__ */ jsx17("div", { className: "flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:flex-wrap sm:items-center", children: filters }) : null
|
|
1480
1732
|
] }),
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
bulkActions ? /* @__PURE__ */
|
|
1733
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex min-h-[var(--ds-control-height)] flex-wrap items-center gap-2 lg:justify-end", children: [
|
|
1734
|
+
bulkActions ? /* @__PURE__ */ jsx17("div", { "data-slot": "page-toolbar-bulk-actions", className: "contents", children: bulkActions }) : null,
|
|
1483
1735
|
viewControls,
|
|
1484
1736
|
children
|
|
1485
1737
|
] })
|
|
@@ -1489,8 +1741,8 @@ function PageToolbar({
|
|
|
1489
1741
|
}
|
|
1490
1742
|
|
|
1491
1743
|
// src/patterns/preference-controls.tsx
|
|
1492
|
-
import * as
|
|
1493
|
-
import { jsx as
|
|
1744
|
+
import * as React7 from "react";
|
|
1745
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1494
1746
|
var APPEARANCE_KEY = "conscia-appearance:v1";
|
|
1495
1747
|
var DENSITY_KEY = "conscia-density:v1";
|
|
1496
1748
|
var PREFERENCE_EVENT = "conscia-preferences";
|
|
@@ -1516,7 +1768,7 @@ function writePreference(key, value) {
|
|
|
1516
1768
|
window.dispatchEvent(new Event(PREFERENCE_EVENT));
|
|
1517
1769
|
}
|
|
1518
1770
|
function useStoredPreference(key, fallback, allowedValues) {
|
|
1519
|
-
return
|
|
1771
|
+
return React7.useSyncExternalStore(
|
|
1520
1772
|
(onStoreChange) => {
|
|
1521
1773
|
window.addEventListener("storage", onStoreChange);
|
|
1522
1774
|
window.addEventListener(PREFERENCE_EVENT, onStoreChange);
|
|
@@ -1544,7 +1796,7 @@ function useConsciaPreferences() {
|
|
|
1544
1796
|
}
|
|
1545
1797
|
function DesignSystemPreferenceSync() {
|
|
1546
1798
|
const { appearance, density } = useConsciaPreferences();
|
|
1547
|
-
|
|
1799
|
+
React7.useEffect(() => {
|
|
1548
1800
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1549
1801
|
const sync = () => applyConsciaPreferences(
|
|
1550
1802
|
document.documentElement,
|
|
@@ -1560,7 +1812,7 @@ function DesignSystemPreferenceSync() {
|
|
|
1560
1812
|
}
|
|
1561
1813
|
function AppearanceControl({ className }) {
|
|
1562
1814
|
const { appearance } = useConsciaPreferences();
|
|
1563
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ jsx18(
|
|
1564
1816
|
SegmentedControl,
|
|
1565
1817
|
{
|
|
1566
1818
|
className,
|
|
@@ -1573,7 +1825,7 @@ function AppearanceControl({ className }) {
|
|
|
1573
1825
|
}
|
|
1574
1826
|
function DensityControl({ className }) {
|
|
1575
1827
|
const { density } = useConsciaPreferences();
|
|
1576
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ jsx18(
|
|
1577
1829
|
SegmentedControl,
|
|
1578
1830
|
{
|
|
1579
1831
|
className,
|
|
@@ -1585,9 +1837,9 @@ function DensityControl({ className }) {
|
|
|
1585
1837
|
);
|
|
1586
1838
|
}
|
|
1587
1839
|
function DesignPreferenceControls({ className }) {
|
|
1588
|
-
return /* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn("flex flex-col gap-3 text-sm", className), children: [
|
|
1841
|
+
/* @__PURE__ */ jsx18(AppearanceControl, {}),
|
|
1842
|
+
/* @__PURE__ */ jsx18(DensityControl, {})
|
|
1591
1843
|
] });
|
|
1592
1844
|
}
|
|
1593
1845
|
function SegmentedControl({
|
|
@@ -1597,16 +1849,16 @@ function SegmentedControl({
|
|
|
1597
1849
|
values,
|
|
1598
1850
|
onChange
|
|
1599
1851
|
}) {
|
|
1600
|
-
return /* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1852
|
+
return /* @__PURE__ */ jsxs16("fieldset", { className: cn("flex flex-col gap-2", className), children: [
|
|
1853
|
+
/* @__PURE__ */ jsx18("legend", { className: "text-[var(--ds-metadata)] font-medium text-text-supporting", children: label }),
|
|
1854
|
+
/* @__PURE__ */ jsx18("div", { className: "grid w-full grid-cols-3 rounded-[var(--ds-radius-control)] bg-surface-muted p-1", children: values.map((item) => /* @__PURE__ */ jsx18(
|
|
1603
1855
|
"button",
|
|
1604
1856
|
{
|
|
1605
1857
|
type: "button",
|
|
1606
1858
|
"aria-pressed": value === item,
|
|
1607
1859
|
suppressHydrationWarning: true,
|
|
1608
1860
|
onClick: () => onChange(item),
|
|
1609
|
-
className: "h-7 rounded-[calc(var(--ds-radius-control)-2px)] px-
|
|
1861
|
+
className: "min-w-0 h-7 rounded-[calc(var(--ds-radius-control)-2px)] px-1.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",
|
|
1610
1862
|
children: item
|
|
1611
1863
|
},
|
|
1612
1864
|
item
|
|
@@ -1615,10 +1867,10 @@ function SegmentedControl({
|
|
|
1615
1867
|
}
|
|
1616
1868
|
|
|
1617
1869
|
// src/patterns/provider-mark.tsx
|
|
1618
|
-
import { jsx as
|
|
1870
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1619
1871
|
function ProviderMark({ name, shortName, description, size = "default", className, ...props }) {
|
|
1620
|
-
return /* @__PURE__ */
|
|
1621
|
-
/* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ jsxs17("div", { "data-slot": "provider-mark", className: cn("flex min-w-0 items-center gap-3", className), ...props, children: [
|
|
1873
|
+
/* @__PURE__ */ jsx19(
|
|
1622
1874
|
"div",
|
|
1623
1875
|
{
|
|
1624
1876
|
"aria-hidden": "true",
|
|
@@ -1629,15 +1881,15 @@ function ProviderMark({ name, shortName, description, size = "default", classNam
|
|
|
1629
1881
|
children: shortName
|
|
1630
1882
|
}
|
|
1631
1883
|
),
|
|
1632
|
-
/* @__PURE__ */
|
|
1633
|
-
/* @__PURE__ */
|
|
1634
|
-
description ? /* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
|
|
1885
|
+
/* @__PURE__ */ jsx19("div", { className: "ds-type-ui truncate font-medium text-text-primary", children: name }),
|
|
1886
|
+
description ? /* @__PURE__ */ jsx19("div", { className: "ds-type-metadata mt-0.5 truncate text-text-supporting", children: description }) : null
|
|
1635
1887
|
] })
|
|
1636
1888
|
] });
|
|
1637
1889
|
}
|
|
1638
1890
|
|
|
1639
1891
|
// src/patterns/resource-detail.tsx
|
|
1640
|
-
import { jsx as
|
|
1892
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1641
1893
|
function ResourceSummary({
|
|
1642
1894
|
variant = "plain",
|
|
1643
1895
|
title,
|
|
@@ -1649,7 +1901,7 @@ function ResourceSummary({
|
|
|
1649
1901
|
children,
|
|
1650
1902
|
...props
|
|
1651
1903
|
}) {
|
|
1652
|
-
return /* @__PURE__ */
|
|
1904
|
+
return /* @__PURE__ */ jsxs18(
|
|
1653
1905
|
"section",
|
|
1654
1906
|
{
|
|
1655
1907
|
"data-slot": "resource-summary",
|
|
@@ -1661,18 +1913,18 @@ function ResourceSummary({
|
|
|
1661
1913
|
),
|
|
1662
1914
|
...props,
|
|
1663
1915
|
children: [
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
title || status ? /* @__PURE__ */
|
|
1667
|
-
title ? /* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between", children: [
|
|
1917
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
|
|
1918
|
+
title || status ? /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
1919
|
+
title ? /* @__PURE__ */ jsx20("h2", { className: "ds-type-section-title truncate", children: title }) : null,
|
|
1668
1920
|
status
|
|
1669
1921
|
] }) : null,
|
|
1670
|
-
description ? /* @__PURE__ */
|
|
1671
|
-
metadata ? /* @__PURE__ */
|
|
1922
|
+
description ? /* @__PURE__ */ jsx20("p", { className: "ds-type-ui mt-1 max-w-3xl text-text-supporting", children: description }) : null,
|
|
1923
|
+
metadata ? /* @__PURE__ */ jsx20("div", { className: "ds-type-metadata mt-2 text-text-supporting", children: metadata }) : null
|
|
1672
1924
|
] }),
|
|
1673
|
-
actions ? /* @__PURE__ */
|
|
1925
|
+
actions ? /* @__PURE__ */ jsx20("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions }) : null
|
|
1674
1926
|
] }),
|
|
1675
|
-
children ? /* @__PURE__ */
|
|
1927
|
+
children ? /* @__PURE__ */ jsx20("div", { className: "mt-4", children }) : null
|
|
1676
1928
|
]
|
|
1677
1929
|
}
|
|
1678
1930
|
);
|
|
@@ -1681,7 +1933,7 @@ function DetailSections({
|
|
|
1681
1933
|
className,
|
|
1682
1934
|
...props
|
|
1683
1935
|
}) {
|
|
1684
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ jsx20(
|
|
1685
1937
|
"div",
|
|
1686
1938
|
{
|
|
1687
1939
|
"data-slot": "detail-sections",
|
|
@@ -1699,7 +1951,7 @@ function DetailSection({
|
|
|
1699
1951
|
children,
|
|
1700
1952
|
...props
|
|
1701
1953
|
}) {
|
|
1702
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ jsxs18(
|
|
1703
1955
|
"section",
|
|
1704
1956
|
{
|
|
1705
1957
|
"data-slot": "detail-section",
|
|
@@ -1710,14 +1962,14 @@ function DetailSection({
|
|
|
1710
1962
|
),
|
|
1711
1963
|
...props,
|
|
1712
1964
|
children: [
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1715
|
-
/* @__PURE__ */
|
|
1716
|
-
description ? /* @__PURE__ */
|
|
1965
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
1966
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
|
|
1967
|
+
/* @__PURE__ */ jsx20("h2", { className: "ds-type-section-title", children: title }),
|
|
1968
|
+
description ? /* @__PURE__ */ jsx20("p", { className: "ds-type-ui mt-1 max-w-3xl text-text-supporting", children: description }) : null
|
|
1717
1969
|
] }),
|
|
1718
|
-
actions ? /* @__PURE__ */
|
|
1970
|
+
actions ? /* @__PURE__ */ jsx20("div", { className: "flex shrink-0 items-center gap-2", children: actions }) : null
|
|
1719
1971
|
] }),
|
|
1720
|
-
children ? /* @__PURE__ */
|
|
1972
|
+
children ? /* @__PURE__ */ jsx20("div", { className: "mt-4", children }) : null
|
|
1721
1973
|
]
|
|
1722
1974
|
}
|
|
1723
1975
|
);
|
|
@@ -1726,7 +1978,7 @@ function KeyValueList({
|
|
|
1726
1978
|
className,
|
|
1727
1979
|
...props
|
|
1728
1980
|
}) {
|
|
1729
|
-
return /* @__PURE__ */
|
|
1981
|
+
return /* @__PURE__ */ jsx20(
|
|
1730
1982
|
"dl",
|
|
1731
1983
|
{
|
|
1732
1984
|
"data-slot": "key-value-list",
|
|
@@ -1740,9 +1992,9 @@ function KeyValueItem({
|
|
|
1740
1992
|
value,
|
|
1741
1993
|
breakValue = false
|
|
1742
1994
|
}) {
|
|
1743
|
-
return /* @__PURE__ */
|
|
1744
|
-
/* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1995
|
+
return /* @__PURE__ */ jsxs18("div", { "data-slot": "key-value-item", className: "flex justify-between gap-4", children: [
|
|
1996
|
+
/* @__PURE__ */ jsx20("dt", { className: "text-text-supporting", children: label }),
|
|
1997
|
+
/* @__PURE__ */ jsx20(
|
|
1746
1998
|
"dd",
|
|
1747
1999
|
{
|
|
1748
2000
|
className: cn(
|
|
@@ -1756,12 +2008,18 @@ function KeyValueItem({
|
|
|
1756
2008
|
}
|
|
1757
2009
|
|
|
1758
2010
|
// src/patterns/sidebar-navigation.tsx
|
|
1759
|
-
import * as
|
|
2011
|
+
import * as React8 from "react";
|
|
1760
2012
|
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
1761
|
-
import { Fragment as
|
|
1762
|
-
function
|
|
2013
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2014
|
+
function hasItems(entry) {
|
|
1763
2015
|
return "items" in entry;
|
|
1764
2016
|
}
|
|
2017
|
+
function isStaticGroup(entry) {
|
|
2018
|
+
return hasItems(entry) && entry.type === "group";
|
|
2019
|
+
}
|
|
2020
|
+
function isCollapsibleSection(entry) {
|
|
2021
|
+
return hasItems(entry) && entry.type !== "group";
|
|
2022
|
+
}
|
|
1765
2023
|
function getNavigationAccessibleLabel(item) {
|
|
1766
2024
|
const metadata = [item.badgeLabel, item.countLabel].filter(Boolean);
|
|
1767
2025
|
return metadata.length > 0 ? `${item.label}, ${metadata.join(", ")}` : item.label;
|
|
@@ -1773,18 +2031,26 @@ function NavigationMetadata({
|
|
|
1773
2031
|
if (badge === void 0 && count === void 0) {
|
|
1774
2032
|
return null;
|
|
1775
2033
|
}
|
|
1776
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ jsxs19(
|
|
1777
2035
|
"span",
|
|
1778
2036
|
{
|
|
1779
2037
|
"aria-hidden": "true",
|
|
1780
2038
|
className: "ml-auto flex min-w-0 shrink-0 items-center gap-1.5 text-sidebar-metadata-text",
|
|
1781
2039
|
children: [
|
|
1782
|
-
badge !== void 0 ? /* @__PURE__ */
|
|
1783
|
-
count !== void 0 ? /* @__PURE__ */
|
|
2040
|
+
badge !== void 0 ? /* @__PURE__ */ jsx21("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,
|
|
2041
|
+
count !== void 0 ? /* @__PURE__ */ jsx21("span", { className: "ds-type-metadata tabular-nums", children: count }) : null
|
|
1784
2042
|
]
|
|
1785
2043
|
}
|
|
1786
2044
|
);
|
|
1787
2045
|
}
|
|
2046
|
+
function NavigationItemContent({ item }) {
|
|
2047
|
+
return /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
2048
|
+
item.icon,
|
|
2049
|
+
!item.icon && item.collapsedLabel ? /* @__PURE__ */ jsx21("span", { className: "hidden shrink-0 font-semibold group-data-[sidebar-state=collapsed]/shell:inline", children: item.collapsedLabel }) : null,
|
|
2050
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate group-data-[sidebar-state=collapsed]/shell:hidden", children: item.label }),
|
|
2051
|
+
/* @__PURE__ */ jsx21(NavigationMetadata, { badge: item.badge, count: item.count })
|
|
2052
|
+
] });
|
|
2053
|
+
}
|
|
1788
2054
|
function readOpenSections(storageKey) {
|
|
1789
2055
|
if (!storageKey || typeof window === "undefined") {
|
|
1790
2056
|
return {};
|
|
@@ -1808,9 +2074,9 @@ function SidebarNavigation({
|
|
|
1808
2074
|
className
|
|
1809
2075
|
}) {
|
|
1810
2076
|
const { isMobile, setMobileOpen, sidebarSide, sidebarState } = useAppShell();
|
|
1811
|
-
const [openSections, setOpenSections] =
|
|
1812
|
-
const storageReady =
|
|
1813
|
-
|
|
2077
|
+
const [openSections, setOpenSections] = React8.useState({});
|
|
2078
|
+
const storageReady = React8.useRef(false);
|
|
2079
|
+
React8.useEffect(() => {
|
|
1814
2080
|
storageReady.current = false;
|
|
1815
2081
|
const storedSections = readOpenSections(storageKey);
|
|
1816
2082
|
queueMicrotask(() => {
|
|
@@ -1818,8 +2084,8 @@ function SidebarNavigation({
|
|
|
1818
2084
|
setOpenSections(storedSections);
|
|
1819
2085
|
});
|
|
1820
2086
|
}, [storageKey]);
|
|
1821
|
-
|
|
1822
|
-
if (!storageReady.current || !storageKey || !entries.some(
|
|
2087
|
+
React8.useEffect(() => {
|
|
2088
|
+
if (!storageReady.current || !storageKey || !entries.some(isCollapsibleSection)) {
|
|
1823
2089
|
return;
|
|
1824
2090
|
}
|
|
1825
2091
|
try {
|
|
@@ -1827,13 +2093,13 @@ function SidebarNavigation({
|
|
|
1827
2093
|
} catch {
|
|
1828
2094
|
}
|
|
1829
2095
|
}, [entries, openSections, storageKey]);
|
|
1830
|
-
const handleNavigate =
|
|
2096
|
+
const handleNavigate = React8.useCallback(() => {
|
|
1831
2097
|
if (isMobile) {
|
|
1832
2098
|
setMobileOpen(false);
|
|
1833
2099
|
}
|
|
1834
2100
|
onNavigate?.();
|
|
1835
2101
|
}, [isMobile, onNavigate, setMobileOpen]);
|
|
1836
|
-
return /* @__PURE__ */
|
|
2102
|
+
return /* @__PURE__ */ jsx21(
|
|
1837
2103
|
"nav",
|
|
1838
2104
|
{
|
|
1839
2105
|
"data-slot": "sidebar-navigation",
|
|
@@ -1843,12 +2109,28 @@ function SidebarNavigation({
|
|
|
1843
2109
|
className
|
|
1844
2110
|
),
|
|
1845
2111
|
children: entries.map((entry) => {
|
|
1846
|
-
if (
|
|
1847
|
-
return /* @__PURE__ */
|
|
2112
|
+
if (isStaticGroup(entry)) {
|
|
2113
|
+
return /* @__PURE__ */ jsx21(NavigationGroup, { label: entry.label, count: entry.count, children: entry.items.map((item) => /* @__PURE__ */ jsx21(
|
|
2114
|
+
NavigationItem,
|
|
2115
|
+
{
|
|
2116
|
+
active: item.active,
|
|
2117
|
+
tooltip: item.label,
|
|
2118
|
+
render: renderLink(item, {
|
|
2119
|
+
"aria-current": item.active ? "page" : void 0,
|
|
2120
|
+
"aria-label": getNavigationAccessibleLabel(item),
|
|
2121
|
+
onClick: handleNavigate,
|
|
2122
|
+
children: /* @__PURE__ */ jsx21(NavigationItemContent, { item })
|
|
2123
|
+
})
|
|
2124
|
+
},
|
|
2125
|
+
item.id
|
|
2126
|
+
)) }, entry.id);
|
|
2127
|
+
}
|
|
2128
|
+
if (!hasItems(entry)) {
|
|
2129
|
+
return /* @__PURE__ */ jsx21(
|
|
1848
2130
|
NavigationGroup,
|
|
1849
2131
|
{
|
|
1850
2132
|
className: entry.startsSection ? "mt-[var(--ds-sidebar-group-gap)]" : void 0,
|
|
1851
|
-
children: /* @__PURE__ */
|
|
2133
|
+
children: /* @__PURE__ */ jsx21(
|
|
1852
2134
|
NavigationItem,
|
|
1853
2135
|
{
|
|
1854
2136
|
active: entry.active,
|
|
@@ -1857,11 +2139,7 @@ function SidebarNavigation({
|
|
|
1857
2139
|
"aria-current": entry.active ? "page" : void 0,
|
|
1858
2140
|
"aria-label": getNavigationAccessibleLabel(entry),
|
|
1859
2141
|
onClick: handleNavigate,
|
|
1860
|
-
children: /* @__PURE__ */
|
|
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
|
-
] })
|
|
2142
|
+
children: /* @__PURE__ */ jsx21(NavigationItemContent, { item: entry })
|
|
1865
2143
|
})
|
|
1866
2144
|
}
|
|
1867
2145
|
)
|
|
@@ -1869,24 +2147,27 @@ function SidebarNavigation({
|
|
|
1869
2147
|
entry.id
|
|
1870
2148
|
);
|
|
1871
2149
|
}
|
|
1872
|
-
const
|
|
2150
|
+
const activeChild = entry.items.some((item) => item.active);
|
|
2151
|
+
const defaultOpen = entry.type === "submenu" ? entry.defaultOpen : false;
|
|
2152
|
+
const legacyActive = entry.type === void 0 ? entry.active : false;
|
|
2153
|
+
const sectionOpen = (openSections[entry.id] ?? defaultOpen) || activeChild || legacyActive;
|
|
1873
2154
|
if (sidebarState === "collapsed" && !isMobile) {
|
|
1874
|
-
return /* @__PURE__ */
|
|
1875
|
-
/* @__PURE__ */
|
|
2155
|
+
return /* @__PURE__ */ jsxs19(DropdownMenu, { children: [
|
|
2156
|
+
/* @__PURE__ */ jsx21(
|
|
1876
2157
|
NavigationGroup,
|
|
1877
2158
|
{
|
|
1878
2159
|
className: entry.startsSection ? "mt-[var(--ds-sidebar-group-gap)]" : void 0,
|
|
1879
|
-
children: /* @__PURE__ */
|
|
2160
|
+
children: /* @__PURE__ */ jsx21(
|
|
1880
2161
|
DropdownMenuTrigger,
|
|
1881
2162
|
{
|
|
1882
|
-
render: /* @__PURE__ */
|
|
2163
|
+
render: /* @__PURE__ */ jsxs19(
|
|
1883
2164
|
NavigationItem,
|
|
1884
2165
|
{
|
|
1885
|
-
active: entry.active,
|
|
1886
2166
|
"aria-label": `${getNavigationAccessibleLabel(entry)} menu`,
|
|
2167
|
+
className: activeChild ? "text-sidebar-primary-text" : void 0,
|
|
1887
2168
|
children: [
|
|
1888
2169
|
entry.icon,
|
|
1889
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ jsx21("span", { className: "sr-only", children: entry.label })
|
|
1890
2171
|
]
|
|
1891
2172
|
}
|
|
1892
2173
|
)
|
|
@@ -1894,7 +2175,7 @@ function SidebarNavigation({
|
|
|
1894
2175
|
)
|
|
1895
2176
|
}
|
|
1896
2177
|
),
|
|
1897
|
-
/* @__PURE__ */
|
|
2178
|
+
/* @__PURE__ */ jsxs19(
|
|
1898
2179
|
DropdownMenuContent,
|
|
1899
2180
|
{
|
|
1900
2181
|
side: sidebarSide === "left" ? "right" : "left",
|
|
@@ -1902,8 +2183,8 @@ function SidebarNavigation({
|
|
|
1902
2183
|
sideOffset: 8,
|
|
1903
2184
|
className: "min-w-56 rounded-[var(--ds-radius-surface)] p-1.5",
|
|
1904
2185
|
children: [
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
2186
|
+
/* @__PURE__ */ jsx21(DropdownMenuLabel, { className: "px-2 py-1.5 font-semibold text-text-supporting", children: entry.label }),
|
|
2187
|
+
/* @__PURE__ */ jsx21(DropdownMenuGroup, { children: entry.items.map((item) => /* @__PURE__ */ jsx21(
|
|
1907
2188
|
DropdownMenuLinkItem,
|
|
1908
2189
|
{
|
|
1909
2190
|
closeOnClick: true,
|
|
@@ -1911,15 +2192,15 @@ function SidebarNavigation({
|
|
|
1911
2192
|
"aria-current": item.active ? "page" : void 0,
|
|
1912
2193
|
"aria-label": getNavigationAccessibleLabel(item),
|
|
1913
2194
|
onClick: handleNavigate,
|
|
1914
|
-
children: /* @__PURE__ */
|
|
2195
|
+
children: /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
1915
2196
|
item.icon,
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate", children: item.label }),
|
|
2198
|
+
/* @__PURE__ */ jsx21(NavigationMetadata, { badge: item.badge, count: item.count })
|
|
1918
2199
|
] })
|
|
1919
2200
|
}),
|
|
1920
2201
|
className: cn(
|
|
1921
2202
|
"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
|
|
2203
|
+
item.active && "bg-selection-background font-semibold text-selection-foreground focus:bg-selection-background focus:text-selection-foreground"
|
|
1923
2204
|
)
|
|
1924
2205
|
},
|
|
1925
2206
|
item.id
|
|
@@ -1929,7 +2210,7 @@ function SidebarNavigation({
|
|
|
1929
2210
|
)
|
|
1930
2211
|
] }, entry.id);
|
|
1931
2212
|
}
|
|
1932
|
-
return /* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ jsx21(
|
|
1933
2214
|
Collapsible,
|
|
1934
2215
|
{
|
|
1935
2216
|
open: sectionOpen,
|
|
@@ -1941,32 +2222,32 @@ function SidebarNavigation({
|
|
|
1941
2222
|
"group/collapsible",
|
|
1942
2223
|
entry.startsSection && "mt-2"
|
|
1943
2224
|
),
|
|
1944
|
-
children: /* @__PURE__ */
|
|
1945
|
-
/* @__PURE__ */
|
|
2225
|
+
children: /* @__PURE__ */ jsxs19(NavigationGroup, { children: [
|
|
2226
|
+
/* @__PURE__ */ jsx21(
|
|
1946
2227
|
CollapsibleTrigger,
|
|
1947
2228
|
{
|
|
1948
|
-
render: /* @__PURE__ */
|
|
2229
|
+
render: /* @__PURE__ */ jsxs19(
|
|
1949
2230
|
NavigationItem,
|
|
1950
2231
|
{
|
|
1951
|
-
active: entry.active,
|
|
1952
2232
|
tooltip: entry.label,
|
|
1953
2233
|
"aria-label": getNavigationAccessibleLabel(entry),
|
|
2234
|
+
className: activeChild ? "text-sidebar-primary-text" : void 0,
|
|
1954
2235
|
children: [
|
|
1955
2236
|
entry.icon,
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
2237
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate group-data-[sidebar-state=collapsed]/shell:hidden", children: entry.label }),
|
|
2238
|
+
/* @__PURE__ */ jsx21(NavigationMetadata, { badge: entry.badge, count: entry.count }),
|
|
2239
|
+
/* @__PURE__ */ jsx21(ChevronRight2, { className: "ml-auto transition-transform duration-150 ease-out group-data-[sidebar-state=collapsed]/shell:hidden group-data-[open]/collapsible:rotate-90" })
|
|
1959
2240
|
]
|
|
1960
2241
|
}
|
|
1961
2242
|
)
|
|
1962
2243
|
}
|
|
1963
2244
|
),
|
|
1964
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ jsx21(
|
|
1965
2246
|
CollapsibleContent,
|
|
1966
2247
|
{
|
|
1967
2248
|
"data-slot": "sidebar-collapsible-content",
|
|
1968
2249
|
className: "overflow-hidden",
|
|
1969
|
-
children: /* @__PURE__ */
|
|
2250
|
+
children: /* @__PURE__ */ jsx21(NavigationSubList, { children: entry.items.map((item) => /* @__PURE__ */ jsx21(
|
|
1970
2251
|
NavigationSubItem,
|
|
1971
2252
|
{
|
|
1972
2253
|
active: item.active,
|
|
@@ -1974,10 +2255,10 @@ function SidebarNavigation({
|
|
|
1974
2255
|
"aria-current": item.active ? "page" : void 0,
|
|
1975
2256
|
"aria-label": getNavigationAccessibleLabel(item),
|
|
1976
2257
|
onClick: handleNavigate,
|
|
1977
|
-
children: /* @__PURE__ */
|
|
2258
|
+
children: /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
1978
2259
|
item.icon,
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
2260
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate", children: item.label }),
|
|
2261
|
+
/* @__PURE__ */ jsx21(NavigationMetadata, { badge: item.badge, count: item.count })
|
|
1981
2262
|
] })
|
|
1982
2263
|
})
|
|
1983
2264
|
},
|
|
@@ -1995,19 +2276,19 @@ function SidebarNavigation({
|
|
|
1995
2276
|
}
|
|
1996
2277
|
|
|
1997
2278
|
// src/patterns/state-views.tsx
|
|
1998
|
-
import { jsx as
|
|
2279
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1999
2280
|
function StateView({ title, description, action, icon, className, ...props }) {
|
|
2000
|
-
return /* @__PURE__ */
|
|
2281
|
+
return /* @__PURE__ */ jsxs20(
|
|
2001
2282
|
"div",
|
|
2002
2283
|
{
|
|
2003
2284
|
"data-slot": "state-view",
|
|
2004
2285
|
className: cn("flex min-h-72 flex-col items-center justify-center gap-3 border-b px-6 py-12 text-center", className),
|
|
2005
2286
|
...props,
|
|
2006
2287
|
children: [
|
|
2007
|
-
icon ? /* @__PURE__ */
|
|
2008
|
-
/* @__PURE__ */
|
|
2009
|
-
description ? /* @__PURE__ */
|
|
2010
|
-
action ? /* @__PURE__ */
|
|
2288
|
+
icon ? /* @__PURE__ */ jsx22("div", { className: "flex size-10 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-5", children: icon }) : null,
|
|
2289
|
+
/* @__PURE__ */ jsx22("h2", { className: "ds-type-section-title", children: title }),
|
|
2290
|
+
description ? /* @__PURE__ */ jsx22("p", { className: "ds-type-ui max-w-md text-text-supporting", children: description }) : null,
|
|
2291
|
+
action ? /* @__PURE__ */ jsx22("div", { className: "mt-1", children: action }) : null
|
|
2011
2292
|
]
|
|
2012
2293
|
}
|
|
2013
2294
|
);
|
|
@@ -2016,12 +2297,12 @@ function LoadingRows({
|
|
|
2016
2297
|
rows = 6,
|
|
2017
2298
|
columns = 5
|
|
2018
2299
|
}) {
|
|
2019
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ jsx22("div", { "data-slot": "loading-rows", className: "border-b", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ jsx22(
|
|
2020
2301
|
"div",
|
|
2021
2302
|
{
|
|
2022
2303
|
className: "grid h-[var(--ds-row-height)] items-center gap-4 border-b px-5 last:border-b-0",
|
|
2023
2304
|
style: { gridTemplateColumns: `2fr repeat(${Math.max(columns - 1, 1)}, minmax(5rem, 1fr))` },
|
|
2024
|
-
children: Array.from({ length: columns }).map((_2, columnIndex) => /* @__PURE__ */
|
|
2305
|
+
children: Array.from({ length: columns }).map((_2, columnIndex) => /* @__PURE__ */ jsx22(
|
|
2025
2306
|
"div",
|
|
2026
2307
|
{
|
|
2027
2308
|
className: cn(
|
|
@@ -2036,7 +2317,7 @@ function LoadingRows({
|
|
|
2036
2317
|
)) });
|
|
2037
2318
|
}
|
|
2038
2319
|
function ErrorState({ title, description, action, className, ...props }) {
|
|
2039
|
-
return /* @__PURE__ */
|
|
2320
|
+
return /* @__PURE__ */ jsx22(
|
|
2040
2321
|
StateView,
|
|
2041
2322
|
{
|
|
2042
2323
|
title,
|
|
@@ -2051,8 +2332,8 @@ function ErrorState({ title, description, action, className, ...props }) {
|
|
|
2051
2332
|
}
|
|
2052
2333
|
|
|
2053
2334
|
// src/patterns/value-meter.tsx
|
|
2054
|
-
import * as
|
|
2055
|
-
import { jsx as
|
|
2335
|
+
import * as React9 from "react";
|
|
2336
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2056
2337
|
function ValueMeter({
|
|
2057
2338
|
label,
|
|
2058
2339
|
value,
|
|
@@ -2063,23 +2344,23 @@ function ValueMeter({
|
|
|
2063
2344
|
className,
|
|
2064
2345
|
...props
|
|
2065
2346
|
}) {
|
|
2066
|
-
const labelId =
|
|
2347
|
+
const labelId = React9.useId();
|
|
2067
2348
|
const hasMaximum = typeof maximum === "number" && maximum > 0;
|
|
2068
2349
|
const boundedValue = hasMaximum ? Math.min(maximum, Math.max(0, value)) : value;
|
|
2069
2350
|
const percentage = hasMaximum ? boundedValue / maximum * 100 : null;
|
|
2070
2351
|
const resolvedValueLabel = valueLabel ?? (hasMaximum ? `${boundedValue} of ${maximum}` : String(boundedValue));
|
|
2071
|
-
return /* @__PURE__ */
|
|
2352
|
+
return /* @__PURE__ */ jsxs21(
|
|
2072
2353
|
"div",
|
|
2073
2354
|
{
|
|
2074
2355
|
"data-slot": "value-meter",
|
|
2075
2356
|
className: cn("grid gap-2", className),
|
|
2076
2357
|
...props,
|
|
2077
2358
|
children: [
|
|
2078
|
-
/* @__PURE__ */
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
/* @__PURE__ */
|
|
2359
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-baseline justify-between gap-4 text-sm", children: [
|
|
2360
|
+
/* @__PURE__ */ jsx23("span", { id: labelId, className: "font-medium text-text-primary", children: label }),
|
|
2361
|
+
/* @__PURE__ */ jsx23("span", { className: "text-text-supporting", children: resolvedValueLabel })
|
|
2081
2362
|
] }),
|
|
2082
|
-
percentage === null ? null : /* @__PURE__ */
|
|
2363
|
+
percentage === null ? null : /* @__PURE__ */ jsx23(
|
|
2083
2364
|
"div",
|
|
2084
2365
|
{
|
|
2085
2366
|
role: "progressbar",
|
|
@@ -2088,7 +2369,7 @@ function ValueMeter({
|
|
|
2088
2369
|
"aria-valuemax": maximum ?? void 0,
|
|
2089
2370
|
"aria-valuenow": boundedValue,
|
|
2090
2371
|
className: "h-2 overflow-hidden rounded-full bg-surface-muted",
|
|
2091
|
-
children: /* @__PURE__ */
|
|
2372
|
+
children: /* @__PURE__ */ jsx23(
|
|
2092
2373
|
"div",
|
|
2093
2374
|
{
|
|
2094
2375
|
className: cn(
|
|
@@ -2102,20 +2383,20 @@ function ValueMeter({
|
|
|
2102
2383
|
)
|
|
2103
2384
|
}
|
|
2104
2385
|
),
|
|
2105
|
-
detail ? /* @__PURE__ */
|
|
2386
|
+
detail ? /* @__PURE__ */ jsx23("div", { className: "text-xs text-text-supporting", children: detail }) : null
|
|
2106
2387
|
]
|
|
2107
2388
|
}
|
|
2108
2389
|
);
|
|
2109
2390
|
}
|
|
2110
2391
|
|
|
2111
2392
|
// src/patterns/workbench.tsx
|
|
2112
|
-
import * as
|
|
2113
|
-
import { jsx as
|
|
2393
|
+
import * as React10 from "react";
|
|
2394
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2114
2395
|
function WorkbenchShell({ className, ...props }) {
|
|
2115
|
-
return /* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ jsx24("div", { "data-slot": "workbench-shell", className: cn("min-w-0", className), ...props });
|
|
2116
2397
|
}
|
|
2117
2398
|
function WorkbenchRail({ variant = "secondary", open = true, className, ...props }) {
|
|
2118
|
-
return /* @__PURE__ */
|
|
2399
|
+
return /* @__PURE__ */ jsx24(
|
|
2119
2400
|
"aside",
|
|
2120
2401
|
{
|
|
2121
2402
|
"data-slot": "workbench-rail",
|
|
@@ -2127,16 +2408,16 @@ function WorkbenchRail({ variant = "secondary", open = true, className, ...props
|
|
|
2127
2408
|
);
|
|
2128
2409
|
}
|
|
2129
2410
|
function WorkbenchMain({ className, ...props }) {
|
|
2130
|
-
return /* @__PURE__ */
|
|
2411
|
+
return /* @__PURE__ */ jsx24("main", { "data-slot": "workbench-main", className: cn("min-w-0", className), ...props });
|
|
2131
2412
|
}
|
|
2132
2413
|
function WorkbenchInspector({ className, ...props }) {
|
|
2133
|
-
return /* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ jsx24("aside", { "data-slot": "workbench-inspector", className: cn("min-w-0", className), ...props });
|
|
2134
2415
|
}
|
|
2135
2416
|
function WorkbenchMobileToolbar({ className, ...props }) {
|
|
2136
|
-
return /* @__PURE__ */
|
|
2417
|
+
return /* @__PURE__ */ jsx24("div", { "data-slot": "workbench-mobile-toolbar", className: cn(className), ...props });
|
|
2137
2418
|
}
|
|
2138
2419
|
function WorkbenchBackdrop({ open = true, className, ...props }) {
|
|
2139
|
-
return /* @__PURE__ */
|
|
2420
|
+
return /* @__PURE__ */ jsx24(
|
|
2140
2421
|
"button",
|
|
2141
2422
|
{
|
|
2142
2423
|
type: "button",
|
|
@@ -2148,19 +2429,19 @@ function WorkbenchBackdrop({ open = true, className, ...props }) {
|
|
|
2148
2429
|
);
|
|
2149
2430
|
}
|
|
2150
2431
|
function WorkbenchSection({ className, ...props }) {
|
|
2151
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsx24("section", { "data-slot": "workbench-section", className: cn(className), ...props });
|
|
2152
2433
|
}
|
|
2153
2434
|
function WorkbenchSectionHeader({ title, metadata, action, className, ...props }) {
|
|
2154
|
-
return /* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
metadata ? /* @__PURE__ */
|
|
2435
|
+
return /* @__PURE__ */ jsxs22("div", { "data-slot": "workbench-section-header", className: cn(className), ...props, children: [
|
|
2436
|
+
/* @__PURE__ */ jsxs22("div", { "data-slot": "workbench-section-heading", children: [
|
|
2437
|
+
/* @__PURE__ */ jsx24("h2", { children: title }),
|
|
2438
|
+
metadata ? /* @__PURE__ */ jsx24("span", { children: metadata }) : null
|
|
2158
2439
|
] }),
|
|
2159
|
-
action ? /* @__PURE__ */
|
|
2440
|
+
action ? /* @__PURE__ */ jsx24("div", { "data-slot": "workbench-section-action", children: action }) : null
|
|
2160
2441
|
] });
|
|
2161
2442
|
}
|
|
2162
2443
|
function ResourceRow({ as = "div", href, selected = false, className, children, ...props }) {
|
|
2163
|
-
return
|
|
2444
|
+
return React10.createElement(
|
|
2164
2445
|
as,
|
|
2165
2446
|
{
|
|
2166
2447
|
...props,
|
|
@@ -2174,35 +2455,35 @@ function ResourceRow({ as = "div", href, selected = false, className, children,
|
|
|
2174
2455
|
);
|
|
2175
2456
|
}
|
|
2176
2457
|
function ResourceRowIcon({ className, ...props }) {
|
|
2177
|
-
return /* @__PURE__ */
|
|
2458
|
+
return /* @__PURE__ */ jsx24("span", { "data-slot": "resource-row-icon", className: cn(className), ...props });
|
|
2178
2459
|
}
|
|
2179
2460
|
function ResourceRowContent({ className, ...props }) {
|
|
2180
|
-
return /* @__PURE__ */
|
|
2461
|
+
return /* @__PURE__ */ jsx24("span", { "data-slot": "resource-row-content", className: cn(className), ...props });
|
|
2181
2462
|
}
|
|
2182
2463
|
function ResourceRowTitle({ className, ...props }) {
|
|
2183
|
-
return /* @__PURE__ */
|
|
2464
|
+
return /* @__PURE__ */ jsx24("strong", { "data-slot": "resource-row-title", className: cn(className), ...props });
|
|
2184
2465
|
}
|
|
2185
2466
|
function ResourceRowDescription({ className, ...props }) {
|
|
2186
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ jsx24("span", { "data-slot": "resource-row-description", className: cn(className), ...props });
|
|
2187
2468
|
}
|
|
2188
2469
|
function ResourceRowMeta({ className, ...props }) {
|
|
2189
|
-
return /* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ jsx24("span", { "data-slot": "resource-row-meta", className: cn(className), ...props });
|
|
2190
2471
|
}
|
|
2191
2472
|
function WorkbenchInspectorSection({ label, action, className, children, ...props }) {
|
|
2192
|
-
return /* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
action ? /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ jsxs22("section", { "data-slot": "workbench-inspector-section", className: cn(className), ...props, children: [
|
|
2474
|
+
/* @__PURE__ */ jsxs22("div", { "data-slot": "workbench-inspector-label", children: [
|
|
2475
|
+
/* @__PURE__ */ jsx24("h3", { children: label }),
|
|
2476
|
+
action ? /* @__PURE__ */ jsx24("div", { children: action }) : null
|
|
2196
2477
|
] }),
|
|
2197
2478
|
children
|
|
2198
2479
|
] });
|
|
2199
2480
|
}
|
|
2200
2481
|
function IdentityRow({ initials, name, detail, compact = false, className, ...props }) {
|
|
2201
|
-
return /* @__PURE__ */
|
|
2202
|
-
/* @__PURE__ */
|
|
2203
|
-
/* @__PURE__ */
|
|
2204
|
-
/* @__PURE__ */
|
|
2205
|
-
detail ? /* @__PURE__ */
|
|
2482
|
+
return /* @__PURE__ */ jsxs22("div", { "data-slot": "identity-row", "data-compact": compact ? "true" : "false", className: cn(className), ...props, children: [
|
|
2483
|
+
/* @__PURE__ */ jsx24("span", { "data-slot": "identity-avatar", children: initials }),
|
|
2484
|
+
/* @__PURE__ */ jsxs22("span", { "data-slot": "identity-copy", children: [
|
|
2485
|
+
/* @__PURE__ */ jsx24("strong", { children: name }),
|
|
2486
|
+
detail ? /* @__PURE__ */ jsx24("small", { children: detail }) : null
|
|
2206
2487
|
] })
|
|
2207
2488
|
] });
|
|
2208
2489
|
}
|
|
@@ -2212,6 +2493,10 @@ export {
|
|
|
2212
2493
|
DataTable,
|
|
2213
2494
|
EntityTable,
|
|
2214
2495
|
CommandPalette,
|
|
2496
|
+
DataPanel,
|
|
2497
|
+
DataPanelHeader,
|
|
2498
|
+
DataPanelContent,
|
|
2499
|
+
DataPanelFooter,
|
|
2215
2500
|
DetailBackLink,
|
|
2216
2501
|
FilterBar,
|
|
2217
2502
|
useAppShell,
|
|
@@ -2229,6 +2514,10 @@ export {
|
|
|
2229
2514
|
SidebarTrigger,
|
|
2230
2515
|
SidebarSearch,
|
|
2231
2516
|
MainRegion,
|
|
2517
|
+
AppHeader,
|
|
2518
|
+
AppHeaderStart,
|
|
2519
|
+
AppHeaderSearch,
|
|
2520
|
+
AppHeaderActions,
|
|
2232
2521
|
TopBar,
|
|
2233
2522
|
PageFrame,
|
|
2234
2523
|
PageContent,
|
|
@@ -2236,6 +2525,8 @@ export {
|
|
|
2236
2525
|
InspectorRegion,
|
|
2237
2526
|
ActivityList,
|
|
2238
2527
|
ActivityItem,
|
|
2528
|
+
AttentionList,
|
|
2529
|
+
AttentionItem,
|
|
2239
2530
|
ConfirmationDialog,
|
|
2240
2531
|
CodeBlock,
|
|
2241
2532
|
InventorySurface,
|
|
@@ -2243,6 +2534,8 @@ export {
|
|
|
2243
2534
|
InventoryMobile,
|
|
2244
2535
|
MetricBand,
|
|
2245
2536
|
MetricBandItem,
|
|
2537
|
+
MetricTrend,
|
|
2538
|
+
MetricCard,
|
|
2246
2539
|
PageHeader,
|
|
2247
2540
|
PageToolbar,
|
|
2248
2541
|
useConsciaPreferences,
|
|
@@ -2278,4 +2571,4 @@ export {
|
|
|
2278
2571
|
WorkbenchInspectorSection,
|
|
2279
2572
|
IdentityRow
|
|
2280
2573
|
};
|
|
2281
|
-
//# sourceMappingURL=chunk-
|
|
2574
|
+
//# sourceMappingURL=chunk-OYJH5CVD.js.map
|