-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/KGU-C-Lab/clab.page into re…
…factor/#183
- Loading branch information
Showing
36 changed files
with
926 additions
and
110 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @gwansikk | ||
* @Jeong-Ag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "auth", | ||
"name": "@clab/auth", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev --port 6001", | ||
|
@@ -33,5 +33,6 @@ | |
"postcss": "^8", | ||
"tailwindcss": "^3.3.0", | ||
"typescript": "^5" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"name": "land", | ||
"packageManager": "[email protected]", | ||
"name": "@clab/land", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
|
@@ -26,5 +25,6 @@ | |
"postcss": "^8", | ||
"tailwindcss": "^3.3.0", | ||
"typescript": "^5" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
{ | ||
"name": "member", | ||
"private": true, | ||
"version": "0.0.0", | ||
"name": "@clab/member", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite --port 6002 --mode development", | ||
"build": "tsc && vite build --mode production", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"dev": "vite --port 6002", | ||
"build": "tsc && vite build", | ||
"lint": "eslint . --ext ts,tsx", | ||
"type": "tsc --noEmit", | ||
"preview": "vite preview" | ||
}, | ||
|
@@ -18,7 +17,7 @@ | |
"@gwansikk/server-chain": "^0.5.2", | ||
"@sentry/react": "^8.9.2", | ||
"@sentry/vite-plugin": "^2.18.0", | ||
"@tanstack/react-query": "^5.18.1", | ||
"@tanstack/react-query": "^5.45.1", | ||
"@tanstack/react-query-devtools": "^5.40.1", | ||
"dayjs": "^1.11.10", | ||
"framer-motion": "^10.18.0", | ||
|
@@ -48,5 +47,6 @@ | |
"tailwindcss": "^3.4.1", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.0.8" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"name": "status", | ||
"version": "0.1.0", | ||
"name": "@clab/status", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
|
@@ -10,19 +9,22 @@ | |
"type": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@clab/utils": "workspace:^", | ||
"next": "14.2.4", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"react-lottie-player": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@clab/config": "workspace:^", | ||
"@clab/utils": "workspace:^", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"eslint": "^8", | ||
"eslint-config-next": "14.1.4", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"name": "time", | ||
"version": "0.1.0", | ||
"name": "@clab/time", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev --port 6004", | ||
|
@@ -28,5 +27,6 @@ | |
"postcss": "^8", | ||
"tailwindcss": "^3.3.0", | ||
"typescript": "^5" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ module.exports = { | |
'hooks', | ||
'icon', | ||
'utils', | ||
'ci', | ||
'github', | ||
], | ||
], | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
{ | ||
"name": "clab.page", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"workspaces": [ | ||
"apps/*", | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"postinstall": "husky install && pnpm build:design-system && pnpm build:icon", | ||
"lint-staged": "lint-staged", | ||
"dev": "pnpm -r run dev", | ||
"build": "pnpm -r run build", | ||
"type": "pnpm -r run type", | ||
"test": "pnpm -r run test", | ||
"coverage": "pnpm -r run coverage", | ||
"lint": "eslint .", | ||
"dev": "turbo run dev", | ||
"build": "turbo run build", | ||
"type": "turbo run type", | ||
"test": "turbo run test", | ||
"coverage": "turbo run coverage", | ||
"lint": "turbo run lint", | ||
"format": "prettier --write .", | ||
"dev:auth": "pnpm --filter auth dev", | ||
"dev:land": "pnpm --filter land dev", | ||
|
@@ -55,6 +50,8 @@ | |
"lint-staged": "^15.2.0", | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-tailwindcss": "^0.5.13", | ||
"turbo": "^2.0.9", | ||
"typescript": "^5.3.3" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"name": "@clab/config", | ||
"version": "0.0.0", | ||
"private": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@clab/design-system", | ||
"version": "0.1.0", | ||
"version": "0.0.1", | ||
"description": "Design system for Kyonggi University C-Lab", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
|
@@ -11,7 +11,7 @@ | |
"scripts": { | ||
"clean": "rimraf dist", | ||
"type": "tsc --noEmit", | ||
"test": "vitest", | ||
"test": "vitest run --coverage --typecheck", | ||
"coverage": "vitest --coverage", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build", | ||
|
@@ -35,7 +35,7 @@ | |
"@types/react": "^18.2.43", | ||
"@types/react-dom": "^18.2.17", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"@vitest/coverage-v8": "^1.6.0", | ||
"@vitest/coverage-istanbul": "^2.0.3", | ||
"autoprefixer": "^10.4.17", | ||
"cva": "1.0.0-beta.1", | ||
"jsdom": "^24.0.0", | ||
|
@@ -47,13 +47,14 @@ | |
"tsup": "^8.1.0", | ||
"typescript": "^5.3.3", | ||
"vite": "^5.2.8", | ||
"vitest": "^1.6.0" | ||
"vitest": "^2.0.3" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"dependencies": { | ||
"@clab/icon": "workspace:^" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
|
||
import { render, screen } from '@testing-library/react'; | ||
|
||
import Badge from './Badge'; | ||
import { badgeVariants } from './Badge.styles'; | ||
|
||
describe('Badge', () => { | ||
it('컴포넌트가 크래시 없이 렌더링되어야 합니다.', () => { | ||
render(<Badge>Badge</Badge>); | ||
|
||
expect(screen.getByText('Badge')).toBeInTheDocument(); | ||
}); | ||
|
||
it('컴포넌트에 색상 변형이 올바르게 적용되어야 합니다.', () => { | ||
const { rerender } = render(<Badge color="primary">Primary Badge</Badge>); | ||
|
||
let badge = screen.getByText('Primary Badge'); | ||
expect(badge).toHaveClass(badgeVariants({ color: 'primary' })); | ||
|
||
rerender(<Badge color="red">Red Badge</Badge>); | ||
badge = screen.getByText('Red Badge'); | ||
expect(badge).toHaveClass(badgeVariants({ color: 'red' })); | ||
|
||
rerender(<Badge color="green">Green Badge</Badge>); | ||
badge = screen.getByText('Green Badge'); | ||
expect(badge).toHaveClass(badgeVariants({ color: 'green' })); | ||
}); | ||
|
||
it('추가적인 클래스명이 올바르게 적용되어야 합니다.', () => { | ||
render(<Badge className="extra-class">Badge</Badge>); | ||
|
||
expect(screen.getByText('Badge')).toHaveClass('extra-class'); | ||
}); | ||
|
||
it('ref가 스팬 엘리먼트로 올바르게 전달되어야 합니다.', () => { | ||
const ref = React.createRef<HTMLSpanElement>(); | ||
render(<Badge ref={ref}>Badge</Badge>); | ||
|
||
expect(ref.current).toBeInstanceOf(HTMLSpanElement); | ||
expect(ref.current?.tagName).toBe('SPAN'); | ||
}); | ||
}); |
Oops, something went wrong.