@idbrnd/design-system 4.1.1 → 4.2.0
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 +2 -2
- package/dist/components/Feedback/Popup/Popup.d.ts +3 -0
- package/dist/components/Feedback/Popup/Popup.types.d.ts +52 -0
- package/dist/components/Feedback/shared/overlayStack.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3667 -3512
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @idbrnd/design-system
|
|
2
2
|
|
|
3
|
-
 <!-- x-release-please-version -->
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
@@ -874,7 +874,7 @@ const [open, setOpen] = useState(false);
|
|
|
874
874
|
| `navLeadingSlot` | `ReactNode` | — | 헤더 좌측 슬롯 |
|
|
875
875
|
| `navTrailingSlot` | `ReactNode` | — | 헤더 우측 슬롯 (닫기 버튼 왼쪽에 배치) |
|
|
876
876
|
| `mainAction` | `ModalAction` | — | 메인 액션 — `FillButton`(primary/medium)으로 렌더링 |
|
|
877
|
-
| `subAction` | `ModalAction` | — | 서브 액션 — `OutlineButton`(
|
|
877
|
+
| `subAction` | `ModalAction` | — | 서브 액션 — `OutlineButton`(secondary/medium)으로 렌더링, 메인 액션 좌측 |
|
|
878
878
|
| `actionSlot` | `ReactNode` | — | 지정 시 `mainAction`/`subAction` 대신 액션 영역을 통째로 교체 |
|
|
879
879
|
| `closeOnEsc` | `boolean` | `true` | ESC 키로 닫기 허용 |
|
|
880
880
|
| `closeOnDimClick` | `boolean` | `false` | 딤 클릭으로 닫기 허용 |
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PopupProps } from "./Popup.types";
|
|
2
|
+
declare function Popup({ open, onClose, platform, variant, heading, body, mainAction, subAction, actionSlot, closeOnEsc, closeOnDimClick, customStyle, className, }: PopupProps): import("react").ReactPortal | null;
|
|
3
|
+
export default Popup;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
export type PopupPlatform = "web" | "mobile";
|
|
3
|
+
export type PopupVariant = "basic" | "text";
|
|
4
|
+
export type PopupActionVariant = "primary" | "error";
|
|
5
|
+
export interface PopupAction {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* 메인 액션 색상 — 데이터 삭제 등 파괴적 행동 확인에는 `error`(빨강)를 사용.
|
|
10
|
+
* 서브 액션에는 적용되지 않음.
|
|
11
|
+
* @defaultValue 'primary'
|
|
12
|
+
*/
|
|
13
|
+
variant?: PopupActionVariant;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface PopupProps {
|
|
18
|
+
/** 팝업 표시 여부 (controlled) */
|
|
19
|
+
open: boolean;
|
|
20
|
+
/** ESC 키·딤 클릭으로 닫힐 때 호출 */
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* 플랫폼별 크기 프리셋
|
|
24
|
+
* - `web`: 버튼 medium, basic 액션 우측 정렬
|
|
25
|
+
* - `mobile`: 버튼 large, basic 액션 동일 너비 분할
|
|
26
|
+
* @defaultValue 'web'
|
|
27
|
+
*/
|
|
28
|
+
platform?: PopupPlatform;
|
|
29
|
+
/**
|
|
30
|
+
* 액션 버튼 형태
|
|
31
|
+
* - `basic`: FillButton(메인) + OutlineButton(서브)
|
|
32
|
+
* - `text`: TextButton, 우측 정렬
|
|
33
|
+
* @defaultValue 'basic'
|
|
34
|
+
*/
|
|
35
|
+
variant?: PopupVariant;
|
|
36
|
+
/** 타이틀 — 문자열 또는 임의의 ReactNode. 미지정 시 미노출 (body와 둘 중 하나는 필수) */
|
|
37
|
+
heading?: ReactNode;
|
|
38
|
+
/** 본문 — 문자열 또는 임의의 ReactNode. 미지정 시 미노출 (heading과 둘 중 하나는 필수) */
|
|
39
|
+
body?: ReactNode;
|
|
40
|
+
/** 메인 액션 — 우측 배치, 시각적 위계 최상위 */
|
|
41
|
+
mainAction?: PopupAction;
|
|
42
|
+
/** 서브 액션 — 메인 액션 좌측 배치 */
|
|
43
|
+
subAction?: PopupAction;
|
|
44
|
+
/** 지정 시 mainAction/subAction 대신 액션 영역을 통째로 교체 */
|
|
45
|
+
actionSlot?: ReactNode;
|
|
46
|
+
/** ESC 키로 닫기 허용 @defaultValue true */
|
|
47
|
+
closeOnEsc?: boolean;
|
|
48
|
+
/** 딤 클릭으로 닫기 허용 @defaultValue false */
|
|
49
|
+
closeOnDimClick?: boolean;
|
|
50
|
+
customStyle?: CSSProperties;
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export type { ToggleSwitchProps, ToggleSwitchSize, } from "./components/Control/
|
|
|
31
31
|
export { default as EmptyState } from "./components/Feedback/EmptyState/EmptyState";
|
|
32
32
|
export { default as Modal } from "./components/Feedback/Modal/Modal";
|
|
33
33
|
export type { ModalProps, ModalSize, ModalType, ModalAction, } from "./components/Feedback/Modal/Modal.types";
|
|
34
|
+
export { default as Popup } from "./components/Feedback/Popup/Popup";
|
|
35
|
+
export type { PopupProps, PopupPlatform, PopupVariant, PopupAction, PopupActionVariant, } from "./components/Feedback/Popup/Popup.types";
|
|
34
36
|
export { default as PushBadge } from "./components/Feedback/PushBadge/PushBadge";
|
|
35
37
|
export { dismissToast, showToast } from "./components/Feedback/Toast/Toast";
|
|
36
38
|
export { dismissSnackbar, showSnackbar, } from "./components/Feedback/Snackbar/Snackbar";
|