@idbrnd/design-system 4.6.0 → 4.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @idbrnd/design-system
2
2
 
3
- ![Version](https://img.shields.io/static/v1?label=version&message=4.6.0&color=blue&style=flat-square) <!-- x-release-please-version -->
3
+ ![Version](https://img.shields.io/static/v1?label=version&message=4.7.0&color=blue&style=flat-square) <!-- x-release-please-version -->
4
4
  ![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat-square&logo=react&logoColor=white)
5
5
  ![Vite](https://img.shields.io/badge/Vite-7.3.0-646CFF?style=flat-square&logo=vite&logoColor=white)
6
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.9.3-3178C6?style=flat-square&logo=typescript&logoColor=white)
@@ -618,6 +618,7 @@ import { showToast, dismissToast } from "@idbrnd/design-system";
618
618
  showToast({ variant: "positive", message: "저장되었습니다." });
619
619
  showToast({ variant: "negative", message: "오류가 발생했습니다." });
620
620
  showToast({ variant: "basic", message: "알림 메시지입니다." });
621
+ showToast({ variant: "basic", message: "읽을 내용이 긴 메시지입니다.", duration: 5000 });
621
622
 
622
623
  dismissToast();
623
624
  ```
@@ -628,6 +629,7 @@ dismissToast();
628
629
  | `variant` | `"basic"` \| `"positive"` \| `"negative"` | 색상 변형 (기본값 `"basic"`) |
629
630
  | `icon` | `ReactNode` | 사용자 지정 아이콘. 미지정 시 variant 기본 아이콘 사용 |
630
631
  | `customStyle` | `CSSProperties` | 추가 인라인 스타일 |
632
+ | `duration` | `number` | 자동 닫힘까지의 시간(밀리초) (기본값 `3000`) |
631
633
 
632
634
  ### Snackbar
633
635
 
@@ -5,6 +5,8 @@ export interface ToastShowOptions {
5
5
  variant?: ToastVariant;
6
6
  customStyle?: CSSProperties;
7
7
  icon?: ReactNode;
8
+ /** 자동 닫힘까지의 시간(밀리초). 생략하면 기본 3초 */
9
+ duration?: number;
8
10
  }
9
- export declare function showToast({ message, variant, customStyle, icon }: ToastShowOptions): void;
11
+ export declare function showToast({ message, variant, customStyle, icon, duration }: ToastShowOptions): void;
10
12
  export declare function dismissToast(): void;
package/dist/index.js CHANGED
@@ -1715,15 +1715,21 @@ function K0() {
1715
1715
  N1 = null, g2(), j2();
1716
1716
  }, c8));
1717
1717
  }
1718
- function C8() {
1718
+ function C8(e) {
1719
1719
  O2(), j2(), f2 = window.setTimeout(() => {
1720
1720
  K0(), O2();
1721
- }, s8);
1721
+ }, e);
1722
1722
  }
1723
1723
  function d8() {
1724
1724
  return typeof window > "u" || typeof document > "u" ? !1 : (W9 || (c2 = document.createElement("div"), c2.setAttribute("data-idb-toast-root", "true"), document.body.appendChild(c2), W9 = Q0.createRoot(c2), g2()), !0);
1725
1725
  }
1726
- function J0({ message: e, variant: t = "basic", customStyle: o, icon: l }) {
1726
+ function J0({
1727
+ message: e,
1728
+ variant: t = "basic",
1729
+ customStyle: o,
1730
+ icon: l,
1731
+ duration: s = s8
1732
+ }) {
1727
1733
  e != null && d8() && (N1 = {
1728
1734
  message: e,
1729
1735
  variant: t,
@@ -1731,7 +1737,7 @@ function J0({ message: e, variant: t = "basic", customStyle: o, icon: l }) {
1731
1737
  icon: l,
1732
1738
  isExiting: !1,
1733
1739
  renderKey: a8++
1734
- }, g2(), C8());
1740
+ }, g2(), C8(s));
1735
1741
  }
1736
1742
  function RC() {
1737
1743
  K0();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idbrnd/design-system",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",