From e0292cca6adb8a13d167f60d7ef2d72a5f3e1c26 Mon Sep 17 00:00:00 2001 From: Carsten Kragelund Date: Mon, 31 Jul 2023 17:56:47 +0200 Subject: [PATCH] feat: add @shadcn/ui components and phosphor icons --- app/header.tsx | 130 +- app/page.tsx | 454 ++++++- components/accordion.tsx | 63 + components/alert-dialog.tsx | 156 +++ components/aspect-ratio.tsx | 7 + components/avatar.tsx | 50 + components/button.tsx | 53 + components/checkbox.tsx | 30 + components/cn.ts | 6 + components/collapsible.tsx | 11 + components/command.tsx | 158 +++ components/context-menu.tsx | 200 +++ components/dialog.tsx | 130 ++ components/dropdown-menu.tsx | 203 +++ components/hover-card.tsx | 29 + components/icons.tsx | 14 + components/input.tsx | 24 + components/label.tsx | 23 + components/menubar.tsx | 236 ++++ components/navigation-menu.tsx | 128 ++ components/popover.tsx | 33 + components/progress.tsx | 28 + components/radio-group.tsx | 44 + components/scroll-area.tsx | 48 + components/select.tsx | 113 ++ components/separator.tsx | 31 + components/sheet.tsx | 230 ++++ components/slider.tsx | 28 + components/switch.tsx | 29 + components/tabs.tsx | 55 + components/textarea.tsx | 24 + components/toast.tsx | 128 ++ components/toaster.tsx | 36 + components/toggle.tsx | 45 + components/tooltip.tsx | 31 + components/use-toast.ts | 189 +++ next.config.js | 12 + package-lock.json | 2214 +++++++++++++++++++++++++++++--- package.json | 38 +- tailwind.config.ts | 13 - tsconfig.json | 4 +- 41 files changed, 5169 insertions(+), 309 deletions(-) create mode 100644 components/accordion.tsx create mode 100644 components/alert-dialog.tsx create mode 100644 components/aspect-ratio.tsx create mode 100644 components/avatar.tsx create mode 100644 components/button.tsx create mode 100644 components/checkbox.tsx create mode 100644 components/cn.ts create mode 100644 components/collapsible.tsx create mode 100644 components/command.tsx create mode 100644 components/context-menu.tsx create mode 100644 components/dialog.tsx create mode 100644 components/dropdown-menu.tsx create mode 100644 components/hover-card.tsx create mode 100644 components/icons.tsx create mode 100644 components/input.tsx create mode 100644 components/label.tsx create mode 100644 components/menubar.tsx create mode 100644 components/navigation-menu.tsx create mode 100644 components/popover.tsx create mode 100644 components/progress.tsx create mode 100644 components/radio-group.tsx create mode 100644 components/scroll-area.tsx create mode 100644 components/select.tsx create mode 100644 components/separator.tsx create mode 100644 components/sheet.tsx create mode 100644 components/slider.tsx create mode 100644 components/switch.tsx create mode 100644 components/tabs.tsx create mode 100644 components/textarea.tsx create mode 100644 components/toast.tsx create mode 100644 components/toaster.tsx create mode 100644 components/toggle.tsx create mode 100644 components/tooltip.tsx create mode 100644 components/use-toast.ts diff --git a/app/header.tsx b/app/header.tsx index 64737ba..1254edd 100644 --- a/app/header.tsx +++ b/app/header.tsx @@ -1,8 +1,6 @@ "use client"; -import { Fragment } from "react"; -import { Popover, Transition } from "@headlessui/react"; -import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline"; -import Image from "next/image"; +import { Sheet, SheetClose, SheetContent, SheetTrigger } from "~/sheet"; +import { List, X } from "~/icons"; export type HeaderProps = { navigation: { name: string; href: string }[]; @@ -10,7 +8,7 @@ export type HeaderProps = { export function Header({ navigation }: HeaderProps) { return ( - +
@@ -82,7 +80,8 @@ export function Header({ navigation }: HeaderProps) {
- */} + - -
-
-
- +
+
+ + -
-
- - - Close menu - -
-
-
-
- {navigation.map((item) => ( - + - {item.name} - - ))} -
-
+ + + + + +
+
+ + + Close menu + +
+
+
+
+ {navigation.map((item) => ( - Start free trial + {item.name} -
-
-

- Existing customer?{" "} - - Login - -

-
+ ))} +
+ +
+

+ Existing customer?{" "} + + Login + +

- - - +
+ + {/* */} + ); } diff --git a/app/page.tsx b/app/page.tsx index 7b26648..2e5ab54 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -6,19 +6,20 @@ const bolt = createBoltClient(routes, { }); import { - ArrowPathIcon, - CloudArrowUpIcon, - CogIcon, - LockClosedIcon, - ServerIcon, - ShieldCheckIcon, -} from "@heroicons/react/24/outline"; -import { - ArrowTopRightOnSquareIcon, - ChevronRightIcon, -} from "@heroicons/react/20/solid"; + CaretRight, + ArrowSquareOut, + ArrowsClockwise, + CloudArrowUp, + Gear, + LockSimple, + HardDrives, + ShieldCheck, +} from "~/icons"; import { Header } from "./header"; import Image from "next/image"; +import { Button } from "~/button"; +import { Input } from "~/input"; +import Link from "next/link"; const navigation = [ { name: "Product", href: "#" }, @@ -31,37 +32,37 @@ const features = [ name: "Push to Deploy", description: "Ac tincidunt sapien vehicula erat auctor pellentesque rhoncus. Et magna sit morbi vitae lobortis.", - icon: CloudArrowUpIcon, + icon: CloudArrowUp, }, { name: "SSL Certificates", description: "Qui aut temporibus nesciunt vitae dicta repellat sit dolores pariatur. Temporibus qui illum aut.", - icon: LockClosedIcon, + icon: LockSimple, }, { name: "Simple Queues", description: "Rerum quas incidunt deleniti quaerat suscipit mollitia. Amet repellendus ut odit dolores qui.", - icon: ArrowPathIcon, + icon: ArrowsClockwise, }, { name: "Advanced Security", description: "Ullam laboriosam est voluptatem maxime ut mollitia commodi. Et dignissimos suscipit perspiciatis.", - icon: ShieldCheckIcon, + icon: ShieldCheck, }, { name: "Powerful API", description: "Ab a facere voluptatem in quia corrupti veritatis aliquam. Veritatis labore quaerat ipsum quaerat id.", - icon: CogIcon, + icon: Gear, }, { name: "Database Backups", description: "Quia qui et est officia cupiditate qui consectetur. Ratione similique et impedit ea ipsum et.", - icon: ServerIcon, + icon: HardDrives, }, ]; const blogPosts = [ @@ -232,7 +233,7 @@ export default async function Home() {
- @@ -242,11 +243,11 @@ export default async function Home() { Visit our careers page - +

{plain} @@ -266,20 +267,20 @@ export default async function Home() { -

- +

@@ -297,11 +298,367 @@ export default async function Home() {

{/* Illustration taken from Lucid Illustrations: https://lucid.pixsellz.io/ */} - + width="601" + height="600" + viewBox="0 0 601 600" + fill="none" + xmlns="http://www.w3.org/2000/svg" + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -327,6 +684,8 @@ export default async function Home() {
@@ -389,6 +748,8 @@ export default async function Home() {
@@ -450,6 +811,8 @@ export default async function Home() {
@@ -478,6 +841,8 @@ export default async function Home() { {post.author.name} @@ -511,6 +876,8 @@ export default async function Home() {
@@ -540,7 +907,7 @@ export default async function Home() { className="inline-flex items-center justify-center rounded-md border border-transparent bg-white px-5 py-3 text-base font-medium text-gray-900 hover:bg-gray-50" > Visit the help center -