@caqophony/ui 0.1.0 → 0.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/README.md +3 -1
- package/dist/{chunk-K3SEIIA3.js → chunk-4YA6BZDJ.js} +1 -1
- package/dist/index.d.mts +319 -6
- package/dist/index.js +1355 -736
- package/dist/markdown.js +1 -1
- package/package.json +1 -1
- package/styles.css +92 -43
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
MarkdownRenderer,
|
|
4
4
|
cn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4YA6BZDJ.js";
|
|
6
6
|
|
|
7
7
|
// src/button.tsx
|
|
8
8
|
import { Slot } from "@radix-ui/react-slot";
|
|
@@ -15,12 +15,12 @@ var buttonVariants = cva(
|
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
variant: {
|
|
18
|
-
default: "bg-primary dark:bg-primary text-primary-foreground dark:text-primary-foreground shadow hover:bg-primary/90 dark:hover:bg-primary/90",
|
|
19
|
-
destructive: "bg-intent-error dark:bg-intent-error text-intent-error-
|
|
20
|
-
outline: "border border-border dark:border-border bg-background dark:bg-background shadow-sm hover:bg-muted dark:hover:bg-muted hover:text-foreground dark:hover:text-foreground",
|
|
18
|
+
default: "bg-primary-solid dark:bg-primary-solid text-primary-foreground dark:text-primary-foreground shadow hover:bg-primary-solid/90 dark:hover:bg-primary-solid/90",
|
|
19
|
+
destructive: "bg-intent-error-solid dark:bg-intent-error-solid text-intent-error-solid-fg dark:text-intent-error-solid-fg shadow-sm hover:bg-intent-error-solid/90 dark:hover:bg-intent-error-solid/90",
|
|
20
|
+
outline: "border border-border dark:border-border bg-background dark:bg-background text-foreground dark:text-foreground shadow-sm hover:bg-muted dark:hover:bg-muted hover:text-foreground dark:hover:text-foreground",
|
|
21
21
|
secondary: "bg-muted dark:bg-muted text-muted-foreground dark:text-muted-foreground shadow-sm hover:bg-muted/80 dark:hover:bg-muted/80",
|
|
22
22
|
ghost: "hover:bg-muted dark:hover:bg-muted hover:text-foreground dark:hover:text-foreground",
|
|
23
|
-
link: "text-primary dark:text-primary underline-offset-4 hover:underline"
|
|
23
|
+
link: "text-primary-text dark:text-primary-text underline-offset-4 hover:underline"
|
|
24
24
|
},
|
|
25
25
|
size: {
|
|
26
26
|
default: "h-10 px-4 py-2",
|
|
@@ -99,7 +99,9 @@ var Card = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
99
99
|
{
|
|
100
100
|
ref,
|
|
101
101
|
className: cn(
|
|
102
|
-
|
|
102
|
+
// W1 (#5823): the border names its colour; Tailwind v4's bare
|
|
103
|
+
// `border` is currentColor (a near-black card edge)
|
|
104
|
+
"rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
103
105
|
className
|
|
104
106
|
),
|
|
105
107
|
...props
|
|
@@ -214,7 +216,7 @@ var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
214
216
|
ref,
|
|
215
217
|
sideOffset,
|
|
216
218
|
className: cn(
|
|
217
|
-
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
219
|
+
"z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
218
220
|
className
|
|
219
221
|
),
|
|
220
222
|
...props
|
|
@@ -251,11 +253,18 @@ function FormField({
|
|
|
251
253
|
htmlFor: name,
|
|
252
254
|
className: cn(
|
|
253
255
|
"block text-sm font-medium",
|
|
254
|
-
hasError ? "text-intent-error dark:text-intent-error" : "text-foreground dark:text-foreground"
|
|
256
|
+
hasError ? "text-intent-error-foreground dark:text-intent-error-foreground" : "text-foreground dark:text-foreground"
|
|
255
257
|
),
|
|
256
258
|
children: [
|
|
257
259
|
label,
|
|
258
|
-
required && /* @__PURE__ */ jsx6(
|
|
260
|
+
required && /* @__PURE__ */ jsx6(
|
|
261
|
+
"span",
|
|
262
|
+
{
|
|
263
|
+
className: "text-intent-error-foreground ml-1",
|
|
264
|
+
"aria-hidden": "true",
|
|
265
|
+
children: "*"
|
|
266
|
+
}
|
|
267
|
+
)
|
|
259
268
|
]
|
|
260
269
|
}
|
|
261
270
|
),
|
|
@@ -275,7 +284,7 @@ function FormField({
|
|
|
275
284
|
hasError && /* @__PURE__ */ jsxs3(
|
|
276
285
|
"p",
|
|
277
286
|
{
|
|
278
|
-
className: "text-intent-error dark:text-intent-error flex items-center gap-1 text-sm",
|
|
287
|
+
className: "text-intent-error-foreground dark:text-intent-error-foreground flex items-center gap-1 text-sm",
|
|
279
288
|
role: "alert",
|
|
280
289
|
"aria-live": "polite",
|
|
281
290
|
children: [
|
|
@@ -338,7 +347,7 @@ function FormError({ error, className }) {
|
|
|
338
347
|
role: "alert",
|
|
339
348
|
children: /* @__PURE__ */ jsxs3("div", { className: "flex gap-3", children: [
|
|
340
349
|
/* @__PURE__ */ jsx6(ErrorIcon, { className: "text-intent-error dark:text-intent-error size-5 shrink-0" }),
|
|
341
|
-
/* @__PURE__ */ jsx6("p", { className: "text-intent-error dark:text-intent-error text-sm", children: error })
|
|
350
|
+
/* @__PURE__ */ jsx6("p", { className: "text-intent-error-foreground dark:text-intent-error-foreground text-sm", children: error })
|
|
342
351
|
] })
|
|
343
352
|
}
|
|
344
353
|
);
|
|
@@ -356,7 +365,7 @@ function FormSuccess({ message, className }) {
|
|
|
356
365
|
role: "status",
|
|
357
366
|
children: /* @__PURE__ */ jsxs3("div", { className: "flex gap-3", children: [
|
|
358
367
|
/* @__PURE__ */ jsx6(SuccessIcon, { className: "text-intent-success dark:text-intent-success size-5 shrink-0" }),
|
|
359
|
-
/* @__PURE__ */ jsx6("p", { className: "text-intent-success dark:text-intent-success text-sm", children: message })
|
|
368
|
+
/* @__PURE__ */ jsx6("p", { className: "text-intent-success-foreground dark:text-intent-success-foreground text-sm", children: message })
|
|
360
369
|
] })
|
|
361
370
|
}
|
|
362
371
|
);
|
|
@@ -501,8 +510,8 @@ function GlobalErrorContent({
|
|
|
501
510
|
{
|
|
502
511
|
style: {
|
|
503
512
|
fontSize: "0.75rem",
|
|
504
|
-
color: "#
|
|
505
|
-
// gossamer-ignore
|
|
513
|
+
color: "#6b7280",
|
|
514
|
+
// gossamer-ignore (W0 #5823: AA on #f9fafb; #9ca3af was 2.4:1)
|
|
506
515
|
marginBottom: "0.25rem"
|
|
507
516
|
},
|
|
508
517
|
children: "Error Reference"
|
|
@@ -619,8 +628,8 @@ function GlobalErrorContent({
|
|
|
619
628
|
style: {
|
|
620
629
|
marginTop: "1.5rem",
|
|
621
630
|
fontSize: "0.75rem",
|
|
622
|
-
color: "#
|
|
623
|
-
// gossamer-ignore
|
|
631
|
+
color: "#6b7280"
|
|
632
|
+
// gossamer-ignore (W0 #5823: AA on #f9fafb; #9ca3af was 2.4:1)
|
|
624
633
|
},
|
|
625
634
|
children: [
|
|
626
635
|
"If this problem persists, please",
|
|
@@ -646,14 +655,218 @@ function GlobalErrorContent({
|
|
|
646
655
|
|
|
647
656
|
// src/collapsible-sidebar.tsx
|
|
648
657
|
import {
|
|
649
|
-
useState,
|
|
650
|
-
useEffect,
|
|
658
|
+
useState as useState2,
|
|
659
|
+
useEffect as useEffect2,
|
|
651
660
|
useCallback,
|
|
652
661
|
createContext,
|
|
653
662
|
useContext
|
|
654
663
|
} from "react";
|
|
655
|
-
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
656
|
-
|
|
664
|
+
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
665
|
+
|
|
666
|
+
// src/nav-drawer.tsx
|
|
667
|
+
import * as React6 from "react";
|
|
668
|
+
|
|
669
|
+
// src/icon.tsx
|
|
670
|
+
import {
|
|
671
|
+
ArrowLeft,
|
|
672
|
+
ArrowRight,
|
|
673
|
+
Bell,
|
|
674
|
+
Calendar,
|
|
675
|
+
Check,
|
|
676
|
+
ChevronDown,
|
|
677
|
+
ChevronLeft,
|
|
678
|
+
ChevronRight,
|
|
679
|
+
ChevronUp,
|
|
680
|
+
CircleAlert,
|
|
681
|
+
CircleCheck,
|
|
682
|
+
ClipboardList,
|
|
683
|
+
Clock,
|
|
684
|
+
Database,
|
|
685
|
+
Download,
|
|
686
|
+
Ellipsis,
|
|
687
|
+
ExternalLink,
|
|
688
|
+
Eye,
|
|
689
|
+
EyeOff,
|
|
690
|
+
FileText,
|
|
691
|
+
Filter,
|
|
692
|
+
Folder,
|
|
693
|
+
Heart,
|
|
694
|
+
House,
|
|
695
|
+
Inbox,
|
|
696
|
+
Info,
|
|
697
|
+
LayoutGrid,
|
|
698
|
+
Link,
|
|
699
|
+
List,
|
|
700
|
+
LoaderCircle,
|
|
701
|
+
Lock,
|
|
702
|
+
LogOut,
|
|
703
|
+
Mail,
|
|
704
|
+
MapPin,
|
|
705
|
+
Menu,
|
|
706
|
+
Package,
|
|
707
|
+
Pencil,
|
|
708
|
+
Phone,
|
|
709
|
+
Plus,
|
|
710
|
+
RefreshCw,
|
|
711
|
+
Rocket,
|
|
712
|
+
Search,
|
|
713
|
+
Settings,
|
|
714
|
+
Star,
|
|
715
|
+
Tag,
|
|
716
|
+
Trash2,
|
|
717
|
+
TriangleAlert,
|
|
718
|
+
Upload,
|
|
719
|
+
User,
|
|
720
|
+
Users,
|
|
721
|
+
X
|
|
722
|
+
} from "lucide-react";
|
|
723
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
724
|
+
var ICONS = {
|
|
725
|
+
"arrow-left": ArrowLeft,
|
|
726
|
+
"arrow-right": ArrowRight,
|
|
727
|
+
bell: Bell,
|
|
728
|
+
calendar: Calendar,
|
|
729
|
+
check: Check,
|
|
730
|
+
"chevron-down": ChevronDown,
|
|
731
|
+
"chevron-left": ChevronLeft,
|
|
732
|
+
"chevron-right": ChevronRight,
|
|
733
|
+
"chevron-up": ChevronUp,
|
|
734
|
+
"circle-alert": CircleAlert,
|
|
735
|
+
"circle-check": CircleCheck,
|
|
736
|
+
"clipboard-list": ClipboardList,
|
|
737
|
+
clock: Clock,
|
|
738
|
+
database: Database,
|
|
739
|
+
download: Download,
|
|
740
|
+
ellipsis: Ellipsis,
|
|
741
|
+
"external-link": ExternalLink,
|
|
742
|
+
eye: Eye,
|
|
743
|
+
"eye-off": EyeOff,
|
|
744
|
+
"file-text": FileText,
|
|
745
|
+
filter: Filter,
|
|
746
|
+
folder: Folder,
|
|
747
|
+
heart: Heart,
|
|
748
|
+
house: House,
|
|
749
|
+
inbox: Inbox,
|
|
750
|
+
info: Info,
|
|
751
|
+
"layout-grid": LayoutGrid,
|
|
752
|
+
link: Link,
|
|
753
|
+
list: List,
|
|
754
|
+
loader: LoaderCircle,
|
|
755
|
+
lock: Lock,
|
|
756
|
+
"log-out": LogOut,
|
|
757
|
+
mail: Mail,
|
|
758
|
+
"map-pin": MapPin,
|
|
759
|
+
menu: Menu,
|
|
760
|
+
package: Package,
|
|
761
|
+
pencil: Pencil,
|
|
762
|
+
phone: Phone,
|
|
763
|
+
plus: Plus,
|
|
764
|
+
"refresh-cw": RefreshCw,
|
|
765
|
+
rocket: Rocket,
|
|
766
|
+
search: Search,
|
|
767
|
+
settings: Settings,
|
|
768
|
+
star: Star,
|
|
769
|
+
tag: Tag,
|
|
770
|
+
trash: Trash2,
|
|
771
|
+
"triangle-alert": TriangleAlert,
|
|
772
|
+
upload: Upload,
|
|
773
|
+
user: User,
|
|
774
|
+
users: Users,
|
|
775
|
+
x: X
|
|
776
|
+
};
|
|
777
|
+
var ICON_SIZES = {
|
|
778
|
+
xs: "size-3",
|
|
779
|
+
sm: "size-4",
|
|
780
|
+
md: "size-5",
|
|
781
|
+
lg: "size-6",
|
|
782
|
+
xl: "size-8"
|
|
783
|
+
};
|
|
784
|
+
function Icon({ name, size, className }) {
|
|
785
|
+
const Glyph = ICONS[name];
|
|
786
|
+
return /* @__PURE__ */ jsx8(Glyph, { className: cn(ICON_SIZES[size], className), "aria-hidden": "true" });
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
// src/nav-drawer.tsx
|
|
790
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
791
|
+
function NavDrawer({
|
|
792
|
+
label,
|
|
793
|
+
side,
|
|
794
|
+
defaultOpen,
|
|
795
|
+
children
|
|
796
|
+
}) {
|
|
797
|
+
const [open, setOpen] = React6.useState(defaultOpen);
|
|
798
|
+
const id = React6.useId();
|
|
799
|
+
React6.useEffect(() => {
|
|
800
|
+
if (!open) return;
|
|
801
|
+
const onKey = (e) => {
|
|
802
|
+
if (e.key === "Escape") setOpen(false);
|
|
803
|
+
};
|
|
804
|
+
document.addEventListener("keydown", onKey);
|
|
805
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
806
|
+
}, [open]);
|
|
807
|
+
const left = side === "left";
|
|
808
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
809
|
+
/* @__PURE__ */ jsx9(
|
|
810
|
+
Button,
|
|
811
|
+
{
|
|
812
|
+
variant: "ghost",
|
|
813
|
+
size: "icon",
|
|
814
|
+
"aria-label": label,
|
|
815
|
+
"aria-expanded": open,
|
|
816
|
+
"aria-controls": open ? id : void 0,
|
|
817
|
+
onClick: () => setOpen(!open),
|
|
818
|
+
children: /* @__PURE__ */ jsx9(Icon, { name: "menu", size: "sm" })
|
|
819
|
+
}
|
|
820
|
+
),
|
|
821
|
+
open && /* @__PURE__ */ jsxs5("div", { className: "z-overlay fixed inset-0", children: [
|
|
822
|
+
/* @__PURE__ */ jsx9(
|
|
823
|
+
"div",
|
|
824
|
+
{
|
|
825
|
+
"aria-hidden": "true",
|
|
826
|
+
className: "absolute inset-0 bg-foreground/40",
|
|
827
|
+
onClick: () => setOpen(false)
|
|
828
|
+
}
|
|
829
|
+
),
|
|
830
|
+
/* @__PURE__ */ jsxs5(
|
|
831
|
+
"aside",
|
|
832
|
+
{
|
|
833
|
+
id,
|
|
834
|
+
"aria-label": label,
|
|
835
|
+
className: cn(
|
|
836
|
+
"absolute inset-y-0 flex w-72 max-w-[calc(100%-3rem)] flex-col overflow-y-auto bg-card shadow-lg",
|
|
837
|
+
left ? "left-0 border-r" : "right-0 border-l",
|
|
838
|
+
"border-border"
|
|
839
|
+
),
|
|
840
|
+
children: [
|
|
841
|
+
/* @__PURE__ */ jsx9(
|
|
842
|
+
"div",
|
|
843
|
+
{
|
|
844
|
+
className: cn(
|
|
845
|
+
"flex px-2 py-2",
|
|
846
|
+
left ? "justify-end" : "justify-start"
|
|
847
|
+
),
|
|
848
|
+
children: /* @__PURE__ */ jsx9(
|
|
849
|
+
Button,
|
|
850
|
+
{
|
|
851
|
+
variant: "ghost",
|
|
852
|
+
size: "icon",
|
|
853
|
+
"aria-label": "Close",
|
|
854
|
+
onClick: () => setOpen(false),
|
|
855
|
+
children: /* @__PURE__ */ jsx9(Icon, { name: "x", size: "sm" })
|
|
856
|
+
}
|
|
857
|
+
)
|
|
858
|
+
}
|
|
859
|
+
),
|
|
860
|
+
children
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
)
|
|
864
|
+
] })
|
|
865
|
+
] });
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
// src/collapsible-sidebar.tsx
|
|
869
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
657
870
|
var SidebarContext = createContext(null);
|
|
658
871
|
function useSidebar() {
|
|
659
872
|
const context = useContext(SidebarContext);
|
|
@@ -668,7 +881,7 @@ var DefaultLink = ({
|
|
|
668
881
|
href,
|
|
669
882
|
className,
|
|
670
883
|
children
|
|
671
|
-
}) => /* @__PURE__ */
|
|
884
|
+
}) => /* @__PURE__ */ jsx10("a", { href: String(href), className, children });
|
|
672
885
|
function CollapsibleSidebar({
|
|
673
886
|
storageKey = "sidebar-collapsed",
|
|
674
887
|
defaultCollapsed = false,
|
|
@@ -681,12 +894,12 @@ function CollapsibleSidebar({
|
|
|
681
894
|
collapsedFooter,
|
|
682
895
|
className,
|
|
683
896
|
collapsedWidth = COLLAPSED_WIDTH,
|
|
684
|
-
expandedWidth = EXPANDED_WIDTH
|
|
897
|
+
expandedWidth = EXPANDED_WIDTH,
|
|
898
|
+
navLabel = "Navigation",
|
|
899
|
+
defaultNavOpen = false
|
|
685
900
|
}) {
|
|
686
|
-
const [isCollapsed, setIsCollapsed] =
|
|
687
|
-
|
|
688
|
-
useEffect(() => {
|
|
689
|
-
setMounted(true);
|
|
901
|
+
const [isCollapsed, setIsCollapsed] = useState2(defaultCollapsed);
|
|
902
|
+
useEffect2(() => {
|
|
690
903
|
const stored = localStorage.getItem(storageKey);
|
|
691
904
|
if (stored !== null) {
|
|
692
905
|
setIsCollapsed(stored === "true");
|
|
@@ -699,104 +912,106 @@ function CollapsibleSidebar({
|
|
|
699
912
|
return newValue;
|
|
700
913
|
});
|
|
701
914
|
}, [storageKey]);
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
915
|
+
const renderItem = (item, collapsed) => {
|
|
916
|
+
const Icon2 = item.icon;
|
|
917
|
+
const active = isActive?.(item.href) ?? false;
|
|
918
|
+
const linkContent = /* @__PURE__ */ jsxs6(
|
|
919
|
+
LinkComponent,
|
|
705
920
|
{
|
|
921
|
+
href: item.href,
|
|
706
922
|
className: cn(
|
|
707
|
-
"
|
|
708
|
-
|
|
923
|
+
"flex items-center gap-3 rounded-lg px-3 py-2 transition-colors",
|
|
924
|
+
collapsed && "justify-center px-2",
|
|
925
|
+
active ? "bg-primary-solid text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
709
926
|
),
|
|
710
|
-
|
|
927
|
+
children: [
|
|
928
|
+
/* @__PURE__ */ jsx10(Icon2, { className: cn("size-5 shrink-0", collapsed && "size-5") }),
|
|
929
|
+
!collapsed && /* @__PURE__ */ jsxs6("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
930
|
+
/* @__PURE__ */ jsx10("div", { className: "truncate text-sm font-medium", children: item.name }),
|
|
931
|
+
item.description && /* @__PURE__ */ jsx10(
|
|
932
|
+
"div",
|
|
933
|
+
{
|
|
934
|
+
className: cn(
|
|
935
|
+
"truncate text-xs",
|
|
936
|
+
// W1 (#5823): full white on the solid fill (at /80 it
|
|
937
|
+
// was below AA)
|
|
938
|
+
active ? "text-primary-foreground" : "text-muted-foreground"
|
|
939
|
+
),
|
|
940
|
+
children: item.description
|
|
941
|
+
}
|
|
942
|
+
)
|
|
943
|
+
] })
|
|
944
|
+
]
|
|
711
945
|
}
|
|
712
946
|
);
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
)
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
children: isCollapsed ? /* @__PURE__ */ jsx8(ChevronRight, { className: "size-4" }) : /* @__PURE__ */ jsx8(ChevronLeft, { className: "size-4" })
|
|
732
|
-
}
|
|
947
|
+
if (collapsed) {
|
|
948
|
+
return /* @__PURE__ */ jsxs6(Tooltip, { children: [
|
|
949
|
+
/* @__PURE__ */ jsx10(TooltipTrigger, { asChild: true, children: linkContent }),
|
|
950
|
+
/* @__PURE__ */ jsxs6(TooltipContent, { side: "right", className: "flex flex-col", children: [
|
|
951
|
+
/* @__PURE__ */ jsx10("span", { className: "font-medium", children: item.name }),
|
|
952
|
+
item.description && /* @__PURE__ */ jsx10("span", { className: "text-xs text-muted-foreground", children: item.description })
|
|
953
|
+
] })
|
|
954
|
+
] }, item.href);
|
|
955
|
+
}
|
|
956
|
+
return /* @__PURE__ */ jsx10("div", { children: linkContent }, item.href);
|
|
957
|
+
};
|
|
958
|
+
return /* @__PURE__ */ jsx10(SidebarContext.Provider, { value: { isCollapsed, toggle }, children: /* @__PURE__ */ jsxs6(TooltipProvider, { delayDuration: 100, children: [
|
|
959
|
+
/* @__PURE__ */ jsx10(
|
|
960
|
+
"div",
|
|
961
|
+
{
|
|
962
|
+
className: cn(
|
|
963
|
+
"flex min-h-screen w-14 flex-shrink-0 flex-col items-center border-r border-border bg-card py-2 lg:hidden",
|
|
964
|
+
className
|
|
733
965
|
),
|
|
734
|
-
|
|
735
|
-
"div",
|
|
736
|
-
{
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
966
|
+
children: /* @__PURE__ */ jsxs6(NavDrawer, { label: navLabel, side: "left", defaultOpen: defaultNavOpen, children: [
|
|
967
|
+
header && /* @__PURE__ */ jsx10("div", { className: "border-b border-border px-4 pb-4", children: header }),
|
|
968
|
+
/* @__PURE__ */ jsx10("div", { className: "flex-1 space-y-1 p-2", children: items.map((item) => renderItem(item, false)) }),
|
|
969
|
+
footer && /* @__PURE__ */ jsx10("div", { className: "mt-auto border-t border-border p-2", children: footer })
|
|
970
|
+
] })
|
|
971
|
+
}
|
|
972
|
+
),
|
|
973
|
+
/* @__PURE__ */ jsxs6(
|
|
974
|
+
"nav",
|
|
975
|
+
{
|
|
976
|
+
className: cn(
|
|
977
|
+
"relative hidden min-h-screen flex-col border-r border-border bg-card transition-all duration-300 ease-in-out lg:flex",
|
|
978
|
+
className
|
|
743
979
|
),
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
LinkComponent,
|
|
980
|
+
style: { width: isCollapsed ? collapsedWidth : expandedWidth },
|
|
981
|
+
children: [
|
|
982
|
+
/* @__PURE__ */ jsx10(
|
|
983
|
+
"button",
|
|
749
984
|
{
|
|
750
|
-
|
|
985
|
+
onClick: toggle,
|
|
751
986
|
className: cn(
|
|
752
|
-
"flex items-center
|
|
753
|
-
isCollapsed && "justify-center px-2",
|
|
754
|
-
active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
987
|
+
"absolute -right-3 top-6 z-10 flex size-6 items-center justify-center rounded-full border border-border bg-card shadow-sm transition-colors hover:bg-muted"
|
|
755
988
|
),
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
Icon,
|
|
759
|
-
{
|
|
760
|
-
className: cn("size-5 shrink-0", isCollapsed && "size-5")
|
|
761
|
-
}
|
|
762
|
-
),
|
|
763
|
-
!isCollapsed && /* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
764
|
-
/* @__PURE__ */ jsx8("div", { className: "truncate text-sm font-medium", children: item.name }),
|
|
765
|
-
item.description && /* @__PURE__ */ jsx8(
|
|
766
|
-
"div",
|
|
767
|
-
{
|
|
768
|
-
className: cn(
|
|
769
|
-
"truncate text-xs",
|
|
770
|
-
active ? "text-primary-foreground/80" : "text-muted-foreground"
|
|
771
|
-
),
|
|
772
|
-
children: item.description
|
|
773
|
-
}
|
|
774
|
-
)
|
|
775
|
-
] })
|
|
776
|
-
]
|
|
989
|
+
"aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
990
|
+
children: isCollapsed ? /* @__PURE__ */ jsx10(ChevronRight2, { className: "size-4" }) : /* @__PURE__ */ jsx10(ChevronLeft2, { className: "size-4" })
|
|
777
991
|
}
|
|
778
|
-
)
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
992
|
+
),
|
|
993
|
+
(header || collapsedHeader) && /* @__PURE__ */ jsx10(
|
|
994
|
+
"div",
|
|
995
|
+
{
|
|
996
|
+
className: cn(
|
|
997
|
+
"border-b border-border p-4 transition-all duration-300",
|
|
998
|
+
isCollapsed ? "px-2" : "px-4"
|
|
999
|
+
),
|
|
1000
|
+
children: isCollapsed ? collapsedHeader || null : header
|
|
1001
|
+
}
|
|
1002
|
+
),
|
|
1003
|
+
/* @__PURE__ */ jsx10("div", { className: "flex-1 space-y-1 overflow-y-auto p-2", children: items.map((item) => renderItem(item, isCollapsed)) }),
|
|
1004
|
+
(footer || collapsedFooter) && /* @__PURE__ */ jsx10("div", { className: "mt-auto border-t border-border p-2", children: isCollapsed ? collapsedFooter || null : footer })
|
|
1005
|
+
]
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
] }) });
|
|
794
1009
|
}
|
|
795
1010
|
|
|
796
1011
|
// src/accordion.tsx
|
|
797
|
-
import { createContext as createContext2, useContext as useContext2, useState as
|
|
798
|
-
import { ChevronDown } from "lucide-react";
|
|
799
|
-
import { jsx as
|
|
1012
|
+
import { createContext as createContext2, useContext as useContext2, useState as useState3, useCallback as useCallback2, useId as useId3 } from "react";
|
|
1013
|
+
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1014
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
800
1015
|
var AccordionContext = createContext2(null);
|
|
801
1016
|
var AccordionItemContext = createContext2(
|
|
802
1017
|
null
|
|
@@ -825,7 +1040,7 @@ function AccordionSingle({
|
|
|
825
1040
|
children,
|
|
826
1041
|
className
|
|
827
1042
|
}) {
|
|
828
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
1043
|
+
const [uncontrolledValue, setUncontrolledValue] = useState3(defaultValue);
|
|
829
1044
|
const isControlled = controlledValue !== void 0;
|
|
830
1045
|
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
831
1046
|
const handleValueChange = useCallback2(
|
|
@@ -838,7 +1053,7 @@ function AccordionSingle({
|
|
|
838
1053
|
},
|
|
839
1054
|
[value, collapsible, isControlled, onValueChange]
|
|
840
1055
|
);
|
|
841
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsx11(
|
|
842
1057
|
AccordionContext.Provider,
|
|
843
1058
|
{
|
|
844
1059
|
value: {
|
|
@@ -846,7 +1061,7 @@ function AccordionSingle({
|
|
|
846
1061
|
value,
|
|
847
1062
|
onValueChange: handleValueChange
|
|
848
1063
|
},
|
|
849
|
-
children: /* @__PURE__ */
|
|
1064
|
+
children: /* @__PURE__ */ jsx11("div", { className: cn("space-y-2", className), "data-accordion-root": "", children })
|
|
850
1065
|
}
|
|
851
1066
|
);
|
|
852
1067
|
}
|
|
@@ -857,7 +1072,7 @@ function AccordionMultiple({
|
|
|
857
1072
|
children,
|
|
858
1073
|
className
|
|
859
1074
|
}) {
|
|
860
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
1075
|
+
const [uncontrolledValue, setUncontrolledValue] = useState3(defaultValue);
|
|
861
1076
|
const isControlled = controlledValue !== void 0;
|
|
862
1077
|
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
863
1078
|
const handleValueChange = useCallback2(
|
|
@@ -870,7 +1085,7 @@ function AccordionMultiple({
|
|
|
870
1085
|
},
|
|
871
1086
|
[value, isControlled, onValueChange]
|
|
872
1087
|
);
|
|
873
|
-
return /* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ jsx11(
|
|
874
1089
|
AccordionContext.Provider,
|
|
875
1090
|
{
|
|
876
1091
|
value: {
|
|
@@ -878,15 +1093,15 @@ function AccordionMultiple({
|
|
|
878
1093
|
value,
|
|
879
1094
|
onValueChange: handleValueChange
|
|
880
1095
|
},
|
|
881
|
-
children: /* @__PURE__ */
|
|
1096
|
+
children: /* @__PURE__ */ jsx11("div", { className: cn("space-y-2", className), "data-accordion-root": "", children })
|
|
882
1097
|
}
|
|
883
1098
|
);
|
|
884
1099
|
}
|
|
885
1100
|
function Accordion(props) {
|
|
886
1101
|
if (props.type === "multiple") {
|
|
887
|
-
return /* @__PURE__ */
|
|
1102
|
+
return /* @__PURE__ */ jsx11(AccordionMultiple, { ...props });
|
|
888
1103
|
}
|
|
889
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ jsx11(AccordionSingle, { ...props });
|
|
890
1105
|
}
|
|
891
1106
|
function AccordionItem({
|
|
892
1107
|
value,
|
|
@@ -896,15 +1111,15 @@ function AccordionItem({
|
|
|
896
1111
|
testId
|
|
897
1112
|
}) {
|
|
898
1113
|
const { value: accordionValue, type } = useAccordion();
|
|
899
|
-
const uniqueId =
|
|
1114
|
+
const uniqueId = useId3();
|
|
900
1115
|
const triggerId = `accordion-trigger-${uniqueId}`;
|
|
901
1116
|
const contentId = `accordion-content-${uniqueId}`;
|
|
902
1117
|
const isOpen = type === "single" ? accordionValue === value : accordionValue.includes(value);
|
|
903
|
-
return /* @__PURE__ */
|
|
1118
|
+
return /* @__PURE__ */ jsx11(
|
|
904
1119
|
AccordionItemContext.Provider,
|
|
905
1120
|
{
|
|
906
|
-
value: { value, isOpen, triggerId, contentId },
|
|
907
|
-
children: /* @__PURE__ */
|
|
1121
|
+
value: { value, isOpen, triggerId, contentId, disabled },
|
|
1122
|
+
children: /* @__PURE__ */ jsx11(
|
|
908
1123
|
"div",
|
|
909
1124
|
{
|
|
910
1125
|
className: cn(
|
|
@@ -929,12 +1144,13 @@ function AccordionTrigger({
|
|
|
929
1144
|
testId
|
|
930
1145
|
}) {
|
|
931
1146
|
const { onValueChange } = useAccordion();
|
|
932
|
-
const { value, isOpen, triggerId, contentId } = useAccordionItem();
|
|
933
|
-
return /* @__PURE__ */
|
|
1147
|
+
const { value, isOpen, triggerId, contentId, disabled } = useAccordionItem();
|
|
1148
|
+
return /* @__PURE__ */ jsxs7(
|
|
934
1149
|
"button",
|
|
935
1150
|
{
|
|
936
1151
|
id: triggerId,
|
|
937
1152
|
type: "button",
|
|
1153
|
+
disabled,
|
|
938
1154
|
onClick: () => onValueChange(value),
|
|
939
1155
|
className: cn(
|
|
940
1156
|
"flex w-full items-center justify-between gap-3 p-4 text-left font-medium",
|
|
@@ -948,14 +1164,14 @@ function AccordionTrigger({
|
|
|
948
1164
|
"data-state": isOpen ? "open" : "closed",
|
|
949
1165
|
"data-testid": testId,
|
|
950
1166
|
children: [
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
icon && /* @__PURE__ */
|
|
953
|
-
/* @__PURE__ */
|
|
1167
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-3", children: [
|
|
1168
|
+
icon && /* @__PURE__ */ jsx11("span", { className: "shrink-0", children: icon }),
|
|
1169
|
+
/* @__PURE__ */ jsx11("span", { children })
|
|
954
1170
|
] }),
|
|
955
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-2", children: [
|
|
956
1172
|
rightContent,
|
|
957
|
-
/* @__PURE__ */
|
|
958
|
-
|
|
1173
|
+
/* @__PURE__ */ jsx11(
|
|
1174
|
+
ChevronDown2,
|
|
959
1175
|
{
|
|
960
1176
|
className: cn(
|
|
961
1177
|
"size-5 shrink-0 text-muted-foreground transition-transform duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]",
|
|
@@ -975,7 +1191,7 @@ function AccordionContent({
|
|
|
975
1191
|
testId
|
|
976
1192
|
}) {
|
|
977
1193
|
const { isOpen, contentId, triggerId } = useAccordionItem();
|
|
978
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ jsx11(
|
|
979
1195
|
"div",
|
|
980
1196
|
{
|
|
981
1197
|
id: contentId,
|
|
@@ -989,7 +1205,7 @@ function AccordionContent({
|
|
|
989
1205
|
"grid transition-all duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]",
|
|
990
1206
|
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
991
1207
|
),
|
|
992
|
-
children: /* @__PURE__ */
|
|
1208
|
+
children: /* @__PURE__ */ jsx11("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx11("div", { className: cn("px-4 pb-4", className), children }) })
|
|
993
1209
|
}
|
|
994
1210
|
);
|
|
995
1211
|
}
|
|
@@ -1007,10 +1223,10 @@ function SimpleAccordion({
|
|
|
1007
1223
|
triggerTestId,
|
|
1008
1224
|
contentTestId
|
|
1009
1225
|
}) {
|
|
1010
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
1226
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState3(defaultOpen);
|
|
1011
1227
|
const isControlled = controlledOpen !== void 0;
|
|
1012
1228
|
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
1013
|
-
const uniqueId =
|
|
1229
|
+
const uniqueId = useId3();
|
|
1014
1230
|
const triggerId = `simple-accordion-trigger-${uniqueId}`;
|
|
1015
1231
|
const contentId = `simple-accordion-content-${uniqueId}`;
|
|
1016
1232
|
const toggle = useCallback2(() => {
|
|
@@ -1020,7 +1236,7 @@ function SimpleAccordion({
|
|
|
1020
1236
|
}
|
|
1021
1237
|
onOpenChange?.(newValue);
|
|
1022
1238
|
}, [isOpen, isControlled, onOpenChange]);
|
|
1023
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ jsxs7(
|
|
1024
1240
|
"div",
|
|
1025
1241
|
{
|
|
1026
1242
|
className: cn(
|
|
@@ -1029,7 +1245,7 @@ function SimpleAccordion({
|
|
|
1029
1245
|
),
|
|
1030
1246
|
"data-state": isOpen ? "open" : "closed",
|
|
1031
1247
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ jsxs7(
|
|
1033
1249
|
"button",
|
|
1034
1250
|
{
|
|
1035
1251
|
id: triggerId,
|
|
@@ -1047,14 +1263,14 @@ function SimpleAccordion({
|
|
|
1047
1263
|
"data-state": isOpen ? "open" : "closed",
|
|
1048
1264
|
"data-testid": triggerTestId,
|
|
1049
1265
|
children: [
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
icon && /* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1266
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-3", children: [
|
|
1267
|
+
icon && /* @__PURE__ */ jsx11("span", { className: "shrink-0", children: icon }),
|
|
1268
|
+
/* @__PURE__ */ jsx11("span", { children: title })
|
|
1053
1269
|
] }),
|
|
1054
|
-
/* @__PURE__ */
|
|
1270
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-2", children: [
|
|
1055
1271
|
rightContent,
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
|
|
1272
|
+
/* @__PURE__ */ jsx11(
|
|
1273
|
+
ChevronDown2,
|
|
1058
1274
|
{
|
|
1059
1275
|
className: cn(
|
|
1060
1276
|
"size-5 shrink-0 text-muted-foreground transition-transform duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]",
|
|
@@ -1067,7 +1283,7 @@ function SimpleAccordion({
|
|
|
1067
1283
|
]
|
|
1068
1284
|
}
|
|
1069
1285
|
),
|
|
1070
|
-
/* @__PURE__ */
|
|
1286
|
+
/* @__PURE__ */ jsx11(
|
|
1071
1287
|
"div",
|
|
1072
1288
|
{
|
|
1073
1289
|
id: contentId,
|
|
@@ -1080,7 +1296,7 @@ function SimpleAccordion({
|
|
|
1080
1296
|
"grid transition-all duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]",
|
|
1081
1297
|
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
1082
1298
|
),
|
|
1083
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ jsx11("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx11("div", { className: cn("px-4 pb-4", contentClassName), children }) })
|
|
1084
1300
|
}
|
|
1085
1301
|
)
|
|
1086
1302
|
]
|
|
@@ -1089,9 +1305,9 @@ function SimpleAccordion({
|
|
|
1089
1305
|
}
|
|
1090
1306
|
|
|
1091
1307
|
// src/confirm-dialog.tsx
|
|
1092
|
-
import * as
|
|
1308
|
+
import * as React7 from "react";
|
|
1093
1309
|
import { Loader2 as Loader22 } from "lucide-react";
|
|
1094
|
-
import { Fragment as
|
|
1310
|
+
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1095
1311
|
function ConfirmDialog({
|
|
1096
1312
|
title,
|
|
1097
1313
|
message,
|
|
@@ -1106,7 +1322,7 @@ function ConfirmDialog({
|
|
|
1106
1322
|
confirmVariant = "default",
|
|
1107
1323
|
className
|
|
1108
1324
|
}) {
|
|
1109
|
-
|
|
1325
|
+
React7.useEffect(() => {
|
|
1110
1326
|
function handleKeyDown(e) {
|
|
1111
1327
|
if (e.key === "Escape" && !isLoading) {
|
|
1112
1328
|
onCancel();
|
|
@@ -1115,7 +1331,7 @@ function ConfirmDialog({
|
|
|
1115
1331
|
document.addEventListener("keydown", handleKeyDown);
|
|
1116
1332
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
1117
1333
|
}, [onCancel, isLoading]);
|
|
1118
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsx12(
|
|
1119
1335
|
"div",
|
|
1120
1336
|
{
|
|
1121
1337
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm dark:bg-background/80",
|
|
@@ -1124,7 +1340,7 @@ function ConfirmDialog({
|
|
|
1124
1340
|
"aria-labelledby": "confirm-dialog-title",
|
|
1125
1341
|
"aria-describedby": "confirm-dialog-description",
|
|
1126
1342
|
"data-testid": dialogTestId,
|
|
1127
|
-
children: /* @__PURE__ */
|
|
1343
|
+
children: /* @__PURE__ */ jsxs8(
|
|
1128
1344
|
"div",
|
|
1129
1345
|
{
|
|
1130
1346
|
className: cn(
|
|
@@ -1133,7 +1349,7 @@ function ConfirmDialog({
|
|
|
1133
1349
|
className
|
|
1134
1350
|
),
|
|
1135
1351
|
children: [
|
|
1136
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ jsx12(
|
|
1137
1353
|
"h3",
|
|
1138
1354
|
{
|
|
1139
1355
|
id: "confirm-dialog-title",
|
|
@@ -1141,7 +1357,7 @@ function ConfirmDialog({
|
|
|
1141
1357
|
children: title
|
|
1142
1358
|
}
|
|
1143
1359
|
),
|
|
1144
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ jsx12(
|
|
1145
1361
|
"p",
|
|
1146
1362
|
{
|
|
1147
1363
|
id: "confirm-dialog-description",
|
|
@@ -1149,8 +1365,8 @@ function ConfirmDialog({
|
|
|
1149
1365
|
children: message
|
|
1150
1366
|
}
|
|
1151
1367
|
),
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ jsxs8("div", { className: "mt-6 flex justify-end gap-3", children: [
|
|
1369
|
+
/* @__PURE__ */ jsx12(
|
|
1154
1370
|
Button,
|
|
1155
1371
|
{
|
|
1156
1372
|
variant: "ghost",
|
|
@@ -1160,15 +1376,15 @@ function ConfirmDialog({
|
|
|
1160
1376
|
children: cancelLabel
|
|
1161
1377
|
}
|
|
1162
1378
|
),
|
|
1163
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ jsx12(
|
|
1164
1380
|
Button,
|
|
1165
1381
|
{
|
|
1166
1382
|
variant: confirmVariant,
|
|
1167
1383
|
onClick: onConfirm,
|
|
1168
1384
|
disabled: isLoading,
|
|
1169
1385
|
"data-testid": confirmTestId,
|
|
1170
|
-
children: isLoading ? /* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
1386
|
+
children: isLoading ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
1387
|
+
/* @__PURE__ */ jsx12(Loader22, { className: "mr-2 size-4 animate-spin" }),
|
|
1172
1388
|
confirmLabel,
|
|
1173
1389
|
"..."
|
|
1174
1390
|
] }) : confirmLabel
|
|
@@ -1183,9 +1399,9 @@ function ConfirmDialog({
|
|
|
1183
1399
|
}
|
|
1184
1400
|
|
|
1185
1401
|
// src/dicebear-avatar.tsx
|
|
1186
|
-
import * as
|
|
1402
|
+
import * as React8 from "react";
|
|
1187
1403
|
import { cva as cva2 } from "class-variance-authority";
|
|
1188
|
-
import { jsx as
|
|
1404
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1189
1405
|
var avatarVariants = cva2(
|
|
1190
1406
|
"relative inline-flex shrink-0 overflow-hidden rounded-full bg-muted dark:bg-muted",
|
|
1191
1407
|
{
|
|
@@ -1209,7 +1425,7 @@ function buildDiceBearUrl(seed, style = "adventurer-neutral") {
|
|
|
1209
1425
|
const encodedSeed = encodeURIComponent(seed);
|
|
1210
1426
|
return `${DICEBEAR_BASE_URL}/${style}/svg?seed=${encodedSeed}`;
|
|
1211
1427
|
}
|
|
1212
|
-
var DiceBearAvatar =
|
|
1428
|
+
var DiceBearAvatar = React8.forwardRef(
|
|
1213
1429
|
({
|
|
1214
1430
|
seed,
|
|
1215
1431
|
avatarStyle = "adventurer-neutral",
|
|
@@ -1219,18 +1435,18 @@ var DiceBearAvatar = React7.forwardRef(
|
|
|
1219
1435
|
className,
|
|
1220
1436
|
...props
|
|
1221
1437
|
}, ref) => {
|
|
1222
|
-
const [hasError, setHasError] =
|
|
1438
|
+
const [hasError, setHasError] = React8.useState(false);
|
|
1223
1439
|
const url = buildDiceBearUrl(seed, avatarStyle);
|
|
1224
|
-
|
|
1440
|
+
React8.useEffect(() => {
|
|
1225
1441
|
setHasError(false);
|
|
1226
1442
|
}, [seed, avatarStyle]);
|
|
1227
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ jsx13(
|
|
1228
1444
|
"div",
|
|
1229
1445
|
{
|
|
1230
1446
|
ref,
|
|
1231
1447
|
className: cn(avatarVariants({ size }), className),
|
|
1232
1448
|
...props,
|
|
1233
|
-
children: hasError ? fallback ? /* @__PURE__ */
|
|
1449
|
+
children: hasError ? fallback ? /* @__PURE__ */ jsx13("div", { className: "flex h-full w-full items-center justify-center text-xs font-medium text-muted-foreground dark:text-muted-foreground", children: fallback }) : /* @__PURE__ */ jsx13("div", { className: "text-primary-text dark:text-primary-text flex h-full w-full items-center justify-center bg-primary/10 text-xs font-medium dark:bg-primary/10", children: seed.charAt(0).toUpperCase() }) : /* @__PURE__ */ jsx13(
|
|
1234
1450
|
"img",
|
|
1235
1451
|
{
|
|
1236
1452
|
src: url,
|
|
@@ -1246,14 +1462,14 @@ var DiceBearAvatar = React7.forwardRef(
|
|
|
1246
1462
|
DiceBearAvatar.displayName = "DiceBearAvatar";
|
|
1247
1463
|
|
|
1248
1464
|
// src/intent-icon.tsx
|
|
1249
|
-
import { Check, AlertTriangle, X, Info } from "lucide-react";
|
|
1250
|
-
import { jsx as
|
|
1465
|
+
import { Check as Check2, AlertTriangle, X as X2, Info as Info2 } from "lucide-react";
|
|
1466
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1251
1467
|
var intentConfig = {
|
|
1252
1468
|
success: {
|
|
1253
1469
|
outerBg: "bg-[rgba(33,196,93,0.10)] dark:bg-[rgba(33,196,93,0.10)]",
|
|
1254
1470
|
innerBg: "bg-[rgba(33,196,93,0.20)] dark:bg-[rgba(33,196,93,0.20)]",
|
|
1255
1471
|
iconColor: "text-[#21c45d] dark:text-[#21c45d]",
|
|
1256
|
-
Icon:
|
|
1472
|
+
Icon: Check2
|
|
1257
1473
|
},
|
|
1258
1474
|
warning: {
|
|
1259
1475
|
outerBg: "bg-[rgba(245,159,10,0.10)] dark:bg-[rgba(245,159,10,0.10)]",
|
|
@@ -1265,13 +1481,13 @@ var intentConfig = {
|
|
|
1265
1481
|
outerBg: "bg-[rgba(239,67,67,0.10)] dark:bg-[rgba(239,67,67,0.10)]",
|
|
1266
1482
|
innerBg: "bg-[rgba(239,67,67,0.20)] dark:bg-[rgba(239,67,67,0.20)]",
|
|
1267
1483
|
iconColor: "text-[#ef4343] dark:text-[#ef4343]",
|
|
1268
|
-
Icon:
|
|
1484
|
+
Icon: X2
|
|
1269
1485
|
},
|
|
1270
1486
|
info: {
|
|
1271
1487
|
outerBg: "bg-[rgba(60,131,246,0.10)] dark:bg-[rgba(60,131,246,0.10)]",
|
|
1272
1488
|
innerBg: "bg-[rgba(60,131,246,0.20)] dark:bg-[rgba(60,131,246,0.20)]",
|
|
1273
1489
|
iconColor: "text-[#3c83f6] dark:text-[#3c83f6]",
|
|
1274
|
-
Icon:
|
|
1490
|
+
Icon: Info2
|
|
1275
1491
|
}
|
|
1276
1492
|
};
|
|
1277
1493
|
var sizeConfig = {
|
|
@@ -1290,20 +1506,20 @@ function IntentIcon({
|
|
|
1290
1506
|
intent = "success",
|
|
1291
1507
|
size = "md"
|
|
1292
1508
|
}) {
|
|
1293
|
-
const { outerBg, innerBg, iconColor, Icon } = intentConfig[intent];
|
|
1509
|
+
const { outerBg, innerBg, iconColor, Icon: Icon2 } = intentConfig[intent];
|
|
1294
1510
|
const { outer, inner, iconSize } = sizeConfig[size];
|
|
1295
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx14(
|
|
1296
1512
|
"div",
|
|
1297
1513
|
{
|
|
1298
1514
|
"data-testid": "intent-icon",
|
|
1299
1515
|
className: `${outer} ${outerBg} flex items-center justify-center`,
|
|
1300
|
-
children: /* @__PURE__ */
|
|
1516
|
+
children: /* @__PURE__ */ jsx14("div", { className: `${inner} ${innerBg} flex items-center justify-center`, children: /* @__PURE__ */ jsx14(Icon2, { className: iconColor, size: iconSize }) })
|
|
1301
1517
|
}
|
|
1302
1518
|
);
|
|
1303
1519
|
}
|
|
1304
1520
|
|
|
1305
1521
|
// src/section-heading.tsx
|
|
1306
|
-
import { jsx as
|
|
1522
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1307
1523
|
var sizeConfig2 = {
|
|
1308
1524
|
display: {
|
|
1309
1525
|
className: "text-4xl font-bold leading-10",
|
|
@@ -1328,8 +1544,8 @@ function SectionHeading({
|
|
|
1328
1544
|
align = "center",
|
|
1329
1545
|
size = "h1"
|
|
1330
1546
|
}) {
|
|
1331
|
-
const { className: sizeClass, tag:
|
|
1332
|
-
return /* @__PURE__ */
|
|
1547
|
+
const { className: sizeClass, tag: Tag2 } = sizeConfig2[size];
|
|
1548
|
+
return /* @__PURE__ */ jsxs9(
|
|
1333
1549
|
"div",
|
|
1334
1550
|
{
|
|
1335
1551
|
"data-testid": "section-heading",
|
|
@@ -1339,15 +1555,15 @@ function SectionHeading({
|
|
|
1339
1555
|
align === "left" && "items-start text-left"
|
|
1340
1556
|
),
|
|
1341
1557
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
description && /* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ jsx15(Tag2, { className: cn("text-foreground dark:text-foreground", sizeClass), children: title }),
|
|
1559
|
+
description && /* @__PURE__ */ jsx15("p", { className: "text-sm font-normal leading-[21px] text-muted-foreground dark:text-muted-foreground", children: description })
|
|
1344
1560
|
]
|
|
1345
1561
|
}
|
|
1346
1562
|
);
|
|
1347
1563
|
}
|
|
1348
1564
|
|
|
1349
1565
|
// src/filter-chip.tsx
|
|
1350
|
-
import { jsx as
|
|
1566
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1351
1567
|
function FilterChip({
|
|
1352
1568
|
label,
|
|
1353
1569
|
active = false,
|
|
@@ -1355,7 +1571,7 @@ function FilterChip({
|
|
|
1355
1571
|
size = "md",
|
|
1356
1572
|
onClick
|
|
1357
1573
|
}) {
|
|
1358
|
-
return /* @__PURE__ */
|
|
1574
|
+
return /* @__PURE__ */ jsxs10(
|
|
1359
1575
|
"button",
|
|
1360
1576
|
{
|
|
1361
1577
|
type: "button",
|
|
@@ -1378,7 +1594,7 @@ function FilterChip({
|
|
|
1378
1594
|
),
|
|
1379
1595
|
children: [
|
|
1380
1596
|
label,
|
|
1381
|
-
count != null && /* @__PURE__ */
|
|
1597
|
+
count != null && /* @__PURE__ */ jsx16(
|
|
1382
1598
|
"span",
|
|
1383
1599
|
{
|
|
1384
1600
|
className: cn(
|
|
@@ -1396,35 +1612,35 @@ function FilterChip({
|
|
|
1396
1612
|
}
|
|
1397
1613
|
|
|
1398
1614
|
// src/distribution-chip.tsx
|
|
1399
|
-
import { jsx as
|
|
1615
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1400
1616
|
function DistributionChip({
|
|
1401
1617
|
count,
|
|
1402
1618
|
label,
|
|
1403
1619
|
dotClass,
|
|
1404
1620
|
testId
|
|
1405
1621
|
}) {
|
|
1406
|
-
return /* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ jsxs11(
|
|
1407
1623
|
"span",
|
|
1408
1624
|
{
|
|
1409
1625
|
"data-testid": testId,
|
|
1410
1626
|
className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1 text-sm font-medium text-foreground",
|
|
1411
1627
|
children: [
|
|
1412
|
-
/* @__PURE__ */
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ jsx17("span", { className: `size-2 rounded-full ${dotClass}` }),
|
|
1629
|
+
/* @__PURE__ */ jsx17("span", { className: "tabular-nums", children: count }),
|
|
1630
|
+
/* @__PURE__ */ jsx17("span", { className: "text-muted-foreground", children: label })
|
|
1415
1631
|
]
|
|
1416
1632
|
}
|
|
1417
1633
|
);
|
|
1418
1634
|
}
|
|
1419
1635
|
|
|
1420
1636
|
// src/skeleton-bar.tsx
|
|
1421
|
-
import { jsx as
|
|
1637
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1422
1638
|
function SkeletonBar({
|
|
1423
1639
|
width = "full",
|
|
1424
1640
|
height = 14,
|
|
1425
1641
|
className = ""
|
|
1426
1642
|
}) {
|
|
1427
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ jsx18(
|
|
1428
1644
|
"div",
|
|
1429
1645
|
{
|
|
1430
1646
|
"data-testid": "skeleton-bar",
|
|
@@ -1442,9 +1658,9 @@ function SkeletonBar({
|
|
|
1442
1658
|
}
|
|
1443
1659
|
|
|
1444
1660
|
// src/skeleton-card.tsx
|
|
1445
|
-
import { jsx as
|
|
1661
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1446
1662
|
function SkeletonCard({ className = "" }) {
|
|
1447
|
-
return /* @__PURE__ */
|
|
1663
|
+
return /* @__PURE__ */ jsxs12(
|
|
1448
1664
|
"div",
|
|
1449
1665
|
{
|
|
1450
1666
|
"data-testid": "skeleton-card",
|
|
@@ -1453,18 +1669,18 @@ function SkeletonCard({ className = "" }) {
|
|
|
1453
1669
|
className
|
|
1454
1670
|
),
|
|
1455
1671
|
children: [
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1672
|
+
/* @__PURE__ */ jsx19(SkeletonBar, { width: 80, height: 10 }),
|
|
1673
|
+
/* @__PURE__ */ jsx19(SkeletonBar, { width: 60, height: 24 }),
|
|
1674
|
+
/* @__PURE__ */ jsx19(SkeletonBar, { width: 100, height: 10 })
|
|
1459
1675
|
]
|
|
1460
1676
|
}
|
|
1461
1677
|
);
|
|
1462
1678
|
}
|
|
1463
1679
|
|
|
1464
1680
|
// src/skeleton-row.tsx
|
|
1465
|
-
import { jsx as
|
|
1681
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1466
1682
|
function SkeletonRow({ className = "" }) {
|
|
1467
|
-
return /* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ jsxs13(
|
|
1468
1684
|
"div",
|
|
1469
1685
|
{
|
|
1470
1686
|
"data-testid": "skeleton-row",
|
|
@@ -1473,10 +1689,10 @@ function SkeletonRow({ className = "" }) {
|
|
|
1473
1689
|
className
|
|
1474
1690
|
),
|
|
1475
1691
|
children: [
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
/* @__PURE__ */
|
|
1479
|
-
/* @__PURE__ */
|
|
1692
|
+
/* @__PURE__ */ jsx20("div", { className: "h-9 w-9 flex-shrink-0 animate-pulse rounded-full bg-muted dark:bg-muted" }),
|
|
1693
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-1 flex-col gap-1.5", children: [
|
|
1694
|
+
/* @__PURE__ */ jsx20(SkeletonBar, { width: 200, height: 12 }),
|
|
1695
|
+
/* @__PURE__ */ jsx20(SkeletonBar, { width: 140, height: 10 })
|
|
1480
1696
|
] })
|
|
1481
1697
|
]
|
|
1482
1698
|
}
|
|
@@ -1484,10 +1700,10 @@ function SkeletonRow({ className = "" }) {
|
|
|
1484
1700
|
}
|
|
1485
1701
|
|
|
1486
1702
|
// src/stacked-list.tsx
|
|
1487
|
-
import * as
|
|
1488
|
-
import { jsx as
|
|
1489
|
-
var StackedList =
|
|
1490
|
-
({ className, divided = true, density = "default", ...props }, ref) => /* @__PURE__ */
|
|
1703
|
+
import * as React9 from "react";
|
|
1704
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1705
|
+
var StackedList = React9.forwardRef(
|
|
1706
|
+
({ className, divided = true, density = "default", ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1491
1707
|
"ul",
|
|
1492
1708
|
{
|
|
1493
1709
|
ref,
|
|
@@ -1499,7 +1715,7 @@ var StackedList = React8.forwardRef(
|
|
|
1499
1715
|
)
|
|
1500
1716
|
);
|
|
1501
1717
|
StackedList.displayName = "StackedList";
|
|
1502
|
-
var StackedListItem =
|
|
1718
|
+
var StackedListItem = React9.forwardRef(
|
|
1503
1719
|
({
|
|
1504
1720
|
className,
|
|
1505
1721
|
avatar,
|
|
@@ -1509,7 +1725,7 @@ var StackedListItem = React8.forwardRef(
|
|
|
1509
1725
|
action,
|
|
1510
1726
|
density = "default",
|
|
1511
1727
|
...props
|
|
1512
|
-
}, ref) => /* @__PURE__ */
|
|
1728
|
+
}, ref) => /* @__PURE__ */ jsxs14(
|
|
1513
1729
|
"li",
|
|
1514
1730
|
{
|
|
1515
1731
|
ref,
|
|
@@ -1520,9 +1736,9 @@ var StackedListItem = React8.forwardRef(
|
|
|
1520
1736
|
),
|
|
1521
1737
|
...props,
|
|
1522
1738
|
children: [
|
|
1523
|
-
avatar && /* @__PURE__ */
|
|
1524
|
-
/* @__PURE__ */
|
|
1525
|
-
/* @__PURE__ */
|
|
1739
|
+
avatar && /* @__PURE__ */ jsx21("div", { className: "flex-shrink-0", children: avatar }),
|
|
1740
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
1741
|
+
/* @__PURE__ */ jsx21(
|
|
1526
1742
|
"p",
|
|
1527
1743
|
{
|
|
1528
1744
|
className: cn(
|
|
@@ -1532,7 +1748,7 @@ var StackedListItem = React8.forwardRef(
|
|
|
1532
1748
|
children: title
|
|
1533
1749
|
}
|
|
1534
1750
|
),
|
|
1535
|
-
description && /* @__PURE__ */
|
|
1751
|
+
description && /* @__PURE__ */ jsx21(
|
|
1536
1752
|
"p",
|
|
1537
1753
|
{
|
|
1538
1754
|
className: cn(
|
|
@@ -1543,8 +1759,8 @@ var StackedListItem = React8.forwardRef(
|
|
|
1543
1759
|
}
|
|
1544
1760
|
)
|
|
1545
1761
|
] }),
|
|
1546
|
-
meta && /* @__PURE__ */
|
|
1547
|
-
action && /* @__PURE__ */
|
|
1762
|
+
meta && /* @__PURE__ */ jsx21("span", { className: "flex-shrink-0 text-sm text-muted-foreground", children: meta }),
|
|
1763
|
+
action && /* @__PURE__ */ jsx21("div", { className: "flex-shrink-0", children: action })
|
|
1548
1764
|
]
|
|
1549
1765
|
}
|
|
1550
1766
|
)
|
|
@@ -1552,8 +1768,8 @@ var StackedListItem = React8.forwardRef(
|
|
|
1552
1768
|
StackedListItem.displayName = "StackedListItem";
|
|
1553
1769
|
|
|
1554
1770
|
// src/grid-list.tsx
|
|
1555
|
-
import * as
|
|
1556
|
-
import { jsx as
|
|
1771
|
+
import * as React10 from "react";
|
|
1772
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1557
1773
|
var COLUMN_CLASSES = {
|
|
1558
1774
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
1559
1775
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
@@ -1564,8 +1780,8 @@ var GAP_CLASSES = {
|
|
|
1564
1780
|
md: "gap-4",
|
|
1565
1781
|
lg: "gap-6"
|
|
1566
1782
|
};
|
|
1567
|
-
var GridList =
|
|
1568
|
-
({ className, columns = 3, gap = "md", ...props }, ref) => /* @__PURE__ */
|
|
1783
|
+
var GridList = React10.forwardRef(
|
|
1784
|
+
({ className, columns = 3, gap = "md", ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1569
1785
|
"div",
|
|
1570
1786
|
{
|
|
1571
1787
|
ref,
|
|
@@ -1580,13 +1796,13 @@ var GridList = React9.forwardRef(
|
|
|
1580
1796
|
)
|
|
1581
1797
|
);
|
|
1582
1798
|
GridList.displayName = "GridList";
|
|
1583
|
-
var GridListItem =
|
|
1584
|
-
({ className, hoverable = false, ...props }, ref) => /* @__PURE__ */
|
|
1799
|
+
var GridListItem = React10.forwardRef(
|
|
1800
|
+
({ className, hoverable = false, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1585
1801
|
"div",
|
|
1586
1802
|
{
|
|
1587
1803
|
ref,
|
|
1588
1804
|
className: cn(
|
|
1589
|
-
"rounded-lg border bg-card p-4 text-card-foreground shadow-sm",
|
|
1805
|
+
"rounded-lg border border-border bg-card p-4 text-card-foreground shadow-sm",
|
|
1590
1806
|
hoverable && "duration-fast cursor-pointer transition-shadow hover:shadow-md",
|
|
1591
1807
|
className
|
|
1592
1808
|
),
|
|
@@ -1597,8 +1813,8 @@ var GridListItem = React9.forwardRef(
|
|
|
1597
1813
|
GridListItem.displayName = "GridListItem";
|
|
1598
1814
|
|
|
1599
1815
|
// src/pagination.tsx
|
|
1600
|
-
import * as
|
|
1601
|
-
import { jsx as
|
|
1816
|
+
import * as React11 from "react";
|
|
1817
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1602
1818
|
function getPageRange(current, total, siblings) {
|
|
1603
1819
|
const range = [];
|
|
1604
1820
|
const left = Math.max(2, current - siblings);
|
|
@@ -1610,7 +1826,7 @@ function getPageRange(current, total, siblings) {
|
|
|
1610
1826
|
if (total > 1) range.push(total);
|
|
1611
1827
|
return range;
|
|
1612
1828
|
}
|
|
1613
|
-
var PaginationButton =
|
|
1829
|
+
var PaginationButton = React11.forwardRef(({ className, active, disabled, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1614
1830
|
"button",
|
|
1615
1831
|
{
|
|
1616
1832
|
ref,
|
|
@@ -1618,7 +1834,7 @@ var PaginationButton = React10.forwardRef(({ className, active, disabled, ...pro
|
|
|
1618
1834
|
disabled,
|
|
1619
1835
|
className: cn(
|
|
1620
1836
|
"inline-flex h-9 min-w-9 items-center justify-center rounded-md px-3 text-sm font-medium transition-colors",
|
|
1621
|
-
active ? "bg-primary text-primary-foreground" : "bg-background text-foreground hover:bg-muted",
|
|
1837
|
+
active ? "bg-primary-solid text-primary-foreground" : "bg-background text-foreground hover:bg-muted",
|
|
1622
1838
|
disabled && "opacity-disabled pointer-events-none",
|
|
1623
1839
|
"border border-input",
|
|
1624
1840
|
className
|
|
@@ -1627,7 +1843,7 @@ var PaginationButton = React10.forwardRef(({ className, active, disabled, ...pro
|
|
|
1627
1843
|
}
|
|
1628
1844
|
));
|
|
1629
1845
|
PaginationButton.displayName = "PaginationButton";
|
|
1630
|
-
var Pagination =
|
|
1846
|
+
var Pagination = React11.forwardRef(
|
|
1631
1847
|
({
|
|
1632
1848
|
className,
|
|
1633
1849
|
currentPage,
|
|
@@ -1643,7 +1859,7 @@ var Pagination = React10.forwardRef(
|
|
|
1643
1859
|
}
|
|
1644
1860
|
};
|
|
1645
1861
|
if (variant === "simple") {
|
|
1646
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsxs15(
|
|
1647
1863
|
"nav",
|
|
1648
1864
|
{
|
|
1649
1865
|
ref,
|
|
@@ -1651,7 +1867,7 @@ var Pagination = React10.forwardRef(
|
|
|
1651
1867
|
className: cn("flex items-center justify-between", className),
|
|
1652
1868
|
...props,
|
|
1653
1869
|
children: [
|
|
1654
|
-
/* @__PURE__ */
|
|
1870
|
+
/* @__PURE__ */ jsx23(
|
|
1655
1871
|
PaginationButton,
|
|
1656
1872
|
{
|
|
1657
1873
|
onClick: () => handleChange(currentPage - 1),
|
|
@@ -1659,13 +1875,13 @@ var Pagination = React10.forwardRef(
|
|
|
1659
1875
|
children: "Previous"
|
|
1660
1876
|
}
|
|
1661
1877
|
),
|
|
1662
|
-
/* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ jsxs15("span", { className: "text-sm text-muted-foreground", children: [
|
|
1663
1879
|
"Page ",
|
|
1664
1880
|
currentPage,
|
|
1665
1881
|
" of ",
|
|
1666
1882
|
totalPages
|
|
1667
1883
|
] }),
|
|
1668
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ jsx23(
|
|
1669
1885
|
PaginationButton,
|
|
1670
1886
|
{
|
|
1671
1887
|
onClick: () => handleChange(currentPage + 1),
|
|
@@ -1678,7 +1894,7 @@ var Pagination = React10.forwardRef(
|
|
|
1678
1894
|
);
|
|
1679
1895
|
}
|
|
1680
1896
|
const pages = getPageRange(currentPage, totalPages, siblingCount);
|
|
1681
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ jsxs15(
|
|
1682
1898
|
"nav",
|
|
1683
1899
|
{
|
|
1684
1900
|
ref,
|
|
@@ -1690,7 +1906,7 @@ var Pagination = React10.forwardRef(
|
|
|
1690
1906
|
),
|
|
1691
1907
|
...props,
|
|
1692
1908
|
children: [
|
|
1693
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ jsx23(
|
|
1694
1910
|
PaginationButton,
|
|
1695
1911
|
{
|
|
1696
1912
|
onClick: () => handleChange(currentPage - 1),
|
|
@@ -1699,14 +1915,14 @@ var Pagination = React10.forwardRef(
|
|
|
1699
1915
|
}
|
|
1700
1916
|
),
|
|
1701
1917
|
pages.map(
|
|
1702
|
-
(page, i) => page === "ellipsis" ? /* @__PURE__ */
|
|
1918
|
+
(page, i) => page === "ellipsis" ? /* @__PURE__ */ jsx23(
|
|
1703
1919
|
"span",
|
|
1704
1920
|
{
|
|
1705
1921
|
className: "inline-flex h-9 min-w-9 items-center justify-center text-sm text-muted-foreground",
|
|
1706
1922
|
children: "..."
|
|
1707
1923
|
},
|
|
1708
1924
|
`ellipsis-${i}`
|
|
1709
|
-
) : /* @__PURE__ */
|
|
1925
|
+
) : /* @__PURE__ */ jsx23(
|
|
1710
1926
|
PaginationButton,
|
|
1711
1927
|
{
|
|
1712
1928
|
active: page === currentPage,
|
|
@@ -1716,7 +1932,7 @@ var Pagination = React10.forwardRef(
|
|
|
1716
1932
|
page
|
|
1717
1933
|
)
|
|
1718
1934
|
),
|
|
1719
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ jsx23(
|
|
1720
1936
|
PaginationButton,
|
|
1721
1937
|
{
|
|
1722
1938
|
onClick: () => handleChange(currentPage + 1),
|
|
@@ -1732,9 +1948,16 @@ var Pagination = React10.forwardRef(
|
|
|
1732
1948
|
Pagination.displayName = "Pagination";
|
|
1733
1949
|
|
|
1734
1950
|
// src/stepper.tsx
|
|
1735
|
-
import * as
|
|
1736
|
-
|
|
1737
|
-
|
|
1951
|
+
import * as React12 from "react";
|
|
1952
|
+
|
|
1953
|
+
// src/scroll-hint.ts
|
|
1954
|
+
var SCROLL_HINT_X = "pr-6 [mask-image:linear-gradient(to_right,black_calc(100%-1.5rem),transparent)]";
|
|
1955
|
+
var SCROLL_HINT_Y = "[container-type:scroll-state]";
|
|
1956
|
+
var SCROLL_HINT_Y_MARK = "pointer-events-none sticky bottom-1 -mt-7 flex h-6 justify-center supports-[container-type:scroll-state]:[@container_not_scroll-state(scrollable:bottom)]:hidden";
|
|
1957
|
+
|
|
1958
|
+
// src/stepper.tsx
|
|
1959
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1960
|
+
var StepContext = React12.createContext({
|
|
1738
1961
|
index: 0,
|
|
1739
1962
|
activeStep: 0,
|
|
1740
1963
|
isLast: false,
|
|
@@ -1751,7 +1974,7 @@ var LABEL_SIZE = {
|
|
|
1751
1974
|
md: "text-sm",
|
|
1752
1975
|
lg: "text-base"
|
|
1753
1976
|
};
|
|
1754
|
-
var StepperStep =
|
|
1977
|
+
var StepperStep = React12.forwardRef(
|
|
1755
1978
|
({
|
|
1756
1979
|
className,
|
|
1757
1980
|
label,
|
|
@@ -1763,26 +1986,28 @@ var StepperStep = React11.forwardRef(
|
|
|
1763
1986
|
href,
|
|
1764
1987
|
...props
|
|
1765
1988
|
}, ref) => {
|
|
1766
|
-
const { index, activeStep, isLast, variant, size } =
|
|
1989
|
+
const { index, activeStep, isLast, variant, size } = React12.useContext(StepContext);
|
|
1767
1990
|
const status = error ? "error" : disabled ? "disabled" : index < activeStep || completed ? "complete" : index === activeStep ? "current" : "upcoming";
|
|
1768
1991
|
const isCurrent = index === activeStep && !error && !disabled;
|
|
1769
|
-
const indicator = /* @__PURE__ */
|
|
1992
|
+
const indicator = /* @__PURE__ */ jsx24(
|
|
1770
1993
|
"div",
|
|
1771
1994
|
{
|
|
1772
1995
|
className: cn(
|
|
1773
1996
|
"flex items-center justify-center rounded-full font-medium",
|
|
1774
1997
|
INDICATOR_SIZE[size],
|
|
1775
|
-
status === "complete" && "bg-primary text-primary-foreground",
|
|
1776
|
-
status === "current" && "border-2 border-primary bg-background
|
|
1998
|
+
status === "complete" && "bg-primary-solid text-primary-foreground",
|
|
1999
|
+
status === "current" && "text-primary-text border-2 border-primary bg-background",
|
|
1777
2000
|
status === "upcoming" && "border-2 border-border bg-background text-muted-foreground dark:border-border dark:bg-background dark:text-muted-foreground",
|
|
1778
|
-
status === "error" && "border-intent-error bg-intent-error/10 text-intent-error dark:border-intent-error dark:text-intent-error border-2",
|
|
1779
|
-
|
|
2001
|
+
status === "error" && "border-intent-error bg-intent-error/10 text-intent-error-foreground dark:border-intent-error dark:text-intent-error-foreground border-2",
|
|
2002
|
+
// the step row is already faded (`opacity-50`); fading the circle
|
|
2003
|
+
// again drew it at a quarter (W0 #5823)
|
|
2004
|
+
status === "disabled" && "border-2 border-muted bg-muted text-muted-foreground"
|
|
1780
2005
|
),
|
|
1781
2006
|
children: icon ?? (status === "complete" ? "\u2713" : status === "error" ? "!" : index + 1)
|
|
1782
2007
|
}
|
|
1783
2008
|
);
|
|
1784
2009
|
if (variant === "vertical") {
|
|
1785
|
-
return /* @__PURE__ */
|
|
2010
|
+
return /* @__PURE__ */ jsxs16(
|
|
1786
2011
|
"div",
|
|
1787
2012
|
{
|
|
1788
2013
|
ref,
|
|
@@ -1792,51 +2017,53 @@ var StepperStep = React11.forwardRef(
|
|
|
1792
2017
|
className: cn("flex gap-3", disabled && "opacity-50", className),
|
|
1793
2018
|
...props,
|
|
1794
2019
|
children: [
|
|
1795
|
-
/* @__PURE__ */
|
|
2020
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-col items-center", children: [
|
|
1796
2021
|
indicator,
|
|
1797
|
-
!isLast && /* @__PURE__ */
|
|
2022
|
+
!isLast && /* @__PURE__ */ jsx24(
|
|
1798
2023
|
"div",
|
|
1799
2024
|
{
|
|
1800
2025
|
className: cn(
|
|
1801
|
-
|
|
2026
|
+
// circle to circle: no gap above, none below (the next
|
|
2027
|
+
// step's circle starts where this row ends)
|
|
2028
|
+
"w-0.5 flex-1",
|
|
1802
2029
|
status === "complete" ? "bg-primary" : "bg-muted"
|
|
1803
2030
|
)
|
|
1804
2031
|
}
|
|
1805
2032
|
)
|
|
1806
2033
|
] }),
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsxs16("div", { className: "pb-6", children: [
|
|
2035
|
+
/* @__PURE__ */ jsx24(
|
|
1809
2036
|
"p",
|
|
1810
2037
|
{
|
|
1811
2038
|
className: cn(
|
|
1812
2039
|
"font-medium",
|
|
1813
2040
|
LABEL_SIZE[size],
|
|
1814
|
-
status === "error" ? "text-intent-error dark:text-intent-error" : status === "upcoming" || status === "disabled" ? "text-muted-foreground" : "text-foreground"
|
|
2041
|
+
status === "error" ? "text-intent-error-foreground dark:text-intent-error-foreground" : status === "upcoming" || status === "disabled" ? "text-muted-foreground" : "text-foreground"
|
|
1815
2042
|
),
|
|
1816
2043
|
children: label
|
|
1817
2044
|
}
|
|
1818
2045
|
),
|
|
1819
|
-
description && /* @__PURE__ */
|
|
2046
|
+
description && /* @__PURE__ */ jsx24("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description })
|
|
1820
2047
|
] })
|
|
1821
2048
|
]
|
|
1822
2049
|
}
|
|
1823
2050
|
);
|
|
1824
2051
|
}
|
|
1825
|
-
const stepContent = /* @__PURE__ */
|
|
2052
|
+
const stepContent = /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
1826
2053
|
indicator,
|
|
1827
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx24(
|
|
1828
2055
|
"span",
|
|
1829
2056
|
{
|
|
1830
2057
|
className: cn(
|
|
1831
2058
|
"whitespace-nowrap font-medium",
|
|
1832
2059
|
LABEL_SIZE[size],
|
|
1833
|
-
status === "error" ? "text-intent-error dark:text-intent-error" : status === "upcoming" || status === "disabled" ? "text-muted-foreground dark:text-muted-foreground" : "text-foreground dark:text-foreground"
|
|
2060
|
+
status === "error" ? "text-intent-error-foreground dark:text-intent-error-foreground" : status === "upcoming" || status === "disabled" ? "text-muted-foreground dark:text-muted-foreground" : "text-foreground dark:text-foreground"
|
|
1834
2061
|
),
|
|
1835
2062
|
children: label
|
|
1836
2063
|
}
|
|
1837
2064
|
)
|
|
1838
2065
|
] });
|
|
1839
|
-
return /* @__PURE__ */
|
|
2066
|
+
return /* @__PURE__ */ jsxs16(
|
|
1840
2067
|
"div",
|
|
1841
2068
|
{
|
|
1842
2069
|
ref,
|
|
@@ -1846,7 +2073,7 @@ var StepperStep = React11.forwardRef(
|
|
|
1846
2073
|
className: cn("flex items-center", className),
|
|
1847
2074
|
...props,
|
|
1848
2075
|
children: [
|
|
1849
|
-
href && !disabled ? /* @__PURE__ */
|
|
2076
|
+
href && !disabled ? /* @__PURE__ */ jsx24(
|
|
1850
2077
|
"a",
|
|
1851
2078
|
{
|
|
1852
2079
|
href,
|
|
@@ -1855,7 +2082,7 @@ var StepperStep = React11.forwardRef(
|
|
|
1855
2082
|
children: stepContent
|
|
1856
2083
|
}
|
|
1857
2084
|
) : stepContent,
|
|
1858
|
-
!isLast && /* @__PURE__ */
|
|
2085
|
+
!isLast && /* @__PURE__ */ jsx24(
|
|
1859
2086
|
"div",
|
|
1860
2087
|
{
|
|
1861
2088
|
className: cn(
|
|
@@ -1870,7 +2097,7 @@ var StepperStep = React11.forwardRef(
|
|
|
1870
2097
|
}
|
|
1871
2098
|
);
|
|
1872
2099
|
StepperStep.displayName = "StepperStep";
|
|
1873
|
-
var Stepper =
|
|
2100
|
+
var Stepper = React12.forwardRef(
|
|
1874
2101
|
({
|
|
1875
2102
|
className,
|
|
1876
2103
|
variant = "horizontal",
|
|
@@ -1879,18 +2106,19 @@ var Stepper = React11.forwardRef(
|
|
|
1879
2106
|
children,
|
|
1880
2107
|
...props
|
|
1881
2108
|
}, ref) => {
|
|
1882
|
-
const steps =
|
|
1883
|
-
return /* @__PURE__ */
|
|
2109
|
+
const steps = React12.Children.toArray(children);
|
|
2110
|
+
return /* @__PURE__ */ jsx24(
|
|
1884
2111
|
"div",
|
|
1885
2112
|
{
|
|
1886
2113
|
ref,
|
|
1887
2114
|
role: "list",
|
|
1888
2115
|
className: cn(
|
|
1889
|
-
|
|
2116
|
+
// horizontal: scrolls on a narrow screen, never runs off the page
|
|
2117
|
+
variant === "horizontal" ? cn("flex items-center overflow-x-auto", SCROLL_HINT_X) : "flex flex-col",
|
|
1890
2118
|
className
|
|
1891
2119
|
),
|
|
1892
2120
|
...props,
|
|
1893
|
-
children: steps.map((child, i) => /* @__PURE__ */
|
|
2121
|
+
children: steps.map((child, i) => /* @__PURE__ */ jsx24(
|
|
1894
2122
|
StepContext.Provider,
|
|
1895
2123
|
{
|
|
1896
2124
|
value: {
|
|
@@ -1911,14 +2139,14 @@ var Stepper = React11.forwardRef(
|
|
|
1911
2139
|
Stepper.displayName = "Stepper";
|
|
1912
2140
|
|
|
1913
2141
|
// src/command-palette.tsx
|
|
1914
|
-
import * as
|
|
1915
|
-
import { Fragment as
|
|
2142
|
+
import * as React13 from "react";
|
|
2143
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1916
2144
|
var SIZE_CLASSES = {
|
|
1917
2145
|
sm: "max-w-sm",
|
|
1918
2146
|
md: "max-w-lg",
|
|
1919
2147
|
lg: "max-w-2xl"
|
|
1920
2148
|
};
|
|
1921
|
-
var CommandPalette =
|
|
2149
|
+
var CommandPalette = React13.forwardRef(
|
|
1922
2150
|
({
|
|
1923
2151
|
className,
|
|
1924
2152
|
open,
|
|
@@ -1929,9 +2157,9 @@ var CommandPalette = React12.forwardRef(
|
|
|
1929
2157
|
size = "md",
|
|
1930
2158
|
...props
|
|
1931
2159
|
}, ref) => {
|
|
1932
|
-
const [query, setQuery] =
|
|
1933
|
-
const [activeIndex, setActiveIndex] =
|
|
1934
|
-
|
|
2160
|
+
const [query, setQuery] = React13.useState("");
|
|
2161
|
+
const [activeIndex, setActiveIndex] = React13.useState(0);
|
|
2162
|
+
React13.useEffect(() => {
|
|
1935
2163
|
if (!open) return;
|
|
1936
2164
|
const handler = (e) => {
|
|
1937
2165
|
if (e.key === "Escape") onClose?.();
|
|
@@ -1951,7 +2179,7 @@ var CommandPalette = React12.forwardRef(
|
|
|
1951
2179
|
document.addEventListener("keydown", handler);
|
|
1952
2180
|
return () => document.removeEventListener("keydown", handler);
|
|
1953
2181
|
}, [open, onClose, results, activeIndex]);
|
|
1954
|
-
|
|
2182
|
+
React13.useEffect(() => {
|
|
1955
2183
|
setActiveIndex(0);
|
|
1956
2184
|
}, [query]);
|
|
1957
2185
|
if (!open) return null;
|
|
@@ -1964,15 +2192,15 @@ var CommandPalette = React12.forwardRef(
|
|
|
1964
2192
|
},
|
|
1965
2193
|
{}
|
|
1966
2194
|
);
|
|
1967
|
-
return /* @__PURE__ */
|
|
1968
|
-
/* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
2196
|
+
/* @__PURE__ */ jsx25(
|
|
1969
2197
|
"div",
|
|
1970
2198
|
{
|
|
1971
2199
|
className: "z-modal fixed inset-0 bg-foreground/60",
|
|
1972
2200
|
onClick: onClose
|
|
1973
2201
|
}
|
|
1974
2202
|
),
|
|
1975
|
-
/* @__PURE__ */
|
|
2203
|
+
/* @__PURE__ */ jsx25("div", { className: "z-modal fixed inset-0 flex items-start justify-center pt-[15vh]", children: /* @__PURE__ */ jsxs17(
|
|
1976
2204
|
"div",
|
|
1977
2205
|
{
|
|
1978
2206
|
ref,
|
|
@@ -1983,9 +2211,9 @@ var CommandPalette = React12.forwardRef(
|
|
|
1983
2211
|
),
|
|
1984
2212
|
...props,
|
|
1985
2213
|
children: [
|
|
1986
|
-
/* @__PURE__ */
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
/* @__PURE__ */
|
|
2214
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center border-b border-border px-4", children: [
|
|
2215
|
+
/* @__PURE__ */ jsx25("span", { className: "mr-2 text-muted-foreground", children: "\u2318" }),
|
|
2216
|
+
/* @__PURE__ */ jsx25(
|
|
1989
2217
|
"input",
|
|
1990
2218
|
{
|
|
1991
2219
|
type: "text",
|
|
@@ -1999,13 +2227,13 @@ var CommandPalette = React12.forwardRef(
|
|
|
1999
2227
|
autoFocus: true
|
|
2000
2228
|
}
|
|
2001
2229
|
),
|
|
2002
|
-
/* @__PURE__ */
|
|
2230
|
+
/* @__PURE__ */ jsx25("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-xs text-muted-foreground", children: "Esc" })
|
|
2003
2231
|
] }),
|
|
2004
|
-
/* @__PURE__ */
|
|
2005
|
-
/* @__PURE__ */
|
|
2232
|
+
/* @__PURE__ */ jsx25("div", { className: "max-h-80 overflow-y-auto p-2", children: Object.entries(grouped).length === 0 ? /* @__PURE__ */ jsx25("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No results found" }) : Object.entries(grouped).map(([group, items]) => /* @__PURE__ */ jsxs17("div", { children: [
|
|
2233
|
+
/* @__PURE__ */ jsx25("p", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: group }),
|
|
2006
2234
|
items.map((item) => {
|
|
2007
2235
|
const idx = results.indexOf(item);
|
|
2008
|
-
return /* @__PURE__ */
|
|
2236
|
+
return /* @__PURE__ */ jsxs17(
|
|
2009
2237
|
"button",
|
|
2010
2238
|
{
|
|
2011
2239
|
type: "button",
|
|
@@ -2019,9 +2247,9 @@ var CommandPalette = React12.forwardRef(
|
|
|
2019
2247
|
},
|
|
2020
2248
|
onMouseEnter: () => setActiveIndex(idx),
|
|
2021
2249
|
children: [
|
|
2022
|
-
item.icon && /* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
item.shortcut && /* @__PURE__ */
|
|
2250
|
+
item.icon && /* @__PURE__ */ jsx25("span", { className: "flex-shrink-0 text-muted-foreground", children: item.icon }),
|
|
2251
|
+
/* @__PURE__ */ jsx25("span", { className: "flex-1", children: item.label }),
|
|
2252
|
+
item.shortcut && /* @__PURE__ */ jsx25("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-xs text-muted-foreground", children: item.shortcut })
|
|
2025
2253
|
]
|
|
2026
2254
|
},
|
|
2027
2255
|
item.id
|
|
@@ -2037,9 +2265,9 @@ var CommandPalette = React12.forwardRef(
|
|
|
2037
2265
|
CommandPalette.displayName = "CommandPalette";
|
|
2038
2266
|
|
|
2039
2267
|
// src/app-shell.tsx
|
|
2040
|
-
import * as
|
|
2041
|
-
import { jsx as
|
|
2042
|
-
var AppShell =
|
|
2268
|
+
import * as React14 from "react";
|
|
2269
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2270
|
+
var AppShell = React14.forwardRef(
|
|
2043
2271
|
({
|
|
2044
2272
|
className,
|
|
2045
2273
|
variant = "stacked",
|
|
@@ -2048,11 +2276,13 @@ var AppShell = React13.forwardRef(
|
|
|
2048
2276
|
header,
|
|
2049
2277
|
sidebar,
|
|
2050
2278
|
detailPanel,
|
|
2279
|
+
navLabel = "Navigation",
|
|
2280
|
+
defaultNavOpen = false,
|
|
2051
2281
|
children,
|
|
2052
2282
|
...props
|
|
2053
2283
|
}, ref) => {
|
|
2054
2284
|
if (variant === "stacked") {
|
|
2055
|
-
return /* @__PURE__ */
|
|
2285
|
+
return /* @__PURE__ */ jsxs18(
|
|
2056
2286
|
"div",
|
|
2057
2287
|
{
|
|
2058
2288
|
ref,
|
|
@@ -2060,71 +2290,86 @@ var AppShell = React13.forwardRef(
|
|
|
2060
2290
|
...props,
|
|
2061
2291
|
children: [
|
|
2062
2292
|
header,
|
|
2063
|
-
/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ jsx26("main", { className: "flex-1", children })
|
|
2064
2294
|
]
|
|
2065
2295
|
}
|
|
2066
2296
|
);
|
|
2067
2297
|
}
|
|
2068
2298
|
if (variant === "multi-column") {
|
|
2069
|
-
return /* @__PURE__ */
|
|
2299
|
+
return /* @__PURE__ */ jsxs18(
|
|
2070
2300
|
"div",
|
|
2071
2301
|
{
|
|
2072
2302
|
ref,
|
|
2073
|
-
className: cn(
|
|
2303
|
+
className: cn(
|
|
2304
|
+
"flex min-h-screen flex-col bg-background md:flex-row",
|
|
2305
|
+
className
|
|
2306
|
+
),
|
|
2074
2307
|
...props,
|
|
2075
2308
|
children: [
|
|
2076
|
-
sidebar && /* @__PURE__ */
|
|
2309
|
+
sidebar && /* @__PURE__ */ jsx26(
|
|
2077
2310
|
"aside",
|
|
2078
2311
|
{
|
|
2079
2312
|
className: cn(
|
|
2080
|
-
"flex-shrink-0 border-
|
|
2081
|
-
sidebarCollapsed ? "w-16" : "w-60"
|
|
2313
|
+
"flex-shrink-0 border-b border-border bg-card md:border-b-0 md:border-r",
|
|
2314
|
+
sidebarCollapsed ? "md:w-16" : "md:w-60"
|
|
2082
2315
|
),
|
|
2083
2316
|
children: sidebar
|
|
2084
2317
|
}
|
|
2085
2318
|
),
|
|
2086
|
-
/* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
2087
2320
|
header,
|
|
2088
|
-
/* @__PURE__ */
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
detailPanel && /* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-1 flex-col lg:flex-row", children: [
|
|
2322
|
+
/* @__PURE__ */ jsx26("main", { className: "min-w-0 flex-1 overflow-y-auto", children }),
|
|
2323
|
+
detailPanel && /* @__PURE__ */ jsx26("aside", { className: "flex-shrink-0 border-t border-border bg-card lg:w-80 lg:border-l lg:border-t-0", children: detailPanel })
|
|
2091
2324
|
] })
|
|
2092
2325
|
] })
|
|
2093
2326
|
]
|
|
2094
2327
|
}
|
|
2095
2328
|
);
|
|
2096
2329
|
}
|
|
2097
|
-
|
|
2330
|
+
const left = sidebarPosition === "left";
|
|
2331
|
+
const column = sidebar && /* @__PURE__ */ jsx26(
|
|
2332
|
+
"aside",
|
|
2333
|
+
{
|
|
2334
|
+
className: cn(
|
|
2335
|
+
"hidden flex-shrink-0 bg-card transition-all md:block",
|
|
2336
|
+
left ? "border-r border-border" : "border-l border-border",
|
|
2337
|
+
sidebarCollapsed ? "w-16" : "w-60"
|
|
2338
|
+
),
|
|
2339
|
+
children: sidebar
|
|
2340
|
+
}
|
|
2341
|
+
);
|
|
2342
|
+
return /* @__PURE__ */ jsxs18(
|
|
2098
2343
|
"div",
|
|
2099
2344
|
{
|
|
2100
2345
|
ref,
|
|
2101
2346
|
className: cn("flex min-h-screen bg-background", className),
|
|
2102
2347
|
...props,
|
|
2103
2348
|
children: [
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2349
|
+
left && column,
|
|
2350
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
2351
|
+
sidebar && /* @__PURE__ */ jsx26(
|
|
2352
|
+
"div",
|
|
2353
|
+
{
|
|
2354
|
+
className: cn(
|
|
2355
|
+
"flex items-center border-b border-border bg-card px-2 py-2 md:hidden",
|
|
2356
|
+
!left && "justify-end"
|
|
2357
|
+
),
|
|
2358
|
+
children: /* @__PURE__ */ jsx26(
|
|
2359
|
+
NavDrawer,
|
|
2360
|
+
{
|
|
2361
|
+
label: navLabel,
|
|
2362
|
+
side: left ? "left" : "right",
|
|
2363
|
+
defaultOpen: defaultNavOpen,
|
|
2364
|
+
children: sidebar
|
|
2365
|
+
}
|
|
2366
|
+
)
|
|
2367
|
+
}
|
|
2368
|
+
),
|
|
2115
2369
|
header,
|
|
2116
|
-
/* @__PURE__ */
|
|
2370
|
+
/* @__PURE__ */ jsx26("main", { className: "min-w-0 flex-1 overflow-y-auto", children })
|
|
2117
2371
|
] }),
|
|
2118
|
-
|
|
2119
|
-
"aside",
|
|
2120
|
-
{
|
|
2121
|
-
className: cn(
|
|
2122
|
-
"flex-shrink-0 border-l border-border bg-card transition-all",
|
|
2123
|
-
sidebarCollapsed ? "w-16" : "w-60"
|
|
2124
|
-
),
|
|
2125
|
-
children: sidebar
|
|
2126
|
-
}
|
|
2127
|
-
)
|
|
2372
|
+
!left && column
|
|
2128
2373
|
]
|
|
2129
2374
|
}
|
|
2130
2375
|
);
|
|
@@ -2133,8 +2378,8 @@ var AppShell = React13.forwardRef(
|
|
|
2133
2378
|
AppShell.displayName = "AppShell";
|
|
2134
2379
|
|
|
2135
2380
|
// src/popover.tsx
|
|
2136
|
-
import * as
|
|
2137
|
-
import { Fragment as
|
|
2381
|
+
import * as React15 from "react";
|
|
2382
|
+
import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2138
2383
|
var SIDE_CLASSES = {
|
|
2139
2384
|
top: "bottom-full mb-2",
|
|
2140
2385
|
bottom: "top-full mt-2",
|
|
@@ -2146,7 +2391,7 @@ var ALIGN_CLASSES = {
|
|
|
2146
2391
|
center: "left-1/2 -translate-x-1/2",
|
|
2147
2392
|
end: "right-0"
|
|
2148
2393
|
};
|
|
2149
|
-
var Popover =
|
|
2394
|
+
var Popover = React15.forwardRef(
|
|
2150
2395
|
({
|
|
2151
2396
|
className,
|
|
2152
2397
|
open,
|
|
@@ -2157,10 +2402,10 @@ var Popover = React14.forwardRef(
|
|
|
2157
2402
|
children,
|
|
2158
2403
|
...props
|
|
2159
2404
|
}, ref) => {
|
|
2160
|
-
const [internalOpen, setInternalOpen] =
|
|
2405
|
+
const [internalOpen, setInternalOpen] = React15.useState(false);
|
|
2161
2406
|
const isOpen = open ?? internalOpen;
|
|
2162
2407
|
const setOpen = onOpenChange ?? setInternalOpen;
|
|
2163
|
-
|
|
2408
|
+
React15.useEffect(() => {
|
|
2164
2409
|
if (!isOpen) return;
|
|
2165
2410
|
const handler = (e) => {
|
|
2166
2411
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -2168,23 +2413,23 @@ var Popover = React14.forwardRef(
|
|
|
2168
2413
|
document.addEventListener("keydown", handler);
|
|
2169
2414
|
return () => document.removeEventListener("keydown", handler);
|
|
2170
2415
|
}, [isOpen, setOpen]);
|
|
2171
|
-
return /* @__PURE__ */
|
|
2416
|
+
return /* @__PURE__ */ jsxs19(
|
|
2172
2417
|
"div",
|
|
2173
2418
|
{
|
|
2174
2419
|
ref,
|
|
2175
2420
|
className: cn("relative inline-block", className),
|
|
2176
2421
|
...props,
|
|
2177
2422
|
children: [
|
|
2178
|
-
/* @__PURE__ */
|
|
2179
|
-
isOpen && /* @__PURE__ */
|
|
2180
|
-
/* @__PURE__ */
|
|
2423
|
+
/* @__PURE__ */ jsx27("div", { onClick: () => setOpen(!isOpen), children: trigger }),
|
|
2424
|
+
isOpen && /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
2425
|
+
/* @__PURE__ */ jsx27(
|
|
2181
2426
|
"div",
|
|
2182
2427
|
{
|
|
2183
2428
|
className: "z-popover fixed inset-0",
|
|
2184
2429
|
onClick: () => setOpen(false)
|
|
2185
2430
|
}
|
|
2186
2431
|
),
|
|
2187
|
-
/* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ jsx27(
|
|
2188
2433
|
"div",
|
|
2189
2434
|
{
|
|
2190
2435
|
className: cn(
|
|
@@ -2202,7 +2447,7 @@ var Popover = React14.forwardRef(
|
|
|
2202
2447
|
}
|
|
2203
2448
|
);
|
|
2204
2449
|
Popover.displayName = "Popover";
|
|
2205
|
-
var HoverCard =
|
|
2450
|
+
var HoverCard = React15.forwardRef(
|
|
2206
2451
|
({
|
|
2207
2452
|
className,
|
|
2208
2453
|
trigger,
|
|
@@ -2212,8 +2457,8 @@ var HoverCard = React14.forwardRef(
|
|
|
2212
2457
|
children,
|
|
2213
2458
|
...props
|
|
2214
2459
|
}, ref) => {
|
|
2215
|
-
const [open, setOpen] =
|
|
2216
|
-
const timeoutRef =
|
|
2460
|
+
const [open, setOpen] = React15.useState(false);
|
|
2461
|
+
const timeoutRef = React15.useRef();
|
|
2217
2462
|
const handleEnter = () => {
|
|
2218
2463
|
clearTimeout(timeoutRef.current);
|
|
2219
2464
|
timeoutRef.current = setTimeout(() => setOpen(true), delay);
|
|
@@ -2222,10 +2467,10 @@ var HoverCard = React14.forwardRef(
|
|
|
2222
2467
|
clearTimeout(timeoutRef.current);
|
|
2223
2468
|
timeoutRef.current = setTimeout(() => setOpen(false), 150);
|
|
2224
2469
|
};
|
|
2225
|
-
|
|
2470
|
+
React15.useEffect(() => {
|
|
2226
2471
|
return () => clearTimeout(timeoutRef.current);
|
|
2227
2472
|
}, []);
|
|
2228
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ jsxs19(
|
|
2229
2474
|
"div",
|
|
2230
2475
|
{
|
|
2231
2476
|
ref,
|
|
@@ -2235,7 +2480,7 @@ var HoverCard = React14.forwardRef(
|
|
|
2235
2480
|
...props,
|
|
2236
2481
|
children: [
|
|
2237
2482
|
trigger,
|
|
2238
|
-
open && /* @__PURE__ */
|
|
2483
|
+
open && /* @__PURE__ */ jsx27(
|
|
2239
2484
|
"div",
|
|
2240
2485
|
{
|
|
2241
2486
|
className: cn(
|
|
@@ -2256,8 +2501,8 @@ var HoverCard = React14.forwardRef(
|
|
|
2256
2501
|
HoverCard.displayName = "HoverCard";
|
|
2257
2502
|
|
|
2258
2503
|
// src/calendar.tsx
|
|
2259
|
-
import * as
|
|
2260
|
-
import { Fragment as
|
|
2504
|
+
import * as React16 from "react";
|
|
2505
|
+
import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2261
2506
|
function getDaysInMonth(year, month) {
|
|
2262
2507
|
return new Date(year, month + 1, 0).getDate();
|
|
2263
2508
|
}
|
|
@@ -2295,7 +2540,7 @@ var SIZE_CONFIG = {
|
|
|
2295
2540
|
dot: "h-1.5 w-1.5"
|
|
2296
2541
|
}
|
|
2297
2542
|
};
|
|
2298
|
-
var
|
|
2543
|
+
var Calendar2 = React16.forwardRef(
|
|
2299
2544
|
({
|
|
2300
2545
|
className,
|
|
2301
2546
|
value,
|
|
@@ -2311,16 +2556,16 @@ var Calendar = React15.forwardRef(
|
|
|
2311
2556
|
size = "md",
|
|
2312
2557
|
...props
|
|
2313
2558
|
}, ref) => {
|
|
2314
|
-
const today =
|
|
2559
|
+
const today = React16.useMemo(() => {
|
|
2315
2560
|
if (todayProp) return todayProp;
|
|
2316
2561
|
const now = Date.now();
|
|
2317
2562
|
const d = new Date(now);
|
|
2318
2563
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
2319
2564
|
}, [todayProp]);
|
|
2320
2565
|
const initialDate = value ?? rangeStart ?? today;
|
|
2321
|
-
const [viewYear, setViewYear] =
|
|
2322
|
-
const [viewMonth, setViewMonth] =
|
|
2323
|
-
const [focusedDay, setFocusedDay] =
|
|
2566
|
+
const [viewYear, setViewYear] = React16.useState(initialDate.getFullYear());
|
|
2567
|
+
const [viewMonth, setViewMonth] = React16.useState(initialDate.getMonth());
|
|
2568
|
+
const [focusedDay, setFocusedDay] = React16.useState(null);
|
|
2324
2569
|
const daysInMonth = getDaysInMonth(viewYear, viewMonth);
|
|
2325
2570
|
const startDay = getStartDayOfWeek(viewYear, viewMonth);
|
|
2326
2571
|
const config = SIZE_CONFIG[size];
|
|
@@ -2454,7 +2699,7 @@ var Calendar = React15.forwardRef(
|
|
|
2454
2699
|
const cells = [];
|
|
2455
2700
|
for (let i = 0; i < startDay; i++) cells.push(null);
|
|
2456
2701
|
for (let d = 1; d <= daysInMonth; d++) cells.push(d);
|
|
2457
|
-
return /* @__PURE__ */
|
|
2702
|
+
return /* @__PURE__ */ jsxs20(
|
|
2458
2703
|
"div",
|
|
2459
2704
|
{
|
|
2460
2705
|
ref,
|
|
@@ -2469,8 +2714,8 @@ var Calendar = React15.forwardRef(
|
|
|
2469
2714
|
),
|
|
2470
2715
|
...props,
|
|
2471
2716
|
children: [
|
|
2472
|
-
/* @__PURE__ */
|
|
2473
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
2718
|
+
/* @__PURE__ */ jsx28(
|
|
2474
2719
|
"button",
|
|
2475
2720
|
{
|
|
2476
2721
|
type: "button",
|
|
@@ -2481,7 +2726,7 @@ var Calendar = React15.forwardRef(
|
|
|
2481
2726
|
children: "\u2039"
|
|
2482
2727
|
}
|
|
2483
2728
|
),
|
|
2484
|
-
/* @__PURE__ */
|
|
2729
|
+
/* @__PURE__ */ jsx28(
|
|
2485
2730
|
"span",
|
|
2486
2731
|
{
|
|
2487
2732
|
className: "text-sm font-medium text-foreground",
|
|
@@ -2489,7 +2734,7 @@ var Calendar = React15.forwardRef(
|
|
|
2489
2734
|
children: formatMonth(viewYear, viewMonth)
|
|
2490
2735
|
}
|
|
2491
2736
|
),
|
|
2492
|
-
/* @__PURE__ */
|
|
2737
|
+
/* @__PURE__ */ jsx28(
|
|
2493
2738
|
"button",
|
|
2494
2739
|
{
|
|
2495
2740
|
type: "button",
|
|
@@ -2501,7 +2746,7 @@ var Calendar = React15.forwardRef(
|
|
|
2501
2746
|
}
|
|
2502
2747
|
)
|
|
2503
2748
|
] }),
|
|
2504
|
-
/* @__PURE__ */
|
|
2749
|
+
/* @__PURE__ */ jsx28("div", { role: "row", className: cn("grid grid-cols-7", config.gap), children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx28(
|
|
2505
2750
|
"div",
|
|
2506
2751
|
{
|
|
2507
2752
|
role: "columnheader",
|
|
@@ -2513,9 +2758,9 @@ var Calendar = React15.forwardRef(
|
|
|
2513
2758
|
},
|
|
2514
2759
|
day
|
|
2515
2760
|
)) }),
|
|
2516
|
-
/* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsx28("div", { className: cn("grid grid-cols-7", config.gap), children: cells.map((day, i) => {
|
|
2517
2762
|
if (day === null) {
|
|
2518
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ jsx28("div", { className: config.cell }, `empty-${i}`);
|
|
2519
2764
|
}
|
|
2520
2765
|
const date = new Date(viewYear, viewMonth, day);
|
|
2521
2766
|
const disabled = isDisabled(day);
|
|
@@ -2538,7 +2783,7 @@ var Calendar = React15.forwardRef(
|
|
|
2538
2783
|
}
|
|
2539
2784
|
const isToday = isSameDay(date, today);
|
|
2540
2785
|
const eventDot = hasEvent(day);
|
|
2541
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsxs20(
|
|
2542
2787
|
"button",
|
|
2543
2788
|
{
|
|
2544
2789
|
type: "button",
|
|
@@ -2553,11 +2798,11 @@ var Calendar = React15.forwardRef(
|
|
|
2553
2798
|
config.cell,
|
|
2554
2799
|
disabled && "pointer-events-none opacity-50",
|
|
2555
2800
|
isFocused && "ring-2 ring-ring",
|
|
2556
|
-
isSelected || isRangeEndpoint ? "bg-primary font-semibold text-primary-foreground" : isInRange ? "bg-primary/10 font-medium text-foreground" : isToday ? "bg-muted font-semibold text-foreground" : "text-foreground hover:bg-muted"
|
|
2801
|
+
isSelected || isRangeEndpoint ? "bg-primary-solid font-semibold text-primary-foreground" : isInRange ? "bg-primary/10 font-medium text-foreground" : isToday ? "bg-muted font-semibold text-foreground" : "text-foreground hover:bg-muted"
|
|
2557
2802
|
),
|
|
2558
2803
|
children: [
|
|
2559
2804
|
day,
|
|
2560
|
-
eventDot && /* @__PURE__ */
|
|
2805
|
+
eventDot && /* @__PURE__ */ jsx28(
|
|
2561
2806
|
"span",
|
|
2562
2807
|
{
|
|
2563
2808
|
className: cn(
|
|
@@ -2576,8 +2821,8 @@ var Calendar = React15.forwardRef(
|
|
|
2576
2821
|
);
|
|
2577
2822
|
}
|
|
2578
2823
|
);
|
|
2579
|
-
|
|
2580
|
-
var DatePicker =
|
|
2824
|
+
Calendar2.displayName = "Calendar";
|
|
2825
|
+
var DatePicker = React16.forwardRef(
|
|
2581
2826
|
({
|
|
2582
2827
|
className,
|
|
2583
2828
|
variant = "single",
|
|
@@ -2596,7 +2841,7 @@ var DatePicker = React15.forwardRef(
|
|
|
2596
2841
|
disabled,
|
|
2597
2842
|
...props
|
|
2598
2843
|
}, ref) => {
|
|
2599
|
-
const [internalOpen, setInternalOpen] =
|
|
2844
|
+
const [internalOpen, setInternalOpen] = React16.useState(false);
|
|
2600
2845
|
const isOpen = controlledOpen ?? internalOpen;
|
|
2601
2846
|
const setOpen = onOpenChange ?? setInternalOpen;
|
|
2602
2847
|
const defaultPlaceholder = variant === "range" ? "Pick a date range" : "Pick a date";
|
|
@@ -2620,7 +2865,7 @@ var DatePicker = React15.forwardRef(
|
|
|
2620
2865
|
} else if (variant === "range" && rangeStart) {
|
|
2621
2866
|
displayText = rangeEnd ? `${formatDateForInput(rangeStart)} \u2013 ${formatDateForInput(rangeEnd)}` : formatDateForInput(rangeStart);
|
|
2622
2867
|
}
|
|
2623
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ jsxs20(
|
|
2624
2869
|
"div",
|
|
2625
2870
|
{
|
|
2626
2871
|
ref,
|
|
@@ -2628,7 +2873,7 @@ var DatePicker = React15.forwardRef(
|
|
|
2628
2873
|
onKeyDown: handleKeyDown,
|
|
2629
2874
|
...props,
|
|
2630
2875
|
children: [
|
|
2631
|
-
/* @__PURE__ */
|
|
2876
|
+
/* @__PURE__ */ jsxs20(
|
|
2632
2877
|
"button",
|
|
2633
2878
|
{
|
|
2634
2879
|
type: "button",
|
|
@@ -2641,22 +2886,22 @@ var DatePicker = React15.forwardRef(
|
|
|
2641
2886
|
displayText ? "text-foreground" : "text-muted-foreground"
|
|
2642
2887
|
),
|
|
2643
2888
|
children: [
|
|
2644
|
-
/* @__PURE__ */
|
|
2645
|
-
/* @__PURE__ */
|
|
2646
|
-
/* @__PURE__ */
|
|
2889
|
+
/* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", "aria-hidden": "true", children: "\u{1F4C5}" }),
|
|
2890
|
+
/* @__PURE__ */ jsx28("span", { className: "flex-1 text-left", children: displayText ?? placeholder ?? defaultPlaceholder }),
|
|
2891
|
+
/* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", "aria-hidden": "true", children: "\u25BE" })
|
|
2647
2892
|
]
|
|
2648
2893
|
}
|
|
2649
2894
|
),
|
|
2650
|
-
isOpen && /* @__PURE__ */
|
|
2651
|
-
/* @__PURE__ */
|
|
2895
|
+
isOpen && /* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
2896
|
+
/* @__PURE__ */ jsx28(
|
|
2652
2897
|
"div",
|
|
2653
2898
|
{
|
|
2654
2899
|
className: "z-popover fixed inset-0",
|
|
2655
2900
|
onClick: () => setOpen(false)
|
|
2656
2901
|
}
|
|
2657
2902
|
),
|
|
2658
|
-
/* @__PURE__ */
|
|
2659
|
-
|
|
2903
|
+
/* @__PURE__ */ jsx28("div", { className: "z-popover absolute left-0 top-full mt-1", children: /* @__PURE__ */ jsx28(
|
|
2904
|
+
Calendar2,
|
|
2660
2905
|
{
|
|
2661
2906
|
selectionMode: variant,
|
|
2662
2907
|
value: variant === "single" ? value : void 0,
|
|
@@ -2679,9 +2924,9 @@ var DatePicker = React15.forwardRef(
|
|
|
2679
2924
|
DatePicker.displayName = "DatePicker";
|
|
2680
2925
|
|
|
2681
2926
|
// src/navbar.tsx
|
|
2682
|
-
import * as
|
|
2683
|
-
import { jsx as
|
|
2684
|
-
var Navbar =
|
|
2927
|
+
import * as React17 from "react";
|
|
2928
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2929
|
+
var Navbar = React17.forwardRef(
|
|
2685
2930
|
({
|
|
2686
2931
|
className,
|
|
2687
2932
|
variant = "simple",
|
|
@@ -2692,7 +2937,7 @@ var Navbar = React16.forwardRef(
|
|
|
2692
2937
|
secondaryNav,
|
|
2693
2938
|
children,
|
|
2694
2939
|
...props
|
|
2695
|
-
}, ref) => /* @__PURE__ */
|
|
2940
|
+
}, ref) => /* @__PURE__ */ jsxs21(
|
|
2696
2941
|
"header",
|
|
2697
2942
|
{
|
|
2698
2943
|
ref,
|
|
@@ -2703,35 +2948,39 @@ var Navbar = React16.forwardRef(
|
|
|
2703
2948
|
),
|
|
2704
2949
|
...props,
|
|
2705
2950
|
children: [
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
logo && /* @__PURE__ */
|
|
2708
|
-
/* @__PURE__ */
|
|
2951
|
+
/* @__PURE__ */ jsxs21("div", { className: "mx-auto flex h-14 max-w-content-xl items-center gap-4 px-4 sm:px-6", children: [
|
|
2952
|
+
logo && /* @__PURE__ */ jsx29("div", { className: "flex-shrink-0", children: logo }),
|
|
2953
|
+
/* @__PURE__ */ jsx29(
|
|
2709
2954
|
"nav",
|
|
2710
2955
|
{
|
|
2711
2956
|
className: cn(
|
|
2712
|
-
|
|
2713
|
-
|
|
2957
|
+
// W0 (#5823): the links scroll on a narrow screen, never push
|
|
2958
|
+
// the bar off the page
|
|
2959
|
+
"flex min-w-0 items-center gap-4 overflow-x-auto",
|
|
2960
|
+
variant === "centered" && "flex-1 [&>:first-child]:ml-auto [&>:last-child]:mr-auto",
|
|
2961
|
+
SCROLL_HINT_X
|
|
2962
|
+
// W1: a clipped link fades
|
|
2714
2963
|
),
|
|
2715
2964
|
children
|
|
2716
2965
|
}
|
|
2717
2966
|
),
|
|
2718
|
-
variant === "withSearch" && search && /* @__PURE__ */
|
|
2719
|
-
variant !== "centered" && variant !== "withSearch" && /* @__PURE__ */
|
|
2720
|
-
actions && /* @__PURE__ */
|
|
2967
|
+
variant === "withSearch" && search && /* @__PURE__ */ jsx29("div", { className: "min-w-0 flex-1 px-4", children: search }),
|
|
2968
|
+
variant !== "centered" && variant !== "withSearch" && /* @__PURE__ */ jsx29("div", { className: "flex-1" }),
|
|
2969
|
+
actions && /* @__PURE__ */ jsx29("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
2721
2970
|
] }),
|
|
2722
|
-
variant === "twoLevel" && secondaryNav && /* @__PURE__ */
|
|
2971
|
+
variant === "twoLevel" && secondaryNav && /* @__PURE__ */ jsx29("div", { className: "border-t border-border", children: /* @__PURE__ */ jsx29("div", { className: "mx-auto flex max-w-content-xl items-center gap-4 px-4 py-2 sm:px-6", children: secondaryNav }) })
|
|
2723
2972
|
]
|
|
2724
2973
|
}
|
|
2725
2974
|
)
|
|
2726
2975
|
);
|
|
2727
2976
|
Navbar.displayName = "Navbar";
|
|
2728
|
-
var NavbarLink =
|
|
2729
|
-
({ className, active, ...props }, ref) => /* @__PURE__ */
|
|
2977
|
+
var NavbarLink = React17.forwardRef(
|
|
2978
|
+
({ className, active, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2730
2979
|
"a",
|
|
2731
2980
|
{
|
|
2732
2981
|
ref,
|
|
2733
2982
|
className: cn(
|
|
2734
|
-
"text-sm font-medium transition-colors",
|
|
2983
|
+
"shrink-0 whitespace-nowrap text-sm font-medium transition-colors",
|
|
2735
2984
|
active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
|
|
2736
2985
|
className
|
|
2737
2986
|
),
|
|
@@ -2742,10 +2991,25 @@ var NavbarLink = React16.forwardRef(
|
|
|
2742
2991
|
NavbarLink.displayName = "NavbarLink";
|
|
2743
2992
|
|
|
2744
2993
|
// src/card-variants.tsx
|
|
2745
|
-
import * as
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2994
|
+
import * as React18 from "react";
|
|
2995
|
+
|
|
2996
|
+
// src/empty-value.tsx
|
|
2997
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2998
|
+
var EMPTY_VALUE_GLYPH = "\u2014";
|
|
2999
|
+
function isEmptyValue(value) {
|
|
3000
|
+
return value === null || value === void 0 || value === false || typeof value === "string" && value.trim() === "";
|
|
3001
|
+
}
|
|
3002
|
+
function EmptyValue({ className }) {
|
|
3003
|
+
return /* @__PURE__ */ jsxs22("span", { "data-empty-value": true, className: cn("text-muted-foreground", className), children: [
|
|
3004
|
+
/* @__PURE__ */ jsx30("span", { "aria-hidden": "true", children: EMPTY_VALUE_GLYPH }),
|
|
3005
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Not set" })
|
|
3006
|
+
] });
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
// src/card-variants.tsx
|
|
3010
|
+
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3011
|
+
var HorizontalCard = React18.forwardRef(
|
|
3012
|
+
({ className, media, hoverable, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2749
3013
|
"div",
|
|
2750
3014
|
{
|
|
2751
3015
|
ref,
|
|
@@ -2756,15 +3020,15 @@ var HorizontalCard = React17.forwardRef(
|
|
|
2756
3020
|
),
|
|
2757
3021
|
...props,
|
|
2758
3022
|
children: [
|
|
2759
|
-
media && /* @__PURE__ */
|
|
2760
|
-
/* @__PURE__ */
|
|
3023
|
+
media && /* @__PURE__ */ jsx31("div", { className: "flex-shrink-0", children: media }),
|
|
3024
|
+
/* @__PURE__ */ jsx31("div", { className: "flex-1 p-4", children })
|
|
2761
3025
|
]
|
|
2762
3026
|
}
|
|
2763
3027
|
)
|
|
2764
3028
|
);
|
|
2765
3029
|
HorizontalCard.displayName = "HorizontalCard";
|
|
2766
|
-
var ImageCard =
|
|
2767
|
-
({ className, imageSrc, imageAlt, hoverable, children, ...props }, ref) => /* @__PURE__ */
|
|
3030
|
+
var ImageCard = React18.forwardRef(
|
|
3031
|
+
({ className, imageSrc, imageAlt, hoverable, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2768
3032
|
"div",
|
|
2769
3033
|
{
|
|
2770
3034
|
ref,
|
|
@@ -2775,7 +3039,7 @@ var ImageCard = React17.forwardRef(
|
|
|
2775
3039
|
),
|
|
2776
3040
|
...props,
|
|
2777
3041
|
children: [
|
|
2778
|
-
imageSrc && /* @__PURE__ */
|
|
3042
|
+
imageSrc && /* @__PURE__ */ jsx31("div", { className: "aspect-video w-full bg-muted", children: /* @__PURE__ */ jsx31(
|
|
2779
3043
|
"img",
|
|
2780
3044
|
{
|
|
2781
3045
|
src: imageSrc,
|
|
@@ -2783,13 +3047,13 @@ var ImageCard = React17.forwardRef(
|
|
|
2783
3047
|
className: "h-full w-full object-cover"
|
|
2784
3048
|
}
|
|
2785
3049
|
) }),
|
|
2786
|
-
/* @__PURE__ */
|
|
3050
|
+
/* @__PURE__ */ jsx31("div", { className: "p-4", children })
|
|
2787
3051
|
]
|
|
2788
3052
|
}
|
|
2789
3053
|
)
|
|
2790
3054
|
);
|
|
2791
3055
|
ImageCard.displayName = "ImageCard";
|
|
2792
|
-
var StatCardExtended =
|
|
3056
|
+
var StatCardExtended = React18.forwardRef(({ className, label, value, trend, icon, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2793
3057
|
"div",
|
|
2794
3058
|
{
|
|
2795
3059
|
ref,
|
|
@@ -2799,18 +3063,18 @@ var StatCardExtended = React17.forwardRef(({ className, label, value, trend, ico
|
|
|
2799
3063
|
),
|
|
2800
3064
|
...props,
|
|
2801
3065
|
children: [
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
-
icon && /* @__PURE__ */
|
|
3066
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between", children: [
|
|
3067
|
+
/* @__PURE__ */ jsx31("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
3068
|
+
icon && /* @__PURE__ */ jsx31("div", { className: "text-muted-foreground", children: icon })
|
|
2805
3069
|
] }),
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
trend && /* @__PURE__ */
|
|
3070
|
+
/* @__PURE__ */ jsx31("p", { className: "mt-2 text-3xl font-bold text-foreground", children: isEmptyValue(value) ? /* @__PURE__ */ jsx31(EmptyValue, {}) : value }),
|
|
3071
|
+
trend && /* @__PURE__ */ jsxs23(
|
|
2808
3072
|
"p",
|
|
2809
3073
|
{
|
|
2810
3074
|
className: cn(
|
|
2811
3075
|
"mt-1 text-sm font-medium",
|
|
2812
|
-
trend.direction === "up" && "text-intent-success",
|
|
2813
|
-
trend.direction === "down" && "text-intent-error",
|
|
3076
|
+
trend.direction === "up" && "text-intent-success-foreground",
|
|
3077
|
+
trend.direction === "down" && "text-intent-error-foreground",
|
|
2814
3078
|
trend.direction === "neutral" && "text-muted-foreground"
|
|
2815
3079
|
),
|
|
2816
3080
|
children: [
|
|
@@ -2824,8 +3088,8 @@ var StatCardExtended = React17.forwardRef(({ className, label, value, trend, ico
|
|
|
2824
3088
|
}
|
|
2825
3089
|
));
|
|
2826
3090
|
StatCardExtended.displayName = "StatCardExtended";
|
|
2827
|
-
var ActionCard =
|
|
2828
|
-
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */
|
|
3091
|
+
var ActionCard = React18.forwardRef(
|
|
3092
|
+
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2829
3093
|
"div",
|
|
2830
3094
|
{
|
|
2831
3095
|
ref,
|
|
@@ -2835,12 +3099,12 @@ var ActionCard = React17.forwardRef(
|
|
|
2835
3099
|
),
|
|
2836
3100
|
...props,
|
|
2837
3101
|
children: [
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2840
|
-
description && /* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ jsxs23("div", { className: "p-6", children: [
|
|
3103
|
+
/* @__PURE__ */ jsx31("h3", { className: "font-semibold text-foreground", children: title }),
|
|
3104
|
+
description && /* @__PURE__ */ jsx31("p", { className: "mt-1 text-sm text-muted-foreground", children: description }),
|
|
2841
3105
|
children
|
|
2842
3106
|
] }),
|
|
2843
|
-
actions && /* @__PURE__ */
|
|
3107
|
+
actions && /* @__PURE__ */ jsx31("div", { className: "flex items-center gap-2 border-t border-border px-6 py-4", children: actions })
|
|
2844
3108
|
]
|
|
2845
3109
|
}
|
|
2846
3110
|
)
|
|
@@ -2848,9 +3112,9 @@ var ActionCard = React17.forwardRef(
|
|
|
2848
3112
|
ActionCard.displayName = "ActionCard";
|
|
2849
3113
|
|
|
2850
3114
|
// src/modal-dialog.tsx
|
|
2851
|
-
import * as
|
|
3115
|
+
import * as React19 from "react";
|
|
2852
3116
|
import { createPortal } from "react-dom";
|
|
2853
|
-
import { Fragment as
|
|
3117
|
+
import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2854
3118
|
var SIZE_CLASSES2 = {
|
|
2855
3119
|
sm: "max-w-sm",
|
|
2856
3120
|
md: "max-w-md",
|
|
@@ -2858,9 +3122,9 @@ var SIZE_CLASSES2 = {
|
|
|
2858
3122
|
xl: "max-w-xl",
|
|
2859
3123
|
fullscreen: "max-w-full mx-4 my-4 h-[calc(100vh-2rem)]"
|
|
2860
3124
|
};
|
|
2861
|
-
var ModalDialog =
|
|
3125
|
+
var ModalDialog = React19.forwardRef(
|
|
2862
3126
|
({ className, open, onClose, size = "md", children, ...props }, ref) => {
|
|
2863
|
-
|
|
3127
|
+
React19.useEffect(() => {
|
|
2864
3128
|
if (!open) return;
|
|
2865
3129
|
const handler = (e) => {
|
|
2866
3130
|
if (e.key === "Escape") onClose?.();
|
|
@@ -2870,8 +3134,8 @@ var ModalDialog = React18.forwardRef(
|
|
|
2870
3134
|
}, [open, onClose]);
|
|
2871
3135
|
if (!open) return null;
|
|
2872
3136
|
return createPortal(
|
|
2873
|
-
/* @__PURE__ */
|
|
2874
|
-
/* @__PURE__ */
|
|
3137
|
+
/* @__PURE__ */ jsxs24(Fragment7, { children: [
|
|
3138
|
+
/* @__PURE__ */ jsx32(
|
|
2875
3139
|
"div",
|
|
2876
3140
|
{
|
|
2877
3141
|
className: "z-overlay fixed inset-0 bg-foreground/60 transition-opacity",
|
|
@@ -2879,7 +3143,7 @@ var ModalDialog = React18.forwardRef(
|
|
|
2879
3143
|
"aria-hidden": "true"
|
|
2880
3144
|
}
|
|
2881
3145
|
),
|
|
2882
|
-
/* @__PURE__ */
|
|
3146
|
+
/* @__PURE__ */ jsx32("div", { className: "z-modal fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx32(
|
|
2883
3147
|
"div",
|
|
2884
3148
|
{
|
|
2885
3149
|
ref,
|
|
@@ -2901,7 +3165,7 @@ var ModalDialog = React18.forwardRef(
|
|
|
2901
3165
|
}
|
|
2902
3166
|
);
|
|
2903
3167
|
ModalDialog.displayName = "ModalDialog";
|
|
2904
|
-
var ModalHeader =
|
|
3168
|
+
var ModalHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
2905
3169
|
"div",
|
|
2906
3170
|
{
|
|
2907
3171
|
ref,
|
|
@@ -2910,9 +3174,9 @@ var ModalHeader = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2910
3174
|
}
|
|
2911
3175
|
));
|
|
2912
3176
|
ModalHeader.displayName = "ModalHeader";
|
|
2913
|
-
var ModalBody =
|
|
3177
|
+
var ModalBody = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32("div", { ref, className: cn("px-6 py-4", className), ...props }));
|
|
2914
3178
|
ModalBody.displayName = "ModalBody";
|
|
2915
|
-
var ModalFooter =
|
|
3179
|
+
var ModalFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
2916
3180
|
"div",
|
|
2917
3181
|
{
|
|
2918
3182
|
ref,
|
|
@@ -2926,9 +3190,9 @@ var ModalFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2926
3190
|
ModalFooter.displayName = "ModalFooter";
|
|
2927
3191
|
|
|
2928
3192
|
// src/drawer.tsx
|
|
2929
|
-
import * as
|
|
3193
|
+
import * as React20 from "react";
|
|
2930
3194
|
import { createPortal as createPortal2 } from "react-dom";
|
|
2931
|
-
import { Fragment as
|
|
3195
|
+
import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2932
3196
|
var SIZE_CLASSES3 = {
|
|
2933
3197
|
left: { sm: "w-64", md: "w-80", lg: "w-96" },
|
|
2934
3198
|
right: { sm: "w-64", md: "w-80", lg: "w-96" },
|
|
@@ -2939,7 +3203,7 @@ var POSITION_CLASSES = {
|
|
|
2939
3203
|
right: "inset-y-0 right-0",
|
|
2940
3204
|
bottom: "inset-x-0 bottom-0"
|
|
2941
3205
|
};
|
|
2942
|
-
var Drawer =
|
|
3206
|
+
var Drawer = React20.forwardRef(
|
|
2943
3207
|
({
|
|
2944
3208
|
className,
|
|
2945
3209
|
open,
|
|
@@ -2949,7 +3213,7 @@ var Drawer = React19.forwardRef(
|
|
|
2949
3213
|
children,
|
|
2950
3214
|
...props
|
|
2951
3215
|
}, ref) => {
|
|
2952
|
-
|
|
3216
|
+
React20.useEffect(() => {
|
|
2953
3217
|
if (!open) return;
|
|
2954
3218
|
const handler = (e) => {
|
|
2955
3219
|
if (e.key === "Escape") onClose?.();
|
|
@@ -2959,8 +3223,8 @@ var Drawer = React19.forwardRef(
|
|
|
2959
3223
|
}, [open, onClose]);
|
|
2960
3224
|
if (!open) return null;
|
|
2961
3225
|
return createPortal2(
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
3226
|
+
/* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
3227
|
+
/* @__PURE__ */ jsx33(
|
|
2964
3228
|
"div",
|
|
2965
3229
|
{
|
|
2966
3230
|
className: "z-overlay fixed inset-0 bg-foreground/60 transition-opacity",
|
|
@@ -2968,7 +3232,7 @@ var Drawer = React19.forwardRef(
|
|
|
2968
3232
|
"aria-hidden": "true"
|
|
2969
3233
|
}
|
|
2970
3234
|
),
|
|
2971
|
-
/* @__PURE__ */
|
|
3235
|
+
/* @__PURE__ */ jsx33(
|
|
2972
3236
|
"div",
|
|
2973
3237
|
{
|
|
2974
3238
|
ref,
|
|
@@ -2993,7 +3257,7 @@ var Drawer = React19.forwardRef(
|
|
|
2993
3257
|
}
|
|
2994
3258
|
);
|
|
2995
3259
|
Drawer.displayName = "Drawer";
|
|
2996
|
-
var DrawerHeader =
|
|
3260
|
+
var DrawerHeader = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
2997
3261
|
"div",
|
|
2998
3262
|
{
|
|
2999
3263
|
ref,
|
|
@@ -3002,7 +3266,7 @@ var DrawerHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3002
3266
|
}
|
|
3003
3267
|
));
|
|
3004
3268
|
DrawerHeader.displayName = "DrawerHeader";
|
|
3005
|
-
var DrawerBody =
|
|
3269
|
+
var DrawerBody = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
3006
3270
|
"div",
|
|
3007
3271
|
{
|
|
3008
3272
|
ref,
|
|
@@ -3011,7 +3275,7 @@ var DrawerBody = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3011
3275
|
}
|
|
3012
3276
|
));
|
|
3013
3277
|
DrawerBody.displayName = "DrawerBody";
|
|
3014
|
-
var DrawerFooter =
|
|
3278
|
+
var DrawerFooter = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
3015
3279
|
"div",
|
|
3016
3280
|
{
|
|
3017
3281
|
ref,
|
|
@@ -3025,10 +3289,10 @@ var DrawerFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3025
3289
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3026
3290
|
|
|
3027
3291
|
// src/form-layout.tsx
|
|
3028
|
-
import * as
|
|
3029
|
-
import { jsx as
|
|
3030
|
-
var FormLayout =
|
|
3031
|
-
({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */
|
|
3292
|
+
import * as React21 from "react";
|
|
3293
|
+
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3294
|
+
var FormLayout = React21.forwardRef(
|
|
3295
|
+
({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
3032
3296
|
"form",
|
|
3033
3297
|
{
|
|
3034
3298
|
ref,
|
|
@@ -3043,27 +3307,27 @@ var FormLayout = React20.forwardRef(
|
|
|
3043
3307
|
)
|
|
3044
3308
|
);
|
|
3045
3309
|
FormLayout.displayName = "FormLayout";
|
|
3046
|
-
var FormLayoutSection =
|
|
3310
|
+
var FormLayoutSection = React21.forwardRef(({ className, title, description, children, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3047
3311
|
"div",
|
|
3048
3312
|
{
|
|
3049
3313
|
ref,
|
|
3050
3314
|
className: cn("border-b border-border pb-6", className),
|
|
3051
3315
|
...props,
|
|
3052
3316
|
children: [
|
|
3053
|
-
(title || description) && /* @__PURE__ */
|
|
3054
|
-
title && /* @__PURE__ */
|
|
3055
|
-
description && /* @__PURE__ */
|
|
3317
|
+
(title || description) && /* @__PURE__ */ jsxs26("div", { className: "mb-4", children: [
|
|
3318
|
+
title && /* @__PURE__ */ jsx34("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
3319
|
+
description && /* @__PURE__ */ jsx34("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
|
|
3056
3320
|
] }),
|
|
3057
|
-
/* @__PURE__ */
|
|
3321
|
+
/* @__PURE__ */ jsx34("div", { className: "space-y-4", children })
|
|
3058
3322
|
]
|
|
3059
3323
|
}
|
|
3060
3324
|
));
|
|
3061
3325
|
FormLayoutSection.displayName = "FormLayoutSection";
|
|
3062
3326
|
|
|
3063
3327
|
// src/input-group.tsx
|
|
3064
|
-
import * as
|
|
3065
|
-
import { jsx as
|
|
3066
|
-
var InputGroup =
|
|
3328
|
+
import * as React22 from "react";
|
|
3329
|
+
import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3330
|
+
var InputGroup = React22.forwardRef(
|
|
3067
3331
|
({
|
|
3068
3332
|
className,
|
|
3069
3333
|
addon = "prefix",
|
|
@@ -3071,15 +3335,15 @@ var InputGroup = React21.forwardRef(
|
|
|
3071
3335
|
suffixContent,
|
|
3072
3336
|
children,
|
|
3073
3337
|
...props
|
|
3074
|
-
}, ref) => /* @__PURE__ */
|
|
3338
|
+
}, ref) => /* @__PURE__ */ jsxs27(
|
|
3075
3339
|
"div",
|
|
3076
3340
|
{
|
|
3077
3341
|
ref,
|
|
3078
3342
|
className: cn("flex rounded-md shadow-sm", className),
|
|
3079
3343
|
...props,
|
|
3080
3344
|
children: [
|
|
3081
|
-
(addon === "prefix" || addon === "both") && addonContent && /* @__PURE__ */
|
|
3082
|
-
/* @__PURE__ */
|
|
3345
|
+
(addon === "prefix" || addon === "both") && addonContent && /* @__PURE__ */ jsx35("span", { className: "inline-flex items-center rounded-l-md border border-r-0 border-input bg-muted px-3 text-sm text-muted-foreground", children: addonContent }),
|
|
3346
|
+
/* @__PURE__ */ jsx35(
|
|
3083
3347
|
"div",
|
|
3084
3348
|
{
|
|
3085
3349
|
className: cn(
|
|
@@ -3089,7 +3353,7 @@ var InputGroup = React21.forwardRef(
|
|
|
3089
3353
|
children
|
|
3090
3354
|
}
|
|
3091
3355
|
),
|
|
3092
|
-
(addon === "suffix" || addon === "both") && (suffixContent || addonContent) && /* @__PURE__ */
|
|
3356
|
+
(addon === "suffix" || addon === "both") && (suffixContent || addonContent) && /* @__PURE__ */ jsx35("span", { className: "inline-flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground", children: suffixContent || addonContent })
|
|
3093
3357
|
]
|
|
3094
3358
|
}
|
|
3095
3359
|
)
|
|
@@ -3097,9 +3361,9 @@ var InputGroup = React21.forwardRef(
|
|
|
3097
3361
|
InputGroup.displayName = "InputGroup";
|
|
3098
3362
|
|
|
3099
3363
|
// src/radio-group.tsx
|
|
3100
|
-
import * as
|
|
3101
|
-
import { jsx as
|
|
3102
|
-
var RadioGroup =
|
|
3364
|
+
import * as React23 from "react";
|
|
3365
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3366
|
+
var RadioGroup = React23.forwardRef(
|
|
3103
3367
|
({
|
|
3104
3368
|
className,
|
|
3105
3369
|
options,
|
|
@@ -3109,9 +3373,9 @@ var RadioGroup = React22.forwardRef(
|
|
|
3109
3373
|
name,
|
|
3110
3374
|
label,
|
|
3111
3375
|
...props
|
|
3112
|
-
}, ref) => /* @__PURE__ */
|
|
3113
|
-
label && /* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3376
|
+
}, ref) => /* @__PURE__ */ jsxs28("fieldset", { ref, className: cn("space-y-2", className), ...props, children: [
|
|
3377
|
+
label && /* @__PURE__ */ jsx36("legend", { className: "mb-2 text-sm font-medium text-foreground", children: label }),
|
|
3378
|
+
/* @__PURE__ */ jsx36(
|
|
3115
3379
|
"div",
|
|
3116
3380
|
{
|
|
3117
3381
|
className: cn(
|
|
@@ -3122,7 +3386,7 @@ var RadioGroup = React22.forwardRef(
|
|
|
3122
3386
|
children: options.map((option) => {
|
|
3123
3387
|
const isSelected = value === option.value;
|
|
3124
3388
|
if (variant === "card") {
|
|
3125
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ jsxs28(
|
|
3126
3390
|
"label",
|
|
3127
3391
|
{
|
|
3128
3392
|
className: cn(
|
|
@@ -3130,7 +3394,7 @@ var RadioGroup = React22.forwardRef(
|
|
|
3130
3394
|
isSelected ? "border-primary bg-primary/5" : "border-border bg-card hover:bg-muted/50"
|
|
3131
3395
|
),
|
|
3132
3396
|
children: [
|
|
3133
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ jsx36(
|
|
3134
3398
|
"input",
|
|
3135
3399
|
{
|
|
3136
3400
|
type: "radio",
|
|
@@ -3141,16 +3405,16 @@ var RadioGroup = React22.forwardRef(
|
|
|
3141
3405
|
className: "mt-0.5 h-4 w-4 accent-primary"
|
|
3142
3406
|
}
|
|
3143
3407
|
),
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
option.description && /* @__PURE__ */
|
|
3408
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
3409
|
+
/* @__PURE__ */ jsx36("span", { className: "text-sm font-medium text-foreground", children: option.label }),
|
|
3410
|
+
option.description && /* @__PURE__ */ jsx36("p", { className: "mt-0.5 text-xs text-muted-foreground", children: option.description })
|
|
3147
3411
|
] })
|
|
3148
3412
|
]
|
|
3149
3413
|
},
|
|
3150
3414
|
option.value
|
|
3151
3415
|
);
|
|
3152
3416
|
}
|
|
3153
|
-
return /* @__PURE__ */
|
|
3417
|
+
return /* @__PURE__ */ jsxs28(
|
|
3154
3418
|
"label",
|
|
3155
3419
|
{
|
|
3156
3420
|
className: cn(
|
|
@@ -3159,7 +3423,7 @@ var RadioGroup = React22.forwardRef(
|
|
|
3159
3423
|
variant === "stacked" && isSelected && "border-primary bg-primary/5"
|
|
3160
3424
|
),
|
|
3161
3425
|
children: [
|
|
3162
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsx36(
|
|
3163
3427
|
"input",
|
|
3164
3428
|
{
|
|
3165
3429
|
type: "radio",
|
|
@@ -3170,8 +3434,8 @@ var RadioGroup = React22.forwardRef(
|
|
|
3170
3434
|
className: "h-4 w-4 accent-primary"
|
|
3171
3435
|
}
|
|
3172
3436
|
),
|
|
3173
|
-
/* @__PURE__ */
|
|
3174
|
-
option.description && variant === "stacked" && /* @__PURE__ */
|
|
3437
|
+
/* @__PURE__ */ jsx36("span", { className: "text-sm text-foreground", children: option.label }),
|
|
3438
|
+
option.description && variant === "stacked" && /* @__PURE__ */ jsx36("span", { className: "ml-auto text-xs text-muted-foreground", children: option.description })
|
|
3175
3439
|
]
|
|
3176
3440
|
},
|
|
3177
3441
|
option.value
|
|
@@ -3184,9 +3448,9 @@ var RadioGroup = React22.forwardRef(
|
|
|
3184
3448
|
RadioGroup.displayName = "RadioGroup";
|
|
3185
3449
|
|
|
3186
3450
|
// src/combobox.tsx
|
|
3187
|
-
import * as
|
|
3188
|
-
import { jsx as
|
|
3189
|
-
var Combobox =
|
|
3451
|
+
import * as React24 from "react";
|
|
3452
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3453
|
+
var Combobox = React24.forwardRef(
|
|
3190
3454
|
({
|
|
3191
3455
|
className,
|
|
3192
3456
|
options,
|
|
@@ -3197,8 +3461,8 @@ var Combobox = React23.forwardRef(
|
|
|
3197
3461
|
filterable = true,
|
|
3198
3462
|
...props
|
|
3199
3463
|
}, ref) => {
|
|
3200
|
-
const [open, setOpen] =
|
|
3201
|
-
const [search, setSearch] =
|
|
3464
|
+
const [open, setOpen] = React24.useState(false);
|
|
3465
|
+
const [search, setSearch] = React24.useState("");
|
|
3202
3466
|
const selected = multi ? Array.isArray(value) ? value : [] : typeof value === "string" ? value : "";
|
|
3203
3467
|
const filtered = filterable ? options.filter(
|
|
3204
3468
|
(o) => o.label.toLowerCase().includes(search.toLowerCase())
|
|
@@ -3217,20 +3481,20 @@ var Combobox = React23.forwardRef(
|
|
|
3217
3481
|
}
|
|
3218
3482
|
};
|
|
3219
3483
|
const displayValue = multi ? null : options.find((o) => o.value === selected)?.label;
|
|
3220
|
-
return /* @__PURE__ */
|
|
3221
|
-
/* @__PURE__ */
|
|
3484
|
+
return /* @__PURE__ */ jsxs29("div", { ref, className: cn("relative", className), ...props, children: [
|
|
3485
|
+
/* @__PURE__ */ jsxs29(
|
|
3222
3486
|
"div",
|
|
3223
3487
|
{
|
|
3224
3488
|
className: "flex min-h-9 cursor-pointer items-center gap-1 rounded-md border border-input bg-background px-3 py-1.5",
|
|
3225
3489
|
onClick: () => setOpen(!open),
|
|
3226
3490
|
children: [
|
|
3227
|
-
multi && Array.isArray(selected) && selected.length > 0 ? /* @__PURE__ */
|
|
3491
|
+
multi && Array.isArray(selected) && selected.length > 0 ? /* @__PURE__ */ jsx37("div", { className: "flex flex-wrap gap-1", children: selected.map((v) => /* @__PURE__ */ jsxs29(
|
|
3228
3492
|
"span",
|
|
3229
3493
|
{
|
|
3230
|
-
className: "inline-flex items-center gap-1 rounded bg-primary/10 px-2 py-0.5 text-xs font-medium
|
|
3494
|
+
className: "text-primary-text inline-flex items-center gap-1 rounded bg-primary/10 px-2 py-0.5 text-xs font-medium",
|
|
3231
3495
|
children: [
|
|
3232
3496
|
options.find((o) => o.value === v)?.label,
|
|
3233
|
-
/* @__PURE__ */
|
|
3497
|
+
/* @__PURE__ */ jsx37(
|
|
3234
3498
|
"button",
|
|
3235
3499
|
{
|
|
3236
3500
|
type: "button",
|
|
@@ -3238,14 +3502,14 @@ var Combobox = React23.forwardRef(
|
|
|
3238
3502
|
e.stopPropagation();
|
|
3239
3503
|
handleSelect(v);
|
|
3240
3504
|
},
|
|
3241
|
-
className: "text-primary
|
|
3505
|
+
className: "text-primary-text hover:opacity-80",
|
|
3242
3506
|
children: "\u2715"
|
|
3243
3507
|
}
|
|
3244
3508
|
)
|
|
3245
3509
|
]
|
|
3246
3510
|
},
|
|
3247
3511
|
v
|
|
3248
|
-
)) }) : /* @__PURE__ */
|
|
3512
|
+
)) }) : /* @__PURE__ */ jsx37(
|
|
3249
3513
|
"span",
|
|
3250
3514
|
{
|
|
3251
3515
|
className: cn(
|
|
@@ -3255,12 +3519,12 @@ var Combobox = React23.forwardRef(
|
|
|
3255
3519
|
children: displayValue || placeholder
|
|
3256
3520
|
}
|
|
3257
3521
|
),
|
|
3258
|
-
/* @__PURE__ */
|
|
3522
|
+
/* @__PURE__ */ jsx37("span", { className: "ml-auto text-muted-foreground", children: "\u25BE" })
|
|
3259
3523
|
]
|
|
3260
3524
|
}
|
|
3261
3525
|
),
|
|
3262
|
-
open && /* @__PURE__ */
|
|
3263
|
-
filterable && /* @__PURE__ */
|
|
3526
|
+
open && /* @__PURE__ */ jsxs29("div", { className: "z-dropdown absolute mt-1 w-full rounded-md border border-border bg-card shadow-lg", children: [
|
|
3527
|
+
filterable && /* @__PURE__ */ jsx37("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ jsx37(
|
|
3264
3528
|
"input",
|
|
3265
3529
|
{
|
|
3266
3530
|
type: "text",
|
|
@@ -3271,21 +3535,21 @@ var Combobox = React23.forwardRef(
|
|
|
3271
3535
|
autoFocus: true
|
|
3272
3536
|
}
|
|
3273
3537
|
) }),
|
|
3274
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ jsx37("div", { className: "max-h-60 overflow-y-auto p-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx37("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: "No results" }) : filtered.map((option) => {
|
|
3275
3539
|
const isSelected = multi ? Array.isArray(selected) && selected.includes(option.value) : selected === option.value;
|
|
3276
|
-
return /* @__PURE__ */
|
|
3540
|
+
return /* @__PURE__ */ jsxs29(
|
|
3277
3541
|
"button",
|
|
3278
3542
|
{
|
|
3279
3543
|
type: "button",
|
|
3280
3544
|
className: cn(
|
|
3281
3545
|
"flex w-full items-center rounded-sm px-3 py-2 text-left text-sm transition-colors",
|
|
3282
|
-
isSelected ? "bg-primary/10 font-medium
|
|
3546
|
+
isSelected ? "text-primary-text bg-primary/10 font-medium" : "text-foreground hover:bg-muted"
|
|
3283
3547
|
),
|
|
3284
3548
|
onClick: () => handleSelect(option.value),
|
|
3285
3549
|
children: [
|
|
3286
|
-
multi && /* @__PURE__ */
|
|
3550
|
+
multi && /* @__PURE__ */ jsx37("span", { className: "mr-2", children: isSelected ? "\u2611" : "\u2610" }),
|
|
3287
3551
|
option.label,
|
|
3288
|
-
!multi && isSelected && /* @__PURE__ */
|
|
3552
|
+
!multi && isSelected && /* @__PURE__ */ jsx37("span", { className: "text-primary-text ml-auto", children: "\u2713" })
|
|
3289
3553
|
]
|
|
3290
3554
|
},
|
|
3291
3555
|
option.value
|
|
@@ -3298,37 +3562,37 @@ var Combobox = React23.forwardRef(
|
|
|
3298
3562
|
Combobox.displayName = "Combobox";
|
|
3299
3563
|
|
|
3300
3564
|
// src/notification-banner.tsx
|
|
3301
|
-
import * as
|
|
3302
|
-
import { jsx as
|
|
3565
|
+
import * as React25 from "react";
|
|
3566
|
+
import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3303
3567
|
var INTENT_STYLES = {
|
|
3304
3568
|
success: {
|
|
3305
3569
|
subtle: "bg-intent-success/10 text-intent-success-foreground border-intent-success/20",
|
|
3306
|
-
solid: "bg-intent-success text-
|
|
3307
|
-
accent: "border-l-4 border-l-intent-success bg-intent-success/5 text-intent-success-foreground"
|
|
3570
|
+
solid: "border-transparent bg-intent-success-solid text-intent-success-solid-fg",
|
|
3571
|
+
accent: "border-border border-l-4 border-l-intent-success bg-intent-success/5 text-intent-success-foreground"
|
|
3308
3572
|
},
|
|
3309
3573
|
warning: {
|
|
3310
3574
|
subtle: "bg-intent-warning/10 text-intent-warning-foreground border-intent-warning/20",
|
|
3311
|
-
solid: "bg-intent-warning text-
|
|
3312
|
-
accent: "border-l-4 border-l-intent-warning bg-intent-warning/5 text-intent-warning-foreground"
|
|
3575
|
+
solid: "border-transparent bg-intent-warning-solid text-intent-warning-solid-fg",
|
|
3576
|
+
accent: "border-border border-l-4 border-l-intent-warning bg-intent-warning/5 text-intent-warning-foreground"
|
|
3313
3577
|
},
|
|
3314
3578
|
error: {
|
|
3315
3579
|
subtle: "bg-intent-error/10 text-intent-error-foreground border-intent-error/20",
|
|
3316
|
-
solid: "bg-intent-error text-
|
|
3317
|
-
accent: "border-l-4 border-l-intent-error bg-intent-error/5 text-intent-error-foreground"
|
|
3580
|
+
solid: "border-transparent bg-intent-error-solid text-intent-error-solid-fg",
|
|
3581
|
+
accent: "border-border border-l-4 border-l-intent-error bg-intent-error/5 text-intent-error-foreground"
|
|
3318
3582
|
},
|
|
3319
3583
|
info: {
|
|
3320
3584
|
subtle: "bg-intent-info/10 text-intent-info-foreground border-intent-info/20",
|
|
3321
|
-
solid: "bg-intent-info text-
|
|
3322
|
-
accent: "border-l-4 border-l-intent-info bg-intent-info/5 text-intent-info-foreground"
|
|
3585
|
+
solid: "border-transparent bg-intent-info-solid text-intent-info-solid-fg",
|
|
3586
|
+
accent: "border-border border-l-4 border-l-intent-info bg-intent-info/5 text-intent-info-foreground"
|
|
3323
3587
|
}
|
|
3324
3588
|
};
|
|
3325
3589
|
var ICON_MAP = {
|
|
3326
|
-
success: "
|
|
3327
|
-
warning: "
|
|
3328
|
-
error: "
|
|
3329
|
-
info: "
|
|
3590
|
+
success: "circle-check",
|
|
3591
|
+
warning: "triangle-alert",
|
|
3592
|
+
error: "circle-alert",
|
|
3593
|
+
info: "info"
|
|
3330
3594
|
};
|
|
3331
|
-
var NotificationBanner =
|
|
3595
|
+
var NotificationBanner = React25.forwardRef(
|
|
3332
3596
|
({
|
|
3333
3597
|
className,
|
|
3334
3598
|
intent = "info",
|
|
@@ -3340,13 +3604,13 @@ var NotificationBanner = React24.forwardRef(
|
|
|
3340
3604
|
children,
|
|
3341
3605
|
...props
|
|
3342
3606
|
}, ref) => {
|
|
3343
|
-
const [dismissed, setDismissed] =
|
|
3607
|
+
const [dismissed, setDismissed] = React25.useState(false);
|
|
3344
3608
|
if (dismissed) return null;
|
|
3345
3609
|
const handleDismiss = () => {
|
|
3346
3610
|
setDismissed(true);
|
|
3347
3611
|
onDismiss?.();
|
|
3348
3612
|
};
|
|
3349
|
-
return /* @__PURE__ */
|
|
3613
|
+
return /* @__PURE__ */ jsxs30(
|
|
3350
3614
|
"div",
|
|
3351
3615
|
{
|
|
3352
3616
|
ref,
|
|
@@ -3358,18 +3622,18 @@ var NotificationBanner = React24.forwardRef(
|
|
|
3358
3622
|
),
|
|
3359
3623
|
...props,
|
|
3360
3624
|
children: [
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3363
|
-
title && /* @__PURE__ */
|
|
3364
|
-
children && /* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsx38("span", { className: "flex-shrink-0 pt-0.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx38(Icon, { name: ICON_MAP[intent], size: "md" }) }),
|
|
3626
|
+
/* @__PURE__ */ jsxs30("div", { className: "min-w-0 flex-1", children: [
|
|
3627
|
+
title && /* @__PURE__ */ jsx38("p", { className: "font-semibold", children: title }),
|
|
3628
|
+
children && /* @__PURE__ */ jsx38("div", { className: cn(title && "mt-1", "text-sm"), children })
|
|
3365
3629
|
] }),
|
|
3366
|
-
action && /* @__PURE__ */
|
|
3367
|
-
dismissible && /* @__PURE__ */
|
|
3630
|
+
action && /* @__PURE__ */ jsx38("div", { className: "flex-shrink-0", children: action }),
|
|
3631
|
+
dismissible && /* @__PURE__ */ jsx38(
|
|
3368
3632
|
"button",
|
|
3369
3633
|
{
|
|
3370
3634
|
type: "button",
|
|
3371
3635
|
onClick: handleDismiss,
|
|
3372
|
-
className: "flex-shrink-0 text-current
|
|
3636
|
+
className: "flex-shrink-0 text-current transition-opacity hover:opacity-80",
|
|
3373
3637
|
"aria-label": "Dismiss",
|
|
3374
3638
|
children: "\u2715"
|
|
3375
3639
|
}
|
|
@@ -3382,9 +3646,9 @@ var NotificationBanner = React24.forwardRef(
|
|
|
3382
3646
|
NotificationBanner.displayName = "NotificationBanner";
|
|
3383
3647
|
|
|
3384
3648
|
// src/notification-panel.tsx
|
|
3385
|
-
import * as
|
|
3386
|
-
import { jsx as
|
|
3387
|
-
var NotificationPanel =
|
|
3649
|
+
import * as React26 from "react";
|
|
3650
|
+
import { jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3651
|
+
var NotificationPanel = React26.forwardRef(({ className, unreadCount = 0, onMarkAllRead, children, ...props }, ref) => /* @__PURE__ */ jsxs31(
|
|
3388
3652
|
"div",
|
|
3389
3653
|
{
|
|
3390
3654
|
ref,
|
|
@@ -3394,27 +3658,27 @@ var NotificationPanel = React25.forwardRef(({ className, unreadCount = 0, onMark
|
|
|
3394
3658
|
),
|
|
3395
3659
|
...props,
|
|
3396
3660
|
children: [
|
|
3397
|
-
/* @__PURE__ */
|
|
3398
|
-
/* @__PURE__ */
|
|
3661
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between border-b border-border px-4 py-3", children: [
|
|
3662
|
+
/* @__PURE__ */ jsxs31("h3", { className: "text-sm font-semibold text-foreground", children: [
|
|
3399
3663
|
"Notifications",
|
|
3400
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
3664
|
+
unreadCount > 0 && /* @__PURE__ */ jsx39("span", { className: "bg-primary-solid ml-2 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs text-primary-foreground", children: unreadCount })
|
|
3401
3665
|
] }),
|
|
3402
|
-
onMarkAllRead && unreadCount > 0 && /* @__PURE__ */
|
|
3666
|
+
onMarkAllRead && unreadCount > 0 && /* @__PURE__ */ jsx39(
|
|
3403
3667
|
"button",
|
|
3404
3668
|
{
|
|
3405
3669
|
type: "button",
|
|
3406
3670
|
onClick: onMarkAllRead,
|
|
3407
|
-
className: "text-
|
|
3671
|
+
className: "text-primary-text text-xs hover:underline",
|
|
3408
3672
|
children: "Mark all read"
|
|
3409
3673
|
}
|
|
3410
3674
|
)
|
|
3411
3675
|
] }),
|
|
3412
|
-
/* @__PURE__ */
|
|
3676
|
+
/* @__PURE__ */ jsx39("div", { className: "max-h-80 divide-y divide-border overflow-y-auto", children })
|
|
3413
3677
|
]
|
|
3414
3678
|
}
|
|
3415
3679
|
));
|
|
3416
3680
|
NotificationPanel.displayName = "NotificationPanel";
|
|
3417
|
-
var NotificationPanelItem =
|
|
3681
|
+
var NotificationPanelItem = React26.forwardRef(({ className, title, description, time, unread, icon, ...props }, ref) => /* @__PURE__ */ jsxs31(
|
|
3418
3682
|
"div",
|
|
3419
3683
|
{
|
|
3420
3684
|
ref,
|
|
@@ -3425,9 +3689,9 @@ var NotificationPanelItem = React25.forwardRef(({ className, title, description,
|
|
|
3425
3689
|
),
|
|
3426
3690
|
...props,
|
|
3427
3691
|
children: [
|
|
3428
|
-
icon && /* @__PURE__ */
|
|
3429
|
-
/* @__PURE__ */
|
|
3430
|
-
/* @__PURE__ */
|
|
3692
|
+
icon && /* @__PURE__ */ jsx39("div", { className: "flex-shrink-0 pt-0.5", children: icon }),
|
|
3693
|
+
/* @__PURE__ */ jsxs31("div", { className: "min-w-0 flex-1", children: [
|
|
3694
|
+
/* @__PURE__ */ jsx39(
|
|
3431
3695
|
"p",
|
|
3432
3696
|
{
|
|
3433
3697
|
className: cn(
|
|
@@ -3437,22 +3701,22 @@ var NotificationPanelItem = React25.forwardRef(({ className, title, description,
|
|
|
3437
3701
|
children: title
|
|
3438
3702
|
}
|
|
3439
3703
|
),
|
|
3440
|
-
description && /* @__PURE__ */
|
|
3441
|
-
time && /* @__PURE__ */
|
|
3704
|
+
description && /* @__PURE__ */ jsx39("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }),
|
|
3705
|
+
time && /* @__PURE__ */ jsx39("p", { className: "mt-1 text-xs text-muted-foreground", children: time })
|
|
3442
3706
|
] }),
|
|
3443
|
-
unread && /* @__PURE__ */
|
|
3707
|
+
unread && /* @__PURE__ */ jsx39("div", { className: "flex-shrink-0 pt-1.5", children: /* @__PURE__ */ jsx39("div", { className: "h-2 w-2 rounded-full bg-primary" }) })
|
|
3444
3708
|
]
|
|
3445
3709
|
}
|
|
3446
3710
|
));
|
|
3447
3711
|
NotificationPanelItem.displayName = "NotificationPanelItem";
|
|
3448
3712
|
|
|
3449
3713
|
// src/skeleton-patterns.tsx
|
|
3450
|
-
import { jsx as
|
|
3714
|
+
import { jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3451
3715
|
function SkeletonBar2({
|
|
3452
3716
|
className,
|
|
3453
3717
|
...props
|
|
3454
3718
|
}) {
|
|
3455
|
-
return /* @__PURE__ */
|
|
3719
|
+
return /* @__PURE__ */ jsx40(
|
|
3456
3720
|
"div",
|
|
3457
3721
|
{
|
|
3458
3722
|
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
@@ -3466,7 +3730,7 @@ function SkeletonTable({
|
|
|
3466
3730
|
columns = 4,
|
|
3467
3731
|
...props
|
|
3468
3732
|
}) {
|
|
3469
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsxs32(
|
|
3470
3734
|
"div",
|
|
3471
3735
|
{
|
|
3472
3736
|
className: cn(
|
|
@@ -3475,15 +3739,15 @@ function SkeletonTable({
|
|
|
3475
3739
|
),
|
|
3476
3740
|
...props,
|
|
3477
3741
|
children: [
|
|
3478
|
-
/* @__PURE__ */
|
|
3479
|
-
Array.from({ length: rows }).map((_, row) => /* @__PURE__ */
|
|
3742
|
+
/* @__PURE__ */ jsx40("div", { className: "flex gap-4 border-b border-border bg-muted/50 px-4 py-3", children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 flex-1" }, `h-${i}`)) }),
|
|
3743
|
+
Array.from({ length: rows }).map((_, row) => /* @__PURE__ */ jsx40(
|
|
3480
3744
|
"div",
|
|
3481
3745
|
{
|
|
3482
3746
|
className: cn(
|
|
3483
3747
|
"flex gap-4 px-4 py-3",
|
|
3484
3748
|
row < rows - 1 && "border-b border-border"
|
|
3485
3749
|
),
|
|
3486
|
-
children: Array.from({ length: columns }).map((_2, col) => /* @__PURE__ */
|
|
3750
|
+
children: Array.from({ length: columns }).map((_2, col) => /* @__PURE__ */ jsx40(
|
|
3487
3751
|
SkeletonBar2,
|
|
3488
3752
|
{
|
|
3489
3753
|
className: cn("h-4 flex-1", col === 0 && "max-w-[140px]")
|
|
@@ -3505,17 +3769,17 @@ function SkeletonCardGrid({
|
|
|
3505
3769
|
...props
|
|
3506
3770
|
}) {
|
|
3507
3771
|
const colClass = columns === 2 ? "grid-cols-1 sm:grid-cols-2" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
|
|
3508
|
-
return /* @__PURE__ */
|
|
3772
|
+
return /* @__PURE__ */ jsx40("div", { className: cn("grid gap-4", colClass, className), ...props, children: Array.from({ length: cards }).map((_, i) => /* @__PURE__ */ jsxs32(
|
|
3509
3773
|
"div",
|
|
3510
3774
|
{
|
|
3511
3775
|
className: "space-y-3 rounded-lg border border-border p-4",
|
|
3512
3776
|
children: [
|
|
3513
|
-
/* @__PURE__ */
|
|
3514
|
-
/* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-3/4" }),
|
|
3778
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-3 w-full" }),
|
|
3779
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-3 w-5/6" }),
|
|
3780
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex gap-2 pt-2", children: [
|
|
3781
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-6 w-6 rounded-full" }),
|
|
3782
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-20" })
|
|
3519
3783
|
] })
|
|
3520
3784
|
]
|
|
3521
3785
|
},
|
|
@@ -3524,34 +3788,34 @@ function SkeletonCardGrid({
|
|
|
3524
3788
|
}
|
|
3525
3789
|
SkeletonCardGrid.displayName = "SkeletonCardGrid";
|
|
3526
3790
|
function SkeletonDetail({ className, ...props }) {
|
|
3527
|
-
return /* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
3530
|
-
/* @__PURE__ */
|
|
3791
|
+
return /* @__PURE__ */ jsxs32("div", { className: cn("space-y-6", className), ...props, children: [
|
|
3792
|
+
/* @__PURE__ */ jsxs32("div", { className: "space-y-2", children: [
|
|
3793
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-8 w-1/3" }),
|
|
3794
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-2/3" })
|
|
3531
3795
|
] }),
|
|
3532
|
-
/* @__PURE__ */
|
|
3533
|
-
/* @__PURE__ */
|
|
3534
|
-
/* @__PURE__ */
|
|
3796
|
+
/* @__PURE__ */ jsx40("div", { className: "space-y-4", children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsxs32("div", { className: "flex justify-between", children: [
|
|
3797
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-24" }),
|
|
3798
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-40" })
|
|
3535
3799
|
] }, `dl-${i}`)) }),
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */
|
|
3539
|
-
/* @__PURE__ */
|
|
3800
|
+
/* @__PURE__ */ jsxs32("div", { className: "space-y-2", children: [
|
|
3801
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-full" }),
|
|
3802
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-full" }),
|
|
3803
|
+
/* @__PURE__ */ jsx40(SkeletonBar2, { className: "h-4 w-3/4" })
|
|
3540
3804
|
] })
|
|
3541
3805
|
] });
|
|
3542
3806
|
}
|
|
3543
3807
|
SkeletonDetail.displayName = "SkeletonDetail";
|
|
3544
3808
|
|
|
3545
3809
|
// src/toggle.tsx
|
|
3546
|
-
import * as
|
|
3547
|
-
import { jsx as
|
|
3810
|
+
import * as React27 from "react";
|
|
3811
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3548
3812
|
var SIZE_CLASSES4 = {
|
|
3549
3813
|
sm: "h-8 px-2 text-xs",
|
|
3550
3814
|
md: "h-9 px-3 text-sm",
|
|
3551
3815
|
lg: "h-10 px-4 text-base"
|
|
3552
3816
|
};
|
|
3553
|
-
var Toggle =
|
|
3554
|
-
({ className, pressed, variant = "default", size = "md", ...props }, ref) => /* @__PURE__ */
|
|
3817
|
+
var Toggle = React27.forwardRef(
|
|
3818
|
+
({ className, pressed, variant = "default", size = "md", ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
3555
3819
|
"button",
|
|
3556
3820
|
{
|
|
3557
3821
|
ref,
|
|
@@ -3570,7 +3834,7 @@ var Toggle = React26.forwardRef(
|
|
|
3570
3834
|
)
|
|
3571
3835
|
);
|
|
3572
3836
|
Toggle.displayName = "Toggle";
|
|
3573
|
-
var ToggleGroup =
|
|
3837
|
+
var ToggleGroup = React27.forwardRef(
|
|
3574
3838
|
({
|
|
3575
3839
|
className,
|
|
3576
3840
|
type = "single",
|
|
@@ -3597,18 +3861,18 @@ var ToggleGroup = React26.forwardRef(
|
|
|
3597
3861
|
);
|
|
3598
3862
|
}
|
|
3599
3863
|
};
|
|
3600
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ jsx41(
|
|
3601
3865
|
"div",
|
|
3602
3866
|
{
|
|
3603
3867
|
ref,
|
|
3604
3868
|
role: "group",
|
|
3605
3869
|
className: cn("inline-flex items-center gap-1", className),
|
|
3606
3870
|
...props,
|
|
3607
|
-
children:
|
|
3608
|
-
if (!
|
|
3871
|
+
children: React27.Children.map(children, (child) => {
|
|
3872
|
+
if (!React27.isValidElement(child)) return child;
|
|
3609
3873
|
const childProps = child.props;
|
|
3610
3874
|
const itemValue = childProps.value ?? "";
|
|
3611
|
-
return
|
|
3875
|
+
return React27.cloneElement(child, {
|
|
3612
3876
|
pressed: isPressed(itemValue),
|
|
3613
3877
|
variant,
|
|
3614
3878
|
size,
|
|
@@ -3625,8 +3889,8 @@ var ToggleGroup = React26.forwardRef(
|
|
|
3625
3889
|
ToggleGroup.displayName = "ToggleGroup";
|
|
3626
3890
|
|
|
3627
3891
|
// src/avatar-group.tsx
|
|
3628
|
-
import * as
|
|
3629
|
-
import { jsx as
|
|
3892
|
+
import * as React28 from "react";
|
|
3893
|
+
import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3630
3894
|
var SIZE_MAP = {
|
|
3631
3895
|
xs: { avatar: "h-6 w-6", ring: "ring-1", text: "text-[10px]" },
|
|
3632
3896
|
sm: { avatar: "h-8 w-8", ring: "ring-2", text: "text-xs" },
|
|
@@ -3639,14 +3903,14 @@ var OVERLAP_MAP = {
|
|
|
3639
3903
|
md: "-ml-3",
|
|
3640
3904
|
lg: "-ml-3"
|
|
3641
3905
|
};
|
|
3642
|
-
var AvatarGroup =
|
|
3906
|
+
var AvatarGroup = React28.forwardRef(
|
|
3643
3907
|
({ className, max = 5, size = "md", children, ...props }, ref) => {
|
|
3644
|
-
const items =
|
|
3908
|
+
const items = React28.Children.toArray(children);
|
|
3645
3909
|
const visible = items.slice(0, max);
|
|
3646
3910
|
const overflow = items.length - max;
|
|
3647
3911
|
const sizeConfig3 = SIZE_MAP[size];
|
|
3648
|
-
return /* @__PURE__ */
|
|
3649
|
-
visible.map((child, i) => /* @__PURE__ */
|
|
3912
|
+
return /* @__PURE__ */ jsxs33("div", { ref, className: cn("flex items-center", className), ...props, children: [
|
|
3913
|
+
visible.map((child, i) => /* @__PURE__ */ jsx42(
|
|
3650
3914
|
"div",
|
|
3651
3915
|
{
|
|
3652
3916
|
className: cn(
|
|
@@ -3658,7 +3922,7 @@ var AvatarGroup = React27.forwardRef(
|
|
|
3658
3922
|
},
|
|
3659
3923
|
i
|
|
3660
3924
|
)),
|
|
3661
|
-
overflow > 0 && /* @__PURE__ */
|
|
3925
|
+
overflow > 0 && /* @__PURE__ */ jsx42(
|
|
3662
3926
|
"div",
|
|
3663
3927
|
{
|
|
3664
3928
|
className: cn(
|
|
@@ -3667,7 +3931,7 @@ var AvatarGroup = React27.forwardRef(
|
|
|
3667
3931
|
sizeConfig3.ring,
|
|
3668
3932
|
OVERLAP_MAP[size]
|
|
3669
3933
|
),
|
|
3670
|
-
children: /* @__PURE__ */
|
|
3934
|
+
children: /* @__PURE__ */ jsxs33(
|
|
3671
3935
|
"span",
|
|
3672
3936
|
{
|
|
3673
3937
|
className: cn(
|
|
@@ -3686,14 +3950,14 @@ var AvatarGroup = React27.forwardRef(
|
|
|
3686
3950
|
}
|
|
3687
3951
|
);
|
|
3688
3952
|
AvatarGroup.displayName = "AvatarGroup";
|
|
3689
|
-
var AvatarGroupItem =
|
|
3953
|
+
var AvatarGroupItem = React28.forwardRef(({ className, fallback, size = "md", alt, src, ...props }, ref) => {
|
|
3690
3954
|
const sizeConfig3 = SIZE_MAP[size];
|
|
3691
3955
|
if (!src && fallback) {
|
|
3692
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsx42(
|
|
3693
3957
|
"div",
|
|
3694
3958
|
{
|
|
3695
3959
|
className: cn(
|
|
3696
|
-
"flex items-center justify-center rounded-full
|
|
3960
|
+
"bg-primary-solid flex items-center justify-center rounded-full text-primary-foreground",
|
|
3697
3961
|
sizeConfig3.avatar,
|
|
3698
3962
|
sizeConfig3.text,
|
|
3699
3963
|
"font-medium",
|
|
@@ -3703,7 +3967,7 @@ var AvatarGroupItem = React27.forwardRef(({ className, fallback, size = "md", al
|
|
|
3703
3967
|
}
|
|
3704
3968
|
);
|
|
3705
3969
|
}
|
|
3706
|
-
return /* @__PURE__ */
|
|
3970
|
+
return /* @__PURE__ */ jsx42(
|
|
3707
3971
|
"img",
|
|
3708
3972
|
{
|
|
3709
3973
|
ref,
|
|
@@ -3717,26 +3981,33 @@ var AvatarGroupItem = React27.forwardRef(({ className, fallback, size = "md", al
|
|
|
3717
3981
|
AvatarGroupItem.displayName = "AvatarGroupItem";
|
|
3718
3982
|
|
|
3719
3983
|
// src/tab-bar.tsx
|
|
3720
|
-
import * as
|
|
3721
|
-
import { jsx as
|
|
3722
|
-
var TabBar =
|
|
3723
|
-
({ className, variant = "underline", children, ...props }, ref) => /* @__PURE__ */
|
|
3984
|
+
import * as React29 from "react";
|
|
3985
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3986
|
+
var TabBar = React29.forwardRef(
|
|
3987
|
+
({ className, variant = "underline", children, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
3724
3988
|
"div",
|
|
3725
3989
|
{
|
|
3726
3990
|
ref,
|
|
3727
3991
|
role: "tablist",
|
|
3728
3992
|
className: cn(
|
|
3729
|
-
|
|
3730
|
-
|
|
3993
|
+
// W0 (#5823): scrolls horizontally on a narrow screen (never wraps,
|
|
3994
|
+
// never runs off the page). A scroll box clips its own border, so the
|
|
3995
|
+
// baseline is an inset shadow the items' own borders paint over.
|
|
3996
|
+
// W1: the scroll hint (`SCROLL_HINT_X`): the last 1.5rem fades, and
|
|
3997
|
+
// the same 1.5rem of end padding means only a clipped tab fades.
|
|
3998
|
+
"flex overflow-x-auto",
|
|
3999
|
+
variant === "underline" && "gap-4 shadow-[inset_0_-1px_0_hsl(var(--border))]",
|
|
3731
4000
|
variant === "pills" && "gap-1 rounded-lg bg-muted p-1",
|
|
3732
|
-
variant === "enclosed" && "
|
|
4001
|
+
variant === "enclosed" && "shadow-[inset_0_-1px_0_hsl(var(--border))]",
|
|
4002
|
+
SCROLL_HINT_X,
|
|
4003
|
+
// after the variant: its end padding wins over `p-1`
|
|
3733
4004
|
className
|
|
3734
4005
|
),
|
|
3735
4006
|
"data-variant": variant,
|
|
3736
4007
|
...props,
|
|
3737
|
-
children:
|
|
3738
|
-
if (!
|
|
3739
|
-
return
|
|
4008
|
+
children: React29.Children.map(children, (child) => {
|
|
4009
|
+
if (!React29.isValidElement(child)) return child;
|
|
4010
|
+
return React29.cloneElement(
|
|
3740
4011
|
child,
|
|
3741
4012
|
{ _variant: variant }
|
|
3742
4013
|
);
|
|
@@ -3745,8 +4016,8 @@ var TabBar = React28.forwardRef(
|
|
|
3745
4016
|
)
|
|
3746
4017
|
);
|
|
3747
4018
|
TabBar.displayName = "TabBar";
|
|
3748
|
-
var TabBarItem =
|
|
3749
|
-
({ className, active, disabled, _variant: variant = "underline", ...props }, ref) => /* @__PURE__ */
|
|
4019
|
+
var TabBarItem = React29.forwardRef(
|
|
4020
|
+
({ className, active, disabled, _variant: variant = "underline", ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
3750
4021
|
"button",
|
|
3751
4022
|
{
|
|
3752
4023
|
ref,
|
|
@@ -3756,7 +4027,7 @@ var TabBarItem = React28.forwardRef(
|
|
|
3756
4027
|
"aria-disabled": disabled || void 0,
|
|
3757
4028
|
disabled,
|
|
3758
4029
|
className: cn(
|
|
3759
|
-
"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors",
|
|
4030
|
+
"inline-flex shrink-0 items-center justify-center whitespace-nowrap text-sm font-medium transition-colors",
|
|
3760
4031
|
disabled && "pointer-events-none opacity-50",
|
|
3761
4032
|
// Underline
|
|
3762
4033
|
variant === "underline" && [
|
|
@@ -3770,7 +4041,7 @@ var TabBarItem = React28.forwardRef(
|
|
|
3770
4041
|
],
|
|
3771
4042
|
// Enclosed
|
|
3772
4043
|
variant === "enclosed" && [
|
|
3773
|
-
"
|
|
4044
|
+
"rounded-t-md border border-b-0 px-4 py-2",
|
|
3774
4045
|
active ? "border-border bg-background text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
3775
4046
|
],
|
|
3776
4047
|
className
|
|
@@ -3782,7 +4053,7 @@ var TabBarItem = React28.forwardRef(
|
|
|
3782
4053
|
TabBarItem.displayName = "TabBarItem";
|
|
3783
4054
|
|
|
3784
4055
|
// src/sticky-action-bar.tsx
|
|
3785
|
-
import { jsx as
|
|
4056
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3786
4057
|
function StickyActionBar({
|
|
3787
4058
|
context,
|
|
3788
4059
|
actions,
|
|
@@ -3790,7 +4061,7 @@ function StickyActionBar({
|
|
|
3790
4061
|
className,
|
|
3791
4062
|
testId = "sticky-action-bar"
|
|
3792
4063
|
}) {
|
|
3793
|
-
return /* @__PURE__ */
|
|
4064
|
+
return /* @__PURE__ */ jsx44(
|
|
3794
4065
|
"div",
|
|
3795
4066
|
{
|
|
3796
4067
|
"data-testid": testId,
|
|
@@ -3801,24 +4072,24 @@ function StickyActionBar({
|
|
|
3801
4072
|
topClassName,
|
|
3802
4073
|
className
|
|
3803
4074
|
),
|
|
3804
|
-
children: /* @__PURE__ */
|
|
3805
|
-
context != null ? /* @__PURE__ */
|
|
3806
|
-
/* @__PURE__ */
|
|
4075
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
4076
|
+
context != null ? /* @__PURE__ */ jsx44("div", { className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5", children: context }) : /* @__PURE__ */ jsx44("span", {}),
|
|
4077
|
+
/* @__PURE__ */ jsx44("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
3807
4078
|
] })
|
|
3808
4079
|
}
|
|
3809
4080
|
);
|
|
3810
4081
|
}
|
|
3811
4082
|
|
|
3812
4083
|
// src/button-group.tsx
|
|
3813
|
-
import * as
|
|
3814
|
-
import { jsx as
|
|
4084
|
+
import * as React30 from "react";
|
|
4085
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3815
4086
|
var SIZE_CLASSES5 = {
|
|
3816
4087
|
sm: "h-8 px-3 text-xs",
|
|
3817
4088
|
md: "h-9 px-4 text-sm",
|
|
3818
4089
|
lg: "h-10 px-5 text-base"
|
|
3819
4090
|
};
|
|
3820
|
-
var ButtonGroup =
|
|
3821
|
-
({ className, variant = "default", size = "md", children, ...props }, ref) => /* @__PURE__ */
|
|
4091
|
+
var ButtonGroup = React30.forwardRef(
|
|
4092
|
+
({ className, variant = "default", size = "md", children, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3822
4093
|
"div",
|
|
3823
4094
|
{
|
|
3824
4095
|
ref,
|
|
@@ -3831,9 +4102,9 @@ var ButtonGroup = React29.forwardRef(
|
|
|
3831
4102
|
"data-variant": variant,
|
|
3832
4103
|
"data-size": size,
|
|
3833
4104
|
...props,
|
|
3834
|
-
children:
|
|
3835
|
-
if (!
|
|
3836
|
-
return
|
|
4105
|
+
children: React30.Children.map(children, (child) => {
|
|
4106
|
+
if (!React30.isValidElement(child)) return child;
|
|
4107
|
+
return React30.cloneElement(
|
|
3837
4108
|
child,
|
|
3838
4109
|
{ _variant: variant, _size: size }
|
|
3839
4110
|
);
|
|
@@ -3842,20 +4113,22 @@ var ButtonGroup = React29.forwardRef(
|
|
|
3842
4113
|
)
|
|
3843
4114
|
);
|
|
3844
4115
|
ButtonGroup.displayName = "ButtonGroup";
|
|
3845
|
-
var ButtonGroupItem =
|
|
4116
|
+
var ButtonGroupItem = React30.forwardRef(
|
|
3846
4117
|
({
|
|
3847
4118
|
className,
|
|
3848
4119
|
active,
|
|
3849
4120
|
_variant: variant = "default",
|
|
3850
4121
|
_size: size = "md",
|
|
3851
4122
|
...props
|
|
3852
|
-
}, ref) => /* @__PURE__ */
|
|
4123
|
+
}, ref) => /* @__PURE__ */ jsx45(
|
|
3853
4124
|
"button",
|
|
3854
4125
|
{
|
|
3855
4126
|
ref,
|
|
3856
4127
|
type: "button",
|
|
3857
4128
|
className: cn(
|
|
3858
4129
|
"inline-flex items-center justify-center font-medium transition-colors",
|
|
4130
|
+
// W1 (#5823): a disabled segment reads as disabled
|
|
4131
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
3859
4132
|
SIZE_CLASSES5[size],
|
|
3860
4133
|
// Default: connected bordered buttons
|
|
3861
4134
|
variant === "default" && [
|
|
@@ -3869,10 +4142,14 @@ var ButtonGroupItem = React29.forwardRef(
|
|
|
3869
4142
|
"-ml-px first:ml-0 first:rounded-l-md last:rounded-r-md",
|
|
3870
4143
|
active && "bg-muted font-semibold"
|
|
3871
4144
|
],
|
|
3872
|
-
// Segmented: pill-style inside a container
|
|
4145
|
+
// Segmented: pill-style inside a container. W1 (#5823): a hairline
|
|
4146
|
+
// separates two inactive segments (they read as plain text without
|
|
4147
|
+
// one); none beside the raised active segment.
|
|
3873
4148
|
variant === "segmented" && [
|
|
3874
|
-
"rounded-sm text-muted-foreground",
|
|
3875
|
-
|
|
4149
|
+
"relative rounded-sm text-muted-foreground hover:text-foreground",
|
|
4150
|
+
"not-first:before:absolute not-first:before:inset-y-1.5 not-first:before:left-0 not-first:before:w-px not-first:before:bg-border",
|
|
4151
|
+
"[[aria-pressed=true]+&]:before:hidden",
|
|
4152
|
+
active && "bg-background font-semibold text-foreground shadow-sm before:hidden"
|
|
3876
4153
|
],
|
|
3877
4154
|
className
|
|
3878
4155
|
),
|
|
@@ -3884,16 +4161,16 @@ var ButtonGroupItem = React29.forwardRef(
|
|
|
3884
4161
|
ButtonGroupItem.displayName = "ButtonGroupItem";
|
|
3885
4162
|
|
|
3886
4163
|
// src/data-table.tsx
|
|
3887
|
-
import * as
|
|
3888
|
-
import { jsx as
|
|
3889
|
-
var DataTable =
|
|
4164
|
+
import * as React31 from "react";
|
|
4165
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4166
|
+
var DataTable = React31.forwardRef(
|
|
3890
4167
|
({
|
|
3891
4168
|
className,
|
|
3892
4169
|
density = "default",
|
|
3893
4170
|
striped = false,
|
|
3894
4171
|
bordered = false,
|
|
3895
4172
|
...props
|
|
3896
|
-
}, ref) => /* @__PURE__ */
|
|
4173
|
+
}, ref) => /* @__PURE__ */ jsx46("div", { className: cn("w-full overflow-x-auto", SCROLL_HINT_X), children: /* @__PURE__ */ jsx46(
|
|
3897
4174
|
"table",
|
|
3898
4175
|
{
|
|
3899
4176
|
ref,
|
|
@@ -3909,7 +4186,7 @@ var DataTable = React30.forwardRef(
|
|
|
3909
4186
|
) })
|
|
3910
4187
|
);
|
|
3911
4188
|
DataTable.displayName = "DataTable";
|
|
3912
|
-
var TableHeader =
|
|
4189
|
+
var TableHeader = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3913
4190
|
"thead",
|
|
3914
4191
|
{
|
|
3915
4192
|
ref,
|
|
@@ -3918,7 +4195,7 @@ var TableHeader = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3918
4195
|
}
|
|
3919
4196
|
));
|
|
3920
4197
|
TableHeader.displayName = "TableHeader";
|
|
3921
|
-
var TableBody =
|
|
4198
|
+
var TableBody = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3922
4199
|
"tbody",
|
|
3923
4200
|
{
|
|
3924
4201
|
ref,
|
|
@@ -3927,8 +4204,8 @@ var TableBody = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3927
4204
|
}
|
|
3928
4205
|
));
|
|
3929
4206
|
TableBody.displayName = "TableBody";
|
|
3930
|
-
var TableRow =
|
|
3931
|
-
({ className, selected, ...props }, ref) => /* @__PURE__ */
|
|
4207
|
+
var TableRow = React31.forwardRef(
|
|
4208
|
+
({ className, selected, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3932
4209
|
"tr",
|
|
3933
4210
|
{
|
|
3934
4211
|
ref,
|
|
@@ -3951,12 +4228,12 @@ var DENSITY_CELL = {
|
|
|
3951
4228
|
default: "px-4 py-2",
|
|
3952
4229
|
relaxed: "px-4 py-3"
|
|
3953
4230
|
};
|
|
3954
|
-
var TableCell =
|
|
4231
|
+
var TableCell = React31.forwardRef(
|
|
3955
4232
|
({ className, header, sortDirection, onSort, children, ...props }, ref) => {
|
|
3956
|
-
const
|
|
4233
|
+
const Tag2 = header ? "th" : "td";
|
|
3957
4234
|
const sortIndicator = sortDirection === "asc" ? " \u2191" : sortDirection === "desc" ? " \u2193" : "";
|
|
3958
|
-
return /* @__PURE__ */
|
|
3959
|
-
|
|
4235
|
+
return /* @__PURE__ */ jsxs35(
|
|
4236
|
+
Tag2,
|
|
3960
4237
|
{
|
|
3961
4238
|
ref,
|
|
3962
4239
|
className: cn(
|
|
@@ -3970,14 +4247,14 @@ var TableCell = React30.forwardRef(
|
|
|
3970
4247
|
...props,
|
|
3971
4248
|
children: [
|
|
3972
4249
|
children,
|
|
3973
|
-
header && sortIndicator && /* @__PURE__ */
|
|
4250
|
+
header && sortIndicator && /* @__PURE__ */ jsx46("span", { className: "text-primary-text ml-1", children: sortIndicator })
|
|
3974
4251
|
]
|
|
3975
4252
|
}
|
|
3976
4253
|
);
|
|
3977
4254
|
}
|
|
3978
4255
|
);
|
|
3979
4256
|
TableCell.displayName = "TableCell";
|
|
3980
|
-
var TableCaption =
|
|
4257
|
+
var TableCaption = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3981
4258
|
"caption",
|
|
3982
4259
|
{
|
|
3983
4260
|
ref,
|
|
@@ -3988,15 +4265,15 @@ var TableCaption = React30.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3988
4265
|
TableCaption.displayName = "TableCaption";
|
|
3989
4266
|
|
|
3990
4267
|
// src/stat-group.tsx
|
|
3991
|
-
import * as
|
|
3992
|
-
import { jsx as
|
|
4268
|
+
import * as React32 from "react";
|
|
4269
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3993
4270
|
var COL_CLASSES = {
|
|
3994
4271
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
3995
4272
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
3996
4273
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
3997
4274
|
};
|
|
3998
|
-
var StatGroup =
|
|
3999
|
-
({ className, columns = 3, variant = "card", children, ...props }, ref) => /* @__PURE__ */
|
|
4275
|
+
var StatGroup = React32.forwardRef(
|
|
4276
|
+
({ className, columns = 3, variant = "card", children, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
4000
4277
|
"div",
|
|
4001
4278
|
{
|
|
4002
4279
|
ref,
|
|
@@ -4014,67 +4291,71 @@ var StatGroup = React31.forwardRef(
|
|
|
4014
4291
|
StatGroup.displayName = "StatGroup";
|
|
4015
4292
|
|
|
4016
4293
|
// src/description-list.tsx
|
|
4017
|
-
import * as
|
|
4018
|
-
import { jsx as
|
|
4019
|
-
var
|
|
4294
|
+
import * as React33 from "react";
|
|
4295
|
+
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4296
|
+
var DescriptionLayoutContext = React33.createContext("stacked");
|
|
4297
|
+
var DescriptionList = React33.forwardRef(({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */ jsx48(DescriptionLayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsx48(
|
|
4020
4298
|
"dl",
|
|
4021
4299
|
{
|
|
4022
4300
|
ref,
|
|
4023
4301
|
className: cn(
|
|
4024
|
-
layout === "grid" && "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
4302
|
+
layout === "grid" && "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2",
|
|
4025
4303
|
layout === "side-by-side" && "divide-y divide-border",
|
|
4026
4304
|
layout === "stacked" && "space-y-4",
|
|
4027
4305
|
className
|
|
4028
4306
|
),
|
|
4029
4307
|
...props
|
|
4030
4308
|
}
|
|
4031
|
-
));
|
|
4309
|
+
) }));
|
|
4032
4310
|
DescriptionList.displayName = "DescriptionList";
|
|
4033
|
-
var DescriptionItem =
|
|
4034
|
-
({ className, label, value,
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
children: [
|
|
4046
|
-
/* @__PURE__ */ jsx45(
|
|
4047
|
-
"dt",
|
|
4048
|
-
{
|
|
4049
|
-
className: cn(
|
|
4050
|
-
"text-sm font-medium text-muted-foreground",
|
|
4051
|
-
layout === "side-by-side" && "flex-shrink-0"
|
|
4052
|
-
),
|
|
4053
|
-
children: label
|
|
4054
|
-
}
|
|
4311
|
+
var DescriptionItem = React33.forwardRef(
|
|
4312
|
+
({ className, label, value, ...props }, ref) => {
|
|
4313
|
+
const layout = React33.useContext(DescriptionLayoutContext);
|
|
4314
|
+
return /* @__PURE__ */ jsxs36(
|
|
4315
|
+
"div",
|
|
4316
|
+
{
|
|
4317
|
+
ref,
|
|
4318
|
+
className: cn(
|
|
4319
|
+
layout === "side-by-side" && "flex justify-between py-3 sm:gap-4",
|
|
4320
|
+
layout === "stacked" && "",
|
|
4321
|
+
layout === "grid" && "",
|
|
4322
|
+
className
|
|
4055
4323
|
),
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4324
|
+
...props,
|
|
4325
|
+
children: [
|
|
4326
|
+
/* @__PURE__ */ jsx48(
|
|
4327
|
+
"dt",
|
|
4328
|
+
{
|
|
4329
|
+
className: cn(
|
|
4330
|
+
"text-sm font-medium text-muted-foreground",
|
|
4331
|
+
layout === "side-by-side" && "flex-shrink-0"
|
|
4332
|
+
),
|
|
4333
|
+
children: label
|
|
4334
|
+
}
|
|
4335
|
+
),
|
|
4336
|
+
/* @__PURE__ */ jsx48(
|
|
4337
|
+
"dd",
|
|
4338
|
+
{
|
|
4339
|
+
className: cn(
|
|
4340
|
+
"min-w-0 break-words text-sm text-foreground",
|
|
4341
|
+
layout !== "side-by-side" && "mt-1",
|
|
4342
|
+
layout === "side-by-side" && "text-right"
|
|
4343
|
+
),
|
|
4344
|
+
children: isEmptyValue(value) ? /* @__PURE__ */ jsx48(EmptyValue, {}) : value
|
|
4345
|
+
}
|
|
4346
|
+
)
|
|
4347
|
+
]
|
|
4348
|
+
}
|
|
4349
|
+
);
|
|
4350
|
+
}
|
|
4070
4351
|
);
|
|
4071
4352
|
DescriptionItem.displayName = "DescriptionItem";
|
|
4072
4353
|
|
|
4073
4354
|
// src/activity-feed.tsx
|
|
4074
|
-
import * as
|
|
4075
|
-
import { jsx as
|
|
4076
|
-
var ActivityFeed =
|
|
4077
|
-
({ className, variant = "simple", ...props }, ref) => /* @__PURE__ */
|
|
4355
|
+
import * as React34 from "react";
|
|
4356
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4357
|
+
var ActivityFeed = React34.forwardRef(
|
|
4358
|
+
({ className, variant = "simple", ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
4078
4359
|
"div",
|
|
4079
4360
|
{
|
|
4080
4361
|
ref,
|
|
@@ -4085,19 +4366,19 @@ var ActivityFeed = React33.forwardRef(
|
|
|
4085
4366
|
)
|
|
4086
4367
|
);
|
|
4087
4368
|
ActivityFeed.displayName = "ActivityFeed";
|
|
4088
|
-
var ActivityFeedItem =
|
|
4089
|
-
({ className, avatar, eventDescription, timestamp, isLast, ...props }, ref) => /* @__PURE__ */
|
|
4369
|
+
var ActivityFeedItem = React34.forwardRef(
|
|
4370
|
+
({ className, avatar, eventDescription, timestamp, isLast, ...props }, ref) => /* @__PURE__ */ jsxs37(
|
|
4090
4371
|
"div",
|
|
4091
4372
|
{
|
|
4092
4373
|
ref,
|
|
4093
4374
|
className: cn("relative flex gap-3 pb-6", className),
|
|
4094
4375
|
...props,
|
|
4095
4376
|
children: [
|
|
4096
|
-
!isLast && /* @__PURE__ */
|
|
4097
|
-
/* @__PURE__ */
|
|
4098
|
-
/* @__PURE__ */
|
|
4099
|
-
/* @__PURE__ */
|
|
4100
|
-
timestamp && /* @__PURE__ */
|
|
4377
|
+
!isLast && /* @__PURE__ */ jsx49("div", { className: "absolute left-5 top-10 -ml-px h-full w-0.5 bg-muted" }),
|
|
4378
|
+
/* @__PURE__ */ jsx49("div", { className: "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted", children: avatar }),
|
|
4379
|
+
/* @__PURE__ */ jsxs37("div", { className: "min-w-0 flex-1 pt-1", children: [
|
|
4380
|
+
/* @__PURE__ */ jsx49("div", { className: "text-sm text-foreground", children: eventDescription }),
|
|
4381
|
+
timestamp && /* @__PURE__ */ jsx49("p", { className: "mt-0.5 text-xs text-muted-foreground", children: timestamp })
|
|
4101
4382
|
] })
|
|
4102
4383
|
]
|
|
4103
4384
|
}
|
|
@@ -4106,19 +4387,19 @@ var ActivityFeedItem = React33.forwardRef(
|
|
|
4106
4387
|
ActivityFeedItem.displayName = "ActivityFeedItem";
|
|
4107
4388
|
|
|
4108
4389
|
// src/alert.tsx
|
|
4109
|
-
import * as
|
|
4110
|
-
import { jsx as
|
|
4111
|
-
var
|
|
4390
|
+
import * as React35 from "react";
|
|
4391
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4392
|
+
var INTENT_SUBTLE_STYLES = {
|
|
4112
4393
|
success: "bg-intent-success/10 text-intent-success-foreground border-intent-success/20",
|
|
4113
4394
|
warning: "bg-intent-warning/10 text-intent-warning-foreground border-intent-warning/20",
|
|
4114
4395
|
error: "bg-intent-error/10 text-intent-error-foreground border-intent-error/20",
|
|
4115
4396
|
info: "bg-intent-info/10 text-intent-info-foreground border-intent-info/20"
|
|
4116
4397
|
};
|
|
4117
4398
|
var SOLID_STYLES = {
|
|
4118
|
-
success: "bg-intent-success text-
|
|
4119
|
-
warning: "bg-intent-warning text-
|
|
4120
|
-
error: "bg-intent-error text-
|
|
4121
|
-
info: "bg-intent-info text-
|
|
4399
|
+
success: "border-transparent bg-intent-success-solid text-intent-success-solid-fg",
|
|
4400
|
+
warning: "border-transparent bg-intent-warning-solid text-intent-warning-solid-fg",
|
|
4401
|
+
error: "border-transparent bg-intent-error-solid text-intent-error-solid-fg",
|
|
4402
|
+
info: "border-transparent bg-intent-info-solid text-intent-info-solid-fg"
|
|
4122
4403
|
};
|
|
4123
4404
|
var OUTLINE_STYLES = {
|
|
4124
4405
|
success: "border-intent-success-border text-intent-success-foreground bg-background",
|
|
@@ -4127,12 +4408,12 @@ var OUTLINE_STYLES = {
|
|
|
4127
4408
|
info: "border-intent-info-border text-intent-info-foreground bg-background"
|
|
4128
4409
|
};
|
|
4129
4410
|
var ICON_MAP2 = {
|
|
4130
|
-
success: "
|
|
4131
|
-
warning: "
|
|
4132
|
-
error: "
|
|
4133
|
-
info: "
|
|
4411
|
+
success: "circle-check",
|
|
4412
|
+
warning: "triangle-alert",
|
|
4413
|
+
error: "circle-alert",
|
|
4414
|
+
info: "info"
|
|
4134
4415
|
};
|
|
4135
|
-
var Alert =
|
|
4416
|
+
var Alert = React35.forwardRef(
|
|
4136
4417
|
({
|
|
4137
4418
|
className,
|
|
4138
4419
|
intent = "info",
|
|
@@ -4143,8 +4424,8 @@ var Alert = React34.forwardRef(
|
|
|
4143
4424
|
children,
|
|
4144
4425
|
...props
|
|
4145
4426
|
}, ref) => {
|
|
4146
|
-
const styles = variant === "solid" ? SOLID_STYLES[intent] : variant === "outline" ? OUTLINE_STYLES[intent] :
|
|
4147
|
-
return /* @__PURE__ */
|
|
4427
|
+
const styles = variant === "solid" ? SOLID_STYLES[intent] : variant === "outline" ? OUTLINE_STYLES[intent] : INTENT_SUBTLE_STYLES[intent];
|
|
4428
|
+
return /* @__PURE__ */ jsxs38(
|
|
4148
4429
|
"div",
|
|
4149
4430
|
{
|
|
4150
4431
|
ref,
|
|
@@ -4152,17 +4433,17 @@ var Alert = React34.forwardRef(
|
|
|
4152
4433
|
className: cn("flex gap-3 rounded-lg border p-4", styles, className),
|
|
4153
4434
|
...props,
|
|
4154
4435
|
children: [
|
|
4155
|
-
/* @__PURE__ */
|
|
4156
|
-
/* @__PURE__ */
|
|
4157
|
-
title && /* @__PURE__ */
|
|
4158
|
-
children && /* @__PURE__ */
|
|
4436
|
+
/* @__PURE__ */ jsx50("span", { className: "flex-shrink-0 pt-0.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx50(Icon, { name: ICON_MAP2[intent], size: "md" }) }),
|
|
4437
|
+
/* @__PURE__ */ jsxs38("div", { className: "min-w-0 flex-1", children: [
|
|
4438
|
+
title && /* @__PURE__ */ jsx50("p", { className: "font-semibold", children: title }),
|
|
4439
|
+
children && /* @__PURE__ */ jsx50("div", { className: cn(title && "mt-1", "text-sm"), children })
|
|
4159
4440
|
] }),
|
|
4160
|
-
dismissible && /* @__PURE__ */
|
|
4441
|
+
dismissible && /* @__PURE__ */ jsx50(
|
|
4161
4442
|
"button",
|
|
4162
4443
|
{
|
|
4163
4444
|
type: "button",
|
|
4164
4445
|
onClick: onDismiss,
|
|
4165
|
-
className: "
|
|
4446
|
+
className: "flex-shrink-0 hover:opacity-80",
|
|
4166
4447
|
"aria-label": "Dismiss",
|
|
4167
4448
|
children: "\u2715"
|
|
4168
4449
|
}
|
|
@@ -4175,9 +4456,9 @@ var Alert = React34.forwardRef(
|
|
|
4175
4456
|
Alert.displayName = "Alert";
|
|
4176
4457
|
|
|
4177
4458
|
// src/empty-state.tsx
|
|
4178
|
-
import { jsx as
|
|
4459
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4179
4460
|
function EmptyState({
|
|
4180
|
-
icon:
|
|
4461
|
+
icon: Icon2,
|
|
4181
4462
|
title,
|
|
4182
4463
|
description,
|
|
4183
4464
|
action,
|
|
@@ -4186,7 +4467,7 @@ function EmptyState({
|
|
|
4186
4467
|
className
|
|
4187
4468
|
}) {
|
|
4188
4469
|
const compact = size === "compact";
|
|
4189
|
-
return /* @__PURE__ */
|
|
4470
|
+
return /* @__PURE__ */ jsxs39(
|
|
4190
4471
|
"div",
|
|
4191
4472
|
{
|
|
4192
4473
|
"data-testid": testId,
|
|
@@ -4196,7 +4477,7 @@ function EmptyState({
|
|
|
4196
4477
|
className
|
|
4197
4478
|
),
|
|
4198
4479
|
children: [
|
|
4199
|
-
|
|
4480
|
+
Icon2 && /* @__PURE__ */ jsx51(
|
|
4200
4481
|
"div",
|
|
4201
4482
|
{
|
|
4202
4483
|
"aria-hidden": "true",
|
|
@@ -4204,10 +4485,10 @@ function EmptyState({
|
|
|
4204
4485
|
"flex items-center justify-center rounded-full bg-primary/10 text-primary",
|
|
4205
4486
|
compact ? "mb-3 size-12" : "mb-5 size-16"
|
|
4206
4487
|
),
|
|
4207
|
-
children: /* @__PURE__ */
|
|
4488
|
+
children: /* @__PURE__ */ jsx51(Icon2, { className: compact ? "size-6" : "size-8" })
|
|
4208
4489
|
}
|
|
4209
4490
|
),
|
|
4210
|
-
/* @__PURE__ */
|
|
4491
|
+
/* @__PURE__ */ jsx51(
|
|
4211
4492
|
"h2",
|
|
4212
4493
|
{
|
|
4213
4494
|
className: cn(
|
|
@@ -4217,7 +4498,7 @@ function EmptyState({
|
|
|
4217
4498
|
children: title
|
|
4218
4499
|
}
|
|
4219
4500
|
),
|
|
4220
|
-
description && /* @__PURE__ */
|
|
4501
|
+
description && /* @__PURE__ */ jsx51(
|
|
4221
4502
|
"p",
|
|
4222
4503
|
{
|
|
4223
4504
|
className: cn(
|
|
@@ -4227,21 +4508,21 @@ function EmptyState({
|
|
|
4227
4508
|
children: description
|
|
4228
4509
|
}
|
|
4229
4510
|
),
|
|
4230
|
-
action && /* @__PURE__ */
|
|
4511
|
+
action && /* @__PURE__ */ jsx51("div", { className: compact ? "mt-4" : "mt-6", children: action })
|
|
4231
4512
|
]
|
|
4232
4513
|
}
|
|
4233
4514
|
);
|
|
4234
4515
|
}
|
|
4235
4516
|
|
|
4236
4517
|
// src/action-panel.tsx
|
|
4237
|
-
import * as
|
|
4238
|
-
import { Fragment as
|
|
4518
|
+
import * as React36 from "react";
|
|
4519
|
+
import { Fragment as Fragment9, jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4239
4520
|
var BORDER_INTENT = {
|
|
4240
4521
|
default: "border-l-primary",
|
|
4241
4522
|
warning: "border-l-intent-warning",
|
|
4242
4523
|
destructive: "border-l-intent-error"
|
|
4243
4524
|
};
|
|
4244
|
-
var ActionPanel =
|
|
4525
|
+
var ActionPanel = React36.forwardRef(
|
|
4245
4526
|
({
|
|
4246
4527
|
className,
|
|
4247
4528
|
title,
|
|
@@ -4250,7 +4531,7 @@ var ActionPanel = React35.forwardRef(
|
|
|
4250
4531
|
variant = "simple",
|
|
4251
4532
|
intent = "default",
|
|
4252
4533
|
...props
|
|
4253
|
-
}, ref) => /* @__PURE__ */
|
|
4534
|
+
}, ref) => /* @__PURE__ */ jsx52(
|
|
4254
4535
|
"div",
|
|
4255
4536
|
{
|
|
4256
4537
|
ref,
|
|
@@ -4261,16 +4542,16 @@ var ActionPanel = React35.forwardRef(
|
|
|
4261
4542
|
className
|
|
4262
4543
|
),
|
|
4263
4544
|
...props,
|
|
4264
|
-
children: variant === "split" ? /* @__PURE__ */
|
|
4265
|
-
/* @__PURE__ */
|
|
4266
|
-
/* @__PURE__ */
|
|
4267
|
-
description && /* @__PURE__ */
|
|
4545
|
+
children: variant === "split" ? /* @__PURE__ */ jsxs40(Fragment9, { children: [
|
|
4546
|
+
/* @__PURE__ */ jsxs40("div", { className: "min-w-0", children: [
|
|
4547
|
+
/* @__PURE__ */ jsx52("h3", { className: "font-semibold text-foreground", children: title }),
|
|
4548
|
+
description && /* @__PURE__ */ jsx52("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
|
|
4268
4549
|
] }),
|
|
4269
|
-
action && /* @__PURE__ */
|
|
4270
|
-
] }) : /* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4272
|
-
description && /* @__PURE__ */
|
|
4273
|
-
action && /* @__PURE__ */
|
|
4550
|
+
action && /* @__PURE__ */ jsx52("div", { className: "flex-shrink-0", children: action })
|
|
4551
|
+
] }) : /* @__PURE__ */ jsxs40(Fragment9, { children: [
|
|
4552
|
+
/* @__PURE__ */ jsx52("h3", { className: "font-semibold text-foreground", children: title }),
|
|
4553
|
+
description && /* @__PURE__ */ jsx52("p", { className: "mt-1 text-sm text-muted-foreground", children: description }),
|
|
4554
|
+
action && /* @__PURE__ */ jsx52("div", { className: "mt-4", children: action })
|
|
4274
4555
|
] })
|
|
4275
4556
|
}
|
|
4276
4557
|
)
|
|
@@ -4278,14 +4559,14 @@ var ActionPanel = React35.forwardRef(
|
|
|
4278
4559
|
ActionPanel.displayName = "ActionPanel";
|
|
4279
4560
|
|
|
4280
4561
|
// src/divider.tsx
|
|
4281
|
-
import * as
|
|
4282
|
-
import { jsx as
|
|
4562
|
+
import * as React37 from "react";
|
|
4563
|
+
import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4283
4564
|
var VARIANT_CLASSES = {
|
|
4284
4565
|
solid: "border-solid",
|
|
4285
4566
|
dashed: "border-dashed",
|
|
4286
4567
|
dotted: "border-dotted"
|
|
4287
4568
|
};
|
|
4288
|
-
var Divider =
|
|
4569
|
+
var Divider = React37.forwardRef(
|
|
4289
4570
|
({
|
|
4290
4571
|
className,
|
|
4291
4572
|
label,
|
|
@@ -4295,7 +4576,7 @@ var Divider = React36.forwardRef(
|
|
|
4295
4576
|
...props
|
|
4296
4577
|
}, ref) => {
|
|
4297
4578
|
if (orientation === "vertical") {
|
|
4298
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ jsx53(
|
|
4299
4580
|
"div",
|
|
4300
4581
|
{
|
|
4301
4582
|
ref,
|
|
@@ -4312,7 +4593,7 @@ var Divider = React36.forwardRef(
|
|
|
4312
4593
|
);
|
|
4313
4594
|
}
|
|
4314
4595
|
if (!label) {
|
|
4315
|
-
return /* @__PURE__ */
|
|
4596
|
+
return /* @__PURE__ */ jsx53(
|
|
4316
4597
|
"div",
|
|
4317
4598
|
{
|
|
4318
4599
|
ref,
|
|
@@ -4326,7 +4607,7 @@ var Divider = React36.forwardRef(
|
|
|
4326
4607
|
}
|
|
4327
4608
|
);
|
|
4328
4609
|
}
|
|
4329
|
-
return /* @__PURE__ */
|
|
4610
|
+
return /* @__PURE__ */ jsxs41(
|
|
4330
4611
|
"div",
|
|
4331
4612
|
{
|
|
4332
4613
|
ref,
|
|
@@ -4334,7 +4615,7 @@ var Divider = React36.forwardRef(
|
|
|
4334
4615
|
role: "separator",
|
|
4335
4616
|
...props,
|
|
4336
4617
|
children: [
|
|
4337
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
4618
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx53(
|
|
4338
4619
|
"div",
|
|
4339
4620
|
{
|
|
4340
4621
|
className: cn(
|
|
@@ -4343,7 +4624,7 @@ var Divider = React36.forwardRef(
|
|
|
4343
4624
|
)
|
|
4344
4625
|
}
|
|
4345
4626
|
),
|
|
4346
|
-
/* @__PURE__ */
|
|
4627
|
+
/* @__PURE__ */ jsx53(
|
|
4347
4628
|
"span",
|
|
4348
4629
|
{
|
|
4349
4630
|
className: cn(
|
|
@@ -4353,7 +4634,7 @@ var Divider = React36.forwardRef(
|
|
|
4353
4634
|
children: label
|
|
4354
4635
|
}
|
|
4355
4636
|
),
|
|
4356
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
4637
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx53(
|
|
4357
4638
|
"div",
|
|
4358
4639
|
{
|
|
4359
4640
|
className: cn(
|
|
@@ -4370,8 +4651,8 @@ var Divider = React36.forwardRef(
|
|
|
4370
4651
|
Divider.displayName = "Divider";
|
|
4371
4652
|
|
|
4372
4653
|
// src/container.tsx
|
|
4373
|
-
import * as
|
|
4374
|
-
import { jsx as
|
|
4654
|
+
import * as React38 from "react";
|
|
4655
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
4375
4656
|
var SIZE_CLASSES6 = {
|
|
4376
4657
|
sm: "max-w-content-sm",
|
|
4377
4658
|
md: "max-w-content-md",
|
|
@@ -4379,8 +4660,8 @@ var SIZE_CLASSES6 = {
|
|
|
4379
4660
|
xl: "max-w-content-xl",
|
|
4380
4661
|
full: "max-w-full"
|
|
4381
4662
|
};
|
|
4382
|
-
var Container =
|
|
4383
|
-
({ className, size = "xl", padded = true, ...props }, ref) => /* @__PURE__ */
|
|
4663
|
+
var Container = React38.forwardRef(
|
|
4664
|
+
({ className, size = "xl", padded = true, ...props }, ref) => /* @__PURE__ */ jsx54(
|
|
4384
4665
|
"div",
|
|
4385
4666
|
{
|
|
4386
4667
|
ref,
|
|
@@ -4397,16 +4678,16 @@ var Container = React37.forwardRef(
|
|
|
4397
4678
|
Container.displayName = "Container";
|
|
4398
4679
|
|
|
4399
4680
|
// src/page-content.tsx
|
|
4400
|
-
import * as
|
|
4401
|
-
import { jsx as
|
|
4681
|
+
import * as React39 from "react";
|
|
4682
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
4402
4683
|
var GAP_CLASSES2 = {
|
|
4403
4684
|
sm: "space-y-4",
|
|
4404
4685
|
md: "space-y-6",
|
|
4405
4686
|
lg: "space-y-8",
|
|
4406
4687
|
none: ""
|
|
4407
4688
|
};
|
|
4408
|
-
var PageContent =
|
|
4409
|
-
({ className, gap = "md", padded = true, children, ...props }, ref) => /* @__PURE__ */
|
|
4689
|
+
var PageContent = React39.forwardRef(
|
|
4690
|
+
({ className, gap = "md", padded = true, children, ...props }, ref) => /* @__PURE__ */ jsx55(
|
|
4410
4691
|
"div",
|
|
4411
4692
|
{
|
|
4412
4693
|
ref,
|
|
@@ -4419,14 +4700,14 @@ var PageContent = React38.forwardRef(
|
|
|
4419
4700
|
PageContent.displayName = "PageContent";
|
|
4420
4701
|
|
|
4421
4702
|
// src/media-object.tsx
|
|
4422
|
-
import * as
|
|
4423
|
-
import { jsx as
|
|
4703
|
+
import * as React40 from "react";
|
|
4704
|
+
import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4424
4705
|
var MEDIA_SIZE = {
|
|
4425
4706
|
sm: "h-8 w-8",
|
|
4426
4707
|
md: "h-10 w-10",
|
|
4427
4708
|
lg: "h-12 w-12"
|
|
4428
4709
|
};
|
|
4429
|
-
var MediaObject =
|
|
4710
|
+
var MediaObject = React40.forwardRef(
|
|
4430
4711
|
({
|
|
4431
4712
|
className,
|
|
4432
4713
|
media,
|
|
@@ -4439,7 +4720,7 @@ var MediaObject = React39.forwardRef(
|
|
|
4439
4720
|
...props
|
|
4440
4721
|
}, ref) => {
|
|
4441
4722
|
if (stacked) {
|
|
4442
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ jsxs42(
|
|
4443
4724
|
"div",
|
|
4444
4725
|
{
|
|
4445
4726
|
ref,
|
|
@@ -4449,17 +4730,17 @@ var MediaObject = React39.forwardRef(
|
|
|
4449
4730
|
),
|
|
4450
4731
|
...props,
|
|
4451
4732
|
children: [
|
|
4452
|
-
/* @__PURE__ */
|
|
4453
|
-
/* @__PURE__ */
|
|
4454
|
-
title && /* @__PURE__ */
|
|
4455
|
-
description && /* @__PURE__ */
|
|
4733
|
+
/* @__PURE__ */ jsx56("div", { className: cn("flex-shrink-0", MEDIA_SIZE[mediaSize]), children: media }),
|
|
4734
|
+
/* @__PURE__ */ jsxs42("div", { className: "min-w-0", children: [
|
|
4735
|
+
title && /* @__PURE__ */ jsx56("p", { className: "font-medium text-foreground", children: title }),
|
|
4736
|
+
description && /* @__PURE__ */ jsx56("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4456
4737
|
] }),
|
|
4457
|
-
action && /* @__PURE__ */
|
|
4738
|
+
action && /* @__PURE__ */ jsx56("div", { children: action })
|
|
4458
4739
|
]
|
|
4459
4740
|
}
|
|
4460
4741
|
);
|
|
4461
4742
|
}
|
|
4462
|
-
return /* @__PURE__ */
|
|
4743
|
+
return /* @__PURE__ */ jsxs42(
|
|
4463
4744
|
"div",
|
|
4464
4745
|
{
|
|
4465
4746
|
ref,
|
|
@@ -4470,12 +4751,12 @@ var MediaObject = React39.forwardRef(
|
|
|
4470
4751
|
),
|
|
4471
4752
|
...props,
|
|
4472
4753
|
children: [
|
|
4473
|
-
/* @__PURE__ */
|
|
4474
|
-
/* @__PURE__ */
|
|
4475
|
-
title && /* @__PURE__ */
|
|
4476
|
-
description && /* @__PURE__ */
|
|
4754
|
+
/* @__PURE__ */ jsx56("div", { className: cn("flex-shrink-0", MEDIA_SIZE[mediaSize]), children: media }),
|
|
4755
|
+
/* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
|
|
4756
|
+
title && /* @__PURE__ */ jsx56("p", { className: "font-medium text-foreground", children: title }),
|
|
4757
|
+
description && /* @__PURE__ */ jsx56("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4477
4758
|
] }),
|
|
4478
|
-
action && /* @__PURE__ */
|
|
4759
|
+
action && /* @__PURE__ */ jsx56("div", { className: "flex-shrink-0", children: action })
|
|
4479
4760
|
]
|
|
4480
4761
|
}
|
|
4481
4762
|
);
|
|
@@ -4483,11 +4764,332 @@ var MediaObject = React39.forwardRef(
|
|
|
4483
4764
|
);
|
|
4484
4765
|
MediaObject.displayName = "MediaObject";
|
|
4485
4766
|
|
|
4767
|
+
// src/page-patterns.tsx
|
|
4768
|
+
import * as React41 from "react";
|
|
4769
|
+
import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4770
|
+
var GUTTER_WIDTHS = {
|
|
4771
|
+
/** A single column of reading or a short list. */
|
|
4772
|
+
narrow: "max-w-content-md",
|
|
4773
|
+
/** A detail or list page with a side panel. */
|
|
4774
|
+
default: "max-w-content-xl"
|
|
4775
|
+
};
|
|
4776
|
+
var PageGutter = React41.forwardRef(
|
|
4777
|
+
({ className, width = "default", ...props }, ref) => /* @__PURE__ */ jsx57(
|
|
4778
|
+
"div",
|
|
4779
|
+
{
|
|
4780
|
+
ref,
|
|
4781
|
+
className: cn(
|
|
4782
|
+
"mx-auto flex w-full min-w-0 flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8 lg:px-8",
|
|
4783
|
+
GUTTER_WIDTHS[width],
|
|
4784
|
+
className
|
|
4785
|
+
),
|
|
4786
|
+
...props
|
|
4787
|
+
}
|
|
4788
|
+
)
|
|
4789
|
+
);
|
|
4790
|
+
PageGutter.displayName = "PageGutter";
|
|
4791
|
+
var PageHeading = React41.forwardRef(
|
|
4792
|
+
({ className, title, description, meta, actions, ...props }, ref) => /* @__PURE__ */ jsxs43(
|
|
4793
|
+
"header",
|
|
4794
|
+
{
|
|
4795
|
+
ref,
|
|
4796
|
+
className: cn(
|
|
4797
|
+
"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
4798
|
+
className
|
|
4799
|
+
),
|
|
4800
|
+
...props,
|
|
4801
|
+
children: [
|
|
4802
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
4803
|
+
/* @__PURE__ */ jsx57("h1", { className: "break-words text-2xl font-semibold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
4804
|
+
description && /* @__PURE__ */ jsx57("p", { className: "break-words text-sm text-muted-foreground sm:text-base", children: description }),
|
|
4805
|
+
meta && /* @__PURE__ */ jsx57("div", { className: "mt-2 flex flex-wrap gap-2", children: meta })
|
|
4806
|
+
] }),
|
|
4807
|
+
actions && /* @__PURE__ */ jsx57("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions })
|
|
4808
|
+
]
|
|
4809
|
+
}
|
|
4810
|
+
)
|
|
4811
|
+
);
|
|
4812
|
+
PageHeading.displayName = "PageHeading";
|
|
4813
|
+
var SectionCard = React41.forwardRef(
|
|
4814
|
+
({
|
|
4815
|
+
className,
|
|
4816
|
+
title,
|
|
4817
|
+
description,
|
|
4818
|
+
actions,
|
|
4819
|
+
size = "default",
|
|
4820
|
+
flush = false,
|
|
4821
|
+
children,
|
|
4822
|
+
...props
|
|
4823
|
+
}, ref) => {
|
|
4824
|
+
const pad = size === "compact" ? "p-4" : "p-4 sm:p-6";
|
|
4825
|
+
const hasHead = Boolean(title || description || actions);
|
|
4826
|
+
return /* @__PURE__ */ jsxs43(
|
|
4827
|
+
Card,
|
|
4828
|
+
{
|
|
4829
|
+
ref,
|
|
4830
|
+
className: cn("min-w-0 overflow-hidden", className),
|
|
4831
|
+
...props,
|
|
4832
|
+
children: [
|
|
4833
|
+
hasHead && /* @__PURE__ */ jsxs43(
|
|
4834
|
+
"div",
|
|
4835
|
+
{
|
|
4836
|
+
className: cn(
|
|
4837
|
+
"flex flex-wrap items-start justify-between gap-x-4 gap-y-2",
|
|
4838
|
+
pad,
|
|
4839
|
+
flush || !children ? "" : "pb-0 sm:pb-0",
|
|
4840
|
+
flush && children ? "border-b border-border" : ""
|
|
4841
|
+
),
|
|
4842
|
+
children: [
|
|
4843
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
4844
|
+
title && /* @__PURE__ */ jsx57(
|
|
4845
|
+
"h2",
|
|
4846
|
+
{
|
|
4847
|
+
className: cn(
|
|
4848
|
+
"break-words font-semibold text-foreground",
|
|
4849
|
+
size === "compact" ? "text-sm" : "text-base"
|
|
4850
|
+
),
|
|
4851
|
+
children: title
|
|
4852
|
+
}
|
|
4853
|
+
),
|
|
4854
|
+
description && /* @__PURE__ */ jsx57("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4855
|
+
] }),
|
|
4856
|
+
actions && /* @__PURE__ */ jsx57("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions })
|
|
4857
|
+
]
|
|
4858
|
+
}
|
|
4859
|
+
),
|
|
4860
|
+
children !== void 0 && children !== null && /* @__PURE__ */ jsx57("div", { className: cn("min-w-0", !flush && pad), children })
|
|
4861
|
+
]
|
|
4862
|
+
}
|
|
4863
|
+
);
|
|
4864
|
+
}
|
|
4865
|
+
);
|
|
4866
|
+
SectionCard.displayName = "SectionCard";
|
|
4867
|
+
var TabbedCard = React41.forwardRef(
|
|
4868
|
+
({ className, tabs, tabsLabel, children, ...props }, ref) => /* @__PURE__ */ jsxs43(
|
|
4869
|
+
Card,
|
|
4870
|
+
{
|
|
4871
|
+
ref,
|
|
4872
|
+
className: cn("min-w-0 overflow-hidden", className),
|
|
4873
|
+
...props,
|
|
4874
|
+
children: [
|
|
4875
|
+
/* @__PURE__ */ jsx57("div", { className: "px-4 pt-3 sm:px-6", children: /* @__PURE__ */ jsx57(TabBar, { variant: "underline", "aria-label": tabsLabel, children: tabs }) }),
|
|
4876
|
+
/* @__PURE__ */ jsx57("div", { className: "min-w-0 p-4 sm:p-6", children })
|
|
4877
|
+
]
|
|
4878
|
+
}
|
|
4879
|
+
)
|
|
4880
|
+
);
|
|
4881
|
+
TabbedCard.displayName = "TabbedCard";
|
|
4882
|
+
var SidePanelLayout = React41.forwardRef(
|
|
4883
|
+
({ className, aside, asideLabel, children, ...props }, ref) => /* @__PURE__ */ jsxs43(
|
|
4884
|
+
"div",
|
|
4885
|
+
{
|
|
4886
|
+
ref,
|
|
4887
|
+
className: cn(
|
|
4888
|
+
"grid min-w-0 grid-cols-1 items-start gap-6 lg:grid-cols-3",
|
|
4889
|
+
className
|
|
4890
|
+
),
|
|
4891
|
+
...props,
|
|
4892
|
+
children: [
|
|
4893
|
+
/* @__PURE__ */ jsx57("div", { className: "flex min-w-0 flex-col gap-6 lg:col-span-2", children }),
|
|
4894
|
+
/* @__PURE__ */ jsx57(
|
|
4895
|
+
"aside",
|
|
4896
|
+
{
|
|
4897
|
+
"aria-label": asideLabel,
|
|
4898
|
+
className: "flex min-w-0 flex-col gap-4 lg:sticky lg:top-6",
|
|
4899
|
+
children: aside
|
|
4900
|
+
}
|
|
4901
|
+
)
|
|
4902
|
+
]
|
|
4903
|
+
}
|
|
4904
|
+
)
|
|
4905
|
+
);
|
|
4906
|
+
SidePanelLayout.displayName = "SidePanelLayout";
|
|
4907
|
+
|
|
4908
|
+
// src/intent-badge.tsx
|
|
4909
|
+
import * as React42 from "react";
|
|
4910
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
4911
|
+
var INTENT_CLASSES = {
|
|
4912
|
+
neutral: "bg-muted text-muted-foreground border-border",
|
|
4913
|
+
// the primary tint is lighter than the intents': `primary-text` on a 10%
|
|
4914
|
+
// tint over the page grey drew 4.46:1 (W1 sheet), under AA
|
|
4915
|
+
primary: "bg-primary/5 text-primary-text border-primary/30",
|
|
4916
|
+
...INTENT_SUBTLE_STYLES
|
|
4917
|
+
};
|
|
4918
|
+
var IntentBadge = React42.forwardRef(
|
|
4919
|
+
({ className, intent = "neutral", children, ...props }, ref) => /* @__PURE__ */ jsx58(
|
|
4920
|
+
"span",
|
|
4921
|
+
{
|
|
4922
|
+
ref,
|
|
4923
|
+
title: typeof children === "string" ? children : void 0,
|
|
4924
|
+
className: cn(
|
|
4925
|
+
"inline-flex max-w-full items-center rounded-full border px-2.5 py-0.5 text-xs font-medium",
|
|
4926
|
+
INTENT_CLASSES[intent],
|
|
4927
|
+
className
|
|
4928
|
+
),
|
|
4929
|
+
...props,
|
|
4930
|
+
children: /* @__PURE__ */ jsx58("span", { className: "truncate", children: isEmptyValue(children) ? /* @__PURE__ */ jsx58(EmptyValue, {}) : children })
|
|
4931
|
+
}
|
|
4932
|
+
)
|
|
4933
|
+
);
|
|
4934
|
+
IntentBadge.displayName = "IntentBadge";
|
|
4935
|
+
|
|
4936
|
+
// src/overflow-menu.tsx
|
|
4937
|
+
import * as React43 from "react";
|
|
4938
|
+
import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4939
|
+
function OverflowMenu({
|
|
4940
|
+
label,
|
|
4941
|
+
items,
|
|
4942
|
+
defaultOpen = false,
|
|
4943
|
+
className
|
|
4944
|
+
}) {
|
|
4945
|
+
const [open, setOpen] = React43.useState(defaultOpen);
|
|
4946
|
+
const menuId = React43.useId();
|
|
4947
|
+
React43.useEffect(() => {
|
|
4948
|
+
if (!open) return;
|
|
4949
|
+
const onKey = (e) => {
|
|
4950
|
+
if (e.key === "Escape") setOpen(false);
|
|
4951
|
+
};
|
|
4952
|
+
document.addEventListener("keydown", onKey);
|
|
4953
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
4954
|
+
}, [open]);
|
|
4955
|
+
return /* @__PURE__ */ jsxs44("div", { className: cn("relative inline-block", className), children: [
|
|
4956
|
+
/* @__PURE__ */ jsx59(
|
|
4957
|
+
Button,
|
|
4958
|
+
{
|
|
4959
|
+
variant: "outline",
|
|
4960
|
+
size: "icon",
|
|
4961
|
+
"aria-label": label,
|
|
4962
|
+
"aria-haspopup": "menu",
|
|
4963
|
+
"aria-expanded": open,
|
|
4964
|
+
"aria-controls": open ? menuId : void 0,
|
|
4965
|
+
onClick: () => setOpen(!open),
|
|
4966
|
+
children: /* @__PURE__ */ jsx59(Icon, { name: "ellipsis", size: "sm" })
|
|
4967
|
+
}
|
|
4968
|
+
),
|
|
4969
|
+
open && /* @__PURE__ */ jsxs44(Fragment10, { children: [
|
|
4970
|
+
/* @__PURE__ */ jsx59(
|
|
4971
|
+
"div",
|
|
4972
|
+
{
|
|
4973
|
+
"aria-hidden": "true",
|
|
4974
|
+
className: "z-dropdown fixed inset-0",
|
|
4975
|
+
onClick: () => setOpen(false)
|
|
4976
|
+
}
|
|
4977
|
+
),
|
|
4978
|
+
/* @__PURE__ */ jsx59(
|
|
4979
|
+
"div",
|
|
4980
|
+
{
|
|
4981
|
+
id: menuId,
|
|
4982
|
+
role: "menu",
|
|
4983
|
+
"aria-label": label,
|
|
4984
|
+
className: "z-dropdown absolute right-0 top-full mt-2 flex w-56 max-w-[calc(100vw-2rem)] flex-col rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
4985
|
+
children: items.map((item) => /* @__PURE__ */ jsxs44(
|
|
4986
|
+
"button",
|
|
4987
|
+
{
|
|
4988
|
+
type: "button",
|
|
4989
|
+
role: "menuitem",
|
|
4990
|
+
disabled: item.disabled,
|
|
4991
|
+
onClick: () => {
|
|
4992
|
+
setOpen(false);
|
|
4993
|
+
item.onSelect();
|
|
4994
|
+
},
|
|
4995
|
+
className: cn(
|
|
4996
|
+
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-muted focus-visible:bg-muted focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
4997
|
+
item.destructive ? "text-intent-error-foreground" : "text-popover-foreground"
|
|
4998
|
+
),
|
|
4999
|
+
children: [
|
|
5000
|
+
item.icon && /* @__PURE__ */ jsx59(Icon, { name: item.icon, size: "sm" }),
|
|
5001
|
+
/* @__PURE__ */ jsx59("span", { className: "min-w-0 truncate", children: item.label })
|
|
5002
|
+
]
|
|
5003
|
+
},
|
|
5004
|
+
item.label
|
|
5005
|
+
))
|
|
5006
|
+
}
|
|
5007
|
+
)
|
|
5008
|
+
] })
|
|
5009
|
+
] });
|
|
5010
|
+
}
|
|
5011
|
+
|
|
5012
|
+
// src/stage-list.tsx
|
|
5013
|
+
import * as React44 from "react";
|
|
5014
|
+
import { jsx as jsx60, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5015
|
+
var StageList = React44.forwardRef(
|
|
5016
|
+
({ stages, outcomes = [], current, ...props }, ref) => {
|
|
5017
|
+
const at = stages.findIndex((s) => s.value === current);
|
|
5018
|
+
const outcome = outcomes.find((s) => s.value === current);
|
|
5019
|
+
if (at < 0 && !outcome)
|
|
5020
|
+
throw new Error(
|
|
5021
|
+
`StageList: current "${current}" is not one of the stages (${stages.map((s) => s.value).join(", ")}) or outcomes (${outcomes.map((s) => s.value).join(", ") || "none"})`
|
|
5022
|
+
);
|
|
5023
|
+
return /* @__PURE__ */ jsxs45(
|
|
5024
|
+
Stepper,
|
|
5025
|
+
{
|
|
5026
|
+
ref,
|
|
5027
|
+
variant: "vertical",
|
|
5028
|
+
size: "sm",
|
|
5029
|
+
activeStep: outcome ? stages.length : at,
|
|
5030
|
+
...props,
|
|
5031
|
+
children: [
|
|
5032
|
+
stages.map((s) => /* @__PURE__ */ jsx60(
|
|
5033
|
+
StepperStep,
|
|
5034
|
+
{
|
|
5035
|
+
label: s.label,
|
|
5036
|
+
disabled: outcome !== void 0
|
|
5037
|
+
},
|
|
5038
|
+
s.value
|
|
5039
|
+
)),
|
|
5040
|
+
outcome && /* @__PURE__ */ jsx60(StepperStep, { label: outcome.label, error: true }, outcome.value)
|
|
5041
|
+
]
|
|
5042
|
+
}
|
|
5043
|
+
);
|
|
5044
|
+
}
|
|
5045
|
+
);
|
|
5046
|
+
StageList.displayName = "StageList";
|
|
5047
|
+
|
|
5048
|
+
// src/clamped-list.tsx
|
|
5049
|
+
import * as React45 from "react";
|
|
5050
|
+
import { jsx as jsx61, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5051
|
+
var MAX_HEIGHTS = {
|
|
5052
|
+
sm: "max-h-48",
|
|
5053
|
+
md: "max-h-72",
|
|
5054
|
+
lg: "max-h-96"
|
|
5055
|
+
};
|
|
5056
|
+
var ClampedList = React45.forwardRef(
|
|
5057
|
+
({ className, label, maxHeight = "md", children, ...props }, ref) => /* @__PURE__ */ jsxs46(
|
|
5058
|
+
"div",
|
|
5059
|
+
{
|
|
5060
|
+
ref,
|
|
5061
|
+
role: "region",
|
|
5062
|
+
"aria-label": label,
|
|
5063
|
+
tabIndex: 0,
|
|
5064
|
+
className: cn(
|
|
5065
|
+
"min-w-0 overflow-y-auto overscroll-contain rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5066
|
+
MAX_HEIGHTS[maxHeight],
|
|
5067
|
+
SCROLL_HINT_Y,
|
|
5068
|
+
className
|
|
5069
|
+
),
|
|
5070
|
+
...props,
|
|
5071
|
+
children: [
|
|
5072
|
+
children,
|
|
5073
|
+
/* @__PURE__ */ jsx61(
|
|
5074
|
+
"div",
|
|
5075
|
+
{
|
|
5076
|
+
"aria-hidden": "true",
|
|
5077
|
+
"data-scroll-hint": "y",
|
|
5078
|
+
className: SCROLL_HINT_Y_MARK,
|
|
5079
|
+
children: /* @__PURE__ */ jsx61("span", { className: "flex items-center rounded-full border border-border bg-card px-2 text-muted-foreground shadow-sm", children: /* @__PURE__ */ jsx61(Icon, { name: "chevron-down", size: "sm" }) })
|
|
5080
|
+
}
|
|
5081
|
+
)
|
|
5082
|
+
]
|
|
5083
|
+
}
|
|
5084
|
+
)
|
|
5085
|
+
);
|
|
5086
|
+
ClampedList.displayName = "ClampedList";
|
|
5087
|
+
|
|
4486
5088
|
// src/hooks/use-debounce.ts
|
|
4487
|
-
import { useEffect as
|
|
5089
|
+
import { useEffect as useEffect10, useState as useState11 } from "react";
|
|
4488
5090
|
function useDebounce(value, ms) {
|
|
4489
|
-
const [debounced, setDebounced] =
|
|
4490
|
-
|
|
5091
|
+
const [debounced, setDebounced] = useState11(value);
|
|
5092
|
+
useEffect10(() => {
|
|
4491
5093
|
const handle = setTimeout(() => setDebounced(value), ms);
|
|
4492
5094
|
return () => clearTimeout(handle);
|
|
4493
5095
|
}, [value, ms]);
|
|
@@ -4509,13 +5111,14 @@ export {
|
|
|
4509
5111
|
Button,
|
|
4510
5112
|
ButtonGroup,
|
|
4511
5113
|
ButtonGroupItem,
|
|
4512
|
-
Calendar,
|
|
5114
|
+
Calendar2 as Calendar,
|
|
4513
5115
|
Card,
|
|
4514
5116
|
CardContent,
|
|
4515
5117
|
CardDescription,
|
|
4516
5118
|
CardFooter,
|
|
4517
5119
|
CardHeader,
|
|
4518
5120
|
CardTitle,
|
|
5121
|
+
ClampedList,
|
|
4519
5122
|
CollapsibleSidebar,
|
|
4520
5123
|
Combobox,
|
|
4521
5124
|
CommandPalette,
|
|
@@ -4532,7 +5135,9 @@ export {
|
|
|
4532
5135
|
DrawerBody,
|
|
4533
5136
|
DrawerFooter,
|
|
4534
5137
|
DrawerHeader,
|
|
5138
|
+
EMPTY_VALUE_GLYPH,
|
|
4535
5139
|
EmptyState,
|
|
5140
|
+
EmptyValue,
|
|
4536
5141
|
FilterChip,
|
|
4537
5142
|
FormError,
|
|
4538
5143
|
FormField,
|
|
@@ -4546,9 +5151,14 @@ export {
|
|
|
4546
5151
|
GridListItem,
|
|
4547
5152
|
HorizontalCard,
|
|
4548
5153
|
HoverCard,
|
|
5154
|
+
ICONS,
|
|
5155
|
+
ICON_SIZES,
|
|
5156
|
+
INTENT_SUBTLE_STYLES,
|
|
5157
|
+
Icon,
|
|
4549
5158
|
ImageCard,
|
|
4550
5159
|
Input,
|
|
4551
5160
|
InputGroup,
|
|
5161
|
+
IntentBadge,
|
|
4552
5162
|
IntentIcon,
|
|
4553
5163
|
MarkdownRenderer,
|
|
4554
5164
|
MediaObject,
|
|
@@ -4561,12 +5171,18 @@ export {
|
|
|
4561
5171
|
NotificationBanner,
|
|
4562
5172
|
NotificationPanel,
|
|
4563
5173
|
NotificationPanelItem,
|
|
5174
|
+
OverflowMenu,
|
|
4564
5175
|
PageContent,
|
|
5176
|
+
PageGutter,
|
|
5177
|
+
PageHeading,
|
|
4565
5178
|
Pagination,
|
|
4566
5179
|
PaginationButton,
|
|
4567
5180
|
Popover,
|
|
4568
5181
|
RadioGroup,
|
|
5182
|
+
SCROLL_HINT_X,
|
|
5183
|
+
SectionCard,
|
|
4569
5184
|
SectionHeading,
|
|
5185
|
+
SidePanelLayout,
|
|
4570
5186
|
SimpleAccordion,
|
|
4571
5187
|
SkeletonBar,
|
|
4572
5188
|
SkeletonCard,
|
|
@@ -4576,6 +5192,7 @@ export {
|
|
|
4576
5192
|
SkeletonTable,
|
|
4577
5193
|
StackedList,
|
|
4578
5194
|
StackedListItem,
|
|
5195
|
+
StageList,
|
|
4579
5196
|
StatCardExtended,
|
|
4580
5197
|
StatGroup,
|
|
4581
5198
|
Stepper,
|
|
@@ -4584,6 +5201,7 @@ export {
|
|
|
4584
5201
|
Switch,
|
|
4585
5202
|
TabBar,
|
|
4586
5203
|
TabBarItem,
|
|
5204
|
+
TabbedCard,
|
|
4587
5205
|
TableBody,
|
|
4588
5206
|
TableCaption,
|
|
4589
5207
|
TableCell,
|
|
@@ -4600,6 +5218,7 @@ export {
|
|
|
4600
5218
|
buttonVariants,
|
|
4601
5219
|
cn,
|
|
4602
5220
|
getPageRange,
|
|
5221
|
+
isEmptyValue,
|
|
4603
5222
|
useDebounce,
|
|
4604
5223
|
useSidebar
|
|
4605
5224
|
};
|