Skip to content

Commit ad6e7e6

Browse files
committed
chore: move all ui components from apps/docs to packages/ui
1 parent 2fb283a commit ad6e7e6

File tree

117 files changed

+272
-3484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+272
-3484
lines changed

apps/docs/eslint.config.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
11
import { defineConfig } from '@nelsonlaidev/eslint-config'
22

3-
export default defineConfig(
4-
{
5-
tailwindEntryPoint: './src/styles/globals.css',
6-
overrides: {
7-
tailwindcss: {
8-
'better-tailwindcss/no-unregistered-classes': ['error', { ignore: ['not-prose', 'toaster'] }]
9-
}
10-
}
11-
},
12-
{
13-
files: ['src/components/ui/**/*.tsx'],
14-
rules: {
15-
// They are OK in UI components
16-
'jsx-a11y/prefer-tag-over-role': 'off',
17-
'jsx-a11y/anchor-has-content': 'off',
18-
'jsx-a11y/no-noninteractive-element-interactions': 'off',
19-
'jsx-a11y/click-events-have-key-events': 'off',
20-
'sonarjs/table-header': 'off',
21-
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off'
3+
export default defineConfig({
4+
tailwindEntryPoint: './src/styles/globals.css',
5+
overrides: {
6+
tailwindcss: {
7+
'better-tailwindcss/no-unregistered-classes': ['error', { ignore: ['not-prose'] }]
228
}
239
}
24-
)
10+
})

apps/docs/package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,14 @@
2525
"dependencies": {
2626
"@repo/ui": "workspace:*",
2727
"cmdk": "1.1.1",
28-
"cva": "1.0.0-beta.4",
29-
"embla-carousel-react": "8.6.0",
3028
"fumadocs-core": "16.0.6",
3129
"fumadocs-mdx": "13.0.3",
3230
"fumadocs-ui": "16.0.6",
3331
"hast-util-to-jsx-runtime": "2.3.6",
34-
"input-otp": "1.4.2",
3532
"lucide-react": "0.548.0",
3633
"next": "16.0.1",
37-
"next-themes": "0.4.6",
38-
"radix-ui": "1.4.3",
3934
"react": "19.2.0",
40-
"react-day-picker": "9.11.1",
4135
"react-dom": "19.2.0",
42-
"react-resizable-panels": "3.0.6",
4336
"recharts": "2.15.4",
4437
"shiki": "3.14.0",
4538
"sonner": "2.0.7",

apps/docs/src/app/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ import type { Metadata } from 'next'
22

33
import '@/styles/globals.css'
44

5+
import { Toaster } from '@repo/ui/components/sonner'
56
import { cn } from '@repo/ui/utils/cn'
67
import { RootProvider } from 'fumadocs-ui/provider/next'
78
import { Geist, Geist_Mono } from 'next/font/google'
89

9-
import { Toaster } from '@/components/ui/sonner'
10-
1110
const geistSans = Geist({
1211
variable: '--font-geist-sans',
1312
subsets: ['latin']

apps/docs/src/components/component-preview-tabs.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
'use client'
22

3+
import { Button } from '@repo/ui/components/button'
4+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@repo/ui/components/tabs'
35
import { CodeBlock } from 'fumadocs-ui/components/codeblock'
46
import { RotateCcwIcon } from 'lucide-react'
57
import { useState } from 'react'
68

7-
import { Button } from './ui/button'
8-
import { Tabs, TabsContent, TabsList, TabsTrigger } from './ui/tabs'
9-
109
type ComponentPreviewTabs = {
1110
preview: React.ReactNode
1211
source: React.ReactNode

apps/docs/src/components/demos/accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '../ui/accordion'
1+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@repo/ui/components/accordion'
22

33
const AccordionDemo = () => {
44
return (

apps/docs/src/components/demos/alert-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
AlertDialogHeader,
99
AlertDialogTitle,
1010
AlertDialogTrigger
11-
} from '../ui/alert-dialog'
12-
import { Button } from '../ui/button'
11+
} from '@repo/ui/components/alert-dialog'
12+
import { Button } from '@repo/ui/components/button'
1313

1414
const AlertDialogDemo = () => {
1515
return (

apps/docs/src/components/demos/alert.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { Alert, AlertDescription, AlertTitle } from '@repo/ui/components/alert'
12
import { AlertCircleIcon, CheckCircle2Icon, PopcornIcon } from 'lucide-react'
23

3-
import { Alert, AlertDescription, AlertTitle } from '../ui/alert'
4-
54
const AlertDemo = () => {
65
return (
76
<div className='grid w-full max-w-xl items-start gap-4'>

apps/docs/src/components/demos/aspect-ratio.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { AspectRatio } from '@repo/ui/components/aspect-ratio'
12
import Image from 'next/image'
23

3-
import { AspectRatio } from '../ui/aspect-ratio'
4-
54
const AspectRatioDemo = () => {
65
return (
76
<AspectRatio ratio={16 / 9} className='rounded-lg bg-muted'>

apps/docs/src/components/demos/avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Avatar, AvatarFallback, AvatarImage } from '../ui/avatar'
1+
import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/avatar'
22

33
const AvatarDemo = () => {
44
return (

apps/docs/src/components/demos/badge.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { Badge } from '@repo/ui/components/badge'
12
import { BadgeCheckIcon } from 'lucide-react'
23

3-
import { Badge } from '../ui/badge'
4-
54
const BadgeDemo = () => {
65
return (
76
<div className='flex flex-col items-center gap-2'>

0 commit comments

Comments
 (0)