diff --git a/.ladle/components.tsx b/.ladle/components.tsx index f019c99..7529c6e 100644 --- a/.ladle/components.tsx +++ b/.ladle/components.tsx @@ -13,7 +13,7 @@ export const Provider: GlobalProvider = ({ children, globalState }) => { }, [globalState.theme, setTheme]); return ( -
+
( {!isLoading && diff --git a/package.json b/package.json index 958bfd3..071d644 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@risc0/ui", - "version": "0.0.140", + "version": "0.0.142", "private": false, "sideEffects": false, "type": "module", @@ -36,8 +36,8 @@ "class-variance-authority": "0.7.1-canary.2", "clsx": "2.1.1", "cmdk": "1.0.0", - "lucide-react": "0.417.0", - "next": "15.0.0-canary.91", + "lucide-react": "0.418.0", + "next": "15.0.0-canary.95", "next-themes": "0.3.0", "radash": "12.1.0", "react-hook-form": "7.52.1", @@ -48,7 +48,7 @@ "tailwind-merge": "2.4.0", "tailwindcss": "3.4.7", "tailwindcss-animate": "1.0.7", - "typescript": "5.6.0-dev.20240730", + "typescript": "5.6.0-dev.20240801", "vaul": "0.9.1" }, "devDependencies": { @@ -59,7 +59,7 @@ "@testing-library/react-hooks": "8.0.1", "@types/jest": "29.5.12", "@vitejs/plugin-react-swc": "3.7.0", - "@vitest/coverage-v8": "2.0.4", + "@vitest/coverage-v8": "2.0.5", "deepmerge": "4.3.1", "happy-dom": "14.12.3", "istanbul-badges-readme": "1.9.0", diff --git a/slider.test.tsx b/slider.test.tsx index 99ba262..063bed9 100644 --- a/slider.test.tsx +++ b/slider.test.tsx @@ -37,7 +37,7 @@ describe("Slider", () => { render(); const thumbElement = screen.getByTestId("slider-thumb"); expect(thumbElement).toHaveClass( - "block size-4 rounded-full border border-primary/50 bg-background shadow transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", + "block size-4 rounded-full border border-primary/50 bg-background transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", ); }); }); diff --git a/slider.tsx b/slider.tsx index bf4a64c..a2bede7 100644 --- a/slider.tsx +++ b/slider.tsx @@ -22,7 +22,7 @@ const Slider = forwardRef< )); diff --git a/stories/breadcrumb.stories.tsx b/stories/breadcrumb.stories.tsx new file mode 100644 index 0000000..ac5bb44 --- /dev/null +++ b/stories/breadcrumb.stories.tsx @@ -0,0 +1,44 @@ +import { + Breadcrumb, + BreadcrumbEllipsis, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator, +} from "breadcrumb"; +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "dropdown-menu"; + +export const Default = () => { + return ( + + + + Home + + + + + + + Toggle menu + + + Documentation + Themes + GitHub + + + + + + Components + + + + Breadcrumb + + + + ); +}; diff --git a/stories/button.stories.tsx b/stories/button.stories.tsx new file mode 100644 index 0000000..f4790a5 --- /dev/null +++ b/stories/button.stories.tsx @@ -0,0 +1,179 @@ +import { Button, type ButtonProps } from "button"; +import { Label } from "label"; +import { RocketIcon } from "lucide-react"; +import { RadioGroup, RadioGroupItem } from "radio-group"; +import { useState } from "react"; + +export const All = () => { + const [variant, setVariant] = useState("default"); + + return ( + <> + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+
+ + ); +}; + +export const IconButtons = () => { + const [variant, setVariant] = useState("default"); + + return ( + <> + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ +
+
+
+ + ); +}; diff --git a/stories/card.stories.tsx b/stories/card.stories.tsx new file mode 100644 index 0000000..84c087c --- /dev/null +++ b/stories/card.stories.tsx @@ -0,0 +1,44 @@ +import { Button } from "button"; +import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "card"; +import { Input } from "input"; +import { Label } from "label"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "select"; + +export const Default = () => { + return ( + + + Create project + Deploy your new project in one-click + + +
+
+
+ + +
+
+ + +
+
+
+
+ + + + +
+ ); +}; diff --git a/stories/checkbox.stories.tsx b/stories/checkbox.stories.tsx new file mode 100644 index 0000000..b3be289 --- /dev/null +++ b/stories/checkbox.stories.tsx @@ -0,0 +1,15 @@ +import { Checkbox } from "checkbox"; + +export const Default = () => { + return ( +
+ + +
+ ); +}; diff --git a/stories/dropdown-menu.stories.tsx b/stories/dropdown-menu.stories.tsx new file mode 100644 index 0000000..e917820 --- /dev/null +++ b/stories/dropdown-menu.stories.tsx @@ -0,0 +1,75 @@ +import { Button } from "button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuPortal, + DropdownMenuSeparator, + DropdownMenuShortcut, + DropdownMenuSub, + DropdownMenuSubContent, + DropdownMenuSubTrigger, + DropdownMenuTrigger, +} from "dropdown-menu"; + +export const Default = () => { + return ( + + + + + + My Account + + + + Profile + ⇧⌘P + + + Billing + ⌘B + + + Settings + ⌘S + + + Keyboard shortcuts + ⌘K + + + + + Team + + Invite users + + + Email + Message + + More... + + + + + New Team + ⌘+T + + + + GitHub + Support + API + + + Log out + ⇧⌘Q + + + + ); +}; diff --git a/stories/separator.stories.tsx b/stories/separator.stories.tsx new file mode 100644 index 0000000..5b1664e --- /dev/null +++ b/stories/separator.stories.tsx @@ -0,0 +1,20 @@ +import { Separator } from "separator"; + +export const Default = () => { + return ( +
+
+

Radix Primitives

+

An open-source UI component library.

+
+ +
+
Blog
+ +
Docs
+ +
Source
+
+
+ ); +}; diff --git a/stories/slider.stories.tsx b/stories/slider.stories.tsx new file mode 100644 index 0000000..c9df7bb --- /dev/null +++ b/stories/slider.stories.tsx @@ -0,0 +1,5 @@ +import { Slider } from "slider"; + +export const Default = () => { + return ; +};