Skip to content

Commit 402b4ad

Browse files
committed
issue #231 refactor: design system refactoring
1 parent c1d0a2b commit 402b4ad

File tree

160 files changed

+1680
-4541
lines changed

Some content is hidden

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

160 files changed

+1680
-4541
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ yarn-debug.log*
66
yarn-error.log*
77
pnpm-debug.log*
88
lerna-debug.log*
9+
.eslintcache
910

1011
node_modules
1112
dist

.pnp.cjs

+899-3,218
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

README.md

+15-1

packages/waggle-design-system/.babelrc.json

-24
This file was deleted.

packages/waggle-design-system/.npmignore

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ node_modules/
22
src/
33
public/
44
tsconfig.json
5+
tsconfig.node.json
6+
vite.config.ts
57
.storybook/
6-
.eslintrc.json
7-
.prettierrc
8-
.github
9-
.husky
10-
.vscode
118
.yarn
12-
.babelrc.json
13-
webpack.config.js
149
.yarnrc.yml
1510
.pnp.cjs
1611
.pnp.lodaer.mjs
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,24 @@
1-
import type { StorybookConfig } from '@storybook/react-webpack5';
2-
import path from 'path';
1+
import type { StorybookConfig } from "@storybook/react-vite";
32

3+
import { join, dirname } from "path";
4+
5+
function getAbsolutePath(value: string): any {
6+
return dirname(require.resolve(join(value, "package.json")));
7+
}
48
const config: StorybookConfig = {
5-
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
9+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
610
addons: [
7-
'@storybook/addon-links',
8-
'@storybook/addon-essentials',
9-
'@storybook/addon-interactions',
10-
'@storybook/addon-a11y',
11+
getAbsolutePath("@storybook/addon-links"),
12+
getAbsolutePath("@storybook/addon-essentials"),
13+
getAbsolutePath("@storybook/addon-onboarding"),
14+
getAbsolutePath("@storybook/addon-interactions"),
1115
],
1216
framework: {
13-
name: '@storybook/react-webpack5',
17+
name: getAbsolutePath("@storybook/react-vite"),
1418
options: {},
1519
},
1620
docs: {
17-
autodocs: true,
18-
},
19-
webpackFinal: async (config) => {
20-
if (config.resolve) {
21-
config.resolve.alias = {
22-
...config.resolve.alias,
23-
'@': path.resolve(__dirname, '../src'),
24-
'@/components': path.resolve(__dirname, '../src/components'),
25-
'@/type': path.resolve(__dirname, '../src/types'),
26-
'@/hooks': path.resolve(__dirname, '../src/hooks'),
27-
'@/styles': path.resolve(__dirname, '../src/styles'),
28-
'@/constants': path.resolve(__dirname, '../src/constants'),
29-
'@/assets': path.resolve(__dirname, '../src/assets'),
30-
'@/stories': path.resolve(__dirname, '../src/stories'),
31-
'@/utils': path.resolve(__dirname, '../src/utils'),
32-
};
33-
}
34-
35-
const imageRule = config.module?.rules?.find((rule) => {
36-
const test = (rule as { test: RegExp }).test;
37-
38-
if (!test) return false;
39-
40-
return test.test('.svg');
41-
}) as { [key: string]: any };
42-
43-
imageRule.exclude = /\.svg$/;
44-
45-
config.module?.rules?.push({
46-
test: /\.svg$/,
47-
issuer: /\.(jsx|tsx)$/,
48-
use: ['@svgr/webpack'],
49-
});
50-
config.module?.rules?.push({
51-
test: /\.svg$/,
52-
issuer: /\.(js|ts)$/,
53-
use: ['url-loader'],
54-
});
55-
56-
return config;
21+
autodocs: "tag",
5722
},
5823
};
5924
export default config;
+51

packages/waggle-design-system/package.json

+42-47
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
{
22
"name": "waggle-design-system",
3-
"version": "1.2.9",
3+
"version": "1.4.7",
44
"description": "Waggle 디자인 시스템",
5-
"homepage": "https://github.com/teamWaggle/Waggle-Design-System",
6-
"main": "dist/index.js",
7-
"module": "dist/index.js",
5+
"homepage": "https://github.com/teamWaggle/Waggle-front",
6+
"type": "module",
7+
"main": "dist/index.cjs.js",
8+
"module": "dist/index.es.js",
89
"types": "dist/index.d.ts",
910
"browser": "./browser/specific/main.js",
11+
"exports": {
12+
".": {
13+
"module": "./dist/index.es.js",
14+
"import": "./dist/index.es.js",
15+
"default": "./dist/index.cjs.js"
16+
}
17+
},
1018
"scripts": {
11-
"start": "webpack --mode development",
12-
"dev": "webpack serve --mode development --open --hot",
13-
"build": "webpack --mode production",
19+
"dev": "vite",
20+
"build": "tsc && vite build",
1421
"storybook": "storybook dev -p 6006",
1522
"build-storybook": "storybook build",
16-
"publish:npm": "rm -rf dist && mkdir dist && tsc && rm -rf ./dist/stories && cp -r ./src/assets ./dist && tsc-alias",
1723
"chromatic": "npx chromatic --project-token=chpt_9e90f3a3f28a532",
1824
"lint": "eslint src",
1925
"format": "prettier --write src/**/*.ts{,x}"
@@ -34,47 +40,53 @@
3440
"name": "sikkzz",
3541
"email": "[email protected]",
3642
"url": "https://github.com/sikkzz"
43+
},
44+
{
45+
"name": "Hellol77",
46+
"email": "[email protected]",
47+
"url": "https://github.com/Hellol77"
3748
}
3849
],
3950
"repository": {
4051
"type": "git",
41-
"url": "git+https://github.com/teamWaggle/Waggle-Design-System.git"
52+
"url": "git+https://github.com/teamWaggle/Waggle-front.git"
4253
},
4354
"license": "MIT",
4455
"dependencies": {
4556
"@emotion/babel-plugin": "^11.11.0",
4657
"@emotion/react": "^11.11.1",
58+
"@emotion/styled": "^11.11.0",
59+
"@emotion/utils": "^1.2.1",
4760
"react": "^18.2.0",
48-
"react-dom": "^18.2.0"
61+
"react-dom": "^18.2.0",
62+
"vite": "^5.2.9",
63+
"vite-plugin-commonjs": "^0.10.1",
64+
"vite-plugin-dts": "^3.8.3",
65+
"vite-plugin-libcss": "^1.1.1",
66+
"vite-plugin-svgr": "^4.2.0",
67+
"vite-tsconfig-paths": "^4.3.2"
4968
},
5069
"devDependencies": {
51-
"@babel/core": "^7.23.7",
52-
"@babel/plugin-transform-react-jsx": "^7.23.4",
53-
"@babel/preset-env": "^7.22.6",
54-
"@babel/preset-react": "^7.22.5",
55-
"@babel/preset-typescript": "^7.23.3",
5670
"@emotion/babel-plugin": "^11.11.0",
5771
"@emotion/babel-preset-css-prop": "^11.11.0",
58-
"@storybook/addon-a11y": "^7.1.1",
59-
"@storybook/addon-essentials": "^7.0.25",
60-
"@storybook/addon-interactions": "^7.0.25",
61-
"@storybook/addon-links": "^7.0.25",
62-
"@storybook/blocks": "^7.0.25",
63-
"@storybook/react": "^7.0.25",
64-
"@storybook/react-webpack5": "^7.6.8",
65-
"@storybook/testing-library": "^0.0.14-next.2",
66-
"@svgr/webpack": "^8.0.1",
72+
"@storybook/addon-a11y": "^7.6.4",
73+
"@storybook/addon-essentials": "^7.6.4",
74+
"@storybook/addon-interactions": "^7.6.4",
75+
"@storybook/addon-links": "^7.6.4",
76+
"@storybook/addon-onboarding": "^1.0.10",
77+
"@storybook/addon-viewport": "^7.6.4",
78+
"@storybook/blocks": "^7.6.4",
79+
"@storybook/react": "^7.6.4",
80+
"@storybook/react-vite": "^7.6.4",
81+
"@storybook/test": "^7.6.4",
6782
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
68-
"@types/babel__core": "^7",
69-
"@types/babel__preset-env": "^7",
7083
"@types/eslint": "^8",
7184
"@types/node": "^20.8.7",
7285
"@types/react": "^18.2.15",
7386
"@types/react-dom": "^18.2.7",
7487
"@typescript-eslint/eslint-plugin": "^6.8.0",
7588
"@typescript-eslint/parser": "^6.8.0",
76-
"babel-loader": "^9.1.3",
77-
"babel-plugin-react-require": "^4.0.2",
89+
"@vitejs/plugin-react": "^4.2.1",
7890
"eslint": "8.2.0",
7991
"eslint-config-prettier": "^9.0.0",
8092
"eslint-config-react-app": "^7.0.1",
@@ -85,33 +97,16 @@
8597
"eslint-plugin-react-hooks": "^4.6.0",
8698
"eslint-plugin-react-refresh": "^0.4.6",
8799
"eslint-plugin-storybook": "^0.6.15",
88-
"html-webpack-plugin": "^5.5.4",
89-
"husky": "^8.0.3",
90-
"lint-staged": "^15.0.2",
91100
"prettier": "^3.0.3",
92101
"storybook": "^7.6.4",
93102
"ts-loader": "^9.5.1",
94103
"tsc-alias": "^1.8.7",
95104
"typescript": "5.0.4",
96-
"url-loader": "^4.1.1",
97-
"webpack": "^5.89.0",
98-
"webpack-cli": "^5.1.4",
99-
"webpack-dev-server": "^4.15.1",
100-
"webpack-merge": "^5.10.0"
101-
},
102-
"lint-staged": {
103-
"src/**/*.{js,jsx,ts,tsx}": [
104-
"yarn lint"
105-
]
106-
},
107-
"husky": {
108-
"hooks": {
109-
"pre-commit": "lint-staged"
110-
}
105+
"url-loader": "^4.1.1"
111106
},
112107
"packageManager": "[email protected]",
113108
"bugs": {
114-
"url": "https://github.com/teamWaggle/Waggle-Design-System/issues"
109+
"url": "https://github.com/teamWaggle/Waggle-front/issues"
115110
},
116111
"readme": "ERROR: No README data found!",
117112

packages/waggle-design-system/src/assets/index.d.ts

-6
This file was deleted.

packages/waggle-design-system/src/components/Box/Box.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
import type { ComponentPropsWithoutRef, ElementType } from "react";
22

3-
import type { BoxStylingProps } from "@/components/Box/Box.styles";
4-
53
import { getBoxStyling } from "@/components/Box/Box.styles";
64

5+
import type { BoxStylingProps } from "@/components/Box/Box.styles";
6+
77
export interface BoxProps extends ComponentPropsWithoutRef<"div"> {
8-
/**
9-
* Box 컴포넌트가 사용할 HTML 태그
10-
*
11-
* @default 'div'
12-
*/
138
tag?: ElementType;
14-
/** Box 컴포넌트 스타일 옵션 */
159
styles?: BoxStylingProps;
1610
}
1711

packages/waggle-design-system/src/components/Flex/Flex.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import type { FlexStylingProps } from "@/components/Flex/Flex.style";
44
import { flexStyle } from "@/components/Flex/Flex.style";
55

66
export interface FlexProps extends ComponentPropsWithoutRef<"div"> {
7-
/**
8-
* Flex 컴포넌트가 사용할 HTML 태그
9-
*
10-
* @default 'div'
11-
*/
127
tag?: ElementType;
13-
/** Flex 컴포넌트 스타일 옵션 */
148
styles?: FlexStylingProps;
159
}
1610

packages/waggle-design-system/src/components/Logo/Logo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PrimaryLogo from "@/assets/svg/ic-logo.svg";
1+
import PrimaryLogo from "@/assets/svg/ic-logo.svg?react";
22

33
interface LogoType {
44
width: number;

packages/waggle-design-system/src/components/Skeleton/Skeleton.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import { skeletonStyle } from "@/components/Skeleton/Skeleton.style";
55
export interface SkeletonProps extends ComponentPropsWithoutRef<"div"> {
66
width?: string;
77
height?: string;
8-
/**
9-
* Skeleton 모양
10-
*
11-
* @default 'square'
12-
*/
138
variant?: "square" | "circle";
149
}
1510

0 commit comments

Comments
 (0)