@plaidlabs/ui 0.0.6 → 0.0.8
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/LICENSE +21 -0
- package/README.md +111 -0
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Plaid Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# @plaidlabs/ui
|
|
2
|
+
|
|
3
|
+
- Plaid React 디자인 시스템 UI 라이브러리입니다.
|
|
4
|
+
접근성과 일관성을 중심으로 여러 서비스에서 공통 사용하기 위해 설계되었습니다.
|
|
5
|
+
- **TypeScript**, **vanilla-extract**, **react-aria-components** 기반으로 구성되어 있습니다.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 문서 (Storybook)
|
|
10
|
+
|
|
11
|
+
- [Storybook Docs](https://dsy.plaid.ai.kr/storybook)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 설치
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# npm
|
|
20
|
+
npm install @plaidlabs/ui
|
|
21
|
+
|
|
22
|
+
# pnpm
|
|
23
|
+
pnpm add @plaidlabs/ui
|
|
24
|
+
|
|
25
|
+
# yarn
|
|
26
|
+
yarn add @plaidlabs/ui
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 설정 (CSS) — 중요
|
|
32
|
+
|
|
33
|
+
이 라이브러리는 vanilla-extract로 생성된 CSS 번들(`style.css`)을 포함합니다.
|
|
34
|
+
|
|
35
|
+
- **기본 동작(권장)**: `@plaidlabs/ui`를 import 하면 패키지 엔트리에서 `style.css`가 함께 로드되도록 구성되어 있어, 보통 별도 설정 없이 스타일이 적용됩니다.
|
|
36
|
+
- **스타일이 적용되지 않는 경우**(특수한 번들러 설정 / 커스텀 빌드 파이프라인 / 강한 트리셰이킹 등)에는 앱 진입점에서 CSS를 1회 import 해주세요.
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
// main.tsx / App.tsx / layout.tsx
|
|
40
|
+
import '@plaidlabs/ui/style.css';
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
⚠️ `@plaidlabs/ui/dist/style.css` 와 같은 deep import는
|
|
44
|
+
패키지 `exports` 설정에 의해 동작하지 않을 수 있습니다.
|
|
45
|
+
반드시 `@plaidlabs/ui/style.css` 를 사용해주세요.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 사용법
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { Button, Tab, Modal } from '@plaidlabs/ui';
|
|
53
|
+
|
|
54
|
+
export function Example() {
|
|
55
|
+
return (
|
|
56
|
+
<div style={{ padding: 20 }}>
|
|
57
|
+
<Button variant="filled" color="blue">
|
|
58
|
+
버튼
|
|
59
|
+
</Button>
|
|
60
|
+
|
|
61
|
+
<Modal.Trigger>
|
|
62
|
+
<Button>모달 열기</Button>
|
|
63
|
+
<Modal>
|
|
64
|
+
<Modal.Title>제목</Modal.Title>
|
|
65
|
+
<Modal.Content>내용</Modal.Content>
|
|
66
|
+
<Modal.ButtonArea>
|
|
67
|
+
<Button>닫기</Button>
|
|
68
|
+
</Modal.ButtonArea>
|
|
69
|
+
</Modal>
|
|
70
|
+
</Modal.Trigger>
|
|
71
|
+
|
|
72
|
+
<Tab
|
|
73
|
+
aria-label="탭"
|
|
74
|
+
defaultSelectedKey="menu1"
|
|
75
|
+
items={[
|
|
76
|
+
{ id: 'menu1', label: '메뉴 1', content: '컨텐츠 1' },
|
|
77
|
+
{ id: 'menu2', label: '메뉴 2', content: '컨텐츠 2' },
|
|
78
|
+
]}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 요구사항
|
|
88
|
+
|
|
89
|
+
- **React**: \(^18.0.0 \|\| ^19.0.0\)
|
|
90
|
+
- **React DOM**: \(^18.0.0 \|\| ^19.0.0\)
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 제공 컴포넌트
|
|
95
|
+
|
|
96
|
+
패키지 엔트리에서 컴포넌트와 타입을 제공합니다.
|
|
97
|
+
|
|
98
|
+
- Basic (폴더 이름순)
|
|
99
|
+
`Avatar`, `BottomTab`, `Button`, `Checkbox`, `Chip`, `Close`,
|
|
100
|
+
`GuideText`, `Link`, `LnbItem`, `Loading`, `Notice`,
|
|
101
|
+
`PageHeader`, `Pagination`, `Stepper`, `Tab`,
|
|
102
|
+
`TextArea`, `TextField`, `Toggle`
|
|
103
|
+
|
|
104
|
+
- Complex (폴더 이름순)
|
|
105
|
+
`Dropdown`, `Modal`, `Popup`
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 라이선스
|
|
110
|
+
|
|
111
|
+
MIT
|