diff --git a/apps/docs/package.json b/apps/docs/package.json index 5846bae..d90d0c5 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -13,10 +13,7 @@ "chromatic": "npx chromatic --project-token=chpt_98c750b6bad066a" }, "dependencies": { - "@vanilla-extract/css": "^1.14.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "ui": "*" + "@sopt-makers/ui": "^1.0.0" }, "devDependencies": { "@storybook/addon-essentials": "^7.6.3", @@ -31,6 +28,7 @@ "@types/react-dom": "^18.2.15", "@typescript-eslint/eslint-plugin": "^6.10.0", "@typescript-eslint/parser": "^6.10.0", + "@vanilla-extract/css": "^1.14.0", "@vanilla-extract/vite-plugin": "^3.9.2", "@vitejs/plugin-react": "^4.2.0", "chromatic": "^10.0.0", @@ -40,7 +38,9 @@ "eslint-plugin-storybook": "^0.6.15", "storybook": "^7.6.3", "typescript": "^5.2.2", - "vite": "^5.0.0" + "vite": "^5.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "readme": "ERROR: No README data found!", "_id": "docs@0.0.0" diff --git a/apps/docs/src/App.tsx b/apps/docs/src/App.tsx index dd01635..6d9cfac 100644 --- a/apps/docs/src/App.tsx +++ b/apps/docs/src/App.tsx @@ -1,4 +1,4 @@ -import { Test } from '../../../packages/ui'; +import { Test } from '@sopt-makers/ui'; import './App.css'; function App() { diff --git a/apps/docs/src/stories/Button.stories.tsx b/apps/docs/src/stories/Button.stories.tsx index fb9da9d..c6214ac 100644 --- a/apps/docs/src/stories/Button.stories.tsx +++ b/apps/docs/src/stories/Button.stories.tsx @@ -1,5 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; -import { Button } from '../../../../packages/ui'; +import { Button } from '@sopt-makers/ui'; interface ButtonOwnProps { size?: 'sm' | 'md' | 'lg'; diff --git a/apps/docs/src/stories/CheckBox.stories.tsx b/apps/docs/src/stories/CheckBox.stories.tsx index 33f0c5c..c27a6fe 100644 --- a/apps/docs/src/stories/CheckBox.stories.tsx +++ b/apps/docs/src/stories/CheckBox.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react'; -import { CheckBox } from '../../../../packages/ui'; +import { CheckBox } from '@sopt-makers/ui'; const meta = { title: 'Components/CheckBox', diff --git a/apps/docs/src/stories/Dialog.stories.tsx b/apps/docs/src/stories/Dialog.stories.tsx index 03ef3aa..32ff77c 100644 --- a/apps/docs/src/stories/Dialog.stories.tsx +++ b/apps/docs/src/stories/Dialog.stories.tsx @@ -7,7 +7,7 @@ import { DialogContext, type DialogOptionType, useDialog, -} from '../../../../packages/ui'; +} from '@sopt-makers/ui'; export default { title: 'Components/Dialog', diff --git a/apps/docs/src/stories/Header.tsx b/apps/docs/src/stories/Header.tsx index ae086b1..791bf19 100644 --- a/apps/docs/src/stories/Header.tsx +++ b/apps/docs/src/stories/Header.tsx @@ -1,4 +1,4 @@ -import { Button } from '../../../../packages/ui'; +import { Button } from '@sopt-makers/ui'; import './header.css'; type User = { diff --git a/apps/docs/src/stories/Test.stories.ts b/apps/docs/src/stories/Test.stories.ts index d63819a..82e7bb5 100644 --- a/apps/docs/src/stories/Test.stories.ts +++ b/apps/docs/src/stories/Test.stories.ts @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react'; -import { Test } from "../../../../packages/ui"; +import { Test } from "@sopt-makers/ui"; const meta = { title: 'Example/Test', diff --git a/apps/docs/src/stories/Toast.stories.tsx b/apps/docs/src/stories/Toast.stories.tsx index 99eca7e..6f38bc3 100644 --- a/apps/docs/src/stories/Toast.stories.tsx +++ b/apps/docs/src/stories/Toast.stories.tsx @@ -1,5 +1,5 @@ import { Meta, StoryObj, StoryFn } from "@storybook/react"; -import { useToast, ToastProvider, type ToastOptionType } from "../../../../packages/ui"; +import { useToast, ToastProvider, type ToastOptionType } from "@sopt-makers/ui"; import { IconCopy } from "../../../../packages/icons/src"; const meta: Meta = { @@ -37,16 +37,17 @@ const meta: Meta = { }; export default meta; -export const Component: StoryObj = { - args: { - icon: "success", - content: "프로젝트가 등록되었어요.", - action: { name: "보러가기", onClick: () => {} }, - style: { - root: { position: "static", animation: "none", transform: "none" }, - }, - }, -}; +// export const Component: StoryObj = { +// component: Toast, +// args: { +// icon: "success", +// content: "프로젝트가 등록되었어요.", +// action: { name: "보러가기", onClick: () => {} }, +// style: { +// root: { position: "static", animation: "none", transform: "none" }, +// }, +// }, +// }; const ToastSample = ({ option }: { option: ToastOptionType }) => { const { open } = useToast(); diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 03aa15f..a7fc6fb 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -5,10 +5,6 @@ "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, - // "baseUrl": ".", - // "paths": { - // "@ui": ["/packages/ui"] - // }, /* Bundler mode */ "moduleResolution": "bundler", diff --git a/apps/docs/vite.config.ts b/apps/docs/vite.config.ts index 0fb4125..0946dff 100644 --- a/apps/docs/vite.config.ts +++ b/apps/docs/vite.config.ts @@ -5,9 +5,4 @@ import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), vanillaExtractPlugin()], - // resolve: { - // alias: { - // '@ui': '../../packages/ui' - // } - // } }) diff --git a/yarn.lock b/yarn.lock index 0be0af1..0dc6972 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2458,11 +2458,6 @@ resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== -"@sopt-makers/ui@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@sopt-makers/ui/-/ui-1.0.0.tgz#e46e1943c55e67d8b52e73261dd77377544f59d1" - integrity sha512-YKglcUQIBuz6vuRs8DQehSfKVcmlaJCYZo4m02cHwHGbPMdUcR6okYmfXU51H28J1jZ898x+fgfSUOY9w0cgwg== - "@storybook/addon-actions@7.6.17": version "7.6.17" resolved "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-7.6.17.tgz"