Skip to content

Commit

Permalink
Merge pull request #3561 from udecode/sync-shadcn
Browse files Browse the repository at this point in the history
Sync shadcn
zbeyens committed Sep 24, 2024
1 parent 932186d commit 2c68e92
Showing 6 changed files with 3,066 additions and 2,260 deletions.
12 changes: 9 additions & 3 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"$schema": "https://platejs.org/schema.json",
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components"
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
"@udecode/cn": "^38.0.1",
"@udecode/plate-common": "^38.0.0",
"class-variance-authority": "0.7.0",
"clsx": "^2.1.1",
"eslint-plugin-prettier": "^5.2.1",
"lucide-react": "0.441.0",
"next": "^14.2.9",
5,128 changes: 2,943 additions & 2,185 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
28 changes: 24 additions & 4 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -28,12 +28,22 @@
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 72.22% 50.59%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;

--ring: 215 20.2% 65.1%;
--ring: 222.2 84% 4.9%;

--radius: 0.5rem;

--chart-1: 12 76% 61%;

--chart-2: 173 58% 39%;

--chart-3: 197 37% 24%;

--chart-4: 43 74% 66%;

--chart-5: 27 87% 67%;
}

.dark {
@@ -62,9 +72,19 @@
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 85.7% 97.3%;
--destructive-foreground: 210 40% 98%;

--ring: 212.7 26.8% 83.9%;

--chart-1: 220 70% 50%;

--chart-2: 160 60% 45%;

--chart-3: 30 80% 55%;

--chart-4: 280 65% 60%;

--ring: 217.2 32.6% 17.5%;
--chart-5: 340 75% 55%;
}
}

151 changes: 83 additions & 68 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -5,74 +5,89 @@ module.exports = {
darkMode: ['class'],
content: ['src/**/*.{ts,tsx}'],
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
},
borderRadius: {
xl: `calc(var(--radius) + 4px)`,
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
fontFamily: {
sans: ['var(--font-sans)', ...fontFamily.sans],
heading: ['var(--font-heading)', ...fontFamily.sans],
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
},
container: {
center: 'true',
padding: '2rem',
screens: {
'2xl': '1400px'
}
},
extend: {
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))'
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))'
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))'
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))'
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))'
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))'
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))'
},
chart: {
'1': 'hsl(var(--chart-1))',
'2': 'hsl(var(--chart-2))',
'3': 'hsl(var(--chart-3))',
'4': 'hsl(var(--chart-4))',
'5': 'hsl(var(--chart-5))'
}
},
borderRadius: {
xl: '`calc(var(--radius) + 4px)`',
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)'
},
fontFamily: {
sans: ['var(--font-sans)', ...fontFamily.sans],
heading: ['var(--font-heading)', ...fontFamily.sans]
},
keyframes: {
'accordion-down': {
from: {
height: '0'
},
to: {
height: 'var(--radix-accordion-content-height)'
}
},
'accordion-up': {
from: {
height: 'var(--radix-accordion-content-height)'
},
to: {
height: '0'
}
}
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out'
}
}
},
plugins: [require('tailwindcss-animate')],
};

0 comments on commit 2c68e92

Please sign in to comment.