@bigtablet/design-system 3.23.1 → 3.24.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/dist/index.css CHANGED
@@ -1734,6 +1734,171 @@ body:has(.bottom_nav) {
1734
1734
  }
1735
1735
  }
1736
1736
 
1737
+ /* src/ui/navigation/stepper/style.scss */
1738
+ @keyframes skeleton_loading {
1739
+ 0% {
1740
+ background-position: 100% 0;
1741
+ }
1742
+ 100% {
1743
+ background-position: 0 0;
1744
+ }
1745
+ }
1746
+ .stepper {
1747
+ margin: 0;
1748
+ padding: 0;
1749
+ list-style: none;
1750
+ display: flex;
1751
+ font-family: "Pretendard", sans-serif;
1752
+ }
1753
+ .stepper_step {
1754
+ position: relative;
1755
+ display: flex;
1756
+ min-width: 0;
1757
+ }
1758
+ .stepper_content {
1759
+ display: flex;
1760
+ align-items: flex-start;
1761
+ gap: 8px;
1762
+ min-width: 0;
1763
+ padding: 0;
1764
+ border: none;
1765
+ background: none;
1766
+ color: inherit;
1767
+ font: inherit;
1768
+ text-align: left;
1769
+ }
1770
+ .stepper_button {
1771
+ cursor: pointer;
1772
+ border-radius: 6px;
1773
+ transition: background-color 0.1s ease-in-out;
1774
+ }
1775
+ .stepper_button:hover:not([aria-disabled=true]) {
1776
+ background-color: var(--bt-color-bg-solid-dim);
1777
+ }
1778
+ .stepper_button[aria-disabled=true] {
1779
+ cursor: default;
1780
+ }
1781
+ .stepper_button:focus-visible {
1782
+ outline: none;
1783
+ box-shadow: var(--bt-focus-ring);
1784
+ }
1785
+ .stepper_indicator {
1786
+ flex-shrink: 0;
1787
+ display: inline-flex;
1788
+ align-items: center;
1789
+ justify-content: center;
1790
+ box-sizing: border-box;
1791
+ width: 28px;
1792
+ height: 28px;
1793
+ border-radius: 9999px;
1794
+ background: var(--bt-color-bg-solid-dim);
1795
+ color: var(--bt-color-text-caption);
1796
+ font-size: 14px;
1797
+ font-weight: 500;
1798
+ line-height: 20px;
1799
+ letter-spacing: 0px;
1800
+ font-variant-numeric: tabular-nums;
1801
+ transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
1802
+ }
1803
+ .stepper_text {
1804
+ display: flex;
1805
+ flex-direction: column;
1806
+ gap: 2px;
1807
+ min-width: 0;
1808
+ padding-top: 4px;
1809
+ }
1810
+ .stepper_label {
1811
+ color: var(--bt-color-text-heading);
1812
+ font-size: 15px;
1813
+ font-weight: 500;
1814
+ line-height: 22.5px;
1815
+ letter-spacing: 0px;
1816
+ overflow-wrap: anywhere;
1817
+ }
1818
+ .stepper_description {
1819
+ color: var(--bt-color-text-caption);
1820
+ font-size: 14px;
1821
+ font-weight: 400;
1822
+ line-height: 20px;
1823
+ letter-spacing: 0px;
1824
+ overflow-wrap: anywhere;
1825
+ }
1826
+ .stepper_sr_only {
1827
+ position: absolute;
1828
+ width: 1px;
1829
+ height: 1px;
1830
+ padding: 0;
1831
+ margin: -1px;
1832
+ overflow: hidden;
1833
+ clip: rect(0 0 0 0);
1834
+ clip-path: inset(50%);
1835
+ white-space: nowrap;
1836
+ border: 0;
1837
+ }
1838
+ .stepper_step_done .stepper_indicator {
1839
+ background: var(--bt-color-status-success-container);
1840
+ color: var(--bt-color-status-success-on-container);
1841
+ }
1842
+ .stepper_step_active .stepper_indicator {
1843
+ background: var(--bt-color-accent-default);
1844
+ color: var(--bt-color-accent-on-surface);
1845
+ }
1846
+ .stepper_step_pending .stepper_indicator {
1847
+ background: transparent;
1848
+ border: 2px solid var(--bt-color-border-default);
1849
+ }
1850
+ .stepper_step_pending .stepper_label {
1851
+ color: var(--bt-color-text-caption);
1852
+ }
1853
+ .stepper_horizontal {
1854
+ flex-direction: row;
1855
+ align-items: flex-start;
1856
+ gap: 8px;
1857
+ }
1858
+ .stepper_horizontal .stepper_step {
1859
+ flex: 1;
1860
+ align-items: flex-start;
1861
+ }
1862
+ .stepper_horizontal .stepper_step:not(:last-child)::after {
1863
+ content: "";
1864
+ flex: 1;
1865
+ height: 1px;
1866
+ margin-top: 14px;
1867
+ margin-left: 8px;
1868
+ background: var(--bt-color-border-default);
1869
+ }
1870
+ .stepper_horizontal .stepper_step_done:not(:last-child)::after {
1871
+ background: var(--bt-color-accent-default);
1872
+ }
1873
+ .stepper_vertical {
1874
+ flex-direction: column;
1875
+ }
1876
+ .stepper_vertical .stepper_step {
1877
+ padding-bottom: 20px;
1878
+ }
1879
+ .stepper_vertical .stepper_step:last-child {
1880
+ padding-bottom: 0;
1881
+ }
1882
+ .stepper_vertical .stepper_step:not(:last-child) .stepper_indicator::before {
1883
+ content: "";
1884
+ position: absolute;
1885
+ top: 28px;
1886
+ bottom: -4px;
1887
+ left: 14px;
1888
+ width: 1px;
1889
+ background: var(--bt-color-border-default);
1890
+ transform: translateX(-50%);
1891
+ }
1892
+ .stepper_vertical .stepper_step_done:not(:last-child) .stepper_indicator::before {
1893
+ background: var(--bt-color-accent-default);
1894
+ }
1895
+ @media (prefers-reduced-motion: reduce) {
1896
+ .stepper_button,
1897
+ .stepper_indicator {
1898
+ transition: none;
1899
+ }
1900
+ }
1901
+
1737
1902
  /* src/ui/navigation/tabs/style.scss */
1738
1903
  @keyframes skeleton_loading {
1739
1904
  0% {
@@ -4620,6 +4785,13 @@ body:has(.bottom_nav) {
4620
4785
  height: 16px;
4621
4786
  }
4622
4787
  }
4788
+ .toast_live {
4789
+ flex: 1;
4790
+ min-width: 0;
4791
+ display: flex;
4792
+ align-items: flex-start;
4793
+ gap: 8px;
4794
+ }
4623
4795
  .toast_message {
4624
4796
  flex: 1;
4625
4797
  overflow-wrap: anywhere;
@@ -4656,6 +4828,28 @@ body:has(.bottom_nav) {
4656
4828
  margin-top: 0;
4657
4829
  }
4658
4830
  }
4831
+ .toast_action {
4832
+ flex-shrink: 0;
4833
+ margin-top: -1px;
4834
+ padding: 2px 8px;
4835
+ border: none;
4836
+ background: none;
4837
+ cursor: pointer;
4838
+ color: var(--bt-color-accent-default);
4839
+ font-size: 13px;
4840
+ font-weight: 600;
4841
+ line-height: 20px;
4842
+ border-radius: 6px;
4843
+ transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
4844
+ }
4845
+ .toast_action:hover {
4846
+ color: var(--bt-color-accent-strong);
4847
+ background-color: var(--bt-color-bg-solid-dim);
4848
+ }
4849
+ .toast_action:focus-visible {
4850
+ outline: none;
4851
+ box-shadow: var(--bt-focus-ring);
4852
+ }
4659
4853
  .toast_progress {
4660
4854
  position: absolute;
4661
4855
  bottom: 0;
package/dist/index.d.ts CHANGED
@@ -80,6 +80,13 @@ interface FocusTrapOptions {
80
80
  * 우회 없이 세 갈래가 그대로 표현된다.
81
81
  */
82
82
  preferWithin?: React$1.RefObject<HTMLElement | null>;
83
+ /**
84
+ * 초기 포커스를 **이 요소**에 둔다. `preferWithin` 보다 먼저 본다. 컨테이너 안에 붙어 있어야
85
+ * 하고, 아직 없거나 밖이면 기존 순서(`preferWithin` → skip 없는 첫 요소 → 첫 요소 → 컨테이너)
86
+ * 로 떨어진다. 기본 순서가 틀린 자리로 가는 화면 - 검색 모달의 검색 입력, 위험 확인 모달의
87
+ * "취소" - 에서 쓴다.
88
+ */
89
+ initialFocus?: React$1.RefObject<HTMLElement | null>;
83
90
  }
84
91
  declare function useFocusTrap(containerRef: React$1.RefObject<HTMLElement | null>, isActive: boolean, options?: FocusTrapOptions): void;
85
92
 
@@ -792,6 +799,61 @@ interface SidebarSectionProps extends React$1.HTMLAttributes<HTMLDivElement> {
792
799
  /** SidebarItem 그룹 라벨. collapsed에선 sr-only로 숨김. */
793
800
  declare const SidebarSection: ({ label, className, children, ...props }: SidebarSectionProps) => React$1.JSX.Element;
794
801
 
802
+ /** 단계의 진행 상태. `current` 와의 인덱스 비교로 파생된다 - 소비자가 따로 관리하지 않는다 */
803
+ type StepperStatus = "done" | "active" | "pending";
804
+ type StepperOrientation = "horizontal" | "vertical";
805
+ interface StepperStep {
806
+ /** 목록 키 */
807
+ id: string | number;
808
+ /** 단계 이름. 인라인 내용만 - 클릭 가능한 단계는 `<button>` 안에 그려진다 */
809
+ label: React$1.ReactNode;
810
+ /** 이름 아래 짧은 설명. 인라인 내용만 */
811
+ description?: React$1.ReactNode;
812
+ }
813
+ interface StepperProps extends Omit<React$1.HTMLAttributes<HTMLOListElement>, "onClick"> {
814
+ /** 순서대로 */
815
+ steps: StepperStep[];
816
+ /** 현재 단계 인덱스 (0-based). 앞은 `done`, 뒤는 `pending` 이 된다 */
817
+ current: number;
818
+ /** 배치 방향 (기본값: "horizontal") */
819
+ orientation?: StepperOrientation;
820
+ /**
821
+ * 주면 모든 단계가 버튼이 되되 **지나간 단계만 눌린다**. 현재·이후 단계는 `aria-disabled` 다 -
822
+ * 아직 오지 않은 단계로 건너뛰는 것은 그 사이 폼 검증을 우회하는 일이라 컴포넌트가 열지 않는다.
823
+ */
824
+ onStepClick?: (index: number, step: StepperStep) => void;
825
+ /** 루트 요소 ref (React 19 ref-as-prop) */
826
+ ref?: React$1.Ref<HTMLOListElement>;
827
+ }
828
+ /**
829
+ * 다단계 폼의 진행 표시. 가입·온보딩·결제처럼 "몇 단계 중 어디" 를 보여 준다.
830
+ *
831
+ * `<ol>` 로 렌더한다 - 순서가 있는 목록이고 스크린리더가 "3개 중 2번째" 를 읽어 준다. 현재 단계는
832
+ * `aria-current="step"`, 지나간 단계는 시각 숨김 텍스트 "완료" 를 함께 갖는다. 색·모양만으로
833
+ * 상태를 전달하지 않는다 (WCAG 1.4.1) - `done` 은 체크, `active`·`pending` 은 번호이고 `pending`
834
+ * 은 빈 원이다.
835
+ *
836
+ * `Timeline` 과의 경계: 시간 순 **기록**(주문 추적, 활동 로그)은 `Timeline`, 사용자가 **밟아
837
+ * 가는 절차**는 `Stepper`.
838
+ *
839
+ * @example
840
+ * ```tsx
841
+ * <Stepper
842
+ * steps={[
843
+ * { id: "account", label: "계정" },
844
+ * { id: "profile", label: "프로필", description: "이름과 소속" },
845
+ * { id: "done", label: "완료" },
846
+ * ]}
847
+ * current={1}
848
+ * onStepClick={setStep}
849
+ * />
850
+ * ```
851
+ */
852
+ declare const Stepper: {
853
+ ({ steps, current, orientation, onStepClick, className, ref, ...props }: StepperProps): React$1.JSX.Element;
854
+ displayName: string;
855
+ };
856
+
795
857
  type TabsVariant = "line" | "fills";
796
858
  type TabsSize = "sm" | "md";
797
859
  interface TabsProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
@@ -1539,8 +1601,15 @@ type TableProps<T extends object> = {
1539
1601
  onSortChange?: (sort: TableSort | undefined) => void;
1540
1602
  /** 전체 선택 체크박스 aria-label */
1541
1603
  selectAllAriaLabel?: string;
1542
- /** 개별 행 선택 체크박스 aria-label. 인자는 `rowIndexOffset` 이 더해진 **전체 순번**이다 (기본값: (i) => `${i+1}번째 행 선택`) */
1543
- selectRowAriaLabel?: (index: number) => string;
1604
+ /**
1605
+ * 개별 행 선택 체크박스 aria-label. 첫 인자는 `rowIndexOffset` 이 더해진 **전체 순번**, 둘째는
1606
+ * 그 행의 데이터 - 번호 대신 이름으로 읽히게 할 때 쓴다 (기본값: (i) => `${i+1}번째 행 선택`)
1607
+ * @example
1608
+ * ```tsx
1609
+ * selectRowAriaLabel={(_, row) => `${row.name} 선택`}
1610
+ * ```
1611
+ */
1612
+ selectRowAriaLabel?: (index: number, row: T) => string;
1544
1613
  /**
1545
1614
  * 이 표의 첫 행이 전체에서 몇 번째인지 (0-based, 기본 0). 서버 페이지네이션처럼 한 쪽만
1546
1615
  * 받아 그릴 때 준다.
@@ -1636,15 +1705,14 @@ interface DataViewProps<T extends object> extends Omit<React$1.HTMLAttributes<HT
1636
1705
  /** 전체 선택 체크박스의 라벨 (기본값: `Table` 의 기본 라벨) */
1637
1706
  selectAllAriaLabel?: string;
1638
1707
  /**
1639
- * 행 선택 체크박스의 라벨. 인자는 `pagination.pageSize` 를 반영한 **전체 순번**(0-based)이다.
1640
- * 기본값은 순번만 읽어 주므로, 행을 이름으로 구분하려면 바깥 `rows` 를 닫아 넘긴다.
1708
+ * 행 선택 체크박스의 라벨. 첫 인자는 `pagination.pageSize` 를 반영한 **전체 순번**(0-based),
1709
+ * 둘째는 그 행의 데이터. 기본값은 순번만 읽어 주므로 행을 이름으로 구분하려면 둘째 인자를 쓴다.
1641
1710
  * @example
1642
1711
  * ```tsx
1643
- * const offset = (page - 1) * SIZE;
1644
- * selectRowAriaLabel={(index) => `${rows[index - offset].name} 선택`}
1712
+ * selectRowAriaLabel={(_, row) => `${row.name} 선택`}
1645
1713
  * ```
1646
1714
  */
1647
- selectRowAriaLabel?: (index: number) => string;
1715
+ selectRowAriaLabel?: (index: number, row: T) => string;
1648
1716
  /** 선택 액션 줄의 안내 문구 (기본값: (n) => `${n}개 선택됨`) */
1649
1717
  selectionSummary?: (count: number) => string;
1650
1718
  /** 선택 해제 버튼 라벨 */
@@ -1951,6 +2019,25 @@ interface SpinnerProps {
1951
2019
  declare const Spinner: ({ size, ariaLabel: ariaLabelProp }: SpinnerProps) => React$1.JSX.Element;
1952
2020
 
1953
2021
  type ToastVariant = "success" | "error" | "warning" | "info" | "default";
2022
+ interface ToastAction {
2023
+ /** 버튼 라벨 - "실행 취소" 등 */
2024
+ label: string;
2025
+ /** 누르면 실행되고, 이어서 토스트가 닫힌다 */
2026
+ onClick: () => void;
2027
+ }
2028
+ interface ToastOptions {
2029
+ /** 자동 닫힘까지의 ms (기본값: 3000). `Infinity` 면 닫기 버튼·`dismiss` 로만 닫힌다 - 진행 토스트용 */
2030
+ duration?: number;
2031
+ /** 메시지 옆 버튼. 한 번 누를 수 있는 되돌리기 같은 동작에 쓴다 */
2032
+ action?: ToastAction;
2033
+ }
2034
+ /** `update` 로 바꿀 수 있는 필드. `action: null` 이면 버튼을 뗀다 */
2035
+ type ToastPatch = Partial<{
2036
+ message: string;
2037
+ variant: ToastVariant;
2038
+ duration: number;
2039
+ action: ToastAction | null;
2040
+ }>;
1954
2041
  interface ToastProviderProps {
1955
2042
  /** 앱 루트에서 감싸는 자식 요소 */
1956
2043
  children: React$1.ReactNode;
@@ -1972,19 +2059,23 @@ declare const ToastProvider: ({ children, maxCount, closeAriaLabel: closeAriaLab
1972
2059
  /**
1973
2060
  * 토스트 메시지를 표시하는 훅.
1974
2061
  * ToastProvider 내부에서만 사용할 수 있다.
1975
- * @returns 토스트 메시지 표시 함수 객체
2062
+ * @returns 토스트 표시·닫기·갱신 함수 객체. 표시 함수는 토스트 id 를 반환한다
1976
2063
  */
1977
2064
  declare const useToast: () => {
1978
- /** 성공 메시지를 표시한다 */
1979
- success: (message: string, duration?: number) => void;
2065
+ /** 성공 메시지를 표시한다. 두 번째 인자는 ms 또는 `{ duration, action }` */
2066
+ success: (message: string, options?: number | ToastOptions) => string;
1980
2067
  /** 오류 메시지를 표시한다 */
1981
- error: (message: string, duration?: number) => void;
2068
+ error: (message: string, options?: number | ToastOptions) => string;
1982
2069
  /** 경고 메시지를 표시한다 */
1983
- warning: (message: string, duration?: number) => void;
2070
+ warning: (message: string, options?: number | ToastOptions) => string;
1984
2071
  /** 정보 메시지를 표시한다 */
1985
- info: (message: string, duration?: number) => void;
2072
+ info: (message: string, options?: number | ToastOptions) => string;
1986
2073
  /** 기본 메시지를 표시한다 */
1987
- message: (message: string, duration?: number) => void;
2074
+ message: (message: string, options?: number | ToastOptions) => string;
2075
+ /** id 의 토스트를 닫는다 - 닫기 버튼과 같은 퇴출 모션 */
2076
+ dismiss: (id: string) => void;
2077
+ /** id 의 토스트 내용을 바꾼다 - "업로드 중…" 을 "완료" 로 */
2078
+ update: (id: string, patch: ToastPatch) => void;
1988
2079
  };
1989
2080
 
1990
2081
  interface TopLoadingProps {
@@ -3131,6 +3222,12 @@ interface DrawerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "titl
3131
3222
  * 둘 다 비우면 이름 없는 대화상자가 되고 axe `aria-dialog-name` 이 잡는다.
3132
3223
  */
3133
3224
  ariaLabel?: string;
3225
+ /**
3226
+ * 열릴 때 포커스를 둘 요소. 기본 순서(본문 첫 컨트롤 → 닫기 버튼 → 패널)가 틀린 자리로 가는
3227
+ * 화면에서 쓴다 - 검색 드로어의 검색 입력, 위험 확인 드로어의 "취소" 버튼. 패널 안에 붙어
3228
+ * 있는 요소여야 하고, 아니면 기본 순서로 떨어진다.
3229
+ */
3230
+ initialFocusRef?: React$1.RefObject<HTMLElement | null>;
3134
3231
  /**
3135
3232
  * 퇴출 애니메이션이 끝나 패널이 실제로 언마운트된 뒤 호출된다.
3136
3233
  * `open` 을 끈 직후가 아니라 이 시점에 상세 데이터를 비워야 본문만 먼저 사라지지 않는다.
@@ -3145,7 +3242,7 @@ interface DrawerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "titl
3145
3242
  * @returns 열림 상태일 때 렌더링된 드로어, 닫힘 상태면 null
3146
3243
  */
3147
3244
  declare const Drawer: {
3148
- ({ open, onClose, placement, size, title, footer, closeOnOverlay, dismissible, showCloseIcon, closeLabel: closeLabelProp, ariaLabel, onExited, children, className, ...props }: DrawerProps): React$1.ReactPortal | null;
3245
+ ({ open, onClose, placement, size, title, footer, closeOnOverlay, dismissible, showCloseIcon, closeLabel: closeLabelProp, ariaLabel, initialFocusRef, onExited, children, className, ...props }: DrawerProps): React$1.ReactPortal | null;
3149
3246
  displayName: string;
3150
3247
  };
3151
3248
 
@@ -3184,6 +3281,12 @@ interface ModalProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title
3184
3281
  * 둘 다 비우면 이름 없는 대화상자가 되고 axe `aria-dialog-name` 이 잡는다.
3185
3282
  */
3186
3283
  ariaLabel?: string;
3284
+ /**
3285
+ * 열릴 때 포커스를 둘 요소. 기본 순서(본문 첫 컨트롤 → 닫기 버튼 → 패널)가 틀린 자리로 가는
3286
+ * 화면에서 쓴다 - 검색 모달의 검색 입력, 위험 확인 모달의 "취소" 버튼. 패널 안에 붙어
3287
+ * 있는 요소여야 하고, 아니면 기본 순서로 떨어진다.
3288
+ */
3289
+ initialFocusRef?: React$1.RefObject<HTMLElement | null>;
3187
3290
  /**
3188
3291
  * 퇴출 애니메이션이 끝나 패널이 실제로 언마운트된 뒤 호출된다.
3189
3292
  * `open` 을 끈 직후가 아니라 이 시점에 상세 데이터를 비워야 본문만 먼저 사라지지 않는다.
@@ -3196,7 +3299,7 @@ interface ModalProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title
3196
3299
  * @param props 모달 속성
3197
3300
  * @returns 열림 상태일 때 렌더링된 모달, 닫힘 상태면 null
3198
3301
  */
3199
- declare const Modal: ({ open, onClose, closeOnOverlay, dismissible, width, title, description, footer, footerAlign, showCloseIcon, closeLabel: closeLabelProp, children, className, ariaLabel, onExited, ...props }: ModalProps) => React$1.ReactPortal | null;
3302
+ declare const Modal: ({ open, onClose, closeOnOverlay, dismissible, width, title, description, footer, footerAlign, showCloseIcon, closeLabel: closeLabelProp, children, className, ariaLabel, initialFocusRef, onExited, ...props }: ModalProps) => React$1.ReactPortal | null;
3200
3303
 
3201
3304
  /**
3202
3305
  * DS 가 스스로 렌더하는 모든 사용자 노출 문구. 컴포넌트 안에 흩어져 있던 기본값을 한곳에 모은다.
@@ -3269,6 +3372,8 @@ interface LocaleMessages {
3269
3372
  "pagination.next": string;
3270
3373
  "pagination.prev": string;
3271
3374
  "sidebar.toggle": string;
3375
+ "stepper.current": string;
3376
+ "stepper.done": string;
3272
3377
  "drawer.close": string;
3273
3378
  "modal.close": string;
3274
3379
  }
@@ -3607,4 +3712,4 @@ type StackProps<T extends React$1.ElementType = "div"> = PolymorphicProps<T, Sta
3607
3712
  */
3608
3713
  declare const Stack: <T extends React$1.ElementType = "div">({ direction, gap, align, justify, wrap, as, ref, className, children, style, ...props }: StackProps<T>) => React$1.JSX.Element;
3609
3714
 
3610
- export { Accordion, type AccordionItem, type AccordionProps, type AlertActionsAlign, type AlertOptions, AlertProvider, type AlertVariant, AppShell, type AppShellProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeAppearance, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BottomNav, BottomNavItem, type BottomNavItemProps, type BottomNavProps, BottomNavSpacer, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchor, type ButtonAsButton, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardFooterAlign, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipSize, type ChipTone, type ChipType, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, Container, type ContainerProps, type ContainerSize, type CropImageSize, type CropOffset, type CropRect, DataView, type DataViewPagination, type DataViewProps, type DataViewQuery, type DataViewSelectionAction, type DataViewToolbar, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionList, type DescriptionListItem, type DescriptionListLayout, type DescriptionListProps, Divider, type DividerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, type DropdownMultipleProps, type DropdownOption, type DropdownProps, type DropdownSingleProps, type DropdownSize, type DropdownVariant, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, type ErrorStateVariant, Field, type FieldControl, type FieldProps, FileInput, type FileInputProps, type FileInputVariant, type FocusTrapOptions, Form, type FormActionsProps, type FormProps, Grid, type GridCols, type GridGap, type GridProps, Hero, type HeroAction, type HeroAlign, type HeroHeight, type HeroOverlay, type HeroProps, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconProps, ImageCropper, type ImageCropperHandle, type ImageCropperProps, type ImeStrategy, LinearProgress, type LinearProgressProps, ListItem, type ListItemProps, type ListboxItem, type LocaleKey, type LocaleMessages, type LocaleName, LocaleProvider, type LocaleProviderProps, type LocaleText, MediaCard, type MediaCardImage, type MediaCardImagePosition, type MediaCardProps, type MediaCardShadow, Menu, type MenuItem, type MenuProps, Modal, type ModalFooterAlign, type ModalProps, NavBar, type NavBarLayout, type NavBarLocaleConfig, type NavBarLocaleOption, type NavBarProps, type NavBarVariant, NavLink, type NavLinkProps, OtpInput, type OtpInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type PolymorphicProps, type PolymorphicRef, Popover, type PopoverPlacement, type PopoverProps, Prose, type ProseProps, type ProseSize, Radio, RadioGroup, type RadioGroupContextValue, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, type ResolvedTheme, Section, type SectionBg, type SectionProps, type SectionSpacing, Sidebar, SidebarItem, type SidebarItemProps, type SidebarMode, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, type StackWrap, Stat, type StatDeltaTone, type StatProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableSortDirection, Tabs, type TabsProps, type TabsSize, type TabsVariant, TagInput, type TagInputProps, type TagInputSize, TextField, type TextFieldProps, type TextFieldSize, type TextFieldVariant, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type ThemeMode, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, TopLoading, type TopLoadingProps, type UseListboxPopupArgs, type UseListboxPopupResult, a11y, baseBorderWidth, baseColors, baseTypography, borderWidth, breakpoints, catalogs, cn, colors, elevation, en, iconSize, ko, motion, opacity, radius, skeleton, spacing, typography, useAlert, useFieldControl, useFocusTrap, useListboxPopup, useLocaleName, useLocaleText, useRadioGroupContext, useReducedMotion, useSpringHover, useSpringPresence, useTheme, useToast, zIndex };
3715
+ export { Accordion, type AccordionItem, type AccordionProps, type AlertActionsAlign, type AlertOptions, AlertProvider, type AlertVariant, AppShell, type AppShellProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeAppearance, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BottomNav, BottomNavItem, type BottomNavItemProps, type BottomNavProps, BottomNavSpacer, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchor, type ButtonAsButton, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardFooterAlign, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipSize, type ChipTone, type ChipType, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, Container, type ContainerProps, type ContainerSize, type CropImageSize, type CropOffset, type CropRect, DataView, type DataViewPagination, type DataViewProps, type DataViewQuery, type DataViewSelectionAction, type DataViewToolbar, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionList, type DescriptionListItem, type DescriptionListLayout, type DescriptionListProps, Divider, type DividerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, type DropdownMultipleProps, type DropdownOption, type DropdownProps, type DropdownSingleProps, type DropdownSize, type DropdownVariant, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, type ErrorStateVariant, Field, type FieldControl, type FieldProps, FileInput, type FileInputProps, type FileInputVariant, type FocusTrapOptions, Form, type FormActionsProps, type FormProps, Grid, type GridCols, type GridGap, type GridProps, Hero, type HeroAction, type HeroAlign, type HeroHeight, type HeroOverlay, type HeroProps, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconProps, ImageCropper, type ImageCropperHandle, type ImageCropperProps, type ImeStrategy, LinearProgress, type LinearProgressProps, ListItem, type ListItemProps, type ListboxItem, type LocaleKey, type LocaleMessages, type LocaleName, LocaleProvider, type LocaleProviderProps, type LocaleText, MediaCard, type MediaCardImage, type MediaCardImagePosition, type MediaCardProps, type MediaCardShadow, Menu, type MenuItem, type MenuProps, Modal, type ModalFooterAlign, type ModalProps, NavBar, type NavBarLayout, type NavBarLocaleConfig, type NavBarLocaleOption, type NavBarProps, type NavBarVariant, NavLink, type NavLinkProps, OtpInput, type OtpInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type PolymorphicProps, type PolymorphicRef, Popover, type PopoverPlacement, type PopoverProps, Prose, type ProseProps, type ProseSize, Radio, RadioGroup, type RadioGroupContextValue, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, type ResolvedTheme, Section, type SectionBg, type SectionProps, type SectionSpacing, Sidebar, SidebarItem, type SidebarItemProps, type SidebarMode, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, type StackWrap, Stat, type StatDeltaTone, type StatProps, Stepper, type StepperOrientation, type StepperProps, type StepperStatus, type StepperStep, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableSortDirection, Tabs, type TabsProps, type TabsSize, type TabsVariant, TagInput, type TagInputProps, type TagInputSize, TextField, type TextFieldProps, type TextFieldSize, type TextFieldVariant, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type ThemeMode, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, type ToastAction, type ToastOptions, type ToastPatch, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, TopLoading, type TopLoadingProps, type UseListboxPopupArgs, type UseListboxPopupResult, a11y, baseBorderWidth, baseColors, baseTypography, borderWidth, breakpoints, catalogs, cn, colors, elevation, en, iconSize, ko, motion, opacity, radius, skeleton, spacing, typography, useAlert, useFieldControl, useFocusTrap, useListboxPopup, useLocaleName, useLocaleText, useRadioGroupContext, useReducedMotion, useSpringHover, useSpringPresence, useTheme, useToast, zIndex };
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import './index.css';
3
3
  import * as React20 from 'react';
4
- import { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext, useId, Fragment, useImperativeHandle, useLayoutEffect } from 'react';
4
+ import { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext, useId, Fragment as Fragment$1, useImperativeHandle, useLayoutEffect } from 'react';
5
5
  import { useSpring, animated } from '@react-spring/web';
6
- import { ChevronDown, ChevronRight, Globe, ChevronLeft, EyeOff, Eye, ArrowUp, ArrowDown, ArrowUpDown, Search, XCircle, AlertTriangle, CheckCircle2, Info, Bell, Check, Image, X, TriangleAlert } from 'lucide-react';
7
- import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
6
+ import { ChevronDown, ChevronRight, Globe, ChevronLeft, Check, EyeOff, Eye, ArrowUp, ArrowDown, ArrowUpDown, Search, XCircle, AlertTriangle, CheckCircle2, Info, Bell, Image, X, TriangleAlert } from 'lucide-react';
7
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { createPortal } from 'react-dom';
9
9
 
10
10
  // src/utils/cn.ts
@@ -387,7 +387,9 @@ function useFocusTrap(containerRef, isActive, options) {
387
387
  const preferred = preferredRoot ? Array.from(preferredRoot.querySelectorAll(FOCUSABLE_SELECTORS)).find(
388
388
  (el) => !el.hasAttribute(SKIP_AUTOFOCUS_ATTR)
389
389
  ) ?? null : null;
390
- const initialTarget = preferred ?? Array.from(focusableElements).find((el) => !el.hasAttribute(SKIP_AUTOFOCUS_ATTR)) ?? focusableElements[0];
390
+ const explicit = options?.initialFocus?.current;
391
+ const explicitTarget = explicit && container.contains(explicit) && explicit.matches(FOCUSABLE_SELECTORS) ? explicit : null;
392
+ const initialTarget = explicitTarget ?? preferred ?? Array.from(focusableElements).find((el) => !el.hasAttribute(SKIP_AUTOFOCUS_ATTR)) ?? focusableElements[0];
391
393
  if (initialTarget) {
392
394
  initialTarget.focus();
393
395
  } else {
@@ -1039,6 +1041,8 @@ var ko = {
1039
1041
  "pagination.next": "\uB2E4\uC74C \uD398\uC774\uC9C0",
1040
1042
  "pagination.prev": "\uC774\uC804 \uD398\uC774\uC9C0",
1041
1043
  "sidebar.toggle": "\uC0AC\uC774\uB4DC\uBC14 \uD1A0\uAE00",
1044
+ "stepper.current": "\uD604\uC7AC \uB2E8\uACC4",
1045
+ "stepper.done": "\uC644\uB8CC",
1042
1046
  "drawer.close": "\uB2EB\uAE30",
1043
1047
  "modal.close": "\uB2EB\uAE30"
1044
1048
  };
@@ -1104,6 +1108,8 @@ var en = {
1104
1108
  "pagination.next": "Next page",
1105
1109
  "pagination.prev": "Previous page",
1106
1110
  "sidebar.toggle": "Toggle sidebar",
1111
+ "stepper.current": "Current step",
1112
+ "stepper.done": "Completed",
1107
1113
  "drawer.close": "Close",
1108
1114
  "modal.close": "Close"
1109
1115
  };
@@ -1196,7 +1202,7 @@ var BottomNavItem = (props) => {
1196
1202
  const ariaCurrent = active ? "page" : void 0;
1197
1203
  const anchorRest = rest;
1198
1204
  const Tag = as ?? (anchorRest.href != null ? "a" : "button");
1199
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
1205
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
1200
1206
  /* @__PURE__ */ jsxs("span", { className: "bottom_nav_item_icon", "aria-hidden": "true", children: [
1201
1207
  icon,
1202
1208
  badge && /* @__PURE__ */ jsx("span", { className: "bottom_nav_item_badge", children: badge })
@@ -1713,7 +1719,7 @@ var SidebarItem = (props) => {
1713
1719
  const ariaCurrent = active ? "page" : void 0;
1714
1720
  const anchorRest = rest;
1715
1721
  const Tag = as ?? (anchorRest.href != null ? "a" : "button");
1716
- const inner = /* @__PURE__ */ jsxs(Fragment$1, { children: [
1722
+ const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
1717
1723
  icon && /* @__PURE__ */ jsx("span", { className: "sidebar_item_icon", "aria-hidden": "true", children: icon }),
1718
1724
  /* @__PURE__ */ jsx("span", { className: "sidebar_item_label", children }),
1719
1725
  trailing && /* @__PURE__ */ jsx("span", { className: "sidebar_item_trailing", children: trailing })
@@ -1765,6 +1771,55 @@ var SidebarSection = ({ label, className, children, ...props }) => {
1765
1771
  children
1766
1772
  ] });
1767
1773
  };
1774
+ var Stepper = ({
1775
+ steps,
1776
+ current,
1777
+ orientation = "horizontal",
1778
+ onStepClick,
1779
+ className,
1780
+ ref,
1781
+ ...props
1782
+ }) => {
1783
+ const t = useLocaleText();
1784
+ return /* @__PURE__ */ jsx("ol", { ref, className: cn("stepper", `stepper_${orientation}`, className), ...props, children: steps.map((step, index) => {
1785
+ const status = index < current ? "done" : index === current ? "active" : "pending";
1786
+ const clickable = !!onStepClick && status === "done";
1787
+ const statusText = status === "done" ? t("stepper.done") : status === "active" ? t("stepper.current") : null;
1788
+ const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
1789
+ /* @__PURE__ */ jsx("span", { className: "stepper_indicator", "aria-hidden": "true", children: status === "done" ? /* @__PURE__ */ jsx(Check, { size: iconSize.sm }) : index + 1 }),
1790
+ /* @__PURE__ */ jsxs("span", { className: "stepper_text", children: [
1791
+ /* @__PURE__ */ jsxs("span", { className: "stepper_label", children: [
1792
+ step.label,
1793
+ statusText && /* @__PURE__ */ jsxs("span", { className: "stepper_sr_only", children: [
1794
+ " ",
1795
+ statusText
1796
+ ] })
1797
+ ] }),
1798
+ step.description !== void 0 && step.description !== null && /* @__PURE__ */ jsx("span", { className: "stepper_description", children: step.description })
1799
+ ] })
1800
+ ] });
1801
+ return /* @__PURE__ */ jsx(
1802
+ "li",
1803
+ {
1804
+ className: cn("stepper_step", `stepper_step_${status}`),
1805
+ "aria-current": status === "active" ? "step" : void 0,
1806
+ children: onStepClick ? /* @__PURE__ */ jsx(
1807
+ "button",
1808
+ {
1809
+ type: "button",
1810
+ className: "stepper_content stepper_button",
1811
+ "aria-disabled": clickable ? void 0 : true,
1812
+ tabIndex: clickable ? void 0 : -1,
1813
+ onClick: clickable ? () => onStepClick(index, step) : void 0,
1814
+ children: inner
1815
+ }
1816
+ ) : /* @__PURE__ */ jsx("span", { className: "stepper_content", children: inner })
1817
+ },
1818
+ step.id
1819
+ );
1820
+ }) });
1821
+ };
1822
+ Stepper.displayName = "Stepper";
1768
1823
  var TabsContext = React20.createContext(null);
1769
1824
  function useTabsContext() {
1770
1825
  const ctx = React20.useContext(TabsContext);
@@ -3156,7 +3211,7 @@ var Button = (props) => {
3156
3211
  disabled && "button_disabled",
3157
3212
  className
3158
3213
  );
3159
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
3214
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
3160
3215
  leadingIcon && /* @__PURE__ */ jsx("span", { className: "button_icon", "aria-hidden": "true", children: leadingIcon }),
3161
3216
  children && /* @__PURE__ */ jsx("span", { className: "button_label", children }),
3162
3217
  trailingIcon && /* @__PURE__ */ jsx("span", { className: "button_icon", "aria-hidden": "true", children: trailingIcon })
@@ -3386,7 +3441,7 @@ var Table = ({
3386
3441
  const rowClickHint = rowClickHintProp ?? t("table.rowClickHint");
3387
3442
  const emptyMessage = emptyMessageProp === void 0 ? t("table.empty") : emptyMessageProp;
3388
3443
  const selectAllAriaLabel = selectAllAriaLabelProp ?? t("table.selectAll");
3389
- const selectRowAriaLabel = selectRowAriaLabelProp ?? ((index) => t("table.selectRow", { index: index + 1 }));
3444
+ const selectRowAriaLabel = selectRowAriaLabelProp ?? ((index, _row) => t("table.selectRow", { index: index + 1 }));
3390
3445
  const toGlobalIndex = (rowIndex) => rowIndex + rowIndexOffset;
3391
3446
  const wrapperClassName = cn(
3392
3447
  "table_wrapper",
@@ -3556,7 +3611,7 @@ var Table = ({
3556
3611
  children: /* @__PURE__ */ jsx(
3557
3612
  Checkbox,
3558
3613
  {
3559
- "aria-label": selectRowAriaLabel(toGlobalIndex(rowIndex)),
3614
+ "aria-label": selectRowAriaLabel(toGlobalIndex(rowIndex), item),
3560
3615
  checked: isSelected,
3561
3616
  onChange: () => handleToggleRow(rowIdentity)
3562
3617
  }
@@ -4202,29 +4257,38 @@ var ToastItemComponent = ({ item, onRemove, closeAriaLabel }) => {
4202
4257
  React20.useEffect(() => {
4203
4258
  if (item.dismissing) close();
4204
4259
  }, [item.dismissing, close]);
4205
- return /* @__PURE__ */ jsxs(
4206
- animated.div,
4207
- {
4208
- ref: rootRef,
4209
- className: "toast_item",
4210
- style,
4211
- role: item.variant === "error" ? "alert" : "status",
4212
- children: [
4213
- /* @__PURE__ */ jsx("span", { className: `toast_icon toast_icon_${item.variant}`, "aria-hidden": "true", children: VARIANT_ICONS[item.variant] }),
4214
- /* @__PURE__ */ jsx("span", { className: "toast_message", children: item.message }),
4215
- /* @__PURE__ */ jsx("button", { type: "button", className: "toast_close", onClick: close, "aria-label": closeAriaLabel, children: /* @__PURE__ */ jsx(X, { size: iconSize.xs }) }),
4216
- /* @__PURE__ */ jsx(
4217
- "div",
4218
- {
4219
- className: `toast_progress toast_progress_${item.variant}`,
4220
- style: { "--toast-duration": `${item.duration}ms` },
4221
- onAnimationEnd: close,
4222
- "aria-hidden": "true"
4223
- }
4224
- )
4225
- ]
4226
- }
4227
- );
4260
+ const autoDismisses = Number.isFinite(item.duration);
4261
+ const liveRole = item.variant === "error" ? "alert" : "status";
4262
+ return /* @__PURE__ */ jsxs(animated.div, { ref: rootRef, className: "toast_item", style, children: [
4263
+ /* @__PURE__ */ jsxs("div", { className: "toast_live", role: liveRole, children: [
4264
+ /* @__PURE__ */ jsx("span", { className: `toast_icon toast_icon_${item.variant}`, "aria-hidden": "true", children: VARIANT_ICONS[item.variant] }),
4265
+ /* @__PURE__ */ jsx("span", { className: "toast_message", children: item.message })
4266
+ ] }, liveRole),
4267
+ item.action && /* @__PURE__ */ jsx(
4268
+ "button",
4269
+ {
4270
+ type: "button",
4271
+ className: "toast_action",
4272
+ onClick: () => {
4273
+ if (closingRef.current) return;
4274
+ item.action?.onClick();
4275
+ close();
4276
+ },
4277
+ children: item.action.label
4278
+ }
4279
+ ),
4280
+ /* @__PURE__ */ jsx("button", { type: "button", className: "toast_close", onClick: close, "aria-label": closeAriaLabel, children: /* @__PURE__ */ jsx(X, { size: iconSize.xs }) }),
4281
+ autoDismisses && /* @__PURE__ */ jsx(
4282
+ "div",
4283
+ {
4284
+ className: `toast_progress toast_progress_${item.variant}`,
4285
+ style: { "--toast-duration": `${item.duration}ms` },
4286
+ onAnimationEnd: close,
4287
+ "aria-hidden": "true"
4288
+ },
4289
+ item.duration
4290
+ )
4291
+ ] });
4228
4292
  };
4229
4293
  var toastSeq = 0;
4230
4294
  var ToastProvider = ({
@@ -4239,22 +4303,47 @@ var ToastProvider = ({
4239
4303
  const [toasts, setToasts] = React20.useState([]);
4240
4304
  const isMounted = useIsMounted();
4241
4305
  const addToast = React20.useCallback(
4242
- (message, variant, duration = 3e3) => {
4243
- if (maxCount <= 0) return;
4306
+ (message, variant, options = {}) => {
4307
+ const { duration = 3e3, action } = options;
4244
4308
  const id = `toast_${++toastSeq}`;
4309
+ if (maxCount <= 0) return id;
4245
4310
  setToasts((prev) => {
4246
- const next = [{ id, message, variant, duration }, ...prev];
4311
+ const next = [{ id, message, variant, duration, action }, ...prev];
4247
4312
  return next.map(
4248
4313
  (toast, index) => index >= maxCount && !toast.dismissing ? { ...toast, dismissing: true } : toast
4249
4314
  );
4250
4315
  });
4316
+ return id;
4251
4317
  },
4252
4318
  [maxCount]
4253
4319
  );
4320
+ const dismissToast = React20.useCallback((id) => {
4321
+ setToasts(
4322
+ (prev) => prev.map(
4323
+ (toast) => toast.id === id && !toast.dismissing ? { ...toast, dismissing: true } : toast
4324
+ )
4325
+ );
4326
+ }, []);
4327
+ const updateToast = React20.useCallback((id, patch) => {
4328
+ setToasts(
4329
+ (prev) => prev.map((toast) => {
4330
+ if (toast.id !== id || toast.dismissing) return toast;
4331
+ const { action, ...rest } = patch;
4332
+ return {
4333
+ ...toast,
4334
+ ...rest,
4335
+ action: action === null ? void 0 : action ?? toast.action
4336
+ };
4337
+ })
4338
+ );
4339
+ }, []);
4254
4340
  const removeToast = React20.useCallback((id) => {
4255
4341
  setToasts((prev) => prev.filter((t2) => t2.id !== id));
4256
4342
  }, []);
4257
- const contextValue = React20.useMemo(() => ({ addToast }), [addToast]);
4343
+ const contextValue = React20.useMemo(
4344
+ () => ({ addToast, dismissToast, updateToast }),
4345
+ [addToast, dismissToast, updateToast]
4346
+ );
4258
4347
  return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: contextValue, children: [
4259
4348
  children,
4260
4349
  isMounted && createPortal(
@@ -4282,6 +4371,7 @@ var ToastProvider = ({
4282
4371
  )
4283
4372
  ] });
4284
4373
  };
4374
+ var toOptions = (durationOrOptions) => typeof durationOrOptions === "number" ? { duration: durationOrOptions } : durationOrOptions;
4285
4375
  var useToast = () => {
4286
4376
  const ctx = useContext(ToastContext);
4287
4377
  if (!ctx) {
@@ -4290,16 +4380,20 @@ var useToast = () => {
4290
4380
  );
4291
4381
  }
4292
4382
  return {
4293
- /** 성공 메시지를 표시한다 */
4294
- success: (message, duration) => ctx.addToast(message, "success", duration),
4383
+ /** 성공 메시지를 표시한다. 두 번째 인자는 ms 또는 `{ duration, action }` */
4384
+ success: (message, options) => ctx.addToast(message, "success", toOptions(options)),
4295
4385
  /** 오류 메시지를 표시한다 */
4296
- error: (message, duration) => ctx.addToast(message, "error", duration),
4386
+ error: (message, options) => ctx.addToast(message, "error", toOptions(options)),
4297
4387
  /** 경고 메시지를 표시한다 */
4298
- warning: (message, duration) => ctx.addToast(message, "warning", duration),
4388
+ warning: (message, options) => ctx.addToast(message, "warning", toOptions(options)),
4299
4389
  /** 정보 메시지를 표시한다 */
4300
- info: (message, duration) => ctx.addToast(message, "info", duration),
4390
+ info: (message, options) => ctx.addToast(message, "info", toOptions(options)),
4301
4391
  /** 기본 메시지를 표시한다 */
4302
- message: (message, duration) => ctx.addToast(message, "default", duration)
4392
+ message: (message, options) => ctx.addToast(message, "default", toOptions(options)),
4393
+ /** id 의 토스트를 닫는다 - 닫기 버튼과 같은 퇴출 모션 */
4394
+ dismiss: ctx.dismissToast,
4395
+ /** id 의 토스트 내용을 바꾼다 - "업로드 중…" 을 "완료" 로 */
4396
+ update: ctx.updateToast
4303
4397
  };
4304
4398
  };
4305
4399
  var TopLoading = ({
@@ -4394,6 +4488,9 @@ var Combobox = ({
4394
4488
  });
4395
4489
  const { isOpen, setIsOpen, close, activeIndex, setActiveIndex } = popup;
4396
4490
  closeRef.current = close;
4491
+ useEffect(() => {
4492
+ if (!isOpen) setQuery("");
4493
+ }, [isOpen]);
4397
4494
  const onSearchRef = useRef(onSearch);
4398
4495
  useEffect(() => {
4399
4496
  onSearchRef.current = onSearch;
@@ -4794,7 +4891,7 @@ var Dropdown = (props) => {
4794
4891
  children: visibleOptions.length === 0 ? searchable && /* @__PURE__ */ jsx("div", { className: "dropdown_empty", children: emptyText }) : visibleOptions.map((opt, i) => {
4795
4892
  const selected = selectedValues.includes(opt.value);
4796
4893
  const active = i === activeIndex;
4797
- return /* @__PURE__ */ jsxs(Fragment, { children: [
4894
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
4798
4895
  /* @__PURE__ */ jsxs(
4799
4896
  "div",
4800
4897
  {
@@ -6355,6 +6452,7 @@ var Drawer = ({
6355
6452
  showCloseIcon = true,
6356
6453
  closeLabel: closeLabelProp,
6357
6454
  ariaLabel,
6455
+ initialFocusRef,
6358
6456
  onExited,
6359
6457
  children,
6360
6458
  className,
@@ -6374,7 +6472,10 @@ var Drawer = ({
6374
6472
  const [shouldRender, setShouldRender] = React20.useState(open);
6375
6473
  const reduced = useReducedMotion();
6376
6474
  const isMounted = useIsMounted();
6377
- useFocusTrap(panelRef, open && isMounted, { preferWithin: bodyRef });
6475
+ useFocusTrap(panelRef, open && isMounted, {
6476
+ preferWithin: bodyRef,
6477
+ initialFocus: initialFocusRef
6478
+ });
6378
6479
  useOverlayEscape(open && isMounted, () => {
6379
6480
  if (escapeDismissible) onClose?.();
6380
6481
  });
@@ -6471,6 +6572,7 @@ var Modal = ({
6471
6572
  children,
6472
6573
  className,
6473
6574
  ariaLabel,
6575
+ initialFocusRef,
6474
6576
  onExited,
6475
6577
  ...props
6476
6578
  }) => {
@@ -6487,7 +6589,10 @@ var Modal = ({
6487
6589
  const titleId = React20.useId();
6488
6590
  const [shouldRender, setShouldRender] = React20.useState(open);
6489
6591
  const isMounted = useIsMounted();
6490
- useFocusTrap(panelRef, open && isMounted, { preferWithin: bodyRef });
6592
+ useFocusTrap(panelRef, open && isMounted, {
6593
+ preferWithin: bodyRef,
6594
+ initialFocus: initialFocusRef
6595
+ });
6491
6596
  useOverlayEscape(open && isMounted, () => {
6492
6597
  if (escapeDismissible) onClose?.();
6493
6598
  });
@@ -6794,4 +6899,4 @@ var Stack = ({
6794
6899
  );
6795
6900
  };
6796
6901
 
6797
- export { Accordion, AlertProvider, AppShell, Avatar, Badge, BottomNav, BottomNavItem, BottomNavSpacer, Breadcrumb, Button, Card, Checkbox, Chip, Combobox, Container, DataView, DatePicker, DateRangePicker, DescriptionList, Divider, Drawer, Dropdown, EmptyState, ErrorState, Field, FileInput, Form, Grid, Hero, Icon, IconButton, ImageCropper, LinearProgress, ListItem, LocaleProvider, MediaCard, Menu, Modal, NavBar, NavLink, OtpInput, PageHeader, Pagination, Popover, Prose, Radio, RadioGroup, Section, Sidebar, SidebarItem, SidebarSection, Skeleton, Spinner, Stack, Stat, Tab, TabList, TabPanel, Table, Tabs, TagInput, TextField, Textarea, ThemeProvider, TimePicker, Timeline, ToastProvider, Toggle, Tooltip, TopLoading, a11y, baseBorderWidth, baseColors, baseTypography, borderWidth, breakpoints, catalogs, cn, colors, elevation, en, iconSize, ko, motion, opacity, radius, skeleton, spacing, typography, useAlert, useFieldControl, useFocusTrap, useListboxPopup, useLocaleName, useLocaleText, useRadioGroupContext, useReducedMotion, useSpringHover, useSpringPresence, useTheme, useToast, zIndex };
6902
+ export { Accordion, AlertProvider, AppShell, Avatar, Badge, BottomNav, BottomNavItem, BottomNavSpacer, Breadcrumb, Button, Card, Checkbox, Chip, Combobox, Container, DataView, DatePicker, DateRangePicker, DescriptionList, Divider, Drawer, Dropdown, EmptyState, ErrorState, Field, FileInput, Form, Grid, Hero, Icon, IconButton, ImageCropper, LinearProgress, ListItem, LocaleProvider, MediaCard, Menu, Modal, NavBar, NavLink, OtpInput, PageHeader, Pagination, Popover, Prose, Radio, RadioGroup, Section, Sidebar, SidebarItem, SidebarSection, Skeleton, Spinner, Stack, Stat, Stepper, Tab, TabList, TabPanel, Table, Tabs, TagInput, TextField, Textarea, ThemeProvider, TimePicker, Timeline, ToastProvider, Toggle, Tooltip, TopLoading, a11y, baseBorderWidth, baseColors, baseTypography, borderWidth, breakpoints, catalogs, cn, colors, elevation, en, iconSize, ko, motion, opacity, radius, skeleton, spacing, typography, useAlert, useFieldControl, useFocusTrap, useListboxPopup, useLocaleName, useLocaleText, useRadioGroupContext, useReducedMotion, useSpringHover, useSpringPresence, useTheme, useToast, zIndex };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigtablet/design-system",
3
- "version": "3.23.1",
3
+ "version": "3.24.0",
4
4
  "description": "Bigtablet Design System UI Components",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
@@ -130,8 +130,9 @@
130
130
  },
131
131
  {
132
132
  "path": "dist/vanilla/bigtablet.min.js",
133
+ "disablePlugins": ["@size-limit/esbuild"],
133
134
  "limit": "8 kB",
134
- "message": "Raised 7 kB -> 8 kB on 2026-09-10: baseline was 6.83 kB, leaving 0.17 kB (2.4%) under the old 7 kB limit. The current limit leaves 1.17 kB. Re-measure before raising again."
135
+ "message": "Raised 7 kB -> 8 kB on 2026-09-10: baseline was 6.83 kB, leaving 0.17 kB (2.4%) under the old 7 kB limit. Re-measured 2026-09-18 without esbuild: 6.54 kB raw brotli, leaving 1.46 kB. esbuild is disabled for this entry: the file is a pre-minified UMD script loaded via <script>, and bundling it as ESM (package.json type=module) only produced a commonjs-variable-in-esm warning - the raw file size is the number consumers actually download. Re-measure before raising again."
135
136
  },
136
137
  {
137
138
  "path": "dist/index.css",