@plaidlabs/ui 0.0.4 → 0.0.7
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 +111 -0
- package/dist/components/basic/loading/Loading.css.d.ts +19 -7
- package/dist/components/basic/loading/Loading.d.ts +1 -1
- package/dist/index.js +1642 -1642
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
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
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
export declare const spinner: string;
|
|
2
2
|
export declare const spinnerSize: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
3
|
size: {
|
|
4
|
-
|
|
4
|
+
sm: {
|
|
5
5
|
width: "1rem";
|
|
6
6
|
height: "1rem";
|
|
7
|
-
borderWidth: "0.0625rem";
|
|
8
7
|
};
|
|
9
|
-
|
|
8
|
+
md: {
|
|
10
9
|
width: "1.5rem";
|
|
11
10
|
height: "1.5rem";
|
|
12
|
-
borderWidth: "0.125rem";
|
|
13
11
|
};
|
|
14
|
-
|
|
12
|
+
lg: {
|
|
15
13
|
width: "2rem";
|
|
16
14
|
height: "2rem";
|
|
17
|
-
borderWidth: "0.1875rem";
|
|
18
15
|
};
|
|
19
|
-
|
|
16
|
+
xl: {
|
|
20
17
|
width: "2.5rem";
|
|
21
18
|
height: "2.5rem";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export declare const circleBorderWidth: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
23
|
+
size: {
|
|
24
|
+
sm: {
|
|
25
|
+
borderWidth: "0.0625rem";
|
|
26
|
+
};
|
|
27
|
+
md: {
|
|
28
|
+
borderWidth: "0.125rem";
|
|
29
|
+
};
|
|
30
|
+
lg: {
|
|
31
|
+
borderWidth: "0.1875rem";
|
|
32
|
+
};
|
|
33
|
+
xl: {
|
|
22
34
|
borderWidth: "0.1875rem";
|
|
23
35
|
};
|
|
24
36
|
};
|