Built by{" "}
diff --git a/apps/www/components/site-header.tsx b/apps/www/components/site-header.tsx
index 9d99f23c9d..a82397094b 100644
--- a/apps/www/components/site-header.tsx
+++ b/apps/www/components/site-header.tsx
@@ -1,60 +1,35 @@
import Link from "next/link"
import { siteConfig } from "@/config/site"
-import { cn } from "@/lib/utils"
import { CommandMenu } from "@/components/command-menu"
import { Icons } from "@/components/icons"
import { MainNav } from "@/components/main-nav"
import { MobileNav } from "@/components/mobile-nav"
-import { ModeToggle } from "@/components/mode-toggle"
-import { buttonVariants } from "@/registry/new-york/ui/button"
+import { ModeSwitcher } from "@/components/mode-switcher"
+import { Button } from "@/registry/new-york/ui/button"
export function SiteHeader() {
return (
-
+
-
+
-
diff --git a/apps/www/components/theme-customizer.tsx b/apps/www/components/theme-customizer.tsx
index d457ded0c4..6cc1488e10 100644
--- a/apps/www/components/theme-customizer.tsx
+++ b/apps/www/components/theme-customizer.tsx
@@ -2,7 +2,7 @@
import * as React from "react"
import template from "lodash.template"
-import { Check, Copy, HelpCircle, Moon, Repeat, Sun } from "lucide-react"
+import { Check, Copy, Moon, Repeat, Sun } from "lucide-react"
import { useTheme } from "next-themes"
import { cn } from "@/lib/utils"
@@ -72,75 +72,6 @@ export function ThemeCustomizer() {
-
- {mounted ? (
- <>
- {["zinc", "rose", "blue", "green", "orange"].map((color) => {
- const baseColor = baseColors.find(
- (baseColor) => baseColor.name === color
- )
- const isActive = config.theme === color
-
- if (!baseColor) {
- return null
- }
-
- return (
-
-
-
-
-
- {baseColor.label}
-
-
- )
- })}
- >
- ) : (
-
-
-
-
-
-
-
- )}
-
@@ -164,10 +95,10 @@ function Customizer() {
- Customize
+ Theme Customizer
- Pick a style and color for your components.
+ Customize your components colors.
-
-
-
-
-
-
- About styles
-
-
-
- What is the difference between the New York and Default style?
-
-
- A style comes with its own set of components, animations,
- icons and more.
-
-
- The Default style has
- larger inputs, uses lucide-react for icons and
- tailwindcss-animate for animations.
-
-
- The New York style ships
- with smaller buttons and cards with shadows. It uses icons
- from Radix Icons.
-
-
-
-
-
-
-
-
-
- {baseColors.map((theme) => {
- const isActive = config.theme === theme.name
-
- return mounted ? (
-
- ) : (
-
+ {baseColors
+ .filter(
+ (theme) =>
+ !["slate", "stone", "gray", "neutral"].includes(theme.name)
)
- })}
+ .map((theme) => {
+ const isActive = config.theme === theme.name
+
+ return mounted ? (
+
+ ) : (
+
+ )
+ })}
diff --git a/apps/www/config/docs.ts b/apps/www/config/docs.ts
index 22fef44220..62ae2f818b 100644
--- a/apps/www/config/docs.ts
+++ b/apps/www/config/docs.ts
@@ -8,6 +8,10 @@ export interface DocsConfig {
export const docsConfig: DocsConfig = {
mainNav: [
+ {
+ title: "Home",
+ href: "/",
+ },
{
title: "Documentation",
href: "/docs",
diff --git a/apps/www/config/site.ts b/apps/www/config/site.ts
index 76c0b1f7b8..c684f2e109 100644
--- a/apps/www/config/site.ts
+++ b/apps/www/config/site.ts
@@ -11,3 +11,8 @@ export const siteConfig = {
}
export type SiteConfig = typeof siteConfig
+
+export const META_THEME_COLORS = {
+ light: "#ffffff",
+ dark: "#09090b",
+}
diff --git a/apps/www/hooks/use-meta-color.ts b/apps/www/hooks/use-meta-color.ts
new file mode 100644
index 0000000000..ec52514b1e
--- /dev/null
+++ b/apps/www/hooks/use-meta-color.ts
@@ -0,0 +1,25 @@
+import * as React from "react"
+import { useTheme } from "next-themes"
+
+import { META_THEME_COLORS } from "@/config/site"
+
+export function useMetaColor() {
+ const { resolvedTheme } = useTheme()
+
+ const metaColor = React.useMemo(() => {
+ return resolvedTheme !== "dark"
+ ? META_THEME_COLORS.light
+ : META_THEME_COLORS.dark
+ }, [resolvedTheme])
+
+ const setMetaColor = React.useCallback((color: string) => {
+ document
+ .querySelector('meta[name="theme-color"]')
+ ?.setAttribute("content", color)
+ }, [])
+
+ return {
+ metaColor,
+ setMetaColor,
+ }
+}
diff --git a/apps/www/package.json b/apps/www/package.json
index a74b89e038..9e3772c24c 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -85,7 +85,7 @@
"swr": "2.2.6-beta.3",
"tailwind-merge": "^1.12.0",
"ts-morph": "^22.0.0",
- "vaul": "0.9.0",
+ "vaul": "1.1.1",
"zod": "^3.21.4"
},
"devDependencies": {
diff --git a/apps/www/styles/globals.css b/apps/www/styles/globals.css
index 390170e634..c673affc56 100644
--- a/apps/www/styles/globals.css
+++ b/apps/www/styles/globals.css
@@ -87,11 +87,17 @@
@apply scroll-smooth;
}
body {
- @apply bg-background text-foreground;
+ @apply bg-background text-foreground overscroll-none;
/* font-feature-settings: "rlig" 1, "calt" 1; */
font-synthesis-weight: none;
text-rendering: optimizeLegibility;
}
+
+ @supports (font: -apple-system-body) and (-webkit-appearance: none) {
+ [data-wrapper] {
+ @apply min-[1800px]:border-t;
+ }
+ }
}
@layer utilities {
@@ -113,6 +119,16 @@
content: "";
@apply absolute -inset-4 shadow-xl rounded-xl border;
}
+
+ /* Hide scrollbar for Chrome, Safari and Opera */
+ .no-scrollbar::-webkit-scrollbar {
+ display: none;
+ }
+ /* Hide scrollbar for IE, Edge and Firefox */
+ .no-scrollbar {
+ -ms-overflow-style: none; /* IE and Edge */
+ scrollbar-width: none; /* Firefox */
+ }
}
@media (max-width: 640px) {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0467c27a58..313ea62019 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -307,8 +307,8 @@ importers:
specifier: ^22.0.0
version: 22.0.0
vaul:
- specifier: 0.9.0
- version: 0.9.0(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
+ specifier: 1.1.1
+ version: 1.1.1(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
zod:
specifier: ^3.21.4
version: 3.21.4
@@ -7036,11 +7036,11 @@ packages:
validate-npm-package-name@3.0.0:
resolution: {integrity: sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==}
- vaul@0.9.0:
- resolution: {integrity: sha512-bZSySGbAHiTXmZychprnX/dE0EsSige88xtyyL3/MCRbrFotRPQZo7UdydGXZWw+CKbNOw5Ow8gwAo93/nB/Cg==}
+ vaul@1.1.1:
+ resolution: {integrity: sha512-+ejzF6ffQKPcfgS7uOrGn017g39F8SO4yLPXbBhpC7a0H+oPqPna8f1BUfXaz8eU4+pxbQcmjxW+jWBSbxjaFg==}
peerDependencies:
- react: ^16.8 || ^17.0 || ^18.0
- react-dom: ^16.8 || ^17.0 || ^18.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0
vfile-location@4.1.0:
resolution: {integrity: sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==}
@@ -7780,7 +7780,7 @@ snapshots:
'@types/node': 20.5.1
chalk: 4.1.2
cosmiconfig: 8.3.6(typescript@5.5.3)
- cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.3))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3))(typescript@5.5.3)
+ cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.3))(ts-node@10.9.2(@types/node@20.11.27)(typescript@5.5.3))(typescript@5.5.3)
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
lodash.uniq: 4.5.0
@@ -10515,7 +10515,7 @@ snapshots:
core-util-is@1.0.3: {}
- cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.3))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3))(typescript@5.5.3):
+ cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.3))(ts-node@10.9.2(@types/node@20.11.27)(typescript@5.5.3))(typescript@5.5.3):
dependencies:
'@types/node': 20.5.1
cosmiconfig: 8.3.6(typescript@5.5.3)
@@ -15026,7 +15026,7 @@ snapshots:
dependencies:
builtins: 1.0.3
- vaul@0.9.0(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0(react@18.2.0))(react@18.2.0):
+ vaul@1.1.1(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0(react@18.2.0))(react@18.2.0):
dependencies:
'@radix-ui/react-dialog': 1.1.1(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
react: 18.2.0