@farmzone/fz-react-ui 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,93 +1,120 @@
1
- # fz-react-ui
1
+ # @farmzone/fz-react-ui
2
2
 
3
+ Farmzone 사내 프로젝트에서 공통으로 쓰는 React 컴포넌트 라이브러리입니다. Tailwind CSS 기반 스타일링, Radix UI 프리미티브, tiptap 기반 리치 에디터를 포함합니다.
3
4
 
5
+ ## 요구 사항
4
6
 
5
- ## Getting started
7
+ - React `>=18` / React DOM `>=18`
8
+ - Node.js 20+
9
+ - Tailwind CSS v4 (스타일을 직접 통합하는 경우)
6
10
 
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
11
+ ## 설치
8
12
 
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
13
+ ```bash
14
+ npm install @farmzone/fz-react-ui
15
+ ```
10
16
 
11
- ## Add your files
17
+ ### 필수 peer dependency
12
18
 
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
19
+ 아래 패키지들은 `peerDependencies`로 선언되어 있어 **직접 설치**해야 합니다 (라이브러리 번들에 포함되지 않음):
15
20
 
21
+ ```bash
22
+ npm install react react-dom lucide-react react-router
16
23
  ```
17
- cd existing_repo
18
- git remote add origin http://git.farmzonesnc.com/si/fz-react-ui.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
24
 
23
- ## Integrate with your tools
25
+ - `lucide-react` — 아이콘. Sidebar, Pagination, Input, RichEditorToolbar 등 다수 컴포넌트가 사용합니다.
26
+ - `react-router` — `Sidebar`가 내부적으로 `useNavigate`/`useLocation`을 사용합니다.
27
+
28
+ ### 선택 peer dependency
29
+
30
+ 특정 컴포넌트를 쓸 때만 필요합니다. 해당 컴포넌트를 쓰지 않으면 설치하지 않아도 됩니다.
31
+
32
+ | 패키지 | 필요한 컴포넌트 |
33
+ |---|---|
34
+ | `react-hook-form`, `@hookform/resolvers`, `zod` | `SubmitForm` |
35
+ | `react-daum-postcode` | `SearchAddress` |
24
36
 
25
- - [ ] [Set up project integrations](http://git.farmzonesnc.com/si/fz-react-ui/-/settings/integrations)
37
+ ## 스타일 설정
26
38
 
27
- ## Collaborate with your team
39
+ 두 가지 방법 중 하나를 선택합니다.
28
40
 
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
41
+ **옵션 A — 컴파일된 CSS 그대로 사용** (Tailwind를 직접 쓰지 않는 프로젝트)
34
42
 
35
- ## Test and Deploy
43
+ ```ts
44
+ import "@farmzone/fz-react-ui/styles";
45
+ ```
36
46
 
37
- Use the built-in continuous integration in GitLab.
47
+ **옵션 B — 컨슈머 프로젝트의 Tailwind v4 빌드에 통합** (권장, 트리쉐이킹됨)
38
48
 
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
49
+ ```css
50
+ /* 프로젝트의 Tailwind 진입 CSS 파일에 추가 */
51
+ @import "@farmzone/fz-react-ui/tw.css";
52
+ ```
44
53
 
45
- ***
54
+ `tw.css`는 fz-react-ui의 컴파일된 JS를 `@source`로 스캔하고, 라이브러리 전용 색상 토큰(`--color-main-red` 등)을 `@theme`으로 노출합니다. 컨슈머 프로젝트도 Tailwind v4를 쓰고 있어야 합니다.
46
55
 
47
- # Editing this README
56
+ ## 사용 예시
48
57
 
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
58
+ ```tsx
59
+ import { Button, Input, Table } from "@farmzone/fz-react-ui";
60
+ import type { Column } from "@farmzone/fz-react-ui";
50
61
 
51
- ## Suggestions for a good README
62
+ function UserSearch() {
63
+ const [name, setName] = useState("");
52
64
 
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
65
+ return (
66
+ <div className="flex flex-col gap-3">
67
+ <div className="flex items-end gap-2">
68
+ <Input label="이름" value={name} onChange={(e) => setName(e.target.value)} />
69
+ <Button variant="search" size="sm">검색</Button>
70
+ </div>
71
+ <Table columns={columns as Array<Column<unknown>>} data={rows} rowKey="id" />
72
+ </div>
73
+ );
74
+ }
75
+ ```
54
76
 
55
- ## Name
56
- Choose a self-explaining name for your project.
77
+ 컴포넌트 조합 시 임의의 Tailwind 팔레트 클래스(`bg-blue-600` 등)보다 라이브러리 자체 semantic 토큰(`bg-main`, `Button`의 `variant`/`size` prop 등)을 우선 사용하세요 — 컴파일된 CSS에 없는 클래스는 조용히 무시됩니다.
57
78
 
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
79
+ ## 컴포넌트
60
80
 
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
81
+ **Form / Input**
82
+ `Input`, `Textarea`, `Checkbox`, `Switch`, `Slider`, `Radio` / `RadioGroup`, `Select` / `SelectGroup`, `DatePicker`, `SearchBar`, `SearchAddress`, `SubmitForm`, `DebouncedButton`
63
83
 
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
84
+ **Feedback / Overlay**
85
+ `Modal`, `ToastProvider` (+ `toast`), `Tooltip`, `Popover` / `SimplePopover`, `Empty`, `Loading` / `LoadingOverlay`, `Spinner`, `Skeleton`, `confirmModal`
66
86
 
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
87
+ **Layout / Navigation**
88
+ `Sidebar`, `Tab`, `MultiTab`, `BreadCrumb`, `Pagination`, `PageFilter`, `ScrollArea`
69
89
 
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
90
+ **Data Display**
91
+ `Table`, `Badge`, `Carousel`, `FilePreviewViewer`, `DetailModalFrame` / `DetailPageFrame` / `DetailContent`
72
92
 
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
93
+ **Upload**
94
+ `BaseUploader`, `ExcelUploader`, `FileUploader`
75
95
 
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
96
+ **Editor**
97
+ `RichEditor` (+ `RichEditorContent`, `RichEditorToolbar`, `useRichEditor`) — tiptap 기반 리치 텍스트 에디터. 멘션, 테이블, 이미지, 정렬 등을 지원합니다.
78
98
 
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
99
+ **Hooks**
100
+ `useModal`, `useCustomBlocker`, `useBlockModalConfirm`, `useScrollToTop`, `useFilePreviewViewer`, `useParams`, `useMultiTabStore`, `useBreadCrumbItems`
81
101
 
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
102
+ **Utils**
103
+ `cn`, `buttonVariants`, `textVariants`, `Z_INDEX`
83
104
 
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
105
+ 전체 export 목록과 정확한 타입은 `dist/index.d.ts`를 참고하세요.
85
106
 
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
107
+ ## 로컬 개발
108
+
109
+ ```bash
110
+ pnpm i --frozen-lockfile # 이 리포는 pnpm 사용
111
+ pnpm dev # tsup watch 빌드
112
+ pnpm storybook # Storybook (localhost:6006)
113
+ pnpm build # dist/ 전체 빌드 (JS + CSS)
114
+ pnpm lint
115
+ pnpm typecheck
116
+ ```
88
117
 
89
- ## License
90
- For open source projects, say how it is licensed.
118
+ ## 배포
91
119
 
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
120
+ `main` 브랜치에 머지되면 GitLab CI가 `npm publish`를 실행합니다 (`.gitlab-ci.yml`). 배포 전 `package.json`의 `version`을 수동으로 올려야 합니다 — 특히 `peerDependencies` 변경처럼 컨슈머 쪽 설치 요구사항이 바뀌는 경우 최소 minor 버전을 올리세요.