├── .changeset ├── README.md └── config.json ├── .cursor └── rules │ └── rules.mdc ├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── auto-assign.yml │ ├── release.yml │ └── vitest.yml ├── .gitignore ├── .npmrc ├── .prettierrc.js ├── .vscode ├── settings.json └── tasks.json ├── README.md ├── apps └── docs │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .storybook │ ├── main.ts │ └── preview.ts │ ├── CHANGELOG.md │ ├── README.md │ ├── index.html │ ├── package.json │ ├── public │ ├── next.svg │ ├── turborepo.svg │ ├── vercel.svg │ └── vite.svg │ ├── src │ ├── App.css │ ├── App.tsx │ ├── assets │ │ └── react.svg │ ├── index.css │ ├── main.tsx │ ├── stories │ │ ├── Button.stories.tsx │ │ ├── Callout.stories.tsx │ │ ├── CheckBox.stories.tsx │ │ ├── Chip.stories.tsx │ │ ├── Colors.stories.tsx │ │ ├── Configure.mdx │ │ ├── Dialog.stories.tsx │ │ ├── FieldBox.stories.tsx │ │ ├── Fonts.stories.tsx │ │ ├── Header.stories.ts │ │ ├── Header.tsx │ │ ├── Icons.stories.tsx │ │ ├── Page.stories.ts │ │ ├── Page.tsx │ │ ├── Radio.stories.tsx │ │ ├── SearchField.stories.tsx │ │ ├── Select.stories.tsx │ │ ├── SelectV2NoTriggerContent.stories.tsx │ │ ├── SelectV2WithTriggerContent.stories.tsx │ │ ├── Skeleton.stories.tsx │ │ ├── Tab.stories.tsx │ │ ├── Tag.stories.tsx │ │ ├── TextArea.stories.tsx │ │ ├── TextField.stories.tsx │ │ ├── Toast.stories.tsx │ │ ├── Toggle.stories.tsx │ │ ├── UserMention.stories.tsx │ │ ├── header.css │ │ └── page.css │ └── vite-env.d.ts │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.ts ├── package.json ├── packages ├── colors │ ├── CHANGELOG.md │ ├── index.ts │ ├── package.json │ ├── src │ │ └── colors.ts │ └── tsconfig.json ├── eslint-config-custom │ ├── README.md │ ├── library.js │ ├── next.js │ ├── package.json │ └── react-internal.js ├── fonts │ ├── CHANGELOG.md │ ├── index.ts │ ├── package.json │ ├── src │ │ └── fonts.ts │ └── tsconfig.json ├── icons │ ├── CHANGELOG.md │ ├── README.md │ ├── index.ts │ ├── package.json │ ├── src │ │ ├── Communication │ │ │ ├── ic-archive.tsx │ │ │ ├── ic-birthday-primary.tsx │ │ │ ├── ic-birthday-secondary.tsx │ │ │ ├── ic-bookmark.tsx │ │ │ ├── ic-edit.tsx │ │ │ ├── ic-eye-off.tsx │ │ │ ├── ic-eye.tsx │ │ │ ├── ic-location-filled.tsx │ │ │ ├── ic-location.tsx │ │ │ ├── ic-mail.tsx │ │ │ ├── ic-mento.tsx │ │ │ ├── ic-message-alert.tsx │ │ │ ├── ic-message-chat.tsx │ │ │ ├── ic-message-check.tsx │ │ │ ├── ic-message-dots.tsx │ │ │ ├── ic-message-plus.tsx │ │ │ ├── ic-message-question.tsx │ │ │ ├── ic-message-square.tsx │ │ │ ├── ic-message-text.tsx │ │ │ ├── ic-message-x.tsx │ │ │ ├── ic-phone.tsx │ │ │ ├── ic-pin.tsx │ │ │ ├── ic-send.tsx │ │ │ └── index.ts │ │ ├── Editor │ │ │ ├── ic-align-center.tsx │ │ │ ├── ic-align-justify.tsx │ │ │ ├── ic-align-left.tsx │ │ │ ├── ic-align-right.tsx │ │ │ ├── ic-attachment.tsx │ │ │ ├── ic-bold.tsx │ │ │ ├── ic-code.tsx │ │ │ ├── ic-delete.tsx │ │ │ ├── ic-dotpoints.tsx │ │ │ ├── ic-italic.tsx │ │ │ ├── ic-left-indent.tsx │ │ │ ├── ic-letter-spacing.tsx │ │ │ ├── ic-line-height.tsx │ │ │ ├── ic-paragraph-spacing.tsx │ │ │ ├── ic-paragraph-wrap.tsx │ │ │ ├── ic-right-indent.tsx │ │ │ ├── ic-type-strikethrough.tsx │ │ │ ├── ic-type.tsx │ │ │ ├── ic-underline.tsx │ │ │ ├── ic-write.tsx │ │ │ ├── ic-zoom-in.tsx │ │ │ ├── ic-zoom-out.tsx │ │ │ └── index.ts │ │ ├── Feedback │ │ │ ├── ic-alert-circle.tsx │ │ │ ├── ic-alert-triangle.tsx │ │ │ ├── ic-bell-active.tsx │ │ │ ├── ic-bell-off.tsx │ │ │ ├── ic-bell.tsx │ │ │ ├── ic-help-circle.tsx │ │ │ ├── ic-info-circle.tsx │ │ │ ├── ic-thumbs-down.tsx │ │ │ ├── ic-thumbs-up.tsx │ │ │ └── index.ts │ │ ├── Files │ │ │ ├── ic-file-check.tsx │ │ │ ├── ic-file-download.tsx │ │ │ ├── ic-file-minus.tsx │ │ │ ├── ic-file-plus.tsx │ │ │ ├── ic-file-search.tsx │ │ │ ├── ic-file-text.tsx │ │ │ ├── ic-file-x.tsx │ │ │ ├── ic-file.tsx │ │ │ ├── ic-folder-check.tsx │ │ │ ├── ic-folder-download.tsx │ │ │ ├── ic-folder.tsx │ │ │ └── index.ts │ │ ├── General │ │ │ ├── ic-copy.tsx │ │ │ ├── ic-dots-vertical.tsx │ │ │ ├── ic-download-cloud.tsx │ │ │ ├── ic-home.tsx │ │ │ ├── ic-link.tsx │ │ │ ├── ic-lock.tsx │ │ │ ├── ic-log-in.tsx │ │ │ ├── ic-log-out.tsx │ │ │ ├── ic-menu.tsx │ │ │ ├── ic-search.tsx │ │ │ ├── ic-settings.tsx │ │ │ ├── ic-share.tsx │ │ │ ├── ic-sliders.tsx │ │ │ ├── ic-trash.tsx │ │ │ ├── ic-unlocked.tsx │ │ │ ├── ic-upload-cloud.tsx │ │ │ └── index.ts │ │ ├── Interaction │ │ │ ├── ic-arrow-down-left.tsx │ │ │ ├── ic-arrow-down-right.tsx │ │ │ ├── ic-arrow-down.tsx │ │ │ ├── ic-arrow-left.tsx │ │ │ ├── ic-arrow-right.tsx │ │ │ ├── ic-arrow-up-left.tsx │ │ │ ├── ic-arrow-up-right.tsx │ │ │ ├── ic-arrow-up.tsx │ │ │ ├── ic-check-circle.tsx │ │ │ ├── ic-check-square.tsx │ │ │ ├── ic-check.tsx │ │ │ ├── ic-chevron-down.tsx │ │ │ ├── ic-chevron-left.tsx │ │ │ ├── ic-chevron-right.tsx │ │ │ ├── ic-chevron-up.tsx │ │ │ ├── ic-flip-backward.tsx │ │ │ ├── ic-flip-forward.tsx │ │ │ ├── ic-heart.tsx │ │ │ ├── ic-plus-circle.tsx │ │ │ ├── ic-plus-square.tsx │ │ │ ├── ic-plus.tsx │ │ │ ├── ic-refresh.tsx │ │ │ ├── ic-switch-horizontal.tsx │ │ │ ├── ic-switch-vertical.tsx │ │ │ ├── ic-x-circle.tsx │ │ │ ├── ic-x-close.tsx │ │ │ └── index.ts │ │ ├── Logo │ │ │ ├── ic-apple.tsx │ │ │ ├── ic-behance.tsx │ │ │ ├── ic-facebook.tsx │ │ │ ├── ic-github.tsx │ │ │ ├── ic-google-color.tsx │ │ │ ├── ic-google-mono.tsx │ │ │ ├── ic-instagram.tsx │ │ │ ├── ic-kakao.tsx │ │ │ ├── ic-linkedin.tsx │ │ │ ├── ic-playstore.tsx │ │ │ └── index.ts │ │ ├── Media │ │ │ ├── ic-camera-off.tsx │ │ │ ├── ic-camera-plus.tsx │ │ │ ├── ic-camera.tsx │ │ │ ├── ic-image-check.tsx │ │ │ ├── ic-image-down.tsx │ │ │ ├── ic-image-left.tsx │ │ │ ├── ic-image-plus.tsx │ │ │ ├── ic-image-right.tsx │ │ │ ├── ic-image-up.tsx │ │ │ ├── ic-image.tsx │ │ │ ├── ic-power.tsx │ │ │ ├── ic-repeat.tsx │ │ │ ├── ic-video-off.tsx │ │ │ ├── ic-video.tsx │ │ │ └── index.ts │ │ ├── Time │ │ │ ├── ic-alarm-clock-check.tsx │ │ │ ├── ic-alarm-clock-minus.tsx │ │ │ ├── ic-alarm-clock-off.tsx │ │ │ ├── ic-alarm-clock-plus.tsx │ │ │ ├── ic-alarm-clock.tsx │ │ │ ├── ic-calendar-check.tsx │ │ │ ├── ic-calendar-date.tsx │ │ │ ├── ic-calendar-plus.tsx │ │ │ ├── ic-calendar.tsx │ │ │ ├── ic-clock-check.tsx │ │ │ ├── ic-clock-plus.tsx │ │ │ ├── ic-clock-snooze.tsx │ │ │ ├── ic-clock.tsx │ │ │ └── index.ts │ │ └── Users │ │ │ ├── ic-user-check.tsx │ │ │ ├── ic-user-edit.tsx │ │ │ ├── ic-user-minus.tsx │ │ │ ├── ic-user-plus.tsx │ │ │ ├── ic-user-x.tsx │ │ │ ├── ic-user.tsx │ │ │ ├── ic-users-check.tsx │ │ │ ├── ic-users-minus.tsx │ │ │ ├── ic-users-plus.tsx │ │ │ ├── ic-users-x.tsx │ │ │ ├── ic-users.tsx │ │ │ └── index.ts │ └── tsconfig.json ├── tsconfig │ ├── base.json │ ├── nextjs.json │ ├── package.json │ └── react-library.json └── ui │ ├── .eslintrc.js │ ├── .gitignore │ ├── .npmignore │ ├── Button │ ├── Button.tsx │ ├── constants.ts │ ├── index.tsx │ ├── style.css.ts │ ├── test │ │ └── Button.test.tsx │ ├── types.ts │ └── utils.ts │ ├── CHANGELOG.md │ ├── Callout │ ├── Callout.tsx │ ├── constants.ts │ ├── index.tsx │ ├── style.css.ts │ └── types.ts │ ├── Chip │ ├── Chip.tsx │ ├── constants.ts │ ├── index.tsx │ ├── style.css.ts │ └── types.ts │ ├── Control │ ├── CheckBox.tsx │ ├── Radio.tsx │ ├── Toggle.tsx │ ├── index.ts │ ├── style.css.ts │ └── test │ │ ├── Checkbox.test.tsx │ │ ├── Radio.test.tsx │ │ └── Toggle.test.tsx │ ├── Dialog │ ├── Dialog.tsx │ ├── DialogComponent.tsx │ ├── DialogProvider.tsx │ ├── components │ │ ├── index.tsx │ │ └── style.css.ts │ ├── index.tsx │ ├── style.css.ts │ ├── types.ts │ └── useDialog.tsx │ ├── FieldBox │ ├── FieldBox.tsx │ ├── components │ │ ├── BottomAddon.tsx │ │ ├── ErrorMessage.tsx │ │ ├── Label.tsx │ │ ├── TopAddon.tsx │ │ └── index.ts │ ├── index.ts │ └── style.css.ts │ ├── Input │ ├── SearchField.tsx │ ├── Select.tsx │ ├── TextArea.tsx │ ├── TextField.tsx │ ├── UserMention.tsx │ ├── deprecated │ │ └── Select.tsx │ ├── icons │ │ ├── AlertCircleIcon.tsx │ │ ├── SearchIcon.tsx │ │ ├── SendIcon.tsx │ │ └── XCircleIcon.tsx │ ├── index.tsx │ └── style.css.ts │ ├── Skeleton │ ├── Skeleton.tsx │ ├── constants.ts │ ├── index.ts │ ├── style.css.ts │ ├── types.ts │ └── utils.ts │ ├── Tab │ ├── Tab.tsx │ ├── constants.ts │ ├── index.tsx │ ├── style.css.ts │ ├── test │ │ └── Tab.test.tsx │ └── utils.ts │ ├── Tag │ ├── Tag.tsx │ ├── constants.ts │ ├── index.tsx │ ├── style.css.ts │ ├── types.ts │ └── utils.ts │ ├── Test │ ├── Test.test.tsx │ ├── Test.tsx │ ├── index.tsx │ └── style.css.ts │ ├── Toast │ ├── Toast.tsx │ ├── ToastProvider.tsx │ ├── icons │ │ ├── alert.tsx │ │ ├── error.tsx │ │ ├── index.ts │ │ └── success.tsx │ ├── index.tsx │ ├── parts │ │ ├── index.tsx │ │ └── style.css.ts │ ├── types.ts │ └── useToast.tsx │ ├── cssVariables.ts │ ├── index.ts │ ├── package.json │ ├── scripts │ └── buildCssModules.js │ ├── theme.css.ts │ ├── tsconfig.json │ ├── tsup.config.ts │ ├── turbo │ └── generators │ │ ├── config.ts │ │ └── templates │ │ ├── component.hbs │ │ └── style.hbs │ ├── vitest.config.mjs │ └── vitest.setup.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts └── vscode.sh ├── tsconfig.json └── turbo.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.cursor/rules/rules.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: true 5 | --- 6 | You are an expert in TypeScript,React and Vanilla Extract. 7 | 8 | we are managing all packages by pnpm package manager and turborepo. 9 | 10 | ## Ground rules 11 | - 대답은 될 수 있으면 한국어로 할 것. 12 | 13 | ## Tech Stack 14 | - Turborepo를 통해서 모노레포 체계를 사용 중. 15 | - apps/docs: UI component 들의 스토리북 패키지 16 | - packages: Makers라는 사내 조직에서 이용 가능한 디자인 시스템 패키지들 17 | 18 | - pacakges 내 주요 패키지들 19 | - packages/ui: ui 컴포넌트들을 관리하는 패키지 20 | - packages/colors: 디자인 시스템 칼러들을 관리하는 패키지 21 | - packages/fonts: 디자인 시스템 폰트들을 관리하는 패키지 22 | - packages/icons: 디자인 시스템 아이콘들을 관리하는 패키지 23 | 24 | - 메인 기술 스택 25 | - react, turborepo, vanilla-extract, radix-ui, vitest, changeset, tsup 26 | 27 | ## Coding Rules 28 | - Prefer functional components over class components. Avoid using class components. 29 | - Use interfaces to define the props types for components. 30 | - Prefer writing CSS styles for a specific component within the same file. However, it's acceptable to separate the styles if they grow too large. 31 | - Scalability and reusability are the top priorities when designing components. 32 | - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError). 33 | - Prefer a co-located structure. Group related concerns together in the same place. 34 | - Prefer iteration and modularization over code duplication. 35 | - Always use absolute path. 36 | 37 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | @suwonthugger @wuzoo -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## 변경사항 2 | 3 | 4 | 5 | ## 링크 6 | 7 | 8 | 9 | ## 시급한 정도 10 | 11 | 🏃‍♂️ 보통 : 최대한 빠르게 리뷰 부탁드립니다. 12 | 13 | 14 | 15 | 16 | ## 기타 사항 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/workflows/auto-assign.yml: -------------------------------------------------------------------------------- 1 | name: Auto Assign PR Author 2 | 3 | on: 4 | pull_request: 5 | types: [opened] 6 | 7 | jobs: 8 | auto-assign: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Checkout code 13 | uses: actions/checkout@v3 14 | 15 | - name: Install GitHub CLI 16 | run: | 17 | sudo apt-get update 18 | sudo apt-get install -y gh 19 | 20 | - name: Auto-assign PR author 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | run: | 24 | gh auth setup-git 25 | gh pr edit ${{ github.event.pull_request.number }} --add-assignee ${{ github.event.pull_request.user.login }} 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | concurrency: ${{ github.workflow }}-${{ github.ref }} 9 | 10 | jobs: 11 | release: 12 | name: Release 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout Repo 16 | uses: actions/checkout@v3 17 | 18 | - name: Setup pnpm 19 | uses: pnpm/action-setup@v2 20 | with: 21 | version: 9 22 | 23 | - name: Setup Node.js 18 24 | uses: actions/setup-node@v3 25 | with: 26 | node-version: 18 27 | cache: 'pnpm' 28 | 29 | - name: Install Dependencies 30 | run: pnpm install 31 | 32 | - name: Configure npm 33 | run: | 34 | cat << EOF > "$HOME/.npmrc" 35 | auto-install-peers = true 36 | //registry.npmjs.org/:_authToken=$NPM_TOKEN 37 | EOF 38 | env: 39 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 40 | 41 | - name: Create Release Pull Request or Publish to npm 42 | id: changesets 43 | uses: changesets/action@v1 44 | with: 45 | version: pnpm changeset version 46 | publish: pnpm publish-packages 47 | env: 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 49 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 50 | -------------------------------------------------------------------------------- /.github/workflows/vitest.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | pull_request: 5 | branches: [main] 6 | 7 | jobs: 8 | test: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Checkout Repo 13 | uses: actions/checkout@v3 14 | 15 | - name: Setup Node.js 18 16 | uses: actions/setup-node@v3 17 | with: 18 | node-version: '18' 19 | 20 | - name: Setup pnpm 21 | uses: pnpm/action-setup@v2 22 | with: 23 | version: 9 24 | 25 | - name: Install Dependencies 26 | run: pnpm install 27 | 28 | - name: Build Packages 29 | run: pnpm build 30 | 31 | - name: Run Vitest Tests 32 | run: pnpm test 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # next.js 12 | .next/ 13 | out/ 14 | build 15 | 16 | # misc 17 | .DS_Store 18 | *.pem 19 | 20 | # debug 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | pnpm-debug.log* 25 | 26 | # local env files 27 | .env 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # turbo 34 | .turbo 35 | 36 | # vercel 37 | .vercel 38 | 39 | dist/ 40 | .idea 41 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | manage-package-manager-versions=true -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("prettier").Options} */ 2 | const config = { 3 | arrowParens: "always", 4 | endOfLine: "lf", 5 | jsxSingleQuote: true, 6 | printWidth: 120, 7 | quoteProps: "consistent", 8 | singleQuote: true, 9 | tabWidth: 2, 10 | trailingComma: "all", 11 | }; 12 | 13 | module.exports = config; 14 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib", 3 | "editor.formatOnSave": true, 4 | "editor.defaultFormatter": "esbenp.prettier-vscode", 5 | "terminal.integrated.profiles.osx": { 6 | "zsh": { 7 | "path": "/bin/zsh", 8 | "args": ["-l", "-i"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Dev start", 6 | "type": "shell", 7 | "command": "./scripts/vscode.sh", 8 | "group": { 9 | "kind": "build", 10 | "isDefault": true 11 | }, 12 | "problemMatcher": [], 13 | "runOptions": { 14 | "runOn": "folderOpen" 15 | } 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /apps/docs/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | 'plugin:storybook/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parser: '@typescript-eslint/parser', 12 | plugins: ['react-refresh'], 13 | rules: { 14 | 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /apps/docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | storybook-static 27 | -------------------------------------------------------------------------------- /apps/docs/.storybook/main.ts: -------------------------------------------------------------------------------- 1 | import type { StorybookConfig } from "@storybook/react-vite"; 2 | 3 | import { join, dirname } from "path"; 4 | 5 | /** 6 | * This function is used to resolve the absolute path of a package. 7 | * It is needed in projects that use Yarn PnP or are set up within a monorepo. 8 | */ 9 | function getAbsolutePath(value: string): any { 10 | return dirname(require.resolve(join(value, "package.json"))); 11 | } 12 | const config: StorybookConfig = { 13 | stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], 14 | addons: [ 15 | getAbsolutePath("@storybook/addon-links"), 16 | getAbsolutePath("@storybook/addon-essentials"), 17 | getAbsolutePath("@storybook/addon-onboarding"), 18 | getAbsolutePath("@storybook/addon-interactions"), 19 | ], 20 | framework: { 21 | name: getAbsolutePath("@storybook/react-vite"), 22 | options: {}, 23 | }, 24 | docs: { 25 | autodocs: "tag", 26 | }, 27 | async viteFinal(config) { 28 | const { mergeConfig } = await import('vite'); 29 | 30 | return mergeConfig(config, { 31 | optimizeDeps: ['@sopt-makers/icons'] 32 | }); 33 | }, 34 | }; 35 | export default config; -------------------------------------------------------------------------------- /apps/docs/.storybook/preview.ts: -------------------------------------------------------------------------------- 1 | import type { Preview } from "@storybook/react"; 2 | 3 | import "../src/index.css"; 4 | import "@sopt-makers/ui/dist/index.css"; 5 | 6 | const preview: Preview = { 7 | parameters: { 8 | actions: { argTypesRegex: "^on[A-Z].*" }, 9 | controls: { 10 | matchers: { 11 | color: /(background|color)$/i, 12 | date: /Date$/i, 13 | }, 14 | }, 15 | layout: "centered", 16 | backgrounds: { 17 | default: "dark", // 기본 배경을 'dark'로 설정 18 | values: [ 19 | { name: "dark", value: "#0F1012" }, // 'dark' 배경의 색상을 검정색으로 지정 20 | { name: "white", value: "#ffffff" }, 21 | ], 22 | }, 23 | }, 24 | }; 25 | 26 | export default preview; 27 | -------------------------------------------------------------------------------- /apps/docs/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default { 18 | // other rules... 19 | parserOptions: { 20 | ecmaVersion: 'latest', 21 | sourceType: 'module', 22 | project: ['./tsconfig.json', './tsconfig.node.json'], 23 | tsconfigRootDir: __dirname, 24 | }, 25 | } 26 | ``` 27 | 28 | - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` 29 | - Optionally add `plugin:@typescript-eslint/stylistic-type-checked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list 31 | -------------------------------------------------------------------------------- /apps/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/docs/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } -------------------------------------------------------------------------------- /apps/docs/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.tsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /apps/docs/src/stories/CheckBox.stories.tsx: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from "@storybook/react"; 2 | import { CheckBox } from "@sopt-makers/ui"; 3 | 4 | const meta = { 5 | title: "Components/Control/CheckBox", 6 | component: CheckBox, 7 | tags: ["autodocs"], 8 | argTypes: { 9 | size: { control: 'radio', options: ['sm', 'lg'] }, 10 | label: { control: 'text' }, 11 | color: { control: 'color' }, 12 | } 13 | } as Meta; 14 | 15 | export default meta; 16 | type Story = StoryObj; 17 | 18 | export const Default: Story = { 19 | args: { 20 | checked: true, 21 | size: "sm", 22 | label: "Label", 23 | }, 24 | }; 25 | 26 | export const LargeLabel: StoryObj = { 27 | args: { 28 | checked: false, 29 | size: "lg", 30 | label: "Label", 31 | }, 32 | }; 33 | 34 | export const SmallLabel: StoryObj = { 35 | args: { 36 | checked: false, 37 | size: "sm", 38 | label: "Label", 39 | }, 40 | }; 41 | -------------------------------------------------------------------------------- /apps/docs/src/stories/Header.stories.ts: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from '@storybook/react'; 2 | 3 | import { Header } from './Header'; 4 | 5 | const meta = { 6 | title: 'Example/Header', 7 | component: Header, 8 | // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs 9 | tags: ['autodocs'], 10 | parameters: { 11 | // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout 12 | layout: 'fullscreen', 13 | }, 14 | } satisfies Meta; 15 | 16 | export default meta; 17 | type Story = StoryObj; 18 | 19 | export const LoggedIn: Story = { 20 | args: { 21 | user: { 22 | name: 'Jane Doe', 23 | }, 24 | }, 25 | }; 26 | 27 | export const LoggedOut: Story = {}; 28 | -------------------------------------------------------------------------------- /apps/docs/src/stories/Page.stories.ts: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from '@storybook/react'; 2 | import { within, userEvent, expect } from '@storybook/test'; 3 | 4 | import { Page } from './Page'; 5 | 6 | const meta = { 7 | title: 'Example/Page', 8 | component: Page, 9 | parameters: { 10 | // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout 11 | layout: 'fullscreen', 12 | }, 13 | } satisfies Meta; 14 | 15 | export default meta; 16 | type Story = StoryObj; 17 | 18 | export const LoggedOut: Story = {}; 19 | 20 | // More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing 21 | export const LoggedIn: Story = { 22 | play: async ({ canvasElement }) => { 23 | const canvas = within(canvasElement); 24 | const loginButton = canvas.getByRole('button', { name: /Log in/i }); 25 | await expect(loginButton).toBeInTheDocument(); 26 | await userEvent.click(loginButton); 27 | await expect(loginButton).not.toBeInTheDocument(); 28 | 29 | const logoutButton = canvas.getByRole('button', { name: /Log out/i }); 30 | await expect(logoutButton).toBeInTheDocument(); 31 | }, 32 | }; 33 | -------------------------------------------------------------------------------- /apps/docs/src/stories/Radio.stories.tsx: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from "@storybook/react"; 2 | import { Radio } from "@sopt-makers/ui"; 3 | 4 | const meta = { 5 | title: "Components/Control/Radio", 6 | component: Radio, 7 | tags: ["autodocs"], 8 | argTypes: { 9 | size: { control: 'radio', options: ['sm', 'lg'] }, 10 | label: { control: 'text' }, 11 | color: { control: 'color' }, 12 | } 13 | } as Meta; 14 | 15 | export default meta; 16 | type Story = StoryObj; 17 | 18 | export const Default: Story = { 19 | args: { 20 | checked: true, 21 | size: "sm", 22 | }, 23 | }; 24 | 25 | export const LargeRadio: StoryObj = { 26 | args: { 27 | checked: false, 28 | size: "lg", 29 | label: "Label", 30 | }, 31 | }; 32 | 33 | export const SmallRadio: StoryObj = { 34 | args: { 35 | checked: false, 36 | size: "sm", 37 | label: "Label", 38 | }, 39 | }; 40 | -------------------------------------------------------------------------------- /apps/docs/src/stories/SearchField.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ChangeEvent, useState, type InputHTMLAttributes } from 'react'; 2 | import { StoryObj } from '@storybook/react'; 3 | import { SearchField } from '@sopt-makers/ui'; 4 | import { fn } from '@storybook/test'; 5 | 6 | interface SearchFieldProps extends Omit, 'value'> { 7 | value: string; 8 | onSubmit: () => void; 9 | onReset: () => void; 10 | } 11 | 12 | const useSearchField = (props: SearchFieldProps) => { 13 | const [search, setSearch] = useState(props.value); 14 | 15 | const handleSearchChange = (e: ChangeEvent) => { 16 | setSearch(e.target.value); 17 | } 18 | 19 | const handleSearchReset = () => { 20 | setSearch(''); 21 | } 22 | 23 | return 24 | } 25 | 26 | export default { 27 | title: 'Components/Input/SearchField', 28 | component: useSearchField, 29 | tags: ['autodocs'], 30 | args: { 31 | value: '', 32 | style: { width: '335px' }, 33 | onSubmit: fn(), 34 | }, 35 | argTypes: { 36 | value: { control: false }, 37 | style: { control: false }, 38 | onSubmit: { action: 'onSubmit' } 39 | } 40 | } 41 | 42 | export const Default: StoryObj = { 43 | args: { 44 | placeholder: 'Placeholder...', 45 | readOnly: false, 46 | disabled: false, 47 | }, 48 | }; -------------------------------------------------------------------------------- /apps/docs/src/stories/Tag.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta, StoryObj } from '@storybook/react'; 2 | 3 | import { Tag, TagProps } from '@sopt-makers/ui'; 4 | 5 | export default { 6 | title: 'Components/Tag', 7 | component: Tag, 8 | tags: ['autodocs'], 9 | argTypes: { 10 | size: { control: 'radio', options: ['sm', 'md', 'lg'] }, 11 | shape: { control: 'radio', options: ['rect', 'pill'] }, 12 | variant: { control: 'radio', options: ['default', 'primary', 'secondary'] }, 13 | type: { control: 'radio', options: ['solid', 'line'] }, 14 | }, 15 | } as Meta; 16 | 17 | // 기본 태그 스토리 18 | export const Default: StoryObj = { 19 | args: { 20 | children: 'Default Tag', 21 | size: 'sm', 22 | shape: 'rect', 23 | variant: 'default', 24 | type: 'solid', 25 | }, 26 | }; 27 | -------------------------------------------------------------------------------- /apps/docs/src/stories/Toggle.stories.tsx: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from "@storybook/react"; 2 | import { Toggle } from "@sopt-makers/ui"; 3 | 4 | const meta = { 5 | title: "Components/Control/Toggle", 6 | component: Toggle, 7 | tags: ["autodocs"], 8 | argTypes: { 9 | size: { control: 'radio', options: ['sm', 'lg'] }, 10 | } 11 | } as Meta; 12 | 13 | export default meta; 14 | type Story = StoryObj; 15 | 16 | export const Default: Story = { 17 | args: { 18 | checked: true, 19 | size: "lg", 20 | }, 21 | }; 22 | 23 | export const LargeToggle: StoryObj = { 24 | args: { 25 | checked: false, 26 | size: "lg", 27 | }, 28 | }; 29 | 30 | export const SmallToggle: StoryObj = { 31 | args: { 32 | checked: false, 33 | size: "sm", 34 | }, 35 | }; 36 | -------------------------------------------------------------------------------- /apps/docs/src/stories/header.css: -------------------------------------------------------------------------------- 1 | .storybook-header { 2 | font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; 3 | border-bottom: 1px solid rgba(0, 0, 0, 0.1); 4 | padding: 15px 20px; 5 | display: flex; 6 | align-items: center; 7 | justify-content: space-between; 8 | } 9 | 10 | .storybook-header svg { 11 | display: inline-block; 12 | vertical-align: top; 13 | } 14 | 15 | .storybook-header h1 { 16 | font-weight: 700; 17 | font-size: 20px; 18 | line-height: 1; 19 | margin: 6px 0 6px 10px; 20 | display: inline-block; 21 | vertical-align: top; 22 | } 23 | 24 | .storybook-header button + button { 25 | margin-left: 10px; 26 | } 27 | 28 | .storybook-header .welcome { 29 | color: #333; 30 | font-size: 14px; 31 | margin-right: 10px; 32 | } 33 | -------------------------------------------------------------------------------- /apps/docs/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /apps/docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /apps/docs/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/docs/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [react(), vanillaExtractPlugin()], 8 | }) 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "build": "turbo run build", 5 | "test": "turbo run test", 6 | "dev": "turbo run dev", 7 | "lint": "turbo run lint", 8 | "format": "prettier --write \"**/*.{ts,tsx,md}\"", 9 | "publish-packages": "turbo run build lint && changeset publish", 10 | "prepare": "husky install", 11 | "build:ui": "pnpm build --filter @sopt-makers/ui", 12 | "build:icons": "pnpm build --filter @sopt-makers/icons", 13 | "build:fonts": "pnpm build --filter @sopt-makers/fonts", 14 | "build:colors": "pnpm build --filter @sopt-makers/colors" 15 | }, 16 | "devDependencies": { 17 | "eslint": "^8.48.0", 18 | "husky": "^8.0.0", 19 | "lint-staged": "^15.2.9", 20 | "prettier": "^3.0.3", 21 | "tsconfig": "workspace:*", 22 | "turbo": "latest" 23 | }, 24 | "lint-staged": { 25 | "*.{js,jsx,ts,tsx,mdx}": [ 26 | "eslint --fix" 27 | ] 28 | }, 29 | "name": "makers-frontend", 30 | "version": "1.0.0", 31 | "packageManager": "pnpm@9.7.0", 32 | "engines": { 33 | "node": ">=18", 34 | "pnpm": ">=9" 35 | }, 36 | "dependencies": { 37 | "@changesets/cli": "^2.26.2" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/colors/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @sopt-makers/colors 2 | 3 | ## 3.0.3 4 | 5 | ### Patch Changes 6 | 7 | - ffd6ebf: Optimize Package buldles 8 | 9 | ## 3.0.2 10 | 11 | ### Patch Changes 12 | 13 | - 5eae36b: backgroundDimmed 컬러 80%로 수정 14 | 15 | ## 3.0.1 16 | 17 | ### Patch Changes 18 | 19 | - dd16738: change import path 20 | 21 | ## 3.0.0 22 | 23 | ### Major Changes 24 | 25 | - 2ef2768: feat: alpha color 기존 값 변경 및 orange 컬러 추가 26 | 27 | ## 2.2.0 28 | 29 | ### Minor Changes 30 | 31 | - feat: alpha color(opacity) 추가, white 빠진것 추가 32 | 33 | ## 2.1.0 34 | 35 | ### Minor Changes 36 | 37 | - feat: gray950(background) 추가, gray900 수정 38 | 39 | ## 2.0.0 40 | 41 | ### Major Changes 42 | 43 | - 20e0868: feat: mds color grayscale 변경, 시멘틱 컬러 및 새로운 컬러 추가 44 | 45 | ## 1.0.0 46 | 47 | ### Major Changes 48 | 49 | - 306f491: sopt makers의 colors 1.0.0 50 | 51 | ## 0.0.0 52 | 53 | ### Major Changes 54 | 55 | - release first makers colors 56 | -------------------------------------------------------------------------------- /packages/colors/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./src/colors"; 2 | -------------------------------------------------------------------------------- /packages/colors/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sopt-makers/colors", 3 | "version": "3.0.3", 4 | "description": "sopt-makers의 frontend repository에 사용되는 colors를 제공해요.", 5 | "license": "MIT", 6 | "main": "./dist/index.js", 7 | "module": "./dist/index.mjs", 8 | "types": "./dist/index.d.ts", 9 | "files": [ 10 | "dist" 11 | ], 12 | "scripts": { 13 | "build": "tsup index.ts --format cjs,esm --dts", 14 | "dev": "tsup index.ts --format cjs,esm --dts --watch" 15 | }, 16 | "devDependencies": { 17 | "tsup": "^7.2.0", 18 | "typescript": "^5.2.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/colors/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true 11 | }, 12 | "exclude": ["node_modules"] 13 | } -------------------------------------------------------------------------------- /packages/eslint-config-custom/README.md: -------------------------------------------------------------------------------- 1 | # `@turbo/eslint-config` 2 | 3 | Collection of internal eslint configurations. 4 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/library.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require("node:path"); 2 | 3 | const project = resolve(process.cwd(), "tsconfig.json"); 4 | 5 | /* 6 | * This is a custom ESLint configuration for use with 7 | * typescript packages. 8 | * 9 | * This config extends the Vercel Engineering Style Guide. 10 | * For more information, see https://github.com/vercel/style-guide 11 | * 12 | */ 13 | 14 | module.exports = { 15 | extends: [ 16 | "@vercel/style-guide/eslint/node", 17 | "@vercel/style-guide/eslint/typescript", 18 | ].map(require.resolve), 19 | parserOptions: { 20 | project, 21 | }, 22 | globals: { 23 | React: true, 24 | JSX: true, 25 | }, 26 | settings: { 27 | "import/resolver": { 28 | typescript: { 29 | project, 30 | }, 31 | }, 32 | }, 33 | ignorePatterns: ["node_modules/", "dist/"], 34 | }; 35 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/next.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require("node:path"); 2 | 3 | const project = resolve(process.cwd(), "tsconfig.json"); 4 | 5 | /* 6 | * This is a custom ESLint configuration for use with 7 | * Next.js apps. 8 | * 9 | * This config extends the Vercel Engineering Style Guide. 10 | * For more information, see https://github.com/vercel/style-guide 11 | * 12 | */ 13 | 14 | module.exports = { 15 | extends: [ 16 | "@vercel/style-guide/eslint/node", 17 | "@vercel/style-guide/eslint/typescript", 18 | "@vercel/style-guide/eslint/browser", 19 | "@vercel/style-guide/eslint/react", 20 | "@vercel/style-guide/eslint/next", 21 | "eslint-config-turbo", 22 | ].map(require.resolve), 23 | parserOptions: { 24 | project, 25 | }, 26 | globals: { 27 | React: true, 28 | JSX: true, 29 | }, 30 | settings: { 31 | "import/resolver": { 32 | typescript: { 33 | project, 34 | }, 35 | }, 36 | }, 37 | ignorePatterns: ["node_modules/", "dist/"], 38 | // add rules configurations here 39 | rules: { 40 | "import/no-default-export": "off", 41 | }, 42 | }; 43 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-custom", 3 | "license": "MIT", 4 | "version": "0.0.0", 5 | "private": true, 6 | "devDependencies": { 7 | "@vercel/style-guide": "^5.0.0", 8 | "eslint-config-turbo": "^1.10.12" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/react-internal.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require('node:path'); 2 | 3 | const project = resolve(process.cwd(), 'tsconfig.json'); 4 | 5 | /* 6 | * This is a custom ESLint configuration for use with 7 | * internal (bundled by their consumer) libraries 8 | * that utilize React. 9 | * 10 | * This config extends the Vercel Engineering Style Guide. 11 | * For more information, see https://github.com/vercel/style-guide 12 | * 13 | */ 14 | 15 | module.exports = { 16 | extends: [ 17 | '@vercel/style-guide/eslint/browser', 18 | '@vercel/style-guide/eslint/typescript', 19 | '@vercel/style-guide/eslint/react', 20 | ].map(require.resolve), 21 | parserOptions: { 22 | project, 23 | }, 24 | globals: { 25 | JSX: true, 26 | }, 27 | settings: { 28 | 'import/resolver': { 29 | typescript: { 30 | project, 31 | }, 32 | }, 33 | }, 34 | ignorePatterns: ['node_modules/', 'dist/', '.eslintrc.js'], 35 | 36 | rules: { 37 | 'import/no-default-export': 'off', 38 | 'import/prefer-default-export': 'warn', 39 | '@typescript-eslint/explicit-function-return-type': 'off', 40 | '@typescript-eslint/no-empty-function': 'off', 41 | 'unicorn/filename-case': [ 42 | 'error', 43 | { 44 | cases: { 45 | camelCase: true, 46 | pascalCase: true, 47 | }, 48 | }, 49 | ], 50 | }, 51 | }; 52 | -------------------------------------------------------------------------------- /packages/fonts/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @sopt-makers/fonts 2 | 3 | ## 2.0.2 4 | 5 | ### Patch Changes 6 | 7 | - ffd6ebf: Optimize Package buldles 8 | 9 | ## 2.0.1 10 | 11 | ### Patch Changes 12 | 13 | - dd16738: change import path 14 | 15 | ## 2.0.0 16 | 17 | ### Major Changes 18 | 19 | - 5f7cd57: Change fonts name, Add fontStr, Add fontObj 20 | 21 | ## 1.0.0 22 | 23 | ### Major Changes 24 | 25 | - 7aa2d42: release v.1.0.0 26 | -------------------------------------------------------------------------------- /packages/fonts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./src/fonts"; 2 | -------------------------------------------------------------------------------- /packages/fonts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sopt-makers/fonts", 3 | "version": "2.0.2", 4 | "description": "sopt-makers의 frontend repository에 사용되는 fonts를 제공해요.", 5 | "main": "./dist/index.js", 6 | "module": "./dist/index.mjs", 7 | "types": "./dist/index.d.ts", 8 | "files": [ 9 | "dist" 10 | ], 11 | "scripts": { 12 | "build": "tsup index.ts --format cjs,esm --dts", 13 | "dev": "tsup index.ts --format cjs,esm --dts --watch" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/sopt-makers/makers-frontend.git" 18 | }, 19 | "author": "sopt-makers", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/sopt-makers/makers-frontend/issues" 23 | }, 24 | "homepage": "https://github.com/sopt-makers/makers-frontend#readme", 25 | "devDependencies": { 26 | "tsup": "^7.2.0", 27 | "typescript": "^5.2.2" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/fonts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "isolatedModules": true, 6 | "moduleResolution": "node", 7 | "preserveWatchOutput": true, 8 | "skipLibCheck": true, 9 | "noEmit": true, 10 | "strict": true, 11 | "target": "ES2019", 12 | }, 13 | "exclude": ["node_modules"] 14 | } -------------------------------------------------------------------------------- /packages/icons/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @sopt-makers/icons 2 | 3 | ## 1.1.0 4 | 5 | ### Minor Changes 6 | 7 | - 0594176: Fix white -> currentColor, add Logo and Communication/location 8 | 9 | ## 1.0.7 10 | 11 | ### Patch Changes 12 | 13 | - ffd6ebf: Optimize Package buldles 14 | 15 | ## 1.0.6 16 | 17 | ### Patch Changes 18 | 19 | - 17b473b: birthday phone 아이콘 추가 20 | 21 | ## 1.0.5 22 | 23 | ### Patch Changes 24 | 25 | - af4fb40: icons 패키지에 @types-react 의존성 추가 26 | 27 | ## 1.0.4 28 | 29 | ### Patch Changes 30 | 31 | - df3ab34: fix name, fix stroke 32 | 33 | ## 1.0.3 34 | 35 | ### Patch Changes 36 | 37 | - dd16738: change import path 38 | 39 | ## 1.0.2 40 | 41 | ### Patch Changes 42 | 43 | - 056c249: add IconWirte SVG asset. 44 | 45 | ## 1.0.1 46 | 47 | ### Patch Changes 48 | 49 | - c41718f: change index path 50 | 51 | ## 1.0.0 52 | 53 | ### Major Changes 54 | 55 | - a14f589: Release icons library 56 | -------------------------------------------------------------------------------- /packages/icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/Communication/index'; 2 | export * from './src/Editor/index'; 3 | export * from './src/Feedback/index'; 4 | export * from './src/Files/index'; 5 | export * from './src/General/index'; 6 | export * from './src/Interaction/index'; 7 | export * from './src/Media/index'; 8 | export * from './src/Time/index'; 9 | export * from './src/Users/index'; 10 | export * from './src/Logo/index'; 11 | -------------------------------------------------------------------------------- /packages/icons/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sopt-makers/icons", 3 | "version": "1.1.0", 4 | "description": "sopt-makers의 frontend repository에 사용되는 icons를 제공해요.", 5 | "main": "./dist/index.js", 6 | "module": "./dist/index.mjs", 7 | "types": "./dist/index.d.ts", 8 | "files": [ 9 | "dist" 10 | ], 11 | "scripts": { 12 | "build": "tsup index.ts --format cjs,esm --dts", 13 | "dev": "tsup index.ts --format cjs,esm --dts --watch" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/sopt-makers/makers-frontend.git" 18 | }, 19 | "author": "sopt-makers", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/sopt-makers/makers-frontend/issues" 23 | }, 24 | "homepage": "https://github.com/sopt-makers/makers-frontend#readme", 25 | "devDependencies": { 26 | "@svgr/cli": "^8.1.0", 27 | "@types/react": "^18.3.5", 28 | "tsup": "^7.2.0", 29 | "typescript": "^5.2.2" 30 | }, 31 | "peerDependencies": { 32 | "react": "^18.2.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-archive.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from 'react'; 2 | 3 | interface IconArchiveProps extends HTMLAttributes {} 4 | 5 | const IconArchive = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArchive; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-bookmark.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconBookMarkProps extends HTMLAttributes {} 4 | 5 | const IconBookMark = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconBookMark; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-edit.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconEditProps extends HTMLAttributes {} 4 | 5 | const IconEdit = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconEdit; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-eye-off.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconEyeOffProps extends HTMLAttributes {} 4 | 5 | const IconEyeOff = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconEyeOff; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-eye.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconEyeProps extends HTMLAttributes {} 4 | 5 | const IconEye = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 28 | 29 | ); 30 | }); 31 | 32 | export default IconEye; 33 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-location-filled.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from 'react'; 2 | 3 | interface IconLocationFilledProps extends HTMLAttributes {} 4 | 5 | const IconLocationFilled = forwardRef((props, ref) => { 6 | return ( 7 | 8 | 14 | 15 | ); 16 | }); 17 | 18 | export default IconLocationFilled; 19 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-mail.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconMailProps extends HTMLAttributes {} 4 | 5 | const IconMail = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconMail; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-mento.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconMentoProps extends HTMLAttributes {} 4 | 5 | const IconMento = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconMento; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Communication/ic-send.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconSendProps extends HTMLAttributes { } 4 | 5 | const IconSend = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconSend; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-align-center.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlignCenterProps extends HTMLAttributes {} 4 | 5 | const IconAlignCenter = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlignCenter; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-align-justify.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlignJustifyProps extends HTMLAttributes {} 4 | 5 | const IconAlignJustify = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlignJustify; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-align-left.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlignLeftProps extends HTMLAttributes {} 4 | 5 | const IconAlignLeft = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlignLeft; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-align-right.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlignRightProps extends HTMLAttributes {} 4 | 5 | const IconAlignRight = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlignRight; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-attachment.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAttachmentProps extends HTMLAttributes {} 4 | 5 | const IconAttachment = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAttachment; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-bold.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconBoldProps extends HTMLAttributes {} 4 | 5 | const IconBold = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconBold; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-code.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCodeProps extends HTMLAttributes {} 4 | 5 | const IconCode = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconCode; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-delete.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconDeleteProps extends HTMLAttributes {} 4 | 5 | const IconDelete = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconDelete; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-dotpoints.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconDotpointsProps extends HTMLAttributes {} 4 | 5 | const IconDotpoints = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconDotpoints; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-italic.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconItalicProps extends HTMLAttributes {} 4 | 5 | const IconItalic = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconItalic; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-left-indent.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconLeftIndentProps extends HTMLAttributes {} 4 | 5 | const IconLeftIndent = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconLeftIndent; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-letter-spacing.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArchiveProps extends HTMLAttributes { } 4 | 5 | const IconLetterSpacing = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconLetterSpacing; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-line-height.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconLineHeightProps extends HTMLAttributes {} 4 | 5 | const IconLineHeight = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconLineHeight; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-paragraph-spacing.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconParagraphSpacingProps extends HTMLAttributes {} 4 | 5 | const IconParagraphSpacing = forwardRef< 6 | SVGSVGElement, 7 | IconParagraphSpacingProps 8 | >((props, ref) => { 9 | return ( 10 | 17 | 24 | 25 | ); 26 | }); 27 | 28 | export default IconParagraphSpacing; 29 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-paragraph-wrap.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconParagraphWrapProps extends HTMLAttributes {} 4 | 5 | const IconParagraphWrap = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconParagraphWrap; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-right-indent.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconRightIndentProps extends HTMLAttributes {} 4 | 5 | const IconRightIndent = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconRightIndent; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-type-strikethrough.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconTypeStrikethroughProps extends HTMLAttributes {} 4 | 5 | const IconTypeStrikethrough = forwardRef< 6 | SVGSVGElement, 7 | IconTypeStrikethroughProps 8 | >((props, ref) => { 9 | return ( 10 | 17 | 24 | 25 | ); 26 | }); 27 | 28 | export default IconTypeStrikethrough; 29 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-type.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconTypeProps extends HTMLAttributes {} 4 | 5 | const IconType = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconType; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-underline.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconUnderlineProps extends HTMLAttributes {} 4 | 5 | const IconUnderline = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconUnderline; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-write.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconTypeStrikethroughProps extends HTMLAttributes {} 4 | 5 | const IconWrite = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 29 | 30 | ); 31 | } 32 | ); 33 | 34 | export default IconWrite; 35 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-zoom-in.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconZoomInProps extends HTMLAttributes {} 4 | 5 | const IconZoomIn = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconZoomIn; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/ic-zoom-out.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconZoomOutProps extends HTMLAttributes {} 4 | 5 | const IconZoomOut = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconZoomOut; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Editor/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconAlignCenter } from "./ic-align-center"; 2 | export { default as IconAlignJustify } from "./ic-align-justify"; 3 | export { default as IconAlignLeft } from "./ic-align-left"; 4 | export { default as IconAlignRight } from "./ic-align-right"; 5 | export { default as IconAttachment } from "./ic-attachment"; 6 | export { default as IconBold } from "./ic-bold"; 7 | export { default as IconCode } from "./ic-code"; 8 | export { default as IconDelete } from "./ic-delete"; 9 | export { default as IconDotpoints } from "./ic-dotpoints"; 10 | export { default as IconItalic } from "./ic-italic"; 11 | export { default as IconLeftIndent } from "./ic-left-indent"; 12 | export { default as IconLetterSpacing } from "./ic-letter-spacing"; 13 | export { default as IconLineHeight } from "./ic-line-height"; 14 | export { default as IconParagraphSpacing } from "./ic-paragraph-spacing"; 15 | export { default as IconParagraphWrap } from "./ic-paragraph-wrap"; 16 | export { default as IconRightIndent } from "./ic-right-indent"; 17 | export { default as IconType } from "./ic-type"; 18 | export { default as IconTypeStrikethrough } from "./ic-type-strikethrough"; 19 | export { default as IconUnderline } from "./ic-underline"; 20 | export { default as IconWrite } from "./ic-write"; 21 | export { default as IconZoomIn } from "./ic-zoom-in"; 22 | export { default as IconZoomOut } from "./ic-zoom-out"; 23 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-alert-circle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlertCircleProps extends HTMLAttributes {} 4 | 5 | const IconAlertCircle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlertCircle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-alert-triangle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlertTriangleProps extends HTMLAttributes {} 4 | 5 | const IconAlertTriangle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlertTriangle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-bell-off.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconBellOffProps extends HTMLAttributes {} 4 | 5 | const IconBellOff = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconBellOff; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-bell.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconBellProps extends HTMLAttributes {} 4 | 5 | const IconBell = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconBell; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-help-circle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconHelpCircleProps extends HTMLAttributes { } 4 | 5 | const IconHelpCircle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconHelpCircle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-info-circle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconInfoCircleProps extends HTMLAttributes { } 4 | 5 | const IconInfoCircle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconInfoCircle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/ic-thumbs-up.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconThumbsUpProps extends HTMLAttributes {} 4 | 5 | const IconThumbsUp = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconThumbsUp; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Feedback/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconAlertCircle } from "./ic-alert-circle"; 2 | export { default as IconAlertTriangle } from "./ic-alert-triangle"; 3 | export { default as IconBellActive } from "./ic-bell-active"; 4 | export { default as IconBellOff } from "./ic-bell-off"; 5 | export { default as IconBell } from "./ic-bell"; 6 | export { default as IconHelpCircle } from "./ic-help-circle"; 7 | export { default as IconInfoCircle } from "./ic-info-circle"; 8 | export { default as IconThumbsDown } from "./ic-thumbs-down"; 9 | export { default as IconThumbsUp } from "./ic-thumbs-up"; 10 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file-check.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFileCheckProps extends HTMLAttributes {} 4 | 5 | const IconFileCheck = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFileCheck; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file-download.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFileDownloadProps extends HTMLAttributes {} 4 | 5 | const IconFileDownload = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFileDownload; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file-minus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFileMinusProps extends HTMLAttributes {} 4 | 5 | const IconFileMinus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFileMinus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file-plus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFilePlusProps extends HTMLAttributes {} 4 | 5 | const IconFilePlus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFilePlus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file-search.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFileSearchProps extends HTMLAttributes {} 4 | 5 | const IconFileSearch = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFileSearch; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file-x.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFileXProps extends HTMLAttributes {} 4 | 5 | const IconFileX = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconFileX; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-file.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFileProps extends HTMLAttributes {} 4 | 5 | const IconFile = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconFile; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-folder-check.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFolderCheckProps extends HTMLAttributes {} 4 | 5 | const IconFolderCheck = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFolderCheck; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-folder-download.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFolderDownloadProps extends HTMLAttributes {} 4 | 5 | const IconFolderDownload = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFolderDownload; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Files/ic-folder.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFolderProps extends HTMLAttributes {} 4 | 5 | const IconFolder = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconFolder; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Files/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconFileCheck } from "./ic-file-check"; 2 | export { default as IconFileDownload } from "./ic-file-download"; 3 | export { default as IconFileMinus } from "./ic-file-minus"; 4 | export { default as IconFilePlus } from "./ic-file-plus"; 5 | export { default as IconFileSearch } from "./ic-file-search"; 6 | export { default as IconFileText } from "./ic-file-text"; 7 | export { default as IconFileX } from "./ic-file-x"; 8 | export { default as IconFile } from "./ic-file"; 9 | export { default as IconFolderCheck } from "./ic-folder-check"; 10 | export { default as IconFolderDownload } from "./ic-folder-download"; 11 | export { default as IconFolder } from "./ic-folder"; 12 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-download-cloud.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconDownloadCloudProps extends HTMLAttributes {} 4 | 5 | const IconDownloadCloud = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconDownloadCloud; 28 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-link.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconLinkProps extends HTMLAttributes {} 4 | 5 | const IconLink = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconLink; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-lock.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconLockProps extends HTMLAttributes {} 4 | 5 | const IconLock = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconLock; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-log-in.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconLogInProps extends HTMLAttributes {} 4 | 5 | const IconLogIn = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconLogIn; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-log-out.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconLogOutProps extends HTMLAttributes {} 4 | 5 | const IconLogOut = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconLogOut; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-menu.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconMenuProps extends HTMLAttributes {} 4 | 5 | const IconMenu = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconMenu; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-search.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconSearchProps extends HTMLAttributes {} 4 | 5 | const IconSearch = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconSearch; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-share.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconShareProps extends HTMLAttributes {} 4 | 5 | const IconShare = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconShare; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-sliders.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconSlidersProps extends HTMLAttributes {} 4 | 5 | const IconSliders = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconSliders; 28 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-trash.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconTrashProps extends HTMLAttributes {} 4 | 5 | const IconTrash = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconTrash; 26 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-unlocked.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconUnlockedProps extends HTMLAttributes {} 4 | 5 | const IconUnlocked = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconUnlocked; 28 | -------------------------------------------------------------------------------- /packages/icons/src/General/ic-upload-cloud.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconUploadCloudProps extends HTMLAttributes {} 4 | 5 | const IconUploadCloud = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconUploadCloud; 28 | -------------------------------------------------------------------------------- /packages/icons/src/General/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconCopy } from "./ic-copy"; 2 | export { default as IconDotsVertical } from "./ic-dots-vertical"; 3 | export { default as IconDownloadCloud } from "./ic-download-cloud"; 4 | export { default as IconHome } from "./ic-home"; 5 | export { default as IconLink } from "./ic-link"; 6 | export { default as IconLock } from "./ic-lock"; 7 | export { default as IconLogIn } from "./ic-log-in"; 8 | export { default as IconLogOut } from "./ic-log-out"; 9 | export { default as IconMenu } from "./ic-menu"; 10 | export { default as IconSearch } from "./ic-search"; 11 | export { default as IconSettings } from "./ic-settings"; 12 | export { default as IconShare } from "./ic-share"; 13 | export { default as IconSliders } from "./ic-sliders"; 14 | export { default as IconTrash } from "./ic-trash"; 15 | export { default as IconUnlocked } from "./ic-unlocked"; 16 | export { default as IconUploadCloud } from "./ic-upload-cloud"; 17 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-down-left.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowDownLeftProps extends HTMLAttributes {} 4 | 5 | const IconArrowDownLeft = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowDownLeft; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-down-right.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowDownRightProps extends HTMLAttributes {} 4 | 5 | const IconArrowDownRight = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowDownRight; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-down.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowDownProps extends HTMLAttributes {} 4 | 5 | const IconArrowDown = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowDown; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-left.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowLeftProps extends HTMLAttributes {} 4 | 5 | const IconArrowLeft = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowLeft; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-right.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowRightProps extends HTMLAttributes {} 4 | 5 | const IconArrowRight = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowRight; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-up-left.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowUpLeftProps extends HTMLAttributes {} 4 | 5 | const IconArrowUpLeft = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowUpLeft; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-up-right.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowUpRightProps extends HTMLAttributes {} 4 | 5 | const IconArrowUpRight = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowUpRight; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-arrow-up.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconArrowUpProps extends HTMLAttributes {} 4 | 5 | const IconArrowUp = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconArrowUp; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-check-circle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCheckCircleProps extends HTMLAttributes {} 4 | 5 | const IconCheckCircle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCheckCircle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-check-square.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCheckSquareProps extends HTMLAttributes {} 4 | 5 | const IconCheckSquare = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCheckSquare; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-check.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCheckProps extends HTMLAttributes {} 4 | 5 | const IconCheck = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconCheck; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-chevron-down.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconChevronDownProps extends HTMLAttributes {} 4 | 5 | const IconChevronDown = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconChevronDown; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-chevron-left.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconChevronLeftProps extends HTMLAttributes {} 4 | 5 | const IconChevronLeft = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconChevronLeft; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-chevron-right.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconChevronRightProps extends HTMLAttributes {} 4 | 5 | const IconChevronRight = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconChevronRight; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-chevron-up.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconChevronUpProps extends HTMLAttributes {} 4 | 5 | const IconChevronUp = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconChevronUp; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-flip-backward.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFlipBackwardProps extends HTMLAttributes {} 4 | 5 | const IconFlipBackward = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFlipBackward; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-flip-forward.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconFlipForwardProps extends HTMLAttributes {} 4 | 5 | const IconFlipForward = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconFlipForward; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-heart.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconHeartProps extends HTMLAttributes {} 4 | 5 | const IconHeart = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 23 | 24 | ); 25 | }); 26 | 27 | export default IconHeart; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-plus-circle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconPlusCircleProps extends HTMLAttributes {} 4 | 5 | const IconPlusCircle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconPlusCircle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-plus-square.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconPlusSquareProps extends HTMLAttributes {} 4 | 5 | const IconPlusSquare = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconPlusSquare; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-plus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconPlusProps extends HTMLAttributes {} 4 | 5 | const IconPlus = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconPlus; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-refresh.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconRefreshProps extends HTMLAttributes {} 4 | 5 | const IconRefresh = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconRefresh; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-switch-horizontal.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconSwitchHorizontalProps extends HTMLAttributes {} 4 | 5 | const IconSwitchHorizontal = forwardRef< 6 | SVGSVGElement, 7 | IconSwitchHorizontalProps 8 | >((props, ref) => { 9 | return ( 10 | 17 | 24 | 25 | ); 26 | }); 27 | 28 | export default IconSwitchHorizontal; 29 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-switch-vertical.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconSwitchVerticalProps extends HTMLAttributes {} 4 | 5 | const IconSwitchVertical = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconSwitchVertical; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-x-circle.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconXCircleProps extends HTMLAttributes {} 4 | 5 | const IconXCircle = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconXCircle; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Interaction/ic-x-close.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconXCloseProps extends HTMLAttributes {} 4 | 5 | const IconXClose = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconXClose; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Logo/ic-apple.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from 'react'; 2 | 3 | interface IconAppleProps extends HTMLAttributes {} 4 | 5 | const IconApple = forwardRef((props, ref) => { 6 | return ( 7 | 8 | 12 | 13 | ); 14 | }); 15 | 16 | export default IconApple; 17 | -------------------------------------------------------------------------------- /packages/icons/src/Logo/ic-facebook.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from 'react'; 2 | 3 | interface IconFacebookProps extends HTMLAttributes {} 4 | 5 | const IconFacebook = forwardRef((props, ref) => { 6 | return ( 7 | 8 | 12 | 13 | ); 14 | }); 15 | 16 | export default IconFacebook; 17 | -------------------------------------------------------------------------------- /packages/icons/src/Logo/ic-google-mono.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from 'react'; 2 | 3 | interface IconGoogleMonoProps extends HTMLAttributes {} 4 | 5 | const IconGoogleMono = forwardRef((props, ref) => { 6 | return ( 7 | 8 | 12 | 13 | ); 14 | }); 15 | 16 | export default IconGoogleMono; 17 | -------------------------------------------------------------------------------- /packages/icons/src/Logo/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconApple } from './ic-apple'; 2 | export { default as IconBehance } from './ic-behance'; 3 | export { default as IconFacebook } from './ic-facebook'; 4 | export { default as IconGithub } from './ic-github'; 5 | export { default as IconGoogleColor } from './ic-google-color'; 6 | export { default as IconGoogleMono } from './ic-google-mono'; 7 | export { default as IconInstagram } from './ic-instagram'; 8 | export { default as IconKakao } from './ic-kakao'; 9 | export { default as IconLinkedin } from './ic-linkedin'; 10 | export { default as IconPlaystore } from './ic-playstore'; 11 | -------------------------------------------------------------------------------- /packages/icons/src/Media/ic-camera-plus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCameraPlusProps extends HTMLAttributes {} 4 | 5 | const IconCameraPlus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCameraPlus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Media/ic-power.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconPowerProps extends HTMLAttributes {} 4 | 5 | const IconPower = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconPower; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Media/ic-repeat.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconRepeatProps extends HTMLAttributes {} 4 | 5 | const IconRepeat = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconRepeat; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Media/ic-video-off.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconVideoOffProps extends HTMLAttributes {} 4 | 5 | const IconVideoOff = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconVideoOff; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Media/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconCameraOff } from "./ic-camera-off"; 2 | export { default as IconCameraPlus } from "./ic-camera-plus"; 3 | export { default as IconCamera } from "./ic-camera"; 4 | export { default as IconImageCheck } from "./ic-image-check"; 5 | export { default as IconImageDown } from "./ic-image-down"; 6 | export { default as IconImageLeft } from "./ic-image-left"; 7 | export { default as IconImagePlus } from "./ic-image-plus"; 8 | export { default as IconImageRight } from "./ic-image-right"; 9 | export { default as IconImageUp } from "./ic-image-up"; 10 | export { default as IconImage } from "./ic-image"; 11 | export { default as IconPower } from "./ic-power"; 12 | export { default as IconRepeat } from "./ic-repeat"; 13 | export { default as IconVideoOff } from "./ic-video-off"; 14 | export { default as IconVideo } from "./ic-video"; 15 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-alarm-clock-check.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlarmClockCheckProps extends HTMLAttributes {} 4 | 5 | const IconAlarmClockCheck = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlarmClockCheck; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-alarm-clock-minus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlarmClockMinusProps extends HTMLAttributes {} 4 | 5 | const IconAlarmClockMinus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlarmClockMinus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-alarm-clock-off.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlarmClockOffProps extends HTMLAttributes {} 4 | 5 | const IconAlarmClockOff = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlarmClockOff; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-alarm-clock-plus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlarmClockPlusProps extends HTMLAttributes {} 4 | 5 | const IconAlarmClockPlus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlarmClockPlus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-alarm-clock.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconAlarmClockProps extends HTMLAttributes {} 4 | 5 | const IconAlarmClock = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconAlarmClock; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-calendar-check.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCalendarCheckProps extends HTMLAttributes {} 4 | 5 | const IconCalendarCheck = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCalendarCheck; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-calendar-date.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCalendarDateProps extends HTMLAttributes {} 4 | 5 | const IconCalendarDate = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCalendarDate; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-calendar-plus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCalendarPlusProps extends HTMLAttributes {} 4 | 5 | const IconCalendarPlus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCalendarPlus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-calendar.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconCalendarProps extends HTMLAttributes {} 4 | 5 | const IconCalendar = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconCalendar; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-clock-check.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconClockCheckProps extends HTMLAttributes {} 4 | 5 | const IconClockCheck = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconClockCheck; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-clock-plus.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconClockPlusProps extends HTMLAttributes {} 4 | 5 | const IconClockPlus = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconClockPlus; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-clock-snooze.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconClockSnoozeProps extends HTMLAttributes {} 4 | 5 | const IconClockSnooze = forwardRef( 6 | (props, ref) => { 7 | return ( 8 | 15 | 22 | 23 | ); 24 | } 25 | ); 26 | 27 | export default IconClockSnooze; 28 | -------------------------------------------------------------------------------- /packages/icons/src/Time/ic-clock.tsx: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, forwardRef } from "react"; 2 | 3 | interface IconClockProps extends HTMLAttributes {} 4 | 5 | const IconClock = forwardRef((props, ref) => { 6 | return ( 7 | 14 | 21 | 22 | ); 23 | }); 24 | 25 | export default IconClock; 26 | -------------------------------------------------------------------------------- /packages/icons/src/Time/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconAlarmClockCheck } from "./ic-alarm-clock-check"; 2 | export { default as IconAlarmClockMinus } from "./ic-alarm-clock-minus"; 3 | export { default as IconAlarmClockOff } from "./ic-alarm-clock-off"; 4 | export { default as IconAlarmClockPlus } from "./ic-alarm-clock-plus"; 5 | export { default as IconAlarmClock } from "./ic-alarm-clock"; 6 | export { default as IconCalendarCheck } from "./ic-calendar-check"; 7 | export { default as IconCalendarDate } from "./ic-calendar-date"; 8 | export { default as IconCalendarPlus } from "./ic-calendar-plus"; 9 | export { default as IconCalendar } from "./ic-calendar"; 10 | export { default as IconClockCheck } from "./ic-clock-check"; 11 | export { default as IconClockPlus } from "./ic-clock-plus"; 12 | export { default as IconClockSnooze } from "./ic-clock-snooze"; 13 | export { default as IconClock } from "./ic-clock"; 14 | -------------------------------------------------------------------------------- /packages/icons/src/Users/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconUserCheck } from "./ic-user-check"; 2 | export { default as IconUserEdit } from "./ic-user-edit"; 3 | export { default as IconUserMinus } from "./ic-user-minus"; 4 | export { default as IconUserPlus } from "./ic-user-plus"; 5 | export { default as IconUserX } from "./ic-user-x"; 6 | export { default as IconUser } from "./ic-user"; 7 | export { default as IconUsersCheck } from "./ic-users-check"; 8 | export { default as IconUsersMinus } from "./ic-user-minus"; 9 | export { default as IconUsersPlus } from "./ic-users-plus"; 10 | export { default as IconUsersX } from "./ic-users-x"; 11 | export { default as IconUsers } from "./ic-users"; 12 | -------------------------------------------------------------------------------- /packages/icons/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "isolatedModules": true, 7 | "moduleResolution": "node", 8 | "preserveWatchOutput": true, 9 | "skipLibCheck": true, 10 | "noEmit": true, 11 | "strict": true 12 | }, 13 | "include": ["src", "src/custom.d.ts", "index.ts"], 14 | "exclude": ["node_modules"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/tsconfig/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "composite": false, 6 | "declaration": true, 7 | "declarationMap": true, 8 | "esModuleInterop": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "inlineSources": false, 11 | "isolatedModules": true, 12 | "moduleResolution": "node", 13 | "noUnusedLocals": false, 14 | "noUnusedParameters": false, 15 | "preserveWatchOutput": true, 16 | "skipLibCheck": true, 17 | "strict": true, 18 | "strictNullChecks": true 19 | }, 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/tsconfig/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "plugins": [{ "name": "next" }], 7 | "allowJs": true, 8 | "declaration": false, 9 | "declarationMap": false, 10 | "incremental": true, 11 | "jsx": "preserve", 12 | "lib": ["dom", "dom.iterable", "esnext"], 13 | "module": "esnext", 14 | "noEmit": true, 15 | "resolveJsonModule": true, 16 | "strict": false, 17 | "target": "es5" 18 | }, 19 | "include": ["src", "next-env.d.ts"], 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tsconfig", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "publishConfig": { 7 | "access": "public" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/tsconfig/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx", 7 | "lib": ["ES2015", "DOM"], 8 | "module": "ESNext", 9 | "target": "es6" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/ui/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['custom/react-internal'], 3 | ignorePatterns: ['**/*.test.tsx'], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/ui/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /dist 3 | .DS_Store 4 | /*.css 5 | -------------------------------------------------------------------------------- /packages/ui/.npmignore: -------------------------------------------------------------------------------- 1 | /src/ 2 | /scripts/ 3 | .gitignore 4 | tsconfig.json 5 | -------------------------------------------------------------------------------- /packages/ui/Button/Button.tsx: -------------------------------------------------------------------------------- 1 | import React, { type ButtonHTMLAttributes } from 'react'; 2 | import * as S from './style.css'; 3 | import createButtonVariant from './utils'; 4 | import { iconSizes } from './constants'; 5 | 6 | interface IconProps { 7 | color?: string; 8 | width: number; 9 | height: number; 10 | } 11 | 12 | interface ButtonProps extends ButtonHTMLAttributes { 13 | children?: React.ReactNode; 14 | className?: string; 15 | size?: 'sm' | 'md' | 'lg'; 16 | theme?: 'white' | 'black' | 'blue' | 'red'; 17 | rounded?: 'md' | 'lg'; 18 | variant?: 'fill' | 'outlined'; 19 | LeftIcon?: React.ComponentType; 20 | RightIcon?: React.ComponentType; 21 | } 22 | 23 | function Button({ 24 | children, 25 | className, 26 | size = 'md', 27 | theme = 'white', 28 | rounded = 'md', 29 | LeftIcon, 30 | RightIcon, 31 | variant = 'fill', 32 | ...buttonElementProps 33 | }: ButtonProps) { 34 | const style = createButtonVariant(theme, rounded, size, variant); 35 | const iconSize = iconSizes[size]; 36 | return ( 37 | 42 | ); 43 | } 44 | 45 | export default Button; 46 | -------------------------------------------------------------------------------- /packages/ui/Button/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Button'; 2 | -------------------------------------------------------------------------------- /packages/ui/Button/test/Button.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen, fireEvent } from '@testing-library/react'; 2 | import Button from '../Button'; 3 | 4 | it('Button 컴포넌트가 정상적으로 렌더링됩니다.', () => { 5 | render(); 6 | 7 | expect(screen.getByText('테스트 버튼')).toBeInTheDocument(); 8 | }); 9 | 10 | it('버튼을 클릭했을 때 onClick 이벤트 핸들러가 정상적으로 호출됩니다.', () => { 11 | const handleClick = vi.fn(); 12 | render(); 13 | 14 | fireEvent.click(screen.getByText('테스트 버튼')); 15 | expect(handleClick).toHaveBeenCalled(); 16 | }); 17 | 18 | it('disabled 상태에서 버튼을 클릭했을 때 onClick 이벤트 핸들러가 호출되지 않습니다.', () => { 19 | const handleClick = vi.fn(); 20 | render( 21 | , 24 | ); 25 | 26 | fireEvent.click(screen.getByText('테스트 버튼')); 27 | expect(handleClick).not.toHaveBeenCalled(); 28 | }); 29 | -------------------------------------------------------------------------------- /packages/ui/Button/types.ts: -------------------------------------------------------------------------------- 1 | export type ButtonVariant = 'fill' | 'outlined'; 2 | 3 | export type ButtonColorTheme = 'white' | 'black' | 'blue' | 'red'; 4 | 5 | export type ButtonBgColorStatus = 'default' | 'hover' | 'press'; 6 | 7 | export type ButtonColorThemeWithStatus = `${ButtonVariant}-${ButtonColorTheme}-${ButtonBgColorStatus}`; 8 | 9 | export type ButtonRadiusTheme = 'md' | 'lg'; 10 | export type ButtonSizeTheme = 'sm' | 'md' | 'lg'; 11 | -------------------------------------------------------------------------------- /packages/ui/Button/utils.ts: -------------------------------------------------------------------------------- 1 | import { sprinkles } from './style.css'; 2 | import type { ButtonColorTheme, ButtonRadiusTheme, ButtonSizeTheme } from './types'; 3 | 4 | function createButtonVariant( 5 | colorTheme: ButtonColorTheme, 6 | radiusTheme: ButtonRadiusTheme, 7 | sizeTheme: ButtonSizeTheme, 8 | variant: 'fill' | 'outlined', 9 | ) { 10 | return sprinkles({ 11 | backgroundColor: { 12 | default: `${variant}-${colorTheme}-default`, 13 | hover: `${variant}-${colorTheme}-hover`, 14 | active: `${variant}-${colorTheme}-press`, 15 | disabled: `${variant}-disabled`, 16 | }, 17 | color: { 18 | default: `${variant}-${colorTheme}-default`, 19 | hover: `${variant}-${colorTheme}-hover`, 20 | active: `${variant}-${colorTheme}-press`, 21 | disabled: `${variant}-disabled`, 22 | }, 23 | boxShadow: { 24 | default: `${variant}-${colorTheme}-default`, 25 | hover: `${variant}-${colorTheme}-hover`, 26 | active: `${variant}-${colorTheme}-press`, 27 | disabled: `${variant}-disabled`, 28 | }, 29 | borderRadius: radiusTheme === 'lg' ? 'max' : sizeTheme, 30 | padding: sizeTheme, 31 | fontSize: sizeTheme, 32 | }); 33 | } 34 | 35 | export default createButtonVariant; 36 | -------------------------------------------------------------------------------- /packages/ui/Callout/constants.ts: -------------------------------------------------------------------------------- 1 | import type { CSSProperties } from "react"; 2 | import theme from "../theme.css"; 3 | import type { CalloutType } from "./types"; 4 | 5 | export const iconColors: Record = { 6 | danger: theme.colors.red500, 7 | information: theme.colors.blue500, 8 | warning: theme.colors.yellow500, 9 | }; 10 | 11 | export const calloutColors: Record = { 12 | danger: { 13 | backgroundColor: theme.colors.redAlpha100, 14 | borderColor: theme.colors.red600, 15 | }, 16 | information: { 17 | backgroundColor: theme.colors.blueAlpha100, 18 | borderColor: theme.colors.blueAlpha600, 19 | }, 20 | warning: { 21 | backgroundColor: "rgba(255, 194, 52, 0.1)", 22 | borderColor: theme.colors.yellow600, 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/ui/Callout/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from "./Callout"; 2 | -------------------------------------------------------------------------------- /packages/ui/Callout/types.ts: -------------------------------------------------------------------------------- 1 | export type CalloutType = "danger" | "information" | "warning"; 2 | -------------------------------------------------------------------------------- /packages/ui/Chip/constants.ts: -------------------------------------------------------------------------------- 1 | import theme from '../theme.css'; 2 | import type { ChipSizeTheme } from './types'; 3 | 4 | export const paddings: Record = { 5 | sm: '9px 14px', 6 | md: '10px 20px', 7 | }; 8 | 9 | export const fonts = { 10 | sm: theme.fontsObject.LABEL_3_14_SB, 11 | md: theme.fontsObject.LABEL_2_16_SB, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/ui/Chip/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Chip'; 2 | -------------------------------------------------------------------------------- /packages/ui/Chip/style.css.ts: -------------------------------------------------------------------------------- 1 | import { createSprinkles, defineProperties } from '@vanilla-extract/sprinkles'; 2 | import { style } from '@vanilla-extract/css'; 3 | import theme from '../theme.css'; 4 | import { fonts, paddings } from './constants'; 5 | 6 | const active = { 7 | boxShadow: `0 0 0 1px ${theme.colors.gray100} inset`, 8 | color: theme.colors.white, 9 | backgroundColor: theme.colors.gray700, 10 | }; 11 | 12 | export const root = style({ 13 | 'display': 'flex', 14 | 'justifyContent': 'center', 15 | 'alignItems': 'center', 16 | 'gap': 4, 17 | 'boxShadow': `0 0 0 1px ${theme.colors.gray700} inset`, 18 | 'borderRadius': 9999, 19 | 'color': theme.colors.gray300, 20 | 'backgroundColor': theme.colors.gray800, 21 | 'cursor': 'pointer', 22 | 'borderStyle': 'none', 23 | 24 | ':hover': { 25 | color: theme.colors.white, 26 | backgroundColor: theme.colors.gray700, 27 | }, 28 | 29 | ':active': active, 30 | 31 | ':disabled': { 32 | pointerEvents: 'none', 33 | }, 34 | }); 35 | 36 | export const activeStyle = style(active); 37 | 38 | const sprinkleProperties = defineProperties({ 39 | properties: { 40 | padding: paddings, 41 | fontStyle: fonts, 42 | }, 43 | }); 44 | 45 | export const sprinkles = createSprinkles(sprinkleProperties); 46 | -------------------------------------------------------------------------------- /packages/ui/Chip/types.ts: -------------------------------------------------------------------------------- 1 | export type ChipSizeTheme = 'sm' | 'md'; 2 | -------------------------------------------------------------------------------- /packages/ui/Control/CheckBox.tsx: -------------------------------------------------------------------------------- 1 | import type { InputHTMLAttributes } from 'react'; 2 | import { forwardRef } from 'react'; 3 | import { IconCheck } from '@sopt-makers/icons'; 4 | import theme from '../theme.css'; 5 | import { check, checkBox, checkBoxChecked, checkBoxInput, controlLabel, controlWrapper } from './style.css'; 6 | 7 | export interface CheckBoxProps extends Omit, 'size'> { 8 | label?: string; 9 | size?: 'sm' | 'lg'; 10 | checked?: boolean; 11 | color?: string; 12 | } 13 | 14 | const CheckBox = forwardRef( 15 | ({ checked = false, label, size = 'sm', color = theme.colors.gray10, ...props }, ref) => { 16 | return ( 17 | 28 | ); 29 | }, 30 | ); 31 | CheckBox.displayName = 'CheckBox'; 32 | 33 | export default CheckBox; 34 | -------------------------------------------------------------------------------- /packages/ui/Control/Radio.tsx: -------------------------------------------------------------------------------- 1 | import type { InputHTMLAttributes } from 'react'; 2 | import { forwardRef } from 'react'; 3 | import theme from '../theme.css'; 4 | import { controlLabel, controlWrapper, radio } from './style.css'; 5 | 6 | export interface RadioProps extends Omit, 'size'> { 7 | label?: string; 8 | size?: 'sm' | 'lg'; 9 | checked?: boolean; 10 | color?: string; 11 | } 12 | 13 | const Radio = forwardRef( 14 | ({ checked = false, label, size = 'sm', color = theme.colors.gray10, ...props }, ref) => { 15 | return ( 16 | 24 | ); 25 | }, 26 | ); 27 | Radio.displayName = 'Radio'; 28 | 29 | export default Radio; 30 | -------------------------------------------------------------------------------- /packages/ui/Control/Toggle.tsx: -------------------------------------------------------------------------------- 1 | import * as Switch from '@radix-ui/react-switch'; 2 | import { toggleState, toggleThumb, toggleWrapper } from './style.css'; 3 | 4 | export interface ToggleProps extends Switch.SwitchProps { 5 | size?: 'sm' | 'lg'; 6 | } 7 | 8 | export default function Toggle({ size = 'lg', checked = true, ...restProps }: ToggleProps) { 9 | return ( 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/Control/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Radio } from "./Radio"; 2 | export { default as Toggle } from "./Toggle"; 3 | export { default as CheckBox } from "./CheckBox"; 4 | -------------------------------------------------------------------------------- /packages/ui/Control/test/Checkbox.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen, fireEvent } from '@testing-library/react'; 2 | import type { CheckBoxProps } from 'Control/CheckBox'; 3 | import { CheckBox } from '../index'; 4 | 5 | describe('Checkbox의', () => { 6 | function renderCheckbox(props?: CheckBoxProps) { 7 | render(); 8 | } 9 | 10 | describe('정상동작은 다음과 같다.', () => { 11 | it('Checkbox 컴포넌트가 정상적으로 렌더링 된다.', () => { 12 | renderCheckbox(); 13 | 14 | expect(screen.getByRole('checkbox')).toBeInTheDocument(); 15 | }); 16 | 17 | it('checked = true 이면 checkbox가 활성화된 상태로 렌더링된다.', () => { 18 | renderCheckbox({ checked: true }); 19 | 20 | expect(screen.getByRole('checkbox')).toBeChecked(); 21 | }); 22 | 23 | it('checked = false 이면 checkbox가 비활성화된 상태로 렌더링된다.', () => { 24 | renderCheckbox({ checked: false }); 25 | 26 | expect(screen.getByRole('checkbox')).not.toBeChecked(); 27 | }); 28 | }); 29 | 30 | describe('onClick 이벤트는 다음과 같다.', () => { 31 | it('Checkbox를 클릭했을 때 onClick 핸들러가 호출된다.', () => { 32 | const handleClick = vi.fn(); 33 | renderCheckbox({ onClick: handleClick }); 34 | 35 | const checkbox = screen.getByRole('checkbox'); 36 | fireEvent.click(checkbox); 37 | 38 | expect(handleClick).toHaveBeenCalled(); 39 | }); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /packages/ui/Control/test/Radio.test.tsx: -------------------------------------------------------------------------------- 1 | import type { RadioProps } from 'Control/Radio'; 2 | import { render, screen, fireEvent } from '@testing-library/react'; 3 | import { Radio } from '../index'; 4 | 5 | describe('Radio의', () => { 6 | function renderRadio(props?: RadioProps) { 7 | render(); 8 | } 9 | 10 | describe('기본 동작은 다음과 같다.', () => { 11 | it('Checkbox 컴포넌트가 정상적으로 렌더링 된다.', () => { 12 | renderRadio(); 13 | 14 | expect(screen.getByRole('radio')).toBeInTheDocument(); 15 | }); 16 | 17 | it('checked = true 이면 checkbox가 활성화된 상태로 렌더링된다.', () => { 18 | renderRadio({ checked: true }); 19 | 20 | expect(screen.getByRole('radio')).toBeChecked(); 21 | }); 22 | 23 | it('checked = false 이면 checkbox가 비활성화된 상태로 렌더링된다.', () => { 24 | renderRadio({ checked: false }); 25 | 26 | expect(screen.getByRole('radio')).not.toBeChecked(); 27 | }); 28 | }); 29 | 30 | describe('onClick 이벤트는 다음과 같다.', () => { 31 | it('Radio를 클릭했을 때 onClick 핸들러가 호출된다.', () => { 32 | const handleClick = vi.fn(); 33 | renderRadio({ onClick: handleClick }); 34 | 35 | const radio = screen.getByRole('radio'); 36 | fireEvent.click(radio); 37 | 38 | expect(handleClick).toHaveBeenCalled(); 39 | }); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /packages/ui/Dialog/Dialog.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as Dialogs from '@radix-ui/react-dialog'; 4 | import { DialogAnimation, DialogDescription, DialogFooter, DialogTitle } from './components'; 5 | import { dialogContainer, overlay } from './style.css'; 6 | import type { DialogProps } from './types'; 7 | 8 | export function DialogContainer ({ isOpen, onClose, children, ...restProps }: DialogProps) { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 |
{children}
16 |
17 |
18 |
19 |
20 |
21 | ); 22 | }; 23 | 24 | const Dialog = Object.assign(DialogContainer, { 25 | Title: DialogTitle, 26 | Description: DialogDescription, 27 | Footer: DialogFooter, 28 | Animation: DialogAnimation, 29 | }); 30 | 31 | export default Dialog; 32 | -------------------------------------------------------------------------------- /packages/ui/Dialog/components/index.tsx: -------------------------------------------------------------------------------- 1 | import type { ChildrenProp, DialogDescriptionProps, DialogFooterProp } from '../types'; 2 | import { animation, description, footer, gap, title } from './style.css'; 3 | 4 | export function DialogTitle({ children }: ChildrenProp) { 5 | return
{children}
; 6 | } 7 | 8 | export function DialogDescription({ children }: DialogDescriptionProps) { 9 | return
{children}
; 10 | } 11 | 12 | export function DialogFooter({ children, align }: DialogFooterProp) { 13 | return
{children}
; 14 | } 15 | 16 | export function DialogAnimation({ children }: ChildrenProp) { 17 | return
{children}
; 18 | } 19 | -------------------------------------------------------------------------------- /packages/ui/Dialog/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as Dialog } from './Dialog'; 2 | export { DialogContext, default as DialogProvider } from './DialogProvider'; 3 | export type { DialogOptionType } from './types'; 4 | export { default as useDialog } from './useDialog'; 5 | -------------------------------------------------------------------------------- /packages/ui/Dialog/types.ts: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react'; 2 | import type React from 'react'; 3 | import type { CheckBoxProps } from 'Control/CheckBox'; 4 | 5 | 6 | export interface ChildrenProp { 7 | children: ReactNode; 8 | } 9 | 10 | export interface DialogDescriptionProps extends ChildrenProp { 11 | isCheck?: boolean; 12 | } 13 | 14 | export interface DialogFooterProp extends ChildrenProp { 15 | align: 'center' | 'left' | 'right' | 'default'; 16 | } 17 | 18 | interface TypeOptionsProp { 19 | cancelButtonText?: string; 20 | approveButtonText?: string; 21 | buttonFunction?: () => void; 22 | } 23 | 24 | export interface DialogOptionType { 25 | title: ReactNode; 26 | description: ReactNode; 27 | checkBoxOptions?: CheckBoxProps; 28 | type?: 'default' | 'danger' | 'single'; 29 | typeOptions?: TypeOptionsProp; 30 | } 31 | 32 | export interface DialogValueProps extends DialogOptionType { 33 | isOpen: boolean; 34 | onClose: () => void; 35 | } 36 | 37 | export interface DialogProps { 38 | isOpen: boolean; 39 | onClose: () => void; 40 | children?: ReactNode; 41 | } 42 | 43 | export interface ProviderChildren { children: React.ReactNode } 44 | -------------------------------------------------------------------------------- /packages/ui/Dialog/useDialog.tsx: -------------------------------------------------------------------------------- 1 | import { useCallback, useContext } from 'react'; 2 | import { DialogContext } from './DialogProvider'; 3 | import type { DialogOptionType } from './types'; 4 | 5 | const useDialog = () => { 6 | const { openDialog, closeDialog } = useContext(DialogContext); 7 | 8 | const open = useCallback( 9 | (option: DialogOptionType) => { 10 | openDialog(option); 11 | }, 12 | [openDialog] 13 | ); 14 | 15 | return { 16 | open, 17 | close() { 18 | closeDialog(); 19 | }, 20 | }; 21 | }; 22 | 23 | export default useDialog; 24 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/FieldBox.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react'; 2 | import type { HTMLAttributes, ReactNode } from 'react'; 3 | import { TopAddon, BottomAddon, FieldBoxErrorMessage, FieldBoxLabel } from './components'; 4 | 5 | export interface FieldBoxProps extends HTMLAttributes { 6 | topAddon?: ReactNode; 7 | bottomAddon?: ReactNode; 8 | } 9 | 10 | const FieldBoxImpl = forwardRef((props, forwardedRef) => { 11 | const { topAddon, bottomAddon, children, ...restProps } = props; 12 | 13 | return ( 14 |
15 | {topAddon} 16 | {children} 17 | {bottomAddon} 18 |
19 | ); 20 | }); 21 | 22 | FieldBoxImpl.displayName = 'FieldBoxImpl'; 23 | 24 | export const FieldBox = Object.assign(FieldBoxImpl, { 25 | Label: FieldBoxLabel, 26 | TopAddon, 27 | BottomAddon, 28 | ErrorMessage: FieldBoxErrorMessage, 29 | }); 30 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/components/BottomAddon.tsx: -------------------------------------------------------------------------------- 1 | import type { HTMLAttributes, ReactNode } from 'react'; 2 | import { forwardRef } from 'react'; 3 | import { bottomAddonContainerStyle } from '../style.css'; 4 | 5 | export interface FieldBoxBottomAddonProps extends HTMLAttributes { 6 | leftAddon?: ReactNode; 7 | rightAddon?: ReactNode; 8 | } 9 | 10 | export const BottomAddon = forwardRef((props, forwardedRef) => { 11 | const { leftAddon, rightAddon } = props; 12 | 13 | return ( 14 |
15 | {leftAddon} 16 | {rightAddon} 17 |
18 | ); 19 | }); 20 | 21 | BottomAddon.displayName = 'BottomAddon'; 22 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/components/ErrorMessage.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, type HTMLAttributes } from 'react'; 2 | import AlertCircleIcon from 'Input/icons/AlertCircleIcon'; 3 | import { errorMessage } from '../style.css'; 4 | 5 | export interface FieldBoxErrorMessageProps extends HTMLAttributes { 6 | message: string; 7 | } 8 | 9 | export const FieldBoxErrorMessage = forwardRef((props, forwardedRef) => { 10 | const { message } = props; 11 | 12 | return ( 13 |
14 | 15 |

{message}

16 |
17 | ); 18 | }); 19 | 20 | FieldBoxErrorMessage.displayName = 'FieldBoxErrorMessage'; 21 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/components/Label.tsx: -------------------------------------------------------------------------------- 1 | import type { HTMLAttributes } from 'react'; 2 | import { forwardRef } from 'react'; 3 | import { requiredMarkStyle, TopAddonDescriptionStyle, TopAddonLabelStyle } from '../style.css'; 4 | 5 | export interface FieldBoxLabelProps extends HTMLAttributes { 6 | label?: string; 7 | description?: string; 8 | required?: boolean; 9 | } 10 | 11 | export const FieldBoxLabel = forwardRef((props, forwardedRef) => { 12 | const { required = false, label, description } = props; 13 | 14 | return ( 15 |
16 | 25 |
26 | ); 27 | }); 28 | 29 | FieldBoxLabel.displayName = 'FieldBoxLabel'; 30 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/components/TopAddon.tsx: -------------------------------------------------------------------------------- 1 | import type { HTMLAttributes, ReactNode } from 'react'; 2 | import { forwardRef } from 'react'; 3 | import { topAddonContainerStyle } from '../style.css'; 4 | 5 | export interface FieldBoxTopAddonProps extends HTMLAttributes { 6 | leftAddon?: ReactNode; 7 | rightAddon?: ReactNode; 8 | } 9 | 10 | export const TopAddon = forwardRef((props, forwardedRef) => { 11 | const { leftAddon, rightAddon } = props; 12 | 13 | return ( 14 |
15 | {leftAddon} 16 | {rightAddon} 17 |
18 | ); 19 | }); 20 | 21 | TopAddon.displayName = 'TopAddon'; 22 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Label'; 2 | export * from './TopAddon'; 3 | export * from './BottomAddon'; 4 | export * from './ErrorMessage'; 5 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/index.ts: -------------------------------------------------------------------------------- 1 | export * from './FieldBox'; 2 | export * from './components'; 3 | -------------------------------------------------------------------------------- /packages/ui/FieldBox/style.css.ts: -------------------------------------------------------------------------------- 1 | import { style } from '@vanilla-extract/css'; 2 | import theme from '../theme.css'; 3 | 4 | export const TopAddonLabelStyle = style({ 5 | ...theme.fontsObject.LABEL_3_14_SB, 6 | display: 'flex', 7 | gap: '8px', 8 | flexDirection: 'column', 9 | textAlign: 'left', 10 | color: theme.colors.white, 11 | }); 12 | 13 | export const TopAddonDescriptionStyle = style({ 14 | ...theme.fontsObject.LABEL_4_12_SB, 15 | color: theme.colors.gray300, 16 | }); 17 | 18 | export const requiredMarkStyle = style({ 19 | color: theme.colors.secondary, 20 | marginLeft: '4px', 21 | }); 22 | 23 | export const topAddonContainerStyle = style({ 24 | marginBottom: '8px', 25 | display: 'flex', 26 | justifyContent: 'space-between', 27 | alignItems: 'center', 28 | }); 29 | 30 | export const bottomAddonContainerStyle = style({ 31 | marginTop: '8px', 32 | display: 'flex', 33 | justifyContent: 'space-between', 34 | alignItems: 'center', 35 | }); 36 | 37 | export const errorMessage = style({ 38 | display: 'flex', 39 | alignItems: 'center', 40 | gap: '4px', 41 | color: theme.colors.error, 42 | ...theme.fontsObject.LABEL_4_12_SB, 43 | }); 44 | -------------------------------------------------------------------------------- /packages/ui/Input/icons/AlertCircleIcon.tsx: -------------------------------------------------------------------------------- 1 | function AlertCircleIcon() { 2 | return 9 | 16 | 17 | } 18 | 19 | export default AlertCircleIcon; -------------------------------------------------------------------------------- /packages/ui/Input/icons/SearchIcon.tsx: -------------------------------------------------------------------------------- 1 | interface SearchIconProps { 2 | disabled: boolean; 3 | } 4 | 5 | function SearchIcon({ disabled }: SearchIconProps) { 6 | return 13 | 20 | 21 | } 22 | 23 | export default SearchIcon; -------------------------------------------------------------------------------- /packages/ui/Input/icons/SendIcon.tsx: -------------------------------------------------------------------------------- 1 | interface SendIconProps { 2 | disabled: boolean; 3 | } 4 | 5 | function SendIcon({ disabled }: SendIconProps) { 6 | return 13 | 20 | 21 | } 22 | 23 | export default SendIcon; -------------------------------------------------------------------------------- /packages/ui/Input/icons/XCircleIcon.tsx: -------------------------------------------------------------------------------- 1 | function XCircleIcon() { 2 | return 9 | 16 | 17 | } 18 | 19 | export default XCircleIcon; -------------------------------------------------------------------------------- /packages/ui/Input/index.tsx: -------------------------------------------------------------------------------- 1 | // 현행 컴포넌트 2 | 3 | export { default as TextField } from './TextField'; 4 | export { default as TextArea } from './TextArea'; 5 | export { default as SearchField } from './SearchField'; 6 | export { default as SelectV2 } from './Select'; 7 | export { default as UserMention } from './UserMention'; 8 | 9 | // deprecated 컴포넌트 10 | export { default as Select } from './deprecated/Select'; 11 | -------------------------------------------------------------------------------- /packages/ui/Skeleton/constants.ts: -------------------------------------------------------------------------------- 1 | import type { SkeletonVariant } from './types'; 2 | 3 | const SkeletonBorderRadius: Record = { 4 | default: '12px', 5 | circular: '100%', 6 | rounded: '100%', 7 | }; 8 | 9 | export default SkeletonBorderRadius; 10 | -------------------------------------------------------------------------------- /packages/ui/Skeleton/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Skeleton'; 2 | -------------------------------------------------------------------------------- /packages/ui/Skeleton/style.css.ts: -------------------------------------------------------------------------------- 1 | import { colors } from '@sopt-makers/colors'; 2 | import { keyframes, style, globalStyle } from '@vanilla-extract/css'; 3 | import { createSprinkles, defineProperties } from '@vanilla-extract/sprinkles'; 4 | import SkeletonBorderRadius from './constants'; 5 | 6 | const pulseKeyframe = keyframes({ 7 | '0%': { 8 | opacity: 1, 9 | }, 10 | '50%': { 11 | opacity: 0.4, 12 | }, 13 | '100%': { 14 | opacity: 1, 15 | }, 16 | }); 17 | 18 | export const root = style({ 19 | display: 'block', 20 | backgroundColor: colors.gray700, 21 | animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`, 22 | }); 23 | 24 | export const hasChildren = style({ 25 | maxWidth: 'fit-content', 26 | height: 'auto', 27 | }); 28 | 29 | globalStyle(`${hasChildren} > *`, { 30 | visibility: 'hidden', 31 | }); 32 | 33 | const sprinkleProperties = defineProperties({ 34 | properties: { 35 | borderRadius: SkeletonBorderRadius, 36 | }, 37 | }); 38 | 39 | export const sprinkles = createSprinkles(sprinkleProperties); 40 | -------------------------------------------------------------------------------- /packages/ui/Skeleton/types.ts: -------------------------------------------------------------------------------- 1 | export type SkeletonVariant = 'default' | 'circular' | 'rounded'; 2 | -------------------------------------------------------------------------------- /packages/ui/Skeleton/utils.ts: -------------------------------------------------------------------------------- 1 | import { sprinkles } from './style.css'; 2 | import type { SkeletonVariant } from './types'; 3 | 4 | const createSkeletonStyle = (variant: SkeletonVariant) => { 5 | return sprinkles({ borderRadius: variant }); 6 | }; 7 | 8 | export default createSkeletonStyle; 9 | -------------------------------------------------------------------------------- /packages/ui/Tab/constants.ts: -------------------------------------------------------------------------------- 1 | import type { TabStyle } from "./Tab"; 2 | 3 | export const itemWidths: Record = { 4 | primary: "fit-content", 5 | secondary: "120px", 6 | }; 7 | 8 | export const flexGaps: Record = { 9 | primary: "16px", 10 | secondary: "0", 11 | }; 12 | -------------------------------------------------------------------------------- /packages/ui/Tab/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Tab'; -------------------------------------------------------------------------------- /packages/ui/Tab/test/Tab.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen, fireEvent } from '@testing-library/react'; 2 | import Tab from '../Tab'; 3 | 4 | describe('Tab 컴포넌트는', () => { 5 | const mockOnChange = vi.fn(); 6 | const tabItems = ['Tab1', 'Tab2', 'Tab3']; 7 | 8 | function renderTab() { 9 | render(); 10 | } 11 | 12 | it('정상적으로 렌더링이 됩니다.', () => { 13 | renderTab(); 14 | 15 | tabItems.forEach((item) => { 16 | expect(screen.getByText(item)).toBeInTheDocument(); 17 | }); 18 | }); 19 | 20 | it('탭을 클릭하면 onChange 핸들러가 호출됩니다.', () => { 21 | renderTab(); 22 | 23 | fireEvent.click(screen.getByText('Tab2')); 24 | 25 | expect(mockOnChange).toHaveBeenCalledWith('Tab2'); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /packages/ui/Tab/utils.ts: -------------------------------------------------------------------------------- 1 | import { tabItemSprinkles, tabSprinkles } from "./style.css"; 2 | import type { TabStyle } from "./Tab"; 3 | 4 | export const createTabVariant = (style: TabStyle) => 5 | tabSprinkles({ 6 | gap: style, 7 | }); 8 | 9 | export const createTabItemVariant = (style: TabStyle) => 10 | tabItemSprinkles({ 11 | width: style, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ui/Tag/Tag.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, type HTMLAttributes } from 'react'; 2 | import * as S from './style.css'; 3 | import createTagStyle from './utils'; 4 | 5 | export interface TagProps extends HTMLAttributes { 6 | children?: React.ReactNode; 7 | className?: string; 8 | size?: 'sm' | 'md' | 'lg'; 9 | shape?: 'rect' | 'pill'; 10 | variant?: 'default' | 'primary' | 'secondary'; 11 | type?: 'solid' | 'line'; 12 | } 13 | 14 | export const Tag = forwardRef((props, forwardedRef) => { 15 | const { children, className, size = 'sm', shape = 'rect', variant = 'default', type = 'solid', ...restProps } = props; 16 | const style = createTagStyle(type, variant, shape, size); 17 | 18 | return ( 19 |
20 | {children} 21 |
22 | ); 23 | }); 24 | 25 | Tag.displayName = 'Tag'; 26 | -------------------------------------------------------------------------------- /packages/ui/Tag/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './Tag'; 2 | -------------------------------------------------------------------------------- /packages/ui/Tag/style.css.ts: -------------------------------------------------------------------------------- 1 | import { createSprinkles, defineProperties } from "@vanilla-extract/sprinkles"; 2 | import { style } from "@vanilla-extract/css"; 3 | import { 4 | bgColors, 5 | borderRadiuses, 6 | borders, 7 | fonts, 8 | paddings, 9 | textColors, 10 | } from "./constants"; 11 | 12 | export const root = style({ 13 | display: "flex", 14 | justifyContent: "center", 15 | alignItems: "center", 16 | width: "fit-content", 17 | height: "fit-content", 18 | }); 19 | 20 | const sprinkleProperties = defineProperties({ 21 | properties: { 22 | backgroundColor: bgColors, 23 | boxShadow: borders, 24 | color: textColors, 25 | borderRadius: borderRadiuses, 26 | padding: paddings, 27 | fontStyle: fonts, 28 | }, 29 | }); 30 | 31 | export const sprinkles = createSprinkles(sprinkleProperties); 32 | -------------------------------------------------------------------------------- /packages/ui/Tag/types.ts: -------------------------------------------------------------------------------- 1 | export type TagSizeTheme = "sm" | "md" | "lg"; 2 | 3 | export type TagShapeTheme = "rect" | "pill"; 4 | 5 | export type TagVariantTheme = "default" | "primary" | "secondary"; 6 | 7 | export type TagTypeTheme = "solid" | "line"; 8 | 9 | export type TagBgColorTheme = `${TagVariantTheme}-${TagTypeTheme}`; 10 | -------------------------------------------------------------------------------- /packages/ui/Tag/utils.ts: -------------------------------------------------------------------------------- 1 | import type { TagShapeTheme, TagSizeTheme, TagTypeTheme, TagVariantTheme } from './types'; 2 | import { sprinkles } from './style.css'; 3 | 4 | function createTagStyle( 5 | typeTheme: TagTypeTheme, 6 | variantTheme: TagVariantTheme, 7 | shapeTheme: TagShapeTheme, 8 | sizeTheme: TagSizeTheme, 9 | ) { 10 | return sprinkles({ 11 | backgroundColor: `${variantTheme}-${typeTheme}`, 12 | boxShadow: `${variantTheme}-${typeTheme}`, 13 | color: variantTheme, 14 | borderRadius: shapeTheme, 15 | padding: sizeTheme, 16 | fontStyle: sizeTheme, 17 | }); 18 | } 19 | export default createTagStyle; 20 | -------------------------------------------------------------------------------- /packages/ui/Test/Test.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import Test from './Test'; 3 | 4 | it('테스트 컴포넌트가 정상적으로 렌더링됩니다.', () => { 5 | render(); 6 | 7 | expect(screen.getByText('테스트')).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/ui/Test/Test.tsx: -------------------------------------------------------------------------------- 1 | import * as styles from './style.css'; 2 | 3 | interface TestProps { 4 | children?: React.ReactNode; 5 | text: string; 6 | color?: 'black' | 'red' | 'blue'; 7 | size?: 'normal' | 'big' 8 | } 9 | 10 | function Test(props: TestProps) { 11 | const { children, text, color = 'black', size = 'normal' } = props; 12 | 13 | return ( 14 |
15 |

{text}

16 | {children} 17 |
18 | ); 19 | }; 20 | 21 | export default Test; -------------------------------------------------------------------------------- /packages/ui/Test/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Test'; -------------------------------------------------------------------------------- /packages/ui/Test/style.css.ts: -------------------------------------------------------------------------------- 1 | import { style, styleVariants } from '@vanilla-extract/css'; 2 | import theme from '../theme.css'; 3 | 4 | export const root = style({ 5 | color: theme.colors.black, 6 | }); 7 | 8 | export const textSize = styleVariants({ 9 | big: { fontSize: '24px' }, 10 | normal: { fontSize: '16px' } 11 | }) 12 | 13 | export const textColor = styleVariants({ 14 | black: { color: theme.colors.black }, 15 | red: { color: theme.colors.red500 }, 16 | blue: { color: theme.colors.blue500 } 17 | }) -------------------------------------------------------------------------------- /packages/ui/Toast/Toast.tsx: -------------------------------------------------------------------------------- 1 | import React, { forwardRef } from "react"; 2 | import * as Toast from "./parts"; 3 | import type { ToastOptionType } from "./types"; 4 | 5 | function ToastComponent(props: ToastOptionType, ref: React.Ref) { 6 | const { icon, content, action, style } = props; 7 | 8 | return ( 9 | 10 | 11 | {action ? : null} 12 | 13 | ); 14 | } 15 | 16 | export default forwardRef(ToastComponent); 17 | -------------------------------------------------------------------------------- /packages/ui/Toast/icons/alert.tsx: -------------------------------------------------------------------------------- 1 | function ToastIconAlert() { 2 | return ( 3 | 10 | 11 | 12 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ); 28 | } 29 | 30 | export default ToastIconAlert; 31 | -------------------------------------------------------------------------------- /packages/ui/Toast/icons/error.tsx: -------------------------------------------------------------------------------- 1 | function ToastIconError() { 2 | return ( 3 | 10 | 11 | 12 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ); 28 | } 29 | 30 | export default ToastIconError; 31 | -------------------------------------------------------------------------------- /packages/ui/Toast/icons/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToastIconSuccess } from "./success"; 2 | export { default as ToastIconAlert } from "./alert"; 3 | export { default as ToastIconError } from "./error"; -------------------------------------------------------------------------------- /packages/ui/Toast/icons/success.tsx: -------------------------------------------------------------------------------- 1 | function ToastIconSuccess() { 2 | return ( 3 | 10 | 11 | 18 | 19 | ); 20 | } 21 | 22 | export default ToastIconSuccess; 23 | -------------------------------------------------------------------------------- /packages/ui/Toast/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as ToastProvider } from "./ToastProvider"; 2 | export { default as useToast } from "./useToast"; 3 | export { default as Toast } from './Toast'; 4 | export type { ToastOptionType } from "./types"; 5 | -------------------------------------------------------------------------------- /packages/ui/Toast/types.ts: -------------------------------------------------------------------------------- 1 | export interface Children { children: React.ReactNode } 2 | 3 | export type StrictPropsWithChildren

= P & Children; 4 | 5 | export type DefaultIconType = "success" | "alert" | "error"; 6 | 7 | export type ActionType = { 8 | name: string; 9 | } & React.ButtonHTMLAttributes; 10 | 11 | export type Styles = "root" | "content" | "action"; 12 | 13 | export type StyleType = { 14 | [key in Styles]?: React.CSSProperties; 15 | }; 16 | 17 | export interface ToastOptionType { 18 | icon?: DefaultIconType | React.ReactElement; 19 | content: string; 20 | action?: ActionType; 21 | style?: StyleType, 22 | } 23 | -------------------------------------------------------------------------------- /packages/ui/Toast/useToast.tsx: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { ToastContext } from "./ToastProvider"; 3 | import type { ToastOptionType } from "./types"; 4 | 5 | const useToast = () => { 6 | const { openToast, closeToast } = useContext(ToastContext); 7 | 8 | return { 9 | open: (option: ToastOptionType) => { openToast(option); }, 10 | close: () => { closeToast(); } 11 | }; 12 | }; 13 | 14 | export default useToast; 15 | -------------------------------------------------------------------------------- /packages/ui/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cssVariables'; 2 | 3 | // component exports 4 | export { default as Button } from './Button'; 5 | export { CheckBox, Toggle, Radio } from './Control'; 6 | export { Dialog, DialogContext, DialogProvider, useDialog } from './Dialog'; 7 | export type { DialogOptionType } from './Dialog'; 8 | export { ToastProvider, useToast, Toast } from './Toast'; 9 | export type { ToastOptionType } from './Toast'; 10 | export { TextField, TextArea, SearchField, SelectV2, Select, UserMention } from './Input'; 11 | export { default as Chip } from './Chip'; 12 | export { default as Callout } from './Callout'; 13 | export { default as Tab } from './Tab'; 14 | export * from './Skeleton'; 15 | export * from './FieldBox'; 16 | export * from './Tag'; 17 | // test component 18 | export { default as Test } from './Test'; 19 | -------------------------------------------------------------------------------- /packages/ui/scripts/buildCssModules.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef -- require import 오류 */ 2 | const fs = require('node:fs'); 3 | const path = require('node:path'); 4 | const allVariables = require('../dist/cssVariables'); 5 | const outputDir = require('../tsconfig.json').compilerOptions.outDir; 6 | 7 | Object.keys(allVariables).forEach((key) => { 8 | const variableValues = Object.entries(allVariables).find(([name]) => name === key)[1]; 9 | 10 | fs.writeFileSync(path.join(outputDir, `${toFileName(key)}.css`), `${variableValues}`); 11 | }); 12 | 13 | function toCssCasing(str) { 14 | return str.replace(/(?:[a-z])(?:[A-Z])/g, (match) => `${match[0]}-${match[1]}`).toLowerCase(); 15 | } 16 | 17 | function toFileName(str) { 18 | return toCssCasing(str); 19 | } 20 | -------------------------------------------------------------------------------- /packages/ui/theme.css.ts: -------------------------------------------------------------------------------- 1 | import { createGlobalTheme } from "@vanilla-extract/css"; 2 | import { colors } from "@sopt-makers/colors"; 3 | import { fontsObject } from "@sopt-makers/fonts"; 4 | 5 | const theme = createGlobalTheme("body", { 6 | colors, 7 | fontsObject, 8 | }); 9 | 10 | export default theme; 11 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "types": ["vitest/globals"], 5 | "outDir": ".", 6 | "allowSyntheticDefaultImports": true, 7 | "declaration": true, 8 | "declarationDir": "./dist", 9 | "baseUrl": ".", 10 | "emitDeclarationOnly": true, 11 | "esModuleInterop": true, 12 | "noEmit": false, 13 | "noEmitOnError": true, 14 | "target": "esnext" 15 | }, 16 | "extends": "tsconfig/react-library.json", 17 | "include": ["**/*.ts", "**/*.tsx"], 18 | "exclude": ["dist", "build", "node_modules"] 19 | } 20 | -------------------------------------------------------------------------------- /packages/ui/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; 2 | import { defineConfig } from 'tsup'; 3 | 4 | export default defineConfig({ 5 | entry: ['index.ts', "cssVariables.ts"], 6 | format: ['cjs', 'esm'], // CommonJS와 ES Module 형식으로 출력 7 | outDir: 'dist', 8 | dts: true, 9 | sourcemap: true, 10 | esbuildPlugins: [vanillaExtractPlugin()], 11 | clean: true, 12 | external: ['react', 'react-dom', '@radix-ui/*'], // nodeExternals와 유사하게 외부 모듈을 제외 13 | onSuccess: 'echo Build completed!', 14 | 15 | esbuildOptions(options) { 16 | options.minify = true; 17 | options.treeShaking = true; 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /packages/ui/turbo/generators/config.ts: -------------------------------------------------------------------------------- 1 | import type { PlopTypes } from "@turbo/gen"; 2 | 3 | // Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation 4 | 5 | export default function generator(plop: PlopTypes.NodePlopAPI): void { 6 | // A simple generator to add a new React component to the internal UI library 7 | plop.setGenerator("react-component", { 8 | description: "Adds a new react component", 9 | prompts: [ 10 | { 11 | type: "input", 12 | name: "name", 13 | message: "What is the name of the component?", 14 | }, 15 | ], 16 | actions: [ 17 | { 18 | type: "add", 19 | path: "{{pascalCase name}}/style.css.ts", 20 | templateFile: "templates/style.hbs", 21 | }, 22 | { 23 | type: "add", 24 | path: "{{pascalCase name}}/{{pascalCase name}}.tsx", 25 | templateFile: "templates/component.hbs", 26 | }, 27 | { 28 | type: "add", 29 | path: '{{pascalCase name}}/index.tsx', 30 | template: 'export { default } from "./{{pascalCase name}}";' 31 | }, 32 | { 33 | type: "append", 34 | path: "index.tsx", 35 | pattern: /(?\/\/ component exports)/g, 36 | template: 'export { default as {{pascalCase name}} } from "./{{pascalCase name}}";', 37 | }, 38 | ], 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /packages/ui/turbo/generators/templates/component.hbs: -------------------------------------------------------------------------------- 1 | import * as styles from './style'; 2 | 3 | interface Props { 4 | children?: React.ReactNode; 5 | } 6 | 7 | function {{ pascalCase name }}(props: Props) { 8 | const { children } = props; 9 | 10 | return ( 11 |

12 | {children} 13 |
14 | ); 15 | }; 16 | 17 | export default {{ pascalCase name }}; -------------------------------------------------------------------------------- /packages/ui/turbo/generators/templates/style.hbs: -------------------------------------------------------------------------------- 1 | import { style } from '@vanilla-extract/css'; 2 | import theme from '../theme.css'; 3 | 4 | export const root = style({ 5 | color: theme.colors.yellow500, 6 | }); 7 | -------------------------------------------------------------------------------- /packages/ui/vitest.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [vanillaExtractPlugin()], 6 | test: { 7 | globals: true, 8 | environment: 'jsdom', 9 | setupFiles: ['./vitest.setup.ts'], 10 | include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], 11 | exclude: ['**/node_modules/**', '**/dist/**'], 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /packages/ui/vitest.setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-dom'; 2 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'apps/*' 3 | - 'packages/*' 4 | -------------------------------------------------------------------------------- /scripts/vscode.sh: -------------------------------------------------------------------------------- 1 | if [ -s ${HOME}/.nvm/nvm.sh ]; then 2 | . ${HOME}/.nvm/nvm.sh 3 | fi 4 | 5 | pnpm install 6 | 7 | packages=("ui" "icons" "fonts" "colors") 8 | 9 | for pkg in ${packages[@]}; do 10 | if [ ! -d "packages/${pkg}/dist" ]; then 11 | pnpm build:${pkg} 12 | fi 13 | done 14 | 15 | pnpm test 16 | 17 | 18 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/base.json" 3 | } 4 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": ["**/.env.*local"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "outputs": [".next/**", "!.next/cache/**", "dist/**"] 8 | }, 9 | "lint": { 10 | "cache": false 11 | }, 12 | "dev": { 13 | "cache": false, 14 | "persistent": true 15 | }, 16 | "test": { 17 | "cache": false 18 | } 19 | } 20 | } 21 | --------------------------------------------------------------------------------