cashdoc-cms-design-system 1.0.0 → 1.0.2
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 +106 -0
- package/dist/components/Button/Button.d.ts +116 -0
- package/dist/components/Checkbox/Checkbox.d.ts +79 -0
- package/dist/components/DatePicker/DatePicker.d.ts +82 -0
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +93 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Dropdown/Combobox.d.ts +78 -0
- package/dist/components/Dropdown/Dropdown.d.ts +81 -0
- package/dist/components/Dropdown/Select.d.ts +78 -0
- package/dist/components/LoadingCircle/LoadingCircle.d.ts +70 -0
- package/dist/components/Modal/ConfirmModal.d.ts +24 -0
- package/dist/components/Modal/DeleteModal.d.ts +19 -0
- package/dist/components/Modal/ErrorModal.d.ts +20 -0
- package/dist/components/Modal/Modal.d.ts +171 -0
- package/dist/components/Modal/SuccessModal.d.ts +19 -0
- package/dist/components/Modal/WarningModal.d.ts +21 -0
- package/dist/components/Pagination/Pagination.d.ts +106 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +70 -0
- package/dist/components/Popover/PopoverMenuItem.d.ts +25 -0
- package/dist/components/RadioButton/RadioButton.d.ts +71 -0
- package/dist/components/SideNavigation/SideNavigation.d.ts +77 -0
- package/dist/components/Switch/Switch.d.ts +60 -0
- package/dist/components/TagInput/TagInput.d.ts +96 -0
- package/dist/components/Text/Text.d.ts +57 -0
- package/dist/components/TextInput/TextInput.d.ts +78 -0
- package/dist/components/TimePicker/TimePicker.d.ts +110 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/Toast/Toaster.d.ts +78 -0
- package/dist/components/icons/ChevronRightIcon.d.ts +11 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.es.js +3770 -3292
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +37 -22
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/DatePicker/DateRangePicker.d.ts +0 -14
|
@@ -2,5 +2,83 @@ import { Toaster as Sonner } from 'sonner';
|
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
|
|
4
4
|
type ToasterProps = ComponentProps<typeof Sonner>;
|
|
5
|
+
/**
|
|
6
|
+
* 사용자의 액션에 대한 가벼운 피드백을 화면 구석에 일시적으로 표시하는 알림 컴포넌트입니다.
|
|
7
|
+
*
|
|
8
|
+
* {@link Toaster}는 시스템의 상태 변화(성공, 실패, 경고 등)를 비침습적인 방식으로 알립니다.
|
|
9
|
+
* `sonner` 라이브러리를 기반으로 하며, CMS 디자인 가이드에 맞춘 스타일링이 적용되어 있습니다.
|
|
10
|
+
* 어플리케이션 최상위 수준(App.tsx 등)에 한 번만 배치하면 어디서든 `toast()` 함수를 통해 알림을 띄울 수 있습니다.
|
|
11
|
+
*
|
|
12
|
+
* ## When (언제 사용해야 하는가)
|
|
13
|
+
*
|
|
14
|
+
* **사용해야 하는 경우:**
|
|
15
|
+
* - **간단한 결과 알림**: "저장되었습니다", "복사 완료" 등 짧은 피드백
|
|
16
|
+
* - **비파괴적 액션 확인**: 사용자의 흐름을 방해하지 않고 알림만 주고 싶을 때
|
|
17
|
+
* - **백그라운드 작업 완료**: 서버 요청이 성공적으로 처리되었음을 알릴 때
|
|
18
|
+
*
|
|
19
|
+
* **사용하지 말아야 하는 경우:**
|
|
20
|
+
* - **중요한 의사 결정**: 사용자가 반드시 읽고 확인 버튼을 눌러야 하는 내용은 `Modal`을 사용하세요.
|
|
21
|
+
* - **긴 메시지**: 토스트는 수초 후 사라지므로, 읽는 데 시간이 걸리는 긴 텍스트는 부적절합니다.
|
|
22
|
+
* - **에러 세부 정보**: 복잡한 에러 로그나 해결 방법이 포함된 에러는 `Modal`이나 전용 에러 페이지에서 보여주세요.
|
|
23
|
+
*
|
|
24
|
+
* ## Layout behavior
|
|
25
|
+
*
|
|
26
|
+
* - **Floating**: 화면 최상단 레이어에 고정된 위치(기본값: 하단 중앙)에 나타납니다.
|
|
27
|
+
* - **Stacking**: 여러 개의 토스트가 동시에 발생하면 차례대로 쌓여서 표시됩니다.
|
|
28
|
+
* - **Auto-dismiss**: 일정 시간(기본 4초)이 지나면 자동으로 사라집니다.
|
|
29
|
+
*
|
|
30
|
+
* ## Usage guidelines
|
|
31
|
+
*
|
|
32
|
+
* ### ✅ Do (권장 사항)
|
|
33
|
+
*
|
|
34
|
+
* - **명확하고 간결하게**: 핵심만 담은 짧은 문장을 사용하세요. (예: "이미지가 업로드되었습니다")
|
|
35
|
+
* - **적절한 타입 사용**: `toast.success`, `toast.error` 등 상황에 맞는 메서드를 사용하여 색상과 아이콘으로 의미를 전달하세요.
|
|
36
|
+
*
|
|
37
|
+
* ### 🚫 Don't (주의/금지 사항)
|
|
38
|
+
*
|
|
39
|
+
* - **중요 정보 포함**: 토스트는 금방 사라지므로, 계좌번호나 비밀번호 같은 중요 정보를 여기에만 표시해서는 안 됩니다.
|
|
40
|
+
* - **과도한 사용**: 짧은 시간에 너무 많은 토스트가 발생하면 사용자에게 스트레스를 줄 수 있습니다.
|
|
41
|
+
*
|
|
42
|
+
* ## Example
|
|
43
|
+
*
|
|
44
|
+
* {@tool snippet}
|
|
45
|
+
* 최상위 컴포넌트 설정:
|
|
46
|
+
*
|
|
47
|
+
* ```tsx
|
|
48
|
+
* function App() {
|
|
49
|
+
* return (
|
|
50
|
+
* <>
|
|
51
|
+
* <Router />
|
|
52
|
+
* <Toaster />
|
|
53
|
+
* </>
|
|
54
|
+
* );
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
* {@end-tool}
|
|
58
|
+
*
|
|
59
|
+
* {@tool snippet}
|
|
60
|
+
* 다양한 토스트 호출 방법:
|
|
61
|
+
*
|
|
62
|
+
* ```tsx
|
|
63
|
+
* // 기본
|
|
64
|
+
* toast("환영합니다!");
|
|
65
|
+
*
|
|
66
|
+
* // 성공
|
|
67
|
+
* toast.success("저장에 성공했습니다.");
|
|
68
|
+
*
|
|
69
|
+
* // 에러
|
|
70
|
+
* toast.error("서버와의 연결이 원활하지 않습니다.");
|
|
71
|
+
*
|
|
72
|
+
* // 상세 설명 포함
|
|
73
|
+
* toast("알림", {
|
|
74
|
+
* description: "새로운 메시지가 도착했습니다."
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
* {@end-tool}
|
|
78
|
+
*
|
|
79
|
+
* See also:
|
|
80
|
+
*
|
|
81
|
+
* - {@link Modal}, 더 중요하거나 명시적 확인이 필요한 알림
|
|
82
|
+
*/
|
|
5
83
|
declare const Toaster: ({ position, ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
84
|
export { Toaster };
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
import { SVGProps } from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 오른쪽을 가리키는 쉐브론(V자형) 아이콘 컴포넌트입니다.
|
|
5
|
+
*
|
|
6
|
+
* 주로 내비게이션, 아코디언 확장, 또는 리스트 아이템의 상세 페이지 이동을 시각적으로 나타낼 때 사용됩니다.
|
|
7
|
+
*
|
|
8
|
+
* ## Usage
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <ChevronRightIcon className="w-4 h-4 text-gray-500" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
3
14
|
export declare function ChevronRightIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,9 +6,12 @@ export * from './Popover';
|
|
|
6
6
|
export * from './Text';
|
|
7
7
|
export * from './TextInput';
|
|
8
8
|
export * from './DatePicker';
|
|
9
|
+
export * from './DateRangePicker';
|
|
10
|
+
export * from './TimePicker';
|
|
9
11
|
export * from './Switch';
|
|
10
12
|
export * from './RadioButton';
|
|
11
13
|
export * from './SideNavigation';
|
|
14
|
+
export * from './Pagination';
|
|
12
15
|
export * from './Checkbox';
|
|
13
16
|
export * from './Modal';
|
|
14
17
|
export * from './Toast';
|