harebear-ui 0.6.0 → 0.7.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.
@@ -0,0 +1,114 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/layout/stack.tsx
5
+ const gapClass = {
6
+ none: "gap-0",
7
+ xs: "gap-1",
8
+ sm: "gap-2",
9
+ md: "gap-3",
10
+ lg: "gap-4",
11
+ xl: "gap-6"
12
+ };
13
+ const alignClass = {
14
+ start: "items-start",
15
+ center: "items-center",
16
+ end: "items-end",
17
+ stretch: "items-stretch",
18
+ baseline: "items-baseline"
19
+ };
20
+ const justifyClass = {
21
+ start: "justify-start",
22
+ center: "justify-center",
23
+ end: "justify-end",
24
+ between: "justify-between"
25
+ };
26
+ /** Vertical stack with a named gap. */
27
+ function Stack({ gap = "md", align = "stretch", className, ...props }) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "stack",
30
+ className: cn("flex min-w-0 flex-col", gapClass[gap], alignClass[align], className),
31
+ ...props
32
+ });
33
+ }
34
+ /** Horizontal row with a named gap. */
35
+ function Row({ gap = "sm", align = "center", justify = "start", wrap, className, ...props }) {
36
+ return /* @__PURE__ */ jsx("div", {
37
+ "data-slot": "row",
38
+ className: cn("flex min-w-0", gapClass[gap], alignClass[align], justifyClass[justify], wrap && "flex-wrap", className),
39
+ ...props
40
+ });
41
+ }
42
+ const cols = {
43
+ base: {
44
+ 1: "grid-cols-1",
45
+ 2: "grid-cols-2",
46
+ 3: "grid-cols-3",
47
+ 4: "grid-cols-4",
48
+ 5: "grid-cols-5",
49
+ 6: "grid-cols-6"
50
+ },
51
+ viewport: {
52
+ sm: {
53
+ 1: "sm:grid-cols-1",
54
+ 2: "sm:grid-cols-2",
55
+ 3: "sm:grid-cols-3",
56
+ 4: "sm:grid-cols-4",
57
+ 5: "sm:grid-cols-5",
58
+ 6: "sm:grid-cols-6"
59
+ },
60
+ md: {
61
+ 1: "md:grid-cols-1",
62
+ 2: "md:grid-cols-2",
63
+ 3: "md:grid-cols-3",
64
+ 4: "md:grid-cols-4",
65
+ 5: "md:grid-cols-5",
66
+ 6: "md:grid-cols-6"
67
+ },
68
+ lg: {
69
+ 1: "lg:grid-cols-1",
70
+ 2: "lg:grid-cols-2",
71
+ 3: "lg:grid-cols-3",
72
+ 4: "lg:grid-cols-4",
73
+ 5: "lg:grid-cols-5",
74
+ 6: "lg:grid-cols-6"
75
+ }
76
+ },
77
+ container: {
78
+ sm: {
79
+ 1: "@md:grid-cols-1",
80
+ 2: "@md:grid-cols-2",
81
+ 3: "@md:grid-cols-3",
82
+ 4: "@md:grid-cols-4",
83
+ 5: "@md:grid-cols-5",
84
+ 6: "@md:grid-cols-6"
85
+ },
86
+ md: {
87
+ 1: "@2xl:grid-cols-1",
88
+ 2: "@2xl:grid-cols-2",
89
+ 3: "@2xl:grid-cols-3",
90
+ 4: "@2xl:grid-cols-4",
91
+ 5: "@2xl:grid-cols-5",
92
+ 6: "@2xl:grid-cols-6"
93
+ },
94
+ lg: {
95
+ 1: "@4xl:grid-cols-1",
96
+ 2: "@4xl:grid-cols-2",
97
+ 3: "@4xl:grid-cols-3",
98
+ 4: "@4xl:grid-cols-4",
99
+ 5: "@4xl:grid-cols-5",
100
+ 6: "@4xl:grid-cols-6"
101
+ }
102
+ }
103
+ };
104
+ /** Grid of equal columns with named gaps and per-breakpoint column counts. */
105
+ function Grid({ cols: c = 2, gap = "md", query = "viewport", className, ...props }) {
106
+ const r = typeof c === "number" ? { base: c } : c;
107
+ const q = cols[query];
108
+ return /* @__PURE__ */ jsx("div", {
109
+ "data-slot": "grid",
110
+ className: cn("grid min-w-0", gapClass[gap], cols.base[r.base ?? 1], r.sm && q.sm[r.sm], r.md && q.md[r.md], r.lg && q.lg[r.lg], className),
111
+ ...props
112
+ });
113
+ }
114
+ export { Grid, Row, Stack };
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ export type TextTone = "default" | "muted" | "success" | "warning" | "danger" | "info";
3
+ declare const sizeClass: {
4
+ readonly xs: "text-xs";
5
+ readonly sm: "text-[13px]";
6
+ readonly base: "text-sm";
7
+ readonly lg: "text-base";
8
+ readonly xl: "text-xl";
9
+ readonly "2xl": "text-2xl";
10
+ };
11
+ declare const weightClass: {
12
+ readonly normal: "font-normal";
13
+ readonly medium: "font-medium";
14
+ readonly semibold: "font-semibold";
15
+ };
16
+ export interface TextProps extends Omit<React.ComponentProps<"span">, "ref"> {
17
+ size?: keyof typeof sizeClass;
18
+ tone?: TextTone;
19
+ weight?: keyof typeof weightClass;
20
+ mono?: boolean;
21
+ /** One line with an ellipsis. */
22
+ truncate?: boolean;
23
+ /** Clamp to this many lines. */
24
+ lines?: 1 | 2 | 3;
25
+ /** Fixed-width digits for numbers that update. */
26
+ tabular?: boolean;
27
+ as?: "span" | "p" | "div";
28
+ }
29
+ /** Text with props instead of classes: size, tone, weight, mono, truncate, lines. */
30
+ declare function Text({ size, tone, weight, mono, truncate, lines, tabular, as: As, className, ...props }: TextProps): React.JSX.Element;
31
+ export interface HeadingProps extends React.ComponentProps<"h3"> {
32
+ /** 3: a section title in a card. 4: a small uppercase label over a group. */
33
+ level?: 3 | 4;
34
+ }
35
+ /** Section heading inside a card or panel. */
36
+ declare function Heading({ level, className, ...props }: HeadingProps): React.JSX.Element;
37
+ export { Heading, Text };
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/layout/text.tsx
5
+ const toneClass = {
6
+ default: "text-foreground",
7
+ muted: "text-muted-foreground",
8
+ success: "text-success",
9
+ warning: "text-warning",
10
+ danger: "text-destructive",
11
+ info: "text-primary"
12
+ };
13
+ const sizeClass = {
14
+ xs: "text-xs",
15
+ sm: "text-[13px]",
16
+ base: "text-sm",
17
+ lg: "text-base",
18
+ xl: "text-xl",
19
+ "2xl": "text-2xl"
20
+ };
21
+ const weightClass = {
22
+ normal: "font-normal",
23
+ medium: "font-medium",
24
+ semibold: "font-semibold"
25
+ };
26
+ const linesClass = {
27
+ 1: "line-clamp-1",
28
+ 2: "line-clamp-2",
29
+ 3: "line-clamp-3"
30
+ };
31
+ /** Text with props instead of classes: size, tone, weight, mono, truncate, lines. */
32
+ function Text({ size = "base", tone = "default", weight = "normal", mono, truncate, lines, tabular, as: As = "span", className, ...props }) {
33
+ return /* @__PURE__ */ jsx(As, {
34
+ "data-slot": "text",
35
+ className: cn("min-w-0", sizeClass[size], toneClass[tone], weightClass[weight], mono && "font-mono", truncate && "block truncate", lines && linesClass[lines], tabular && "tabular-nums", className),
36
+ ...props
37
+ });
38
+ }
39
+ /** Section heading inside a card or panel. */
40
+ function Heading({ level = 3, className, ...props }) {
41
+ if (level === 4) return /* @__PURE__ */ jsx("h4", {
42
+ "data-slot": "heading",
43
+ className: cn("text-xs font-medium tracking-wide text-muted-foreground uppercase", className),
44
+ ...props
45
+ });
46
+ return /* @__PURE__ */ jsx("h3", {
47
+ "data-slot": "heading",
48
+ className: cn("text-sm font-semibold", className),
49
+ ...props
50
+ });
51
+ }
52
+ export { Heading, Text };
@@ -1,5 +1,8 @@
1
1
  import { Button } from "../ui/button.js";
2
2
  import * as React from "react";
3
- /** Icon button that flips between light and dark mode. */
3
+ /**
4
+ * Icon button that flips between light and dark mode. Safe to server render: the icon follows the
5
+ * `.dark` class through CSS, and the label names the target mode only after hydration.
6
+ */
4
7
  declare function ThemeToggle(props: Omit<React.ComponentProps<typeof Button>, "onClick">): React.JSX.Element;
5
8
  export { ThemeToggle };
@@ -1,21 +1,26 @@
1
1
  "use client";
2
2
  import { Button } from "../ui/button.js";
3
3
  import { useTheme } from "./theme-provider.js";
4
- import { jsx } from "react/jsx-runtime";
4
+ import * as React from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { MoonIcon, SunIcon } from "lucide-react";
6
7
  // src/components/theme/theme-toggle.tsx
7
- /** Icon button that flips between light and dark mode. */
8
+ /**
9
+ * Icon button that flips between light and dark mode. Safe to server render: the icon follows the
10
+ * `.dark` class through CSS, and the label names the target mode only after hydration.
11
+ */
8
12
  function ThemeToggle(props) {
9
13
  const { resolvedMode, toggleMode } = useTheme();
10
- const dark = resolvedMode === "dark";
11
- return /* @__PURE__ */ jsx(Button, {
14
+ const [mounted, setMounted] = React.useState(false);
15
+ React.useEffect(() => setMounted(true), []);
16
+ return /* @__PURE__ */ jsxs(Button, {
12
17
  type: "button",
13
18
  variant: "ghost",
14
19
  size: "icon",
15
- "aria-label": dark ? "Switch to light mode" : "Switch to dark mode",
20
+ "aria-label": !mounted ? "Toggle dark mode" : resolvedMode === "dark" ? "Switch to light mode" : "Switch to dark mode",
16
21
  onClick: toggleMode,
17
22
  ...props,
18
- children: dark ? /* @__PURE__ */ jsx(SunIcon, {}) : /* @__PURE__ */ jsx(MoonIcon, {})
23
+ children: [/* @__PURE__ */ jsx(SunIcon, { className: "hidden dark:block" }), /* @__PURE__ */ jsx(MoonIcon, { className: "dark:hidden" })]
19
24
  });
20
25
  }
21
26
  export { ThemeToggle };
package/dist/index.d.ts CHANGED
@@ -79,6 +79,11 @@ import { Timeline, TimelineItem } from "./components/admin/timeline.js";
79
79
  import { UsageMeter, UsageMeterProps } from "./components/admin/usage-meter.js";
80
80
  import { UserChip, UserChipProps, initials } from "./components/admin/user-chip.js";
81
81
  import { UserMenu, UserMenuProps } from "./components/admin/user-menu.js";
82
+ import { MediaItem, MediaItemProps } from "./components/layout/media-item.js";
83
+ import { Metric, MetricGroup, MetricProps } from "./components/layout/metric.js";
84
+ import { ShowMore, ShowMoreProps } from "./components/layout/show-more.js";
85
+ import { Grid, GridCols, GridProps, ResponsiveGridCols, Row, RowProps, Stack, StackAlign, StackJustify, StackProps, StackSpace } from "./components/layout/stack.js";
86
+ import { Heading, HeadingProps, Text, TextProps, TextTone } from "./components/layout/text.js";
82
87
  import { BarList, BarListItem } from "./components/data/bar-list.js";
83
88
  import { DataTable, DataTableColumnDef, DataTableFeatures, DataTableProps, createDataTableColumnHelper, dataTableFeatures } from "./components/data/data-table.js";
84
89
  import { Sparkline, SparklineProps, smoothPath } from "./components/data/sparkline.js";
@@ -99,4 +104,4 @@ import { useMediaQuery } from "./hooks/use-media-query.js";
99
104
  import { useIsMobile } from "./hooks/use-mobile.js";
100
105
  import { highlightCode, loadHighlighter } from "./lib/highlighter.js";
101
106
  import { cn } from "./lib/utils.js";
102
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, type ActivityItem, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, type AppBrandProps, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, AppleIcon, ApprovalCard, type ApprovalCardProps, ApprovalResult, type ApprovalResultProps, AspectRatio, AssistantAvatar, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthLayout, type AuthLayoutProps, type AuthProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, type BarListItem, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, type ChatMessageProps, ChatPanel, type ChatPanelProps, ChatShell, type ChatShellProps, ChatThread, type ChatThreadProps, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, type CodeSnippetProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type Conversation, type ConversationGroup, ConversationList, type ConversationListProps, CopyField, type CopyFieldProps, DataTable, type DataTableColumnDef, type DataTableFeatures, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, type InlineCodeProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, type KeyValueItem, Label, LinkTile, type LinkTileProps, LoginForm, type LoginFormProps, type LoginValues, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, type MessageActionsProps, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, type ModelOption, ModelPicker, type ModelPickerProps, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewConversationButton, type NewConversationButtonProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptInput, PromptInputChip, type PromptInputChipProps, type PromptInputProps, PromptInputSelect, type PromptInputSelectOption, type PromptInputSelectProps, Prose, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedThemeMode, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarCollapseButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, type SidebarLayoutProps, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, type SignupFormProps, type SignupValues, Skeleton, Slider, Sparkline, type SparklineProps, Spinner, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusBarDatum, StatusBars, type StatusBarsProps, StatusDot, type StatusDotProps, type StatusTone, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, ThemeToggle, Timeline, type TimelineItem, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, type ToolCallProps, ToolGroup, type ToolGroupProps, type ToolStatus, ToolStatusIcon, ToolStep, type ToolStepProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, type TrendChartProps, TrendLegend, type TrendSeries, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, UserChip, type UserChipProps, UserMenu, type UserMenuProps, badgeVariants, buttonGroupVariants, buttonVariants, cn, createDataTableColumnHelper, dataTableFeatures, formatWhen, groupByDate, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toggleVariants, useCarousel, useComboboxAnchor, useCopyToClipboard, useDirection, useHighlightedCode, useIsMobile, useMediaQuery, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useSidebarOptional, useTheme };
107
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, type ActivityItem, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, type AppBrandProps, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, AppleIcon, ApprovalCard, type ApprovalCardProps, ApprovalResult, type ApprovalResultProps, AspectRatio, AssistantAvatar, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthLayout, type AuthLayoutProps, type AuthProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, type BarListItem, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, type ChatMessageProps, ChatPanel, type ChatPanelProps, ChatShell, type ChatShellProps, ChatThread, type ChatThreadProps, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, type CodeSnippetProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type Conversation, type ConversationGroup, ConversationList, type ConversationListProps, CopyField, type CopyFieldProps, DataTable, type DataTableColumnDef, type DataTableFeatures, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GitHubIcon, GoogleIcon, Grid, type GridCols, type GridProps, Heading, type HeadingProps, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, type InlineCodeProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, type KeyValueItem, Label, LinkTile, type LinkTileProps, LoginForm, type LoginFormProps, type LoginValues, Marker, MarkerContent, MarkerIcon, MediaItem, type MediaItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, type MessageActionsProps, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, Metric, MetricGroup, type MetricProps, type ModelOption, ModelPicker, type ModelPickerProps, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewConversationButton, type NewConversationButtonProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptInput, PromptInputChip, type PromptInputChipProps, type PromptInputProps, PromptInputSelect, type PromptInputSelectOption, type PromptInputSelectProps, Prose, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedThemeMode, type ResponsiveGridCols, Row, type RowProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, Sidebar, SidebarCollapseButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, type SidebarLayoutProps, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, type SignupFormProps, type SignupValues, Skeleton, Slider, Sparkline, type SparklineProps, Spinner, Stack, type StackAlign, type StackJustify, type StackProps, type StackSpace, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusBarDatum, StatusBars, type StatusBarsProps, StatusDot, type StatusDotProps, type StatusTone, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, type TextProps, type TextTone, Textarea, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, ThemeToggle, Timeline, type TimelineItem, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, type ToolCallProps, ToolGroup, type ToolGroupProps, type ToolStatus, ToolStatusIcon, ToolStep, type ToolStepProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, type TrendChartProps, TrendLegend, type TrendSeries, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, UserChip, type UserChipProps, UserMenu, type UserMenuProps, badgeVariants, buttonGroupVariants, buttonVariants, cn, createDataTableColumnHelper, dataTableFeatures, formatWhen, groupByDate, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toggleVariants, useCarousel, useComboboxAnchor, useCopyToClipboard, useDirection, useHighlightedCode, useIsMobile, useMediaQuery, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useSidebarOptional, useTheme };
package/dist/index.js CHANGED
@@ -79,6 +79,11 @@ import { Timeline } from "./components/admin/timeline.js";
79
79
  import { UsageMeter } from "./components/admin/usage-meter.js";
80
80
  import { UserChip, initials } from "./components/admin/user-chip.js";
81
81
  import { UserMenu } from "./components/admin/user-menu.js";
82
+ import { MediaItem } from "./components/layout/media-item.js";
83
+ import { Metric, MetricGroup } from "./components/layout/metric.js";
84
+ import { ShowMore } from "./components/layout/show-more.js";
85
+ import { Grid, Row, Stack } from "./components/layout/stack.js";
86
+ import { Heading, Text } from "./components/layout/text.js";
82
87
  import { BarList } from "./components/data/bar-list.js";
83
88
  import { DataTable, createDataTableColumnHelper, dataTableFeatures } from "./components/data/data-table.js";
84
89
  import { Sparkline, smoothPath } from "./components/data/sparkline.js";
@@ -99,4 +104,4 @@ import { useMediaQuery } from "./hooks/use-media-query.js";
99
104
  import { useIsMobile } from "./hooks/use-mobile.js";
100
105
  import { highlightCode, loadHighlighter } from "./lib/highlighter.js";
101
106
  import { cn } from "./lib/utils.js";
102
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, AppShell, AppleIcon, ApprovalCard, ApprovalResult, AspectRatio, AssistantAvatar, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthLayout, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, ChatPanel, ChatShell, ChatThread, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationList, CopyField, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, Label, LinkTile, LoginForm, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, ModelPicker, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewConversationButton, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptInput, PromptInputChip, PromptInputSelect, Prose, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarCollapseButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, Skeleton, Slider, Sparkline, Spinner, StatCard, StatusBadge, StatusBars, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, ThemeScript, ThemeToggle, Timeline, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, ToolGroup, ToolStatusIcon, ToolStep, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, TrendLegend, TypingIndicator, UsageMeter, UserChip, UserMenu, badgeVariants, buttonGroupVariants, buttonVariants, cn, createDataTableColumnHelper, dataTableFeatures, formatWhen, groupByDate, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toggleVariants, useCarousel, useComboboxAnchor, useCopyToClipboard, useDirection, useHighlightedCode, useIsMobile, useMediaQuery, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useSidebarOptional, useTheme };
107
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, AppShell, AppleIcon, ApprovalCard, ApprovalResult, AspectRatio, AssistantAvatar, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthLayout, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, ChatPanel, ChatShell, ChatThread, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationList, CopyField, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GitHubIcon, GoogleIcon, Grid, Heading, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, Label, LinkTile, LoginForm, Marker, MarkerContent, MarkerIcon, MediaItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, Metric, MetricGroup, ModelPicker, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewConversationButton, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptInput, PromptInputChip, PromptInputSelect, Prose, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Row, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShowMore, Sidebar, SidebarCollapseButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, Skeleton, Slider, Sparkline, Spinner, Stack, StatCard, StatusBadge, StatusBars, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, ThemeProvider, ThemeScript, ThemeToggle, Timeline, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, ToolGroup, ToolStatusIcon, ToolStep, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, TrendLegend, TypingIndicator, UsageMeter, UserChip, UserMenu, badgeVariants, buttonGroupVariants, buttonVariants, cn, createDataTableColumnHelper, dataTableFeatures, formatWhen, groupByDate, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toggleVariants, useCarousel, useComboboxAnchor, useCopyToClipboard, useDirection, useHighlightedCode, useIsMobile, useMediaQuery, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useSidebarOptional, useTheme };
@@ -242,6 +242,30 @@ Quiet note with an icon (sparkle by default). Props: `icon?`, `tone?` (`"muted"
242
242
 
243
243
  Muted tile that lifts on hover, for service launchers. Props: `title`, `subtitle?` (mono), `icon?`, `status?: { tone; label }`, `href`, or `asChild` with your router `<Link>` as the only child.
244
244
 
245
+ ## Layout and text
246
+
247
+ Props instead of class names, for blocks that should look right without styling (dashboard widgets, generated UI). Every class string is a literal, so Tailwind finds them.
248
+
249
+ ### `Stack`, `Row`, `Grid`
250
+
251
+ `Stack` stacks children vertically, `Row` lays them out horizontally (`align`, `justify`, `wrap`). Both take a named `gap`: `none | xs | sm | md | lg | xl`. `Grid` makes equal columns: `cols={3}` or `cols={{ base: 1, sm: 2, md: 3 }}`. With `query="container"` the breakpoints measure the nearest `@container` ancestor (sm 28rem, md 42rem, lg 56rem) instead of the screen, for blocks that sit in cards of any width.
252
+
253
+ ### `Text`, `Heading`
254
+
255
+ `Text` takes `size` (`xs | sm | base | lg | xl | 2xl`), `tone` (`default | muted | success | warning | danger | info`), `weight`, `mono`, `truncate`, `lines` (1 to 3) and `tabular`, and renders `as` a span, p or div. `Heading` is a card section title (`level={3}`) or a small uppercase group label (`level={4}`).
256
+
257
+ ### `Metric`, `MetricGroup`
258
+
259
+ A number with `value`, `unit`, `label` and an optional `delta` in percent, green when it improves (`lowerIsBetter` for latency and the like). `MetricGroup` sets metrics side by side, evenly spaced.
260
+
261
+ ### `MediaItem`
262
+
263
+ Thumbnail (`image`, `imageShape`: `poster | square | wide`), a two-line `title` (linked when `href` is set, new tab), a `meta` line and a two-line `description`.
264
+
265
+ ### `ShowMore`
266
+
267
+ Shows the first `initial` children (default 5) and a "Show N more" button for the rest.
268
+
245
269
  ## Data display
246
270
 
247
271
  ### `DataTable`
@@ -0,0 +1,75 @@
1
+ # Working with AI agents
2
+
3
+ harebear-ui is built to be used by coding agents (Claude Code, Codex, Cursor, Copilot and the like). The package ships its own instructions, so an agent in your repo knows which components exist, how to style them, and how to check its work, without you pasting docs into the prompt.
4
+
5
+ ![What init sets up for your agent](../../.github/assets/agents.webp)
6
+
7
+ ## What ships in the package
8
+
9
+ | File (in `node_modules/harebear-ui/`) | What it is |
10
+ | ------------------------------------- | --------------------------------------------------------------------------------------------- |
11
+ | `llms.txt` | Short index: setup, the styling rules, every export by group. Small enough to paste anywhere. |
12
+ | `docs/COMPONENTS.md` | The catalog: every export with props, variants and examples. A test keeps it complete. |
13
+ | `docs/guides/` | These guides: setup per framework, theming, agents. |
14
+ | `skills/harebear-ui/SKILL.md` | A Claude Code skill that loads whenever the agent builds or changes UI. |
15
+ | `AGENTS.md` | Instructions for agents working on harebear-ui itself (not needed in your app). |
16
+
17
+ ## Set up your repo
18
+
19
+ ```bash
20
+ npx harebear-ui init
21
+ ```
22
+
23
+ This writes two things your agent reads automatically:
24
+
25
+ 1. **A harebear-ui section in `AGENTS.md`** (or in `CLAUDE.md` if that file exists and `AGENTS.md` does not). It points at the catalog and states the rules: import from the package root, tokens only, check light and dark mode and phone width. The section sits between `<!-- harebear-ui:start -->` and `<!-- harebear-ui:end -->` markers, and running `init` again after an upgrade replaces it in place.
26
+ 2. **A Claude Code skill** at `.claude/skills/harebear-ui/SKILL.md`. Claude Code loads it on UI tasks; it adds the composition rules (which composite to use for which screen) and the visual checks.
27
+
28
+ Commit both. Re-run `npx harebear-ui init` after upgrading harebear-ui to refresh them.
29
+
30
+ ### Per tool
31
+
32
+ | Tool | What it reads |
33
+ | ------------- | -------------------------------------------------------------------------------------------------------------------- |
34
+ | Claude Code | `CLAUDE.md` and `.claude/skills/`. If your instructions live in `AGENTS.md`, add a line `@AGENTS.md` to `CLAUDE.md`. |
35
+ | Codex, Cursor | `AGENTS.md`. See [agents.md](https://agents.md) for the tools that follow the convention. |
36
+ | Anything else | Point it at `node_modules/harebear-ui/llms.txt` in your own instructions file. |
37
+
38
+ ## Look things up instead of reading everything
39
+
40
+ The full catalog is long. Agents (and you) can pull just the entries a task needs:
41
+
42
+ ```bash
43
+ npx harebear-ui docs DataTable # one export
44
+ npx harebear-ui docs DataTable StatCard # several
45
+ npx harebear-ui docs Prompt # every export starting with "Prompt"
46
+ npx harebear-ui docs Tokens # a whole section: Theme, Tokens, Auth, "AI and chat", ...
47
+ npx harebear-ui docs # everything
48
+ ```
49
+
50
+ A lookup prints the matching `###` sections, or the primitive's table row with its header. It exits with status 1 when nothing matches, so an agent notices a wrong name instead of guessing.
51
+
52
+ ## Prompts that work well
53
+
54
+ The instructions already cover style rules, so prompts can stay about the product:
55
+
56
+ - "Build a settings page with a profile card, a notifications card with switches, and a danger zone with a delete-account ConfirmDialog."
57
+ - "Turn `orders.json` into an orders screen: DataTable with status badges, a detail panel when a row is clicked, and a KPI row above it."
58
+ - "Make a chat UI for our support bot with a conversation list, tool calls shown as ToolSteps and approval prompts for refunds."
59
+ - "Start from the admin reference screen and adapt it to our metrics endpoint."
60
+
61
+ Pointing at a reference screen is the fastest way to a good result. The playground has six, built only from public exports: [`playground/screens/`](https://github.com/HMilbradt/harebear-ui/tree/main/playground/screens) (admin dashboard, AI chat, agent with approvals, records table with detail panel, status home, auth).
62
+
63
+ ## Review what the agent built
64
+
65
+ Things to check before you accept a UI change:
66
+
67
+ - **Both modes.** Toggle light and dark. Anything that only works in one used a palette color instead of a token.
68
+ - **Phone width.** At 375px rows wrap, tables scroll inside their card, and the sidebar becomes a sheet.
69
+ - **No forks.** The agent imported from `harebear-ui` rather than copying component source into the app.
70
+ - **No color overrides.** `className` on harebear components is for layout. A `bg-*` or `text-*` color override on a library component means the agent hit a gap; ask it to report the gap instead.
71
+ - **Accessible icons.** Icon-only buttons have an `aria-label`.
72
+
73
+ ## Working on harebear-ui itself
74
+
75
+ Agents contributing to this repo should read [AGENTS.md](../../AGENTS.md) at the repo root. It covers the layout, the conventions for new components, the checks (`pnpm check`), and how to regenerate the README images (`pnpm shots`).