@xfilecom/front-core 0.2.27 → 0.2.29
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 +45 -15
- package/dist/base.css +756 -0
- package/dist/components/atoms/Accordion.d.ts +18 -0
- package/dist/components/atoms/Accordion.js +68 -0
- package/dist/components/atoms/Alert.d.ts +12 -0
- package/dist/components/atoms/Alert.js +24 -0
- package/dist/components/atoms/AspectRatio.d.ts +8 -0
- package/dist/components/atoms/AspectRatio.js +10 -0
- package/dist/components/atoms/Avatar.d.ts +22 -0
- package/dist/components/atoms/Avatar.js +32 -0
- package/dist/components/atoms/Breadcrumb.d.ts +15 -0
- package/dist/components/atoms/Breadcrumb.js +27 -0
- package/dist/components/atoms/Collapsible.d.ts +12 -0
- package/dist/components/atoms/Collapsible.js +42 -0
- package/dist/components/atoms/Label.d.ts +8 -0
- package/dist/components/atoms/Label.js +10 -0
- package/dist/components/atoms/Pagination.d.ts +13 -0
- package/dist/components/atoms/Pagination.js +25 -0
- package/dist/components/atoms/Paper.d.ts +16 -0
- package/dist/components/atoms/Paper.js +13 -0
- package/dist/components/atoms/Progress.d.ts +8 -0
- package/dist/components/atoms/Progress.js +9 -0
- package/dist/components/atoms/RadioGroup.d.ts +15 -0
- package/dist/components/atoms/RadioGroup.js +37 -0
- package/dist/components/atoms/ScrollArea.d.ts +8 -0
- package/dist/components/atoms/ScrollArea.js +15 -0
- package/dist/components/atoms/Separator.d.ts +10 -0
- package/dist/components/atoms/Separator.js +17 -0
- package/dist/components/atoms/Skeleton.d.ts +6 -0
- package/dist/components/atoms/Skeleton.js +15 -0
- package/dist/components/atoms/Slider.d.ts +4 -0
- package/dist/components/atoms/Slider.js +9 -0
- package/dist/components/atoms/Switch.d.ts +10 -0
- package/dist/components/atoms/Switch.js +12 -0
- package/dist/components/atoms/Table.d.ts +20 -0
- package/dist/components/atoms/Table.js +38 -0
- package/dist/components/atoms/Tabs.d.ts +20 -0
- package/dist/components/atoms/Tabs.js +54 -0
- package/dist/components/atoms/Toggle.d.ts +8 -0
- package/dist/components/atoms/Toggle.js +23 -0
- package/dist/components/atoms/Tooltip.d.ts +10 -0
- package/dist/components/atoms/Tooltip.js +12 -0
- package/dist/components/atoms/index.d.ts +23 -3
- package/dist/components/atoms/index.js +78 -7
- package/dist/generatedVersion.d.ts +1 -1
- package/dist/generatedVersion.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +52 -1
- package/dist/tokens.css +6 -0
- package/docs/COMPONENTS.md +137 -0
- package/docs/DESIGN_SYSTEM.md +32 -0
- package/docs/SHADCN.md +66 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,33 +1,63 @@
|
|
|
1
1
|
# @xfilecom/front-core
|
|
2
2
|
|
|
3
|
-
Design tokens (`tokens.css`), atomic layout
|
|
3
|
+
Design tokens (`tokens.css`), atomic layout (`base.css`), browser-only React components. **Nest / 서버 의존 없음.**
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 문서 (상세)
|
|
6
|
+
|
|
7
|
+
| 문서 | 내용 |
|
|
8
|
+
|------|------|
|
|
9
|
+
| [docs/DESIGN_SYSTEM.md](./docs/DESIGN_SYSTEM.md) | MUI Paper / react-native-paper 등과 **개념 매핑**, elevation·역할 색 |
|
|
10
|
+
| [docs/COMPONENTS.md](./docs/COMPONENTS.md) | 컴포넌트별 **소스 경로**, props 요약, **복붙 예제 코드** |
|
|
11
|
+
| [docs/SHADCN.md](./docs/SHADCN.md) | [shadcn/ui](https://ui.shadcn.com/) **대응표** — Radix 없이 쓰는 범위·앱 의존 권장 |
|
|
12
|
+
|
|
13
|
+
npm 패키지에 `docs/`가 포함되므로, 설치 후 `node_modules/@xfilecom/front-core/docs/`에서도 동일 파일을 볼 수 있다.
|
|
14
|
+
|
|
15
|
+
## CSS 로드 순서
|
|
6
16
|
|
|
7
17
|
1. `@xfilecom/front-core/tokens.css`
|
|
8
18
|
2. `@xfilecom/front-core/base.css`
|
|
9
|
-
3. (
|
|
19
|
+
3. (선택) 앱 `xfc-theme.css`에서 `--xfc-*` 덮어쓰기
|
|
20
|
+
4. (선택) 레이아웃 `app.css`
|
|
21
|
+
|
|
22
|
+
**다크:** `tokens.css` — `html.dark` / `data-theme="dark"`.
|
|
23
|
+
|
|
24
|
+
**배경:** `body` 기본은 옅은 액센트 그라데이션. 단색만 쓰려면 `body { background-image: none; }`.
|
|
25
|
+
|
|
26
|
+
## React import
|
|
10
27
|
|
|
11
|
-
|
|
28
|
+
```tsx
|
|
29
|
+
import {
|
|
30
|
+
Paper,
|
|
31
|
+
Card,
|
|
32
|
+
Button,
|
|
33
|
+
Text,
|
|
34
|
+
Dialog,
|
|
35
|
+
} from '@xfilecom/front-core';
|
|
36
|
+
```
|
|
12
37
|
|
|
13
|
-
|
|
38
|
+
서브패스: `@xfilecom/front-core/atoms`, `@xfilecom/front-core/overlays`.
|
|
14
39
|
|
|
15
|
-
|
|
40
|
+
## Paper (표면)
|
|
16
41
|
|
|
17
|
-
|
|
42
|
+
MUI `Paper` / RN `Surface`에 대응하는 얇은 래퍼:
|
|
18
43
|
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
```tsx
|
|
45
|
+
<Paper elevation={2} style={{ padding: 'var(--xfc-space-lg)' }}>
|
|
46
|
+
…
|
|
47
|
+
</Paper>
|
|
48
|
+
<Paper variant="outlined" style={{ padding: 16 }}>…</Paper>
|
|
49
|
+
```
|
|
21
50
|
|
|
22
|
-
##
|
|
51
|
+
## 기본 문자열·a11y
|
|
23
52
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
53
|
+
- 기본 UI 문구는 **영어** (토스트 Dismiss, Confirm OK/Cancel). 한국어는 props로 덮어쓴다.
|
|
54
|
+
- Dialog / BottomSheet: 스크롤 잠금, Escape, 포커스 트랩 (`useFocusTrap`).
|
|
55
|
+
- Toast: `error` → `role="alert"`, 그 외 `role="status"`.
|
|
26
56
|
|
|
27
57
|
## Version
|
|
28
58
|
|
|
29
|
-
`
|
|
59
|
+
`npm run build` 시 `package.json`의 `version`이 `src/generatedVersion.ts`에 반영된다.
|
|
30
60
|
|
|
31
|
-
##
|
|
61
|
+
## 폼
|
|
32
62
|
|
|
33
|
-
`Input`, `Textarea`, `Select`, `Checkbox`, `Field` —
|
|
63
|
+
`Input`, `Textarea`, `Select`, `Checkbox`, `Field` — 자세한 예는 [COMPONENTS.md](./docs/COMPONENTS.md).
|