Skip to content

Commit dd1149b

Browse files
committed
next config
1 parent 12d776f commit dd1149b

File tree

11 files changed

+87
-62
lines changed

11 files changed

+87
-62
lines changed

.eslintrc.json

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"$schema": "https://json.schemastore.org/eslintrc",
33
"root": true,
44
"extends": [
5+
"next/babel",
6+
"next",
57
"next/core-web-vitals",
68
"prettier",
79
"plugin:tailwindcss/recommended"

apps/www/.env.example

-4
This file was deleted.

apps/www/components/component-preview.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,18 @@ export function ComponentPreview({
108108
<Tabs defaultValue="preview" className="relative mr-auto w-full">
109109
<div className="flex items-center justify-between pb-3">
110110
{!hideCode && (
111-
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0">
111+
<TabsList className="w-full justify-start overflow-hidden rounded-lg border-b bg-gray-a2 p-0.5">
112112
<TabsTrigger
113113
value="preview"
114-
className="relative h-9 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 font-semibold text-muted-foreground shadow-none transition-none data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none"
114+
className="shadow-[inset_-3px_0_3px_0px_var(--gray-a d1)] relative h-9 overflow-hidden rounded-md bg-transparent px-4 py-1 text-xs uppercase tracking-widest text-muted-foreground opacity-50 shadow-none transition-none after:absolute after:inset-0 after:z-[1] after:mx-auto after:size-8 after:translate-y-1/2 after:rounded-full after:bg-gray-1 after:blur-lg data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:opacity-100 data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] data-[state=active]:after:bg-primary-a1"
115115
>
116-
Preview
116+
<span className="relative z-[2] bg-gradient-to-b from-gray-a9 via-gray-a8 to-gray-a12 bg-clip-text text-transparent">Preview</span>
117117
</TabsTrigger>
118118
<TabsTrigger
119119
value="code"
120-
className="relative h-9 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 font-semibold text-muted-foreground shadow-none transition-none data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none"
120+
className="shadow-[inset_-3px_0_3px_0px_var(--gray-a d1)] relative h-9 overflow-hidden rounded-md bg-transparent px-4 py-1 text-xs uppercase tracking-widest text-muted-foreground opacity-50 shadow-none transition-none after:absolute after:inset-0 after:z-[1] after:mx-auto after:size-8 after:translate-y-1/2 after:rounded-full after:bg-gray-1 after:blur-lg data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:opacity-100 data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] data-[state=active]:after:bg-primary-a1"
121121
>
122-
Code
122+
<span className="relative z-[2] bg-gradient-to-b from-gray-a9 via-gray-a8 to-gray-a12 bg-clip-text text-transparent">Code</span>
123123
</TabsTrigger>
124124
</TabsList>
125125
)}

apps/www/content/docs/components/menubar.mdx

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ links:
1414
<Tabs defaultValue="cli">
1515

1616
<TabsList>
17-
<TabsTrigger value="cli">CLI</TabsTrigger>
18-
<TabsTrigger value="manual">Manual</TabsTrigger>
17+
<TabsTrigger value="cli" className="after:absolute data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] relative opacity-50 data-[state=active]:opacity-100 shadow-[inset_-3px_0_3px_0px_var(--gray-a d1)] overflow-hidden after:translate-y-1/2 after:mx-auto after:inset-0 after:bg-gray-1 data-[state=active]:after:bg-primary-a1 after:bottom-0 after:top-0 after:size-8 after:rounded-full after:blur-lg after:z-[1] relative h-9 rounded-md bg-transparent px-4 py-1 tracking-widest uppercase text-xs text-muted-foreground shadow-none transition-none data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:shadow-none">
18+
<span className="relative z-[2] bg-gradient-to-b from-gray-a9 via-gray-a8 to-gray-a12 bg-clip-text text-transparent">CLI</span>
19+
</TabsTrigger>
20+
<TabsTrigger value="manual" className="after:absolute data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] relative opacity-50 data-[state=active]:opacity-100 shadow-[inset_-3px_0_3px_0px_var(--gray-a d1)] overflow-hidden after:translate-y-1/2 after:mx-auto after:inset-0 after:bg-gray-1 data-[state=active]:after:bg-primary-a1 after:bottom-0 after:top-0 after:size-8 after:rounded-full after:blur-lg after:z-[1] relative h-9 rounded-md bg-transparent px-4 py-1 tracking-widest uppercase text-xs text-muted-foreground shadow-none transition-none data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:shadow-none">
21+
<span className="relative z-[2] bg-gradient-to-b from-gray-a9 via-gray-a8 to-gray-a12 bg-clip-text text-transparent">Manual</span>
22+
</TabsTrigger>
1923
</TabsList>
2024
<TabsContent value="cli">
2125

apps/www/next.config.mjs

+9-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { createContentlayerPlugin } from "next-contentlayer2"
22

33
/** @type {import('next').NextConfig} */
44
const nextConfig = {
5-
webpack: (config) => {
6-
config.stats = {
7-
...config.stats,
8-
warningsFilter: [/@ts-morph\/common\/dist\/typescript\.js/],
9-
};
5+
// webpack: (config) => {
6+
// config.stats = {
7+
// ...config.stats,
8+
// warningsFilter: [/@ts-morph\/common\/dist\/typescript\.js/],
9+
// };
1010

11-
return config;
12-
},
11+
// return config;
12+
// },
1313
experimental: {// This might help with serialization issues
14-
serverComponentsExternalPackages: ["@ts-morph/common"],
14+
// serverComponentsExternalPackages: ["@ts-morph/common"],
1515
outputFileTracingIncludes: {
1616
"/blocks/*": ["./registry/**/*"],
1717
},
@@ -20,6 +20,7 @@ const nextConfig = {
2020
reactStrictMode: true,
2121
swcMinify: true,
2222
images: {
23+
domains: ["localhost", "prodkt.cloud"],
2324
remotePatterns: [
2425
{
2526
protocol: "https",

apps/www/package.json

+17-16
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@
2323
"@faker-js/faker": "^8.2.0",
2424
"@hookform/resolvers": "^3.1.0",
2525
"@internationalized/date": "3.5.5",
26-
"@react-types/shared": "3.24.1",
27-
"@react-aria/checkbox": "3.14.6",
28-
"@react-aria/focus": "3.18.2",
29-
"@react-aria/interactions": "3.22.2",
30-
"@react-aria/utils": "3.25.2",
31-
"@react-aria/visually-hidden": "3.8.15",
32-
"@react-aria/i18n": "3.12.2",
33-
"@react-aria/overlays": "3.23.2",
34-
"@react-stately/utils": "3.10.3",
35-
"@react-types/datepicker": "3.8.2",
36-
"@react-stately/checkbox": "3.6.8",
37-
"@react-stately/toggle": "3.7.7",
38-
"@react-types/checkbox": "3.8.3",
3926
"@radix-ui/react-accessible-icon": "^1.0.3",
4027
"@radix-ui/react-accordion": "^1.1.2",
4128
"@radix-ui/react-alert-dialog": "^1.0.4",
@@ -66,6 +53,19 @@
6653
"@radix-ui/react-toggle": "^1.0.3",
6754
"@radix-ui/react-toggle-group": "^1.0.4",
6855
"@radix-ui/react-tooltip": "^1.0.6",
56+
"@react-aria/checkbox": "3.14.6",
57+
"@react-aria/focus": "3.18.2",
58+
"@react-aria/i18n": "3.12.2",
59+
"@react-aria/interactions": "3.22.2",
60+
"@react-aria/overlays": "3.23.2",
61+
"@react-aria/utils": "3.25.2",
62+
"@react-aria/visually-hidden": "3.8.15",
63+
"@react-stately/checkbox": "3.6.8",
64+
"@react-stately/toggle": "3.7.7",
65+
"@react-stately/utils": "3.10.3",
66+
"@react-types/checkbox": "3.8.3",
67+
"@react-types/datepicker": "3.8.2",
68+
"@react-types/shared": "3.24.1",
6969
"@tanstack/react-table": "^8.9.1",
7070
"@vercel/analytics": "^1.2.2",
7171
"@vercel/og": "^0.0.21",
@@ -84,7 +84,6 @@
8484
"lodash.template": "^4.5.0",
8585
"lucide-react": "0.359.0",
8686
"markdown-wasm": "^1.2.0",
87-
"next": "14.3.0-canary.43",
8887
"next-contentlayer2": "^0.4.6",
8988
"next-themes": "^0.4.3",
9089
"react": "^18.2.0",
@@ -103,17 +102,19 @@
103102
"zod": "^3.21.4"
104103
},
105104
"devDependencies": {
105+
"@babel/core": "^7.22.1",
106106
"@shikijs/compat": "^1.1.7",
107+
"@types/color": "^3.0.3",
108+
"@types/flat": "^5.0.2",
107109
"@types/lodash.template": "^4.5.1",
108110
"@types/node": "^17.0.45",
109111
"@types/react": "^18.2.65",
110112
"@types/react-color": "^3.0.6",
111113
"@types/react-dom": "^18.2.22",
112-
"@types/color": "^3.0.3",
113-
"@types/flat": "^5.0.2",
114114
"esbuild": "^0.17.19",
115115
"eslint": "^8.41.0",
116116
"mdast-util-toc": "^6.1.1",
117+
"next": "14.3.0-canary.43",
117118
"postcss": "^8.4.24",
118119
"rehype": "^12.0.1",
119120
"rehype-autolink-headings": "^6.1.1",

apps/www/public/r/styles/default/tabs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"files": [
88
{
99
"path": "ui/tabs.tsx",
10-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground shadow-[inset_0_0_2px_1px_var(--gray-a2),inset_0_0_0px_1px_var(--gray-a2)]\",\n className\n )}\n {...props}\n />\n))\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n",
10+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\nimport { VariantProps, cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst tabListVariants = cva(\"\", {\n variants: {\n variant: {\n default:\n \"h-10 items-center justify-center rounded-xl bg-gray-3 p-1 text-muted-foreground shadow-[inset_0_0_1px_1px_var(--gray-a2),inset_0_-8px_12px_-2px_var(--gray-a1),inset_0_-1px_1px_0px_var(--gray-a2),inset_0_4px_10px_-3px_var(--gray-1),0_0_10px_3px_var(--gray-1)]\",\n chrome:\n \"shadow-[inset_-3px_0_3px_0px_var(--gray-a d1)] relative h-9 overflow-hidden rounded-md bg-transparent px-4 py-1 text-xs uppercase tracking-widest text-muted-foreground opacity-50 transition-none after:absolute after:inset-0 after:z-[1] after:mx-auto after:size-8 after:translate-y-1/2 after:rounded-full after:bg-gray-1 after:blur-lg data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:opacity-100 data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] data-[state=active]:after:bg-primary-a1\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst tabTriggerVariants = cva(\"\", {\n variants: {\n variant: {\n default:\n \"inline-flex items-center justify-center overflow-hidden whitespace-nowrap rounded-lg px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-[inset_0_0_1px_1px_var(--gray-a3)]\",\n chrome:\n \"relative h-9 overflow-hidden rounded-md bg-transparent px-4 py-1 text-xs uppercase tracking-widest text-muted-foreground opacity-50 shadow-[inset_-3px_0_3px_0px_var(--gray-a1)] transition-none after:absolute after:inset-0 after:z-[1] after:mx-auto after:size-8 after:translate-y-1/2 after:rounded-full after:bg-gray-1 after:blur-lg data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:opacity-100 data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] data-[state=active]:after:bg-primary-a1\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {\n variant?: VariantProps<typeof tabListVariants>[\"variant\"]\n }\n>(({ className, variant, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(tabListVariants({ variant, className }))}\n {...props}\n />\n))\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> & {\n variant?: VariantProps<typeof tabTriggerVariants>[\"variant\"]\n }\n>(({ className, variant, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(tabTriggerVariants({ variant, className }))}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n",
1111
"type": "registry:ui",
1212
"target": ""
1313
}

apps/www/registry/default/ui/tabs.tsx

+39-12
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,63 @@
22

33
import * as React from "react"
44
import * as TabsPrimitive from "@radix-ui/react-tabs"
5+
import { VariantProps, cva } from "class-variance-authority"
56

67
import { cn } from "@/lib/utils"
78

9+
const tabListVariants = cva("", {
10+
variants: {
11+
variant: {
12+
default:
13+
"h-10 items-center justify-center rounded-xl bg-gray-3 p-1 text-muted-foreground shadow-[inset_0_0_1px_1px_var(--gray-a2),inset_0_-8px_12px_-2px_var(--gray-a1),inset_0_-1px_1px_0px_var(--gray-a2),inset_0_4px_10px_-3px_var(--gray-1),0_0_10px_3px_var(--gray-1)]",
14+
chrome:
15+
"shadow-[inset_-3px_0_3px_0px_var(--gray-a d1)] relative h-9 overflow-hidden rounded-md bg-transparent px-4 py-1 text-xs uppercase tracking-widest text-muted-foreground opacity-50 transition-none after:absolute after:inset-0 after:z-[1] after:mx-auto after:size-8 after:translate-y-1/2 after:rounded-full after:bg-gray-1 after:blur-lg data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:opacity-100 data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] data-[state=active]:after:bg-primary-a1",
16+
},
17+
},
18+
defaultVariants: {
19+
variant: "default",
20+
},
21+
})
22+
23+
const tabTriggerVariants = cva("", {
24+
variants: {
25+
variant: {
26+
default:
27+
"inline-flex items-center justify-center overflow-hidden whitespace-nowrap rounded-lg px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-[inset_0_0_1px_1px_var(--gray-a3)]",
28+
chrome:
29+
"relative h-9 overflow-hidden rounded-md bg-transparent px-4 py-1 text-xs uppercase tracking-widest text-muted-foreground opacity-50 shadow-[inset_-3px_0_3px_0px_var(--gray-a1)] transition-none after:absolute after:inset-0 after:z-[1] after:mx-auto after:size-8 after:translate-y-1/2 after:rounded-full after:bg-gray-1 after:blur-lg data-[state=active]:border-b-gray-1 data-[state=active]:text-foreground data-[state=active]:opacity-100 data-[state=active]:shadow-[inset_0_1px_2px_2px_var(--gray-a2),0_1px_5px_1px_var(--gray-1),inset_0_1px_1px_0px_var(--gray-a5)] data-[state=active]:after:bg-primary-a1",
30+
},
31+
},
32+
defaultVariants: {
33+
variant: "default",
34+
},
35+
})
36+
837
const Tabs = TabsPrimitive.Root
938

1039
const TabsList = React.forwardRef<
1140
React.ElementRef<typeof TabsPrimitive.List>,
12-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
13-
>(({ className, ...props }, ref) => (
41+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {
42+
variant?: VariantProps<typeof tabListVariants>["variant"]
43+
}
44+
>(({ className, variant, ...props }, ref) => (
1445
<TabsPrimitive.List
1546
ref={ref}
16-
className={cn(
17-
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground shadow-[inset_0_0_2px_1px_var(--gray-a2),inset_0_-4px_0px_-2px_var(--gray-a2)]",
18-
className
19-
)}
47+
className={cn(tabListVariants({ variant, className }))}
2048
{...props}
2149
/>
2250
))
2351
TabsList.displayName = TabsPrimitive.List.displayName
2452

2553
const TabsTrigger = React.forwardRef<
2654
React.ElementRef<typeof TabsPrimitive.Trigger>,
27-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
28-
>(({ className, ...props }, ref) => (
55+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> & {
56+
variant?: VariantProps<typeof tabTriggerVariants>["variant"]
57+
}
58+
>(({ className, variant, ...props }, ref) => (
2959
<TabsPrimitive.Trigger
3060
ref={ref}
31-
className={cn(
32-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
33-
className
34-
)}
61+
className={cn(tabTriggerVariants({ variant, className }))}
3562
{...props}
3663
/>
3764
))

0 commit comments

Comments
 (0)