@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.
Files changed (53) hide show
  1. package/README.md +45 -15
  2. package/dist/base.css +756 -0
  3. package/dist/components/atoms/Accordion.d.ts +18 -0
  4. package/dist/components/atoms/Accordion.js +68 -0
  5. package/dist/components/atoms/Alert.d.ts +12 -0
  6. package/dist/components/atoms/Alert.js +24 -0
  7. package/dist/components/atoms/AspectRatio.d.ts +8 -0
  8. package/dist/components/atoms/AspectRatio.js +10 -0
  9. package/dist/components/atoms/Avatar.d.ts +22 -0
  10. package/dist/components/atoms/Avatar.js +32 -0
  11. package/dist/components/atoms/Breadcrumb.d.ts +15 -0
  12. package/dist/components/atoms/Breadcrumb.js +27 -0
  13. package/dist/components/atoms/Collapsible.d.ts +12 -0
  14. package/dist/components/atoms/Collapsible.js +42 -0
  15. package/dist/components/atoms/Label.d.ts +8 -0
  16. package/dist/components/atoms/Label.js +10 -0
  17. package/dist/components/atoms/Pagination.d.ts +13 -0
  18. package/dist/components/atoms/Pagination.js +25 -0
  19. package/dist/components/atoms/Paper.d.ts +16 -0
  20. package/dist/components/atoms/Paper.js +13 -0
  21. package/dist/components/atoms/Progress.d.ts +8 -0
  22. package/dist/components/atoms/Progress.js +9 -0
  23. package/dist/components/atoms/RadioGroup.d.ts +15 -0
  24. package/dist/components/atoms/RadioGroup.js +37 -0
  25. package/dist/components/atoms/ScrollArea.d.ts +8 -0
  26. package/dist/components/atoms/ScrollArea.js +15 -0
  27. package/dist/components/atoms/Separator.d.ts +10 -0
  28. package/dist/components/atoms/Separator.js +17 -0
  29. package/dist/components/atoms/Skeleton.d.ts +6 -0
  30. package/dist/components/atoms/Skeleton.js +15 -0
  31. package/dist/components/atoms/Slider.d.ts +4 -0
  32. package/dist/components/atoms/Slider.js +9 -0
  33. package/dist/components/atoms/Switch.d.ts +10 -0
  34. package/dist/components/atoms/Switch.js +12 -0
  35. package/dist/components/atoms/Table.d.ts +20 -0
  36. package/dist/components/atoms/Table.js +38 -0
  37. package/dist/components/atoms/Tabs.d.ts +20 -0
  38. package/dist/components/atoms/Tabs.js +54 -0
  39. package/dist/components/atoms/Toggle.d.ts +8 -0
  40. package/dist/components/atoms/Toggle.js +23 -0
  41. package/dist/components/atoms/Tooltip.d.ts +10 -0
  42. package/dist/components/atoms/Tooltip.js +12 -0
  43. package/dist/components/atoms/index.d.ts +23 -3
  44. package/dist/components/atoms/index.js +78 -7
  45. package/dist/generatedVersion.d.ts +1 -1
  46. package/dist/generatedVersion.js +1 -1
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.js +52 -1
  49. package/dist/tokens.css +6 -0
  50. package/docs/COMPONENTS.md +137 -0
  51. package/docs/DESIGN_SYSTEM.md +32 -0
  52. package/docs/SHADCN.md +66 -0
  53. 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/CSS (`base.css`), and browser-only React atoms + overlays. **Nest / 서버 의존 없음.**
3
+ Design tokens (`tokens.css`), atomic layout (`base.css`), browser-only React components. **Nest / 서버 의존 없음.**
4
4
 
5
- ## CSS import order
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. (optional) 앱/공유 테마 — 예: `xfc-theme.css`에서 `--xfc-*` 덮어쓰기
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
- **Dark mode:** `tokens.css` 끝에 `html.dark` / `data-theme="dark"` 프리셋이 있다. 루트에 클래스 또는 속성만 켜면 동일 변수명으로 전환된다.
28
+ ```tsx
29
+ import {
30
+ Paper,
31
+ Card,
32
+ Button,
33
+ Text,
34
+ Dialog,
35
+ } from '@xfilecom/front-core';
36
+ ```
12
37
 
13
- **토큰:** `--xfc-shadow-xs|sm|md|lg`, `--xfc-accent-soft` 등 계층·글로우용 변수가 있다. `tokenVars`에서 TS로 참조 가능.
38
+ 서브패스: `@xfilecom/front-core/atoms`, `@xfilecom/front-core/overlays`.
14
39
 
15
- **배경:** `base.css`의 `body`는 아주 옅은 액센트 그라데이션을 쓴다. 단색만 원하면 앱 CSS에서 `body { background-image: none; }` 로 끈다.
40
+ ## Paper (표면)
16
41
 
17
- ## React
42
+ MUI `Paper` / RN `Surface`에 대응하는 얇은 래퍼:
18
43
 
19
- - 루트 export 또는 `@xfilecom/front-core/atoms`, `@xfilecom/front-core/overlays`.
20
- - **기본 UI 문자열은 영어** (토스트 닫기 `Dismiss`, ConfirmDialog `OK` / `Cancel`). 한국어 등은 props로 넘긴다.
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
- ## Accessibility
51
+ ## 기본 문자열·a11y
23
52
 
24
- - **Dialog / BottomSheet / ConfirmDialog:** body 스크롤 잠금, Escape, 초기 포커스·복귀, **Tab 포커스 트랩** (`useFocusTrap`).
25
- - **Toast:** `error`는 `role="alert"`, `role="status"`. `ToastList`는 `ToastEntry.dismissible`로 행마다 닫기 버튼 on/off.
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
- `XFRAME_FRONT_CORE_VERSION`은 `npm run build` 시 `package.json`의 `version`으로 `src/generatedVersion.ts`가 갱신된다.
59
+ `npm run build` 시 `package.json`의 `version`이 `src/generatedVersion.ts`에 반영된다.
30
60
 
31
- ## Form atoms
61
+ ##
32
62
 
33
- `Input`, `Textarea`, `Select`, `Checkbox`, `Field` — `Field`는 단일 자식 컨트롤에 `aria-describedby` / `aria-invalid` / `id`를 병합한다. 라벨 `htmlFor`와 컨트롤 `id`를 맞출 것.
63
+ `Input`, `Textarea`, `Select`, `Checkbox`, `Field` — 자세한 예는 [COMPONENTS.md](./docs/COMPONENTS.md).