@playfast/reform-better-hub-ui-primitives 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/package.json +2 -2
  2. package/src/components/agent-icon.tsx +21 -0
  3. package/src/components/badge.tsx +54 -0
  4. package/src/components/button.tsx +72 -0
  5. package/src/components/combobox.tsx +290 -0
  6. package/src/components/command.tsx +170 -0
  7. package/src/components/dialog.tsx +129 -0
  8. package/src/components/dropdown-menu.tsx +149 -0
  9. package/src/components/github-background.tsx +280 -0
  10. package/src/components/halftone-background.tsx +289 -0
  11. package/src/components/input-group.tsx +175 -0
  12. package/src/components/input.tsx +25 -0
  13. package/src/components/live-duration.tsx +70 -0
  14. package/src/components/logo.tsx +20 -0
  15. package/src/components/popover.tsx +82 -0
  16. package/src/components/resize-handle.tsx +86 -0
  17. package/src/components/sheet.tsx +147 -0
  18. package/src/components/textarea.tsx +21 -0
  19. package/src/components/time-ago.tsx +57 -0
  20. package/src/components/tooltip.tsx +64 -0
  21. package/src/foundation/cn.ts +8 -0
  22. package/src/foundation/styles.css +156 -0
  23. package/{dist/index.js → src/index.tsx} +2 -1
  24. package/dist/components/agent-icon.d.ts +0 -5
  25. package/dist/components/agent-icon.d.ts.map +0 -1
  26. package/dist/components/agent-icon.js +0 -5
  27. package/dist/components/agent-icon.js.map +0 -1
  28. package/dist/components/badge.d.ts +0 -11
  29. package/dist/components/badge.d.ts.map +0 -1
  30. package/dist/components/badge.js +0 -28
  31. package/dist/components/badge.js.map +0 -1
  32. package/dist/components/button.d.ts +0 -12
  33. package/dist/components/button.d.ts.map +0 -1
  34. package/dist/components/button.js +0 -34
  35. package/dist/components/button.js.map +0 -1
  36. package/dist/components/combobox.d.ts +0 -25
  37. package/dist/components/combobox.d.ts.map +0 -1
  38. package/dist/components/combobox.js +0 -60
  39. package/dist/components/combobox.js.map +0 -1
  40. package/dist/components/command.d.ts +0 -19
  41. package/dist/components/command.d.ts.map +0 -1
  42. package/dist/components/command.js +0 -36
  43. package/dist/components/command.js.map +0 -1
  44. package/dist/components/dialog.d.ts +0 -16
  45. package/dist/components/dialog.d.ts.map +0 -1
  46. package/dist/components/dialog.js +0 -38
  47. package/dist/components/dialog.js.map +0 -1
  48. package/dist/components/dropdown-menu.d.ts +0 -17
  49. package/dist/components/dropdown-menu.d.ts.map +0 -1
  50. package/dist/components/dropdown-menu.js +0 -35
  51. package/dist/components/dropdown-menu.js.map +0 -1
  52. package/dist/components/github-background.d.ts +0 -3
  53. package/dist/components/github-background.d.ts.map +0 -1
  54. package/dist/components/github-background.js +0 -51
  55. package/dist/components/github-background.js.map +0 -1
  56. package/dist/components/halftone-background.d.ts +0 -3
  57. package/dist/components/halftone-background.d.ts.map +0 -1
  58. package/dist/components/halftone-background.js +0 -248
  59. package/dist/components/halftone-background.js.map +0 -1
  60. package/dist/components/input-group.d.ts +0 -19
  61. package/dist/components/input-group.d.ts.map +0 -1
  62. package/dist/components/input-group.js +0 -63
  63. package/dist/components/input-group.js.map +0 -1
  64. package/dist/components/input.d.ts +0 -5
  65. package/dist/components/input.d.ts.map +0 -1
  66. package/dist/components/input.js +0 -7
  67. package/dist/components/input.js.map +0 -1
  68. package/dist/components/live-duration.d.ts +0 -9
  69. package/dist/components/live-duration.d.ts.map +0 -1
  70. package/dist/components/live-duration.js +0 -55
  71. package/dist/components/live-duration.js.map +0 -1
  72. package/dist/components/logo.d.ts +0 -8
  73. package/dist/components/logo.d.ts.map +0 -1
  74. package/dist/components/logo.js +0 -9
  75. package/dist/components/logo.js.map +0 -1
  76. package/dist/components/popover.d.ts +0 -12
  77. package/dist/components/popover.d.ts.map +0 -1
  78. package/dist/components/popover.js +0 -26
  79. package/dist/components/popover.js.map +0 -1
  80. package/dist/components/resize-handle.d.ts +0 -15
  81. package/dist/components/resize-handle.d.ts.map +0 -1
  82. package/dist/components/resize-handle.js +0 -36
  83. package/dist/components/resize-handle.js.map +0 -1
  84. package/dist/components/sheet.d.ts +0 -18
  85. package/dist/components/sheet.d.ts.map +0 -1
  86. package/dist/components/sheet.js +0 -44
  87. package/dist/components/sheet.js.map +0 -1
  88. package/dist/components/textarea.d.ts +0 -5
  89. package/dist/components/textarea.d.ts.map +0 -1
  90. package/dist/components/textarea.js +0 -7
  91. package/dist/components/textarea.js.map +0 -1
  92. package/dist/components/time-ago.d.ts +0 -8
  93. package/dist/components/time-ago.d.ts.map +0 -1
  94. package/dist/components/time-ago.js +0 -40
  95. package/dist/components/time-ago.js.map +0 -1
  96. package/dist/components/tooltip.d.ts +0 -10
  97. package/dist/components/tooltip.d.ts.map +0 -1
  98. package/dist/components/tooltip.js +0 -25
  99. package/dist/components/tooltip.js.map +0 -1
  100. package/dist/foundation/cn.d.ts +0 -7
  101. package/dist/foundation/cn.d.ts.map +0 -1
  102. package/dist/foundation/cn.js +0 -8
  103. package/dist/foundation/cn.js.map +0 -1
  104. package/dist/index.d.ts +0 -21
  105. package/dist/index.d.ts.map +0 -1
  106. package/dist/index.js.map +0 -1
@@ -0,0 +1,86 @@
1
+ // Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
2
+ // (apps/web/src/components/ui/resize-handle.tsx). Full credit to the Better Auth team.
3
+
4
+ import type * as React from "react";
5
+ import { useCallback, useEffect, useState } from "react";
6
+ import type { MouseEvent as ReactMouseEvent } from "react";
7
+ import { cn } from "../foundation/cn";
8
+
9
+ interface ResizeHandleProps {
10
+ /** Called continuously during drag with clientX pixel position */
11
+ onResize: (clientX: number) => void;
12
+ /** Called when drag starts */
13
+ onDragStart?: () => void;
14
+ /** Called when drag ends */
15
+ onDragEnd?: () => void;
16
+ /** Double click handler (e.g. reset to default) */
17
+ onDoubleClick?: () => void;
18
+ className?: string;
19
+ }
20
+
21
+ export function ResizeHandle({
22
+ onResize,
23
+ onDragStart,
24
+ onDragEnd,
25
+ onDoubleClick,
26
+ className,
27
+ }: ResizeHandleProps): React.JSX.Element {
28
+ const [isDragging, setIsDragging] = useState(false);
29
+
30
+ const handleMouseDown = useCallback(
31
+ (e: ReactMouseEvent) => {
32
+ e.preventDefault();
33
+ setIsDragging(true);
34
+ onDragStart?.();
35
+ },
36
+ [onDragStart],
37
+ );
38
+
39
+ useEffect(() => {
40
+ if (!isDragging) return;
41
+
42
+ const handleMouseMove = (e: MouseEvent) => {
43
+ onResize(e.clientX);
44
+ };
45
+
46
+ const handleMouseUp = () => {
47
+ setIsDragging(false);
48
+ onDragEnd?.();
49
+ };
50
+
51
+ document.addEventListener("mousemove", handleMouseMove);
52
+ document.addEventListener("mouseup", handleMouseUp);
53
+ document.body.style.userSelect = "none";
54
+ document.body.style.cursor = "col-resize";
55
+
56
+ return () => {
57
+ document.removeEventListener("mousemove", handleMouseMove);
58
+ document.removeEventListener("mouseup", handleMouseUp);
59
+ document.body.style.userSelect = "";
60
+ document.body.style.cursor = "";
61
+ };
62
+ }, [isDragging, onResize, onDragEnd]);
63
+
64
+ return (
65
+ <div
66
+ onMouseDown={handleMouseDown}
67
+ onDoubleClick={onDoubleClick}
68
+ className={cn(
69
+ "relative shrink-0 w-0 group/resize cursor-col-resize z-10",
70
+ className,
71
+ )}
72
+ >
73
+ {/* Wider invisible hit area */}
74
+ <div className="absolute inset-y-0 -left-[5px] w-[11px]" />
75
+ {/* Visible line */}
76
+ <div
77
+ className={cn(
78
+ "absolute inset-y-0 -left-px w-[2px] transition-all duration-150",
79
+ isDragging
80
+ ? "bg-foreground/25"
81
+ : "bg-transparent group-hover/resize:bg-foreground/15",
82
+ )}
83
+ />
84
+ </div>
85
+ );
86
+ }
@@ -0,0 +1,147 @@
1
+ // Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
2
+ // (apps/web/src/components/ui/sheet.tsx). Full credit to the Better Auth team.
3
+
4
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
5
+ import { XIcon } from "lucide-react";
6
+ import type * as React from "react";
7
+ import { cn } from "../foundation/cn";
8
+
9
+ function Sheet({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element {
10
+ return <DialogPrimitive.Root data-slot="sheet" {...props} />;
11
+ }
12
+
13
+ function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element {
14
+ return <DialogPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
15
+ }
16
+
17
+ function SheetPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element {
18
+ return <DialogPrimitive.Portal data-slot="sheet-portal" {...props} />;
19
+ }
20
+
21
+ function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element {
22
+ return <DialogPrimitive.Close data-slot="sheet-close" {...props} />;
23
+ }
24
+
25
+ function SheetOverlay({
26
+ className,
27
+ ...props
28
+ }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element {
29
+ return (
30
+ <DialogPrimitive.Overlay
31
+ data-slot="sheet-overlay"
32
+ className={cn(
33
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/25 dark:bg-black/70 backdrop-blur-[2px]",
34
+ className,
35
+ )}
36
+ {...props}
37
+ />
38
+ );
39
+ }
40
+
41
+ interface SheetContentProps extends React.ComponentProps<typeof DialogPrimitive.Content> {
42
+ side?: "left" | "right" | "top" | "bottom";
43
+ showCloseButton?: boolean;
44
+ }
45
+
46
+ function SheetContent({
47
+ className,
48
+ children,
49
+ side = "right",
50
+ showCloseButton = true,
51
+ ...props
52
+ }: SheetContentProps): React.JSX.Element {
53
+ const sideStyles = {
54
+ right: "inset-y-0 right-0 h-full w-3/4 sm:max-w-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
55
+ left: "inset-y-0 left-0 h-full w-3/4 sm:max-w-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
56
+ top: "inset-x-0 top-0 w-full data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
57
+ bottom: "inset-x-0 bottom-0 w-full data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
58
+ };
59
+
60
+ return (
61
+ <SheetPortal>
62
+ <SheetOverlay />
63
+ <DialogPrimitive.Content
64
+ data-slot="sheet-content"
65
+ className={cn(
66
+ "fixed z-50 flex flex-col bg-background border-l border-border shadow-lg duration-300",
67
+ sideStyles[side],
68
+ className,
69
+ )}
70
+ {...props}
71
+ >
72
+ <DialogPrimitive.Title className="hidden sr-only">
73
+ {props.title}
74
+ </DialogPrimitive.Title>
75
+ {children}
76
+ {showCloseButton && (
77
+ <DialogPrimitive.Close className="absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary cursor-pointer">
78
+ <XIcon className="h-4 w-4" />
79
+ <span className="sr-only">Close</span>
80
+ </DialogPrimitive.Close>
81
+ )}
82
+ </DialogPrimitive.Content>
83
+ </SheetPortal>
84
+ );
85
+ }
86
+
87
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
88
+ return (
89
+ <div
90
+ data-slot="sheet-header"
91
+ className={cn(
92
+ "flex flex-col gap-2 px-6 py-4 border-b border-border",
93
+ className,
94
+ )}
95
+ {...props}
96
+ />
97
+ );
98
+ }
99
+
100
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
101
+ return (
102
+ <div
103
+ data-slot="sheet-footer"
104
+ className={cn(
105
+ "flex flex-col-reverse gap-2 px-6 py-4 border-t border-border sm:flex-row sm:justify-end",
106
+ className,
107
+ )}
108
+ {...props}
109
+ />
110
+ );
111
+ }
112
+
113
+ function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element {
114
+ return (
115
+ <DialogPrimitive.Title
116
+ data-slot="sheet-title"
117
+ className={cn("text-lg font-semibold text-foreground", className)}
118
+ {...props}
119
+ />
120
+ );
121
+ }
122
+
123
+ function SheetDescription({
124
+ className,
125
+ ...props
126
+ }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element {
127
+ return (
128
+ <DialogPrimitive.Description
129
+ data-slot="sheet-description"
130
+ className={cn("text-sm text-muted-foreground", className)}
131
+ {...props}
132
+ />
133
+ );
134
+ }
135
+
136
+ export {
137
+ Sheet,
138
+ SheetClose,
139
+ SheetContent,
140
+ SheetDescription,
141
+ SheetFooter,
142
+ SheetHeader,
143
+ SheetOverlay,
144
+ SheetPortal,
145
+ SheetTitle,
146
+ SheetTrigger,
147
+ };
@@ -0,0 +1,21 @@
1
+ // Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
2
+ // (apps/web/src/components/ui/textarea.tsx). Full credit to the Better Auth team.
3
+ import type * as React from "react";
4
+ import type { ComponentProps } from "react";
5
+
6
+ import { cn } from "../foundation/cn";
7
+
8
+ function Textarea({ className, ...props }: ComponentProps<"textarea">): React.JSX.Element {
9
+ return (
10
+ <textarea
11
+ data-slot="textarea"
12
+ className={cn(
13
+ "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
14
+ className,
15
+ )}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ export { Textarea };
@@ -0,0 +1,57 @@
1
+ // Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
2
+ // (apps/web/src/components/ui/time-ago.tsx). Full credit to the Better Auth team.
3
+
4
+ import type * as React from "react";
5
+ import { useState, useEffect } from 'react';
6
+
7
+ // Inlined from better-hub's "@/lib/utils" (timeAgo) — only the piece used here.
8
+ function timeAgo(date: string | Date): string {
9
+ const now = new Date();
10
+ const then = new Date(date);
11
+ const seconds = Math.floor((now.getTime() - then.getTime()) / 1000);
12
+
13
+ if (seconds < 60) return 'just now';
14
+ if (seconds < 3600) return `${Math.floor(seconds / 60)}m ago`;
15
+ if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`;
16
+ if (seconds < 604800) return `${Math.floor(seconds / 86400)}d ago`;
17
+ if (seconds < 2592000) return `${Math.floor(seconds / 604800)}w ago`;
18
+
19
+ const months = Math.floor(seconds / 2592000);
20
+ if (months < 12) return `${months}mo ago`;
21
+
22
+ const sameYear = then.getFullYear() === now.getFullYear();
23
+ if (sameYear) {
24
+ return then.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
25
+ }
26
+ return then.toLocaleDateString('en-US', {
27
+ month: 'short',
28
+ day: 'numeric',
29
+ year: 'numeric',
30
+ });
31
+ }
32
+
33
+ interface TimeAgoProps {
34
+ date: string | Date;
35
+ className?: string;
36
+ }
37
+
38
+ export function TimeAgo({ date, className }: TimeAgoProps): React.JSX.Element {
39
+ const [text, setText] = useState(() => timeAgo(date));
40
+
41
+ useEffect(() => {
42
+ setText(timeAgo(date));
43
+ const interval = setInterval(() => setText(timeAgo(date)), 60_000);
44
+ return () => clearInterval(interval);
45
+ }, [date]);
46
+
47
+ return (
48
+ <time
49
+ dateTime={typeof date === 'string' ? date : date.toISOString()}
50
+ title={new Date(date).toLocaleString()}
51
+ className={className}
52
+ suppressHydrationWarning
53
+ >
54
+ {text}
55
+ </time>
56
+ );
57
+ }
@@ -0,0 +1,64 @@
1
+ // Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
2
+ // (apps/web/src/components/ui/tooltip.tsx). Full credit to the Better Auth team.
3
+
4
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5
+ import type * as React from "react";
6
+ import { cn } from "../foundation/cn";
7
+
8
+ function TooltipProvider({
9
+ delayDuration = 300,
10
+ ...props
11
+ }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element {
12
+ return (
13
+ <TooltipPrimitive.Provider
14
+ data-slot="tooltip-provider"
15
+ delayDuration={delayDuration}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element {
22
+ return <TooltipPrimitive.Root data-slot="tooltip" {...props} />;
23
+ }
24
+
25
+ function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element {
26
+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
27
+ }
28
+
29
+ function TooltipPortal({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Portal>): React.JSX.Element {
30
+ return <TooltipPrimitive.Portal data-slot="tooltip-portal" {...props} />;
31
+ }
32
+
33
+ function TooltipContent({
34
+ className,
35
+ sideOffset = 4,
36
+ ...props
37
+ }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element {
38
+ return (
39
+ <TooltipPrimitive.Content
40
+ data-slot="tooltip-content"
41
+ sideOffset={sideOffset}
42
+ className={cn(
43
+ "bg-background text-popover-foreground 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 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",
44
+ className,
45
+ )}
46
+ {...props}
47
+ />
48
+ );
49
+ }
50
+
51
+ function TooltipArrow({
52
+ className,
53
+ ...props
54
+ }: React.ComponentProps<typeof TooltipPrimitive.Arrow>): React.JSX.Element {
55
+ return (
56
+ <TooltipPrimitive.Arrow
57
+ data-slot="tooltip-arrow"
58
+ className={cn("fill-background", className)}
59
+ {...props}
60
+ />
61
+ );
62
+ }
63
+
64
+ export { Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,8 @@
1
+ import { type ClassValue, clsx } from 'clsx'
2
+ import { twMerge } from 'tailwind-merge'
3
+
4
+ /**
5
+ * Merge class names with Tailwind-aware de-duplication.
6
+ * Adapted from better-hub (apps/web/src/lib/utils.ts). See ../../README.md.
7
+ */
8
+ export const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs))
@@ -0,0 +1,156 @@
1
+ /*
2
+ * Design tokens & base styles for the better-hub UI primitives.
3
+ *
4
+ * Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
5
+ * (apps/web/src/app/globals.css). Tailwind v4 "new-york" shadcn style, "Midnight"
6
+ * dark theme. Full credit to the Better Auth team. See ../../README.md.
7
+ */
8
+ @import 'tailwindcss';
9
+ @import 'tw-animate-css';
10
+
11
+ @custom-variant dark (&:where(.dark, .dark *));
12
+
13
+ @theme inline {
14
+ --color-background: var(--background);
15
+ --color-foreground: var(--foreground);
16
+ --color-card: var(--card);
17
+ --color-card-foreground: var(--card-foreground);
18
+ --color-primary: var(--primary);
19
+ --color-primary-foreground: var(--primary-foreground);
20
+ --color-secondary: var(--secondary);
21
+ --color-secondary-foreground: var(--secondary-foreground);
22
+ --color-muted: var(--muted);
23
+ --color-muted-foreground: var(--muted-foreground);
24
+ --color-accent: var(--accent);
25
+ --color-accent-foreground: var(--accent-foreground);
26
+ --color-border: var(--border);
27
+ --color-input: var(--input);
28
+ --color-ring: var(--ring);
29
+ --color-destructive: var(--destructive);
30
+ --color-success: var(--success);
31
+ --color-warning: var(--warning);
32
+ --color-link: var(--link);
33
+ --color-info: var(--info);
34
+ --font-sans: var(--font-geist-sans);
35
+ --font-mono: var(--font-geist-mono);
36
+ --radius-sm: var(--radius-sm);
37
+ --radius-md: var(--radius-md);
38
+ --radius-lg: var(--radius-lg);
39
+ --radius-xl: calc(var(--radius-lg) + 0.25rem);
40
+ --shadow-2xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.09);
41
+ --shadow-xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.09);
42
+ --shadow-sm: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 1px 2px -1px hsl(0 0% 0% / 0.18);
43
+ --shadow: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 1px 2px -1px hsl(0 0% 0% / 0.18);
44
+ --shadow-md: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 2px 4px -1px hsl(0 0% 0% / 0.18);
45
+ --shadow-lg: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 4px 6px -1px hsl(0 0% 0% / 0.18);
46
+ }
47
+
48
+ :root.dark {
49
+ color-scheme: dark;
50
+ }
51
+
52
+ /*
53
+ * Light theme — the counterpart to Midnight. The base color tokens below are
54
+ * defined once on `:root` as the dark (default) palette; this block overrides them
55
+ * with a coherent zinc-based light palette whenever the `.dark` class is absent.
56
+ * `:root:not(.dark)` outranks bare `:root` in specificity, so these win in light
57
+ * mode and are simply not matched (leaving the dark defaults) once `.dark` is set.
58
+ */
59
+ :root:not(.dark) {
60
+ color-scheme: light;
61
+ --background: #ffffff;
62
+ --foreground: #09090b;
63
+ --card: #ffffff;
64
+ --card-foreground: #09090b;
65
+ --primary: #18181b;
66
+ --primary-foreground: #fafafa;
67
+ --secondary: #f4f4f5;
68
+ --secondary-foreground: #18181b;
69
+ --muted: #f4f4f5;
70
+ --muted-foreground: #71717a;
71
+ --accent: #f4f4f5;
72
+ --accent-foreground: #18181b;
73
+ --border: #e4e4e7;
74
+ --input: #e4e4e7;
75
+ --ring: #a1a1aa;
76
+ --link: #2563eb;
77
+ --info: #2563eb;
78
+ --scrollbar-thumb: #d4d4d8;
79
+ --scrollbar-thumb-hover: #a1a1aa;
80
+ --selection-bg: oklch(0.6 0.12 285 / 18%);
81
+ }
82
+
83
+ /* Default theme: Midnight (dark) */
84
+ :root {
85
+ --font-geist-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
86
+ 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
87
+ --font-geist-mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
88
+ 'Liberation Mono', monospace;
89
+ --radius-sm: 0.25rem;
90
+ --radius-md: 0.5rem;
91
+ --radius-lg: 0.75rem;
92
+ --background: #030304;
93
+ --foreground: #fafafa;
94
+ --card: #111113;
95
+ --card-foreground: #fafafa;
96
+ --primary: #e4e4e7;
97
+ --primary-foreground: #09090b;
98
+ --secondary: #1a1a1e;
99
+ --secondary-foreground: #fafafa;
100
+ --muted: #1a1a1e;
101
+ --muted-foreground: #a1a1aa;
102
+ --accent: #1a1a1e;
103
+ --accent-foreground: #fafafa;
104
+ --border: #27272a;
105
+ --input: #27272a;
106
+ --ring: #3f3f46;
107
+ --destructive: oklch(0.704 0.191 22.216);
108
+ --success: oklch(0.627 0.194 149.214);
109
+ --warning: oklch(0.769 0.188 70.08);
110
+ --link: #58a6ff;
111
+ --info: #58a6ff;
112
+ --scrollbar-thumb: #3f3f46;
113
+ --scrollbar-thumb-hover: #52525b;
114
+ --selection-bg: oklch(0.7 0.1 285 / 20%);
115
+ }
116
+
117
+ * {
118
+ border-color: var(--border);
119
+ }
120
+
121
+ body {
122
+ margin: 0;
123
+ background: var(--background);
124
+ color: var(--foreground);
125
+ font-family: var(--font-sans), system-ui, sans-serif;
126
+ }
127
+
128
+ ::-webkit-scrollbar {
129
+ width: 4px;
130
+ height: 4px;
131
+ }
132
+ ::-webkit-scrollbar-track {
133
+ background: transparent;
134
+ }
135
+ ::-webkit-scrollbar-thumb {
136
+ background: var(--scrollbar-thumb);
137
+ border-radius: 9999px;
138
+ }
139
+ ::-webkit-scrollbar-thumb:hover {
140
+ background: var(--scrollbar-thumb-hover);
141
+ }
142
+ * {
143
+ scrollbar-width: thin;
144
+ scrollbar-color: var(--scrollbar-thumb) transparent;
145
+ }
146
+ ::selection {
147
+ background: var(--selection-bg);
148
+ }
149
+
150
+ .no-scrollbar {
151
+ -ms-overflow-style: none;
152
+ scrollbar-width: none;
153
+ }
154
+ .no-scrollbar::-webkit-scrollbar {
155
+ display: none;
156
+ }
@@ -1,6 +1,7 @@
1
1
  // This package's primitives are adapted from better-hub by Better Auth
2
2
  // (https://github.com/better-auth/better-hub) — full credit to the original
3
3
  // authors. See README.md for details.
4
+
4
5
  export * from './components/agent-icon';
5
6
  export * from './components/badge';
6
7
  export * from './components/button';
@@ -20,5 +21,5 @@ export * from './components/sheet';
20
21
  export * from './components/textarea';
21
22
  export * from './components/time-ago';
22
23
  export * from './components/tooltip';
24
+
23
25
  export { cn } from './foundation/cn';
24
- //# sourceMappingURL=index.js.map
@@ -1,5 +0,0 @@
1
- import type * as React from "react";
2
- export declare function AgentIcon({ className }: {
3
- className?: string;
4
- }): React.JSX.Element;
5
- //# sourceMappingURL=agent-icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-icon.d.ts","sourceRoot":"","sources":["../../src/components/agent-icon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAelF"}
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export function AgentIcon({ className }) {
3
- return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 28 28", className: className, children: _jsx("path", { fill: "currentColor", d: "M10.06 18.701a1.628 1.628 0 0 0 2.43-.676l.77-2.34a3.82 3.82 0 0 1 2.416-2.418l2.238-.727a1.6 1.6 0 0 0 .786-.595a1.62 1.62 0 0 0-.849-2.489l-2.215-.72a3.82 3.82 0 0 1-2.42-2.414l-.727-2.237a1.62 1.62 0 0 0-.594-.785a1.655 1.655 0 0 0-1.879 0a1.63 1.63 0 0 0-.6.8L8.68 6.365a3.82 3.82 0 0 1-2.359 2.37l-2.24.726a1.626 1.626 0 0 0 .02 3.073l2.216.72a3.86 3.86 0 0 1 1.816 1.286c.266.343.471.728.606 1.14l.728 2.234c.112.318.32.593.595.787m-3.273-6.873l-2.22-.72s-.085-.038-.085-.108a.14.14 0 0 1 .084-.115L6.8 10.16a5.34 5.34 0 0 0 3.32-3.375l.721-2.219s.043-.084.114-.084s.113.084.113.084l.723 2.223a5.32 5.32 0 0 0 3.377 3.372l2.27.735a.13.13 0 0 1 .078.11a.15.15 0 0 1-.083.113l-2.225.722a5.32 5.32 0 0 0-3.374 3.374l-.715 2.2a.11.11 0 0 1-.115.093c-.104 0-.118-.075-.118-.075l-.723-2.22a5.32 5.32 0 0 0-3.376-3.385m13.017 12.954A1.2 1.2 0 0 0 20.5 25a1.2 1.2 0 0 0 .692-.216a1.2 1.2 0 0 0 .446-.6l.372-1.143a1.61 1.61 0 0 1 1.017-1.02l1.166-.378A1.21 1.21 0 0 0 25 20.505a1.2 1.2 0 0 0-.844-1.146l-1.144-.37a1.61 1.61 0 0 1-1.02-1.018l-.38-1.163a1.2 1.2 0 0 0-2.274.016l-.374 1.146a1.61 1.61 0 0 1-.993 1.017l-1.166.378a1.21 1.21 0 0 0-.807 1.139a1.2 1.2 0 0 0 .823 1.138l1.144.372a1.6 1.6 0 0 1 1.02 1.023l.379 1.163a1.2 1.2 0 0 0 .44.582m-1.371-4.194l-.27-.088l.283-.096a3.12 3.12 0 0 0 1.943-1.974l.088-.27l.089.272a3.11 3.11 0 0 0 1.974 1.975l.293.1l-.271.087a3.12 3.12 0 0 0-1.974 1.977l-.088.27l-.088-.272a3.12 3.12 0 0 0-1.98-1.98" }) }));
4
- }
5
- //# sourceMappingURL=agent-icon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-icon.js","sourceRoot":"","sources":["../../src/components/agent-icon.tsx"],"names":[],"mappings":";AAKA,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAA0B;IAC9D,OAAO,CACN,cACC,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,EACZ,OAAO,EAAC,WAAW,EACnB,SAAS,EAAE,SAAS,YAEpB,eACC,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,k6CAAk6C,GACn6C,GACG,CACN,CAAC;AACH,CAAC"}
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- import type { ClassProp } from "class-variance-authority/types";
4
- declare const badgeVariants: (props?: ({
5
- variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
6
- } & ClassProp) | undefined) => string;
7
- declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
8
- asChild?: boolean;
9
- }): React.JSX.Element;
10
- export { Badge, badgeVariants };
11
- //# sourceMappingURL=badge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAKhE,QAAA,MAAM,aAAa,EAAE,CACpB,KAAK,CAAC,EACH,CAAC;IACD,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnG,GAAG,SAAS,CAAC,GACd,SAAS,KACR,MAkBJ,CAAC;AAEF,iBAAS,KAAK,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,OAAe,EACf,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAW/G;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- // Adapted from better-hub by Better Auth — https://github.com/better-auth/better-hub
3
- // (apps/web/src/components/ui/badge.tsx). Full credit to the Better Auth team.
4
- import * as React from "react";
5
- import { cva } from "class-variance-authority";
6
- import { Slot } from "radix-ui";
7
- import { cn } from "../foundation/cn";
8
- const badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
12
- secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
13
- destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
14
- outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
15
- ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
16
- link: "text-primary underline-offset-4 [a&]:hover:underline",
17
- },
18
- },
19
- defaultVariants: {
20
- variant: "default",
21
- },
22
- });
23
- function Badge({ className, variant = "default", asChild = false, ...props }) {
24
- const Comp = asChild ? Slot.Root : "span";
25
- return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
26
- }
27
- export { Badge, badgeVariants };
28
- //# sourceMappingURL=badge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":";AAAA,qFAAqF;AACrF,+EAA+E;AAC/E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,MAAM,aAAa,GAML,GAAG,CAChB,qaAAqa,EACra;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,OAAO,EAAE,6DAA6D;YACtE,SAAS,EAAE,mEAAmE;YAC9E,WAAW,EACV,wJAAwJ;YACzJ,OAAO,EAAE,sFAAsF;YAC/F,KAAK,EAAE,wDAAwD;YAC/D,IAAI,EAAE,sDAAsD;SAC5D;KACD;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,SAAS;KAClB;CACD,CACD,CAAC;AAEF,SAAS,KAAK,CAAC,EACd,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EACmF;IAC3F,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAE1C,OAAO,CACN,KAAC,IAAI,iBACM,OAAO,kBACH,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { VariantProps } from "class-variance-authority";
2
- import type { ClassProp } from "class-variance-authority/types";
3
- import type * as React from "react";
4
- declare const buttonVariants: (props?: ({
5
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
6
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
7
- } & ClassProp) | undefined) => string;
8
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
9
- asChild?: boolean;
10
- }): React.JSX.Element;
11
- export { Button, buttonVariants };
12
- //# sourceMappingURL=button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,QAAA,MAAM,cAAc,EAAE,CACrB,KAAK,CAAC,EACH,CAAC;IACD,OAAO,CAAC,EACL,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,GACN,IAAI,GACJ,SAAS,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1D,GAAG,SAAS,CAAC,GACd,SAAS,KACR,MAyBJ,CAAC;AAEF,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAChC,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASrB;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}