@bestow-ui/react 0.8.3 → 0.10.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.d.cts CHANGED
@@ -1,15 +1,20 @@
1
1
  import * as _bestow_ui_tokens from '@bestow-ui/tokens';
2
2
  import { space } from '@bestow-ui/tokens';
3
3
  import * as react from 'react';
4
- import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, ButtonHTMLAttributes, ElementType, InputHTMLAttributes, ReactElement, TextareaHTMLAttributes } from 'react';
4
+ import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, ElementType, ButtonHTMLAttributes, InputHTMLAttributes, AnchorHTMLAttributes, ReactElement, TdHTMLAttributes, ThHTMLAttributes, TextareaHTMLAttributes } from 'react';
5
5
  import * as RadixAccordion from '@radix-ui/react-accordion';
6
- import * as RadixMenu from '@radix-ui/react-dropdown-menu';
7
6
  import * as Dialog from '@radix-ui/react-dialog';
7
+ import * as RadixMenu from '@radix-ui/react-dropdown-menu';
8
8
  import * as RadixPopover from '@radix-ui/react-popover';
9
9
  import * as RadixTabs from '@radix-ui/react-tabs';
10
10
 
11
11
  declare const lightTokens: {
12
12
  color: _bestow_ui_tokens.SemanticColors;
13
+ shadow: {
14
+ readonly sm: "0 1px 2px rgba(0, 0, 0, 0.06)";
15
+ readonly md: "0 4px 12px rgba(0, 0, 0, 0.08)";
16
+ readonly lg: "0 12px 32px rgba(0, 0, 0, 0.12)";
17
+ };
13
18
  space: {
14
19
  readonly 0: "0";
15
20
  readonly 1: "4px";
@@ -58,11 +63,6 @@ declare const lightTokens: {
58
63
  readonly relaxed: "1.75";
59
64
  };
60
65
  };
61
- shadow: {
62
- readonly sm: "0 1px 2px rgba(0, 0, 0, 0.06)";
63
- readonly md: "0 4px 12px rgba(0, 0, 0, 0.08)";
64
- readonly lg: "0 12px 32px rgba(0, 0, 0, 0.12)";
65
- };
66
66
  duration: {
67
67
  readonly fast: "120ms";
68
68
  readonly normal: "200ms";
@@ -137,6 +137,19 @@ declare const vars: {
137
137
  subtleHover: `var(--${string})`;
138
138
  text: `var(--${string})`;
139
139
  };
140
+ warning: {
141
+ solid: `var(--${string})`;
142
+ solidHover: `var(--${string})`;
143
+ contrast: `var(--${string})`;
144
+ subtle: `var(--${string})`;
145
+ subtleHover: `var(--${string})`;
146
+ text: `var(--${string})`;
147
+ };
148
+ };
149
+ shadow: {
150
+ readonly sm: `var(--${string})`;
151
+ readonly md: `var(--${string})`;
152
+ readonly lg: `var(--${string})`;
140
153
  };
141
154
  space: {
142
155
  readonly 0: `var(--${string})`;
@@ -186,11 +199,6 @@ declare const vars: {
186
199
  readonly relaxed: `var(--${string})`;
187
200
  };
188
201
  };
189
- shadow: {
190
- readonly sm: `var(--${string})`;
191
- readonly md: `var(--${string})`;
192
- readonly lg: `var(--${string})`;
193
- };
194
202
  duration: {
195
203
  readonly fast: `var(--${string})`;
196
204
  readonly normal: `var(--${string})`;
@@ -239,7 +247,7 @@ declare function createTheme(...inputs: ThemeInput[]): BestowTheme;
239
247
 
240
248
  /** WCAG 대비율 (1 ~ 21) */
241
249
  declare function contrastRatio(a: string, b: string): number;
242
- type IntentName = 'primary' | 'neutral' | 'danger' | 'success';
250
+ type IntentName = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
243
251
  /**
244
252
  * 대표색 하나로 intent(primary 등)의 라이트·다크 색 세트를 만든다. 결과는 createTheme 에 넘긴다.
245
253
  * - solid 는 넘긴 색을 그대로 쓴다 (다크모드에서 너무 어두우면 조금 밝힌다).
@@ -295,6 +303,30 @@ interface AccordionItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixA
295
303
  }
296
304
  declare const AccordionItem: react.ForwardRefExoticComponent<AccordionItemProps & react.RefAttributes<HTMLDivElement>>;
297
305
 
306
+ type AlertColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
307
+ interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'title'> {
308
+ /** 시각적 스타일 */
309
+ variant?: 'soft' | 'outline' | 'solid';
310
+ /** 의미 색상. primary 는 일반 안내(info) 로 쓴다 */
311
+ color?: AlertColor;
312
+ /** 굵게 표시되는 제목 */
313
+ title?: ReactNode;
314
+ /** 앞에 표시할 아이콘. 생략하면 color 에 맞는 기본 아이콘, false 면 표시하지 않는다 (장식용 — 의미는 텍스트로 전달) */
315
+ icon?: ReactNode | false;
316
+ /** 오른쪽에 둘 버튼 등 */
317
+ action?: ReactNode;
318
+ /** 넘기면 닫기(X) 버튼을 표시하고, 누르면 호출한다. 실제로 숨기는 것은 사용하는 쪽이 한다 */
319
+ onClose?: () => void;
320
+ /** 닫기 버튼의 접근 가능한 이름 */
321
+ closeLabel?: string;
322
+ }
323
+ /**
324
+ * 페이지 안에 고정으로 보여 주는 안내 문구. 기본으로 role 이 없다.
325
+ * 사용자 동작 뒤에 새로 나타나는 메시지라면 스크린리더가 바로 읽도록 `role="alert"`(중요·긴급) 또는
326
+ * `role="status"`(일반 알림)를 넘긴다. 잠깐 떴다 사라지는 알림은 Toast 를 쓴다.
327
+ */
328
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
329
+
298
330
  interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
299
331
  /** 이미지 주소. 없거나 불러오지 못하면 fallback 을 보여 준다 */
300
332
  src?: string;
@@ -315,7 +347,7 @@ interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
315
347
  /** 시각적 스타일 */
316
348
  variant?: 'solid' | 'soft' | 'outline';
317
349
  /** 의미 색상 */
318
- color?: 'primary' | 'neutral' | 'danger' | 'success';
350
+ color?: 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
319
351
  /** 크기 */
320
352
  size?: 'sm' | 'md' | 'lg';
321
353
  /** 텍스트 앞에 표시할 아이콘 (장식용 — 의미는 텍스트로 전달한다) */
@@ -323,6 +355,30 @@ interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
323
355
  }
324
356
  declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
325
357
 
358
+ interface BreadcrumbItemData {
359
+ /** 표시할 이름 */
360
+ label: ReactNode;
361
+ /** 이동할 주소. 마지막 항목(현재 페이지)은 링크로 만들지 않는다 */
362
+ href?: string;
363
+ }
364
+ interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
365
+ /** 상위 → 현재 순서의 경로. 마지막 항목이 현재 페이지(aria-current="page")다 */
366
+ items: BreadcrumbItemData[];
367
+ /**
368
+ * 링크로 렌더링할 컴포넌트 (예: Next.js 의 Link). 기본 `<a>`.
369
+ * 컴포넌트(함수)를 넘기므로 클라이언트 컴포넌트에서만 쓸 수 있다 (서버 컴포넌트에서는 생략하면 일반 `<a>` 로 동작)
370
+ */
371
+ linkAs?: ElementType;
372
+ /** 항목 사이 구분 기호 (장식용 — 스크린리더는 읽지 않는다) */
373
+ separator?: ReactNode;
374
+ /** 탐색 영역의 이름 */
375
+ 'aria-label'?: string;
376
+ }
377
+ /**
378
+ * 현재 페이지까지의 경로를 보여 주는 탐색. `<nav>` > `<ol>` 구조이고 마지막 항목에 `aria-current="page"` 를 붙인다.
379
+ */
380
+ declare const Breadcrumb: react.ForwardRefExoticComponent<BreadcrumbProps & react.RefAttributes<HTMLElement>>;
381
+
326
382
  interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
327
383
  /** 시각적 스타일 */
328
384
  variant?: 'solid' | 'soft' | 'outline' | 'ghost';
@@ -345,7 +401,7 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'col
345
401
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
346
402
 
347
403
  interface CardProps extends HTMLAttributes<HTMLElement> {
348
- /** 시각적 스타일. elevated 는 테두리 + 그림자 */
404
+ /** 시각적 스타일. outline 은 테두리, elevated 는 그림자(다크 모드는 가장자리 ring 포함), soft 는 옅은 배경 */
349
405
  variant?: 'outline' | 'elevated' | 'soft';
350
406
  /** 안쪽 여백 (sm 16px, md 24px, lg 32px). 이미지를 가장자리까지 붙이려면 none */
351
407
  padding?: 'none' | 'sm' | 'md' | 'lg';
@@ -374,6 +430,51 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
374
430
  }
375
431
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
376
432
 
433
+ interface ComboboxOption {
434
+ value: string;
435
+ /** 표시·검색에 쓰는 이름 */
436
+ label: string;
437
+ disabled?: boolean;
438
+ }
439
+ interface ComboboxProps {
440
+ /** 선택지 목록 */
441
+ options: ComboboxOption[];
442
+ /** 선택된 값 (제어 모드). undefined 면 선택 없음 */
443
+ value?: string;
444
+ /** 처음 선택된 값 (비제어 모드) */
445
+ defaultValue?: string;
446
+ /** 값이 바뀔 때 호출된다 */
447
+ onValueChange?: (value: string) => void;
448
+ /** 입력한 글자로 선택지를 거르는 함수 (기본: 대소문자 구분 없이 label 에 포함) */
449
+ filter?: (option: ComboboxOption, query: string) => boolean;
450
+ /** 검색 결과가 없을 때 문구 */
451
+ emptyMessage?: ReactNode;
452
+ placeholder?: string;
453
+ /** 위에 표시할 레이블 */
454
+ label?: ReactNode;
455
+ /** 아래에 표시할 도움말. error 일 때는 에러 메시지로 표시된다 */
456
+ helperText?: ReactNode;
457
+ error?: boolean;
458
+ size?: 'sm' | 'md' | 'lg';
459
+ fullWidth?: boolean;
460
+ disabled?: boolean;
461
+ required?: boolean;
462
+ /** form 제출 시 사용할 이름 (선택된 value 가 제출된다) */
463
+ name?: string;
464
+ id?: string;
465
+ /** label 이 없을 때 스크린리더용 이름 */
466
+ 'aria-label'?: string;
467
+ /** 목록 열기 버튼의 이름 */
468
+ toggleLabel?: string;
469
+ /** 입력창 래퍼 className */
470
+ className?: string;
471
+ }
472
+ /**
473
+ * 입력해서 거르며 고르는 선택 상자 (WAI-ARIA combobox + listbox 패턴).
474
+ * ↓/↑ 로 목록을 열고 이동, Enter 로 선택, Esc 로 닫는다. 목록에 없는 값은 입력할 수 없다(선택만).
475
+ */
476
+ declare const Combobox: react.ForwardRefExoticComponent<ComboboxProps & react.RefAttributes<HTMLInputElement>>;
477
+
377
478
  interface DividerProps extends HTMLAttributes<HTMLDivElement> {
378
479
  /** 방향. vertical 은 flex 행 안에서 부모 높이를 채운다 */
379
480
  orientation?: 'horizontal' | 'vertical';
@@ -387,6 +488,45 @@ interface DividerProps extends HTMLAttributes<HTMLDivElement> {
387
488
  }
388
489
  declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
389
490
 
491
+ interface DrawerProps {
492
+ /** 열림 상태 (제어 모드) */
493
+ open?: boolean;
494
+ /** 처음 열림 상태 (비제어 모드) */
495
+ defaultOpen?: boolean;
496
+ /** 열림 상태가 바뀔 때 호출된다 */
497
+ onOpenChange?: (open: boolean) => void;
498
+ /** 클릭하면 패널을 여는 요소. 버튼 등 포커스 가능한 요소 하나여야 한다 */
499
+ trigger?: ReactNode;
500
+ /** 제목 (스크린리더가 패널 이름으로 읽는다) */
501
+ title: ReactNode;
502
+ /** 제목 아래 설명 */
503
+ description?: ReactNode;
504
+ /** 본문. 길면 본문 영역만 스크롤된다 */
505
+ children?: ReactNode;
506
+ /** 하단 고정 버튼 영역. 닫기 버튼은 DrawerClose 로 감싼다 */
507
+ footer?: ReactNode;
508
+ /** 나타나는 방향 (기본 right) */
509
+ side?: 'right' | 'left' | 'top' | 'bottom';
510
+ /** 크기. 좌우는 너비 320/420/640px, 위아래는 높이 30/50/80vh */
511
+ size?: 'sm' | 'md' | 'lg';
512
+ /** 오른쪽 위 닫기(X) 버튼 숨기기 */
513
+ hideCloseButton?: boolean;
514
+ /** 바깥 영역 클릭으로 닫기 (기본 true) */
515
+ closeOnOverlayClick?: boolean;
516
+ /** 패널 className */
517
+ className?: string;
518
+ }
519
+ /**
520
+ * 화면 가장자리에서 밀려 나오는 패널(시트). 필터·상세 보기·모바일 메뉴 등에 쓴다.
521
+ * Modal 과 같은 Radix Dialog 기반이라 포커스 가두기, Esc 로 닫기, 닫힌 뒤 trigger 로 포커스 복귀를 지원한다.
522
+ */
523
+ declare function Drawer({ open, defaultOpen, onOpenChange, trigger, title, description, children, footer, side, size, hideCloseButton, closeOnOverlayClick, className, }: DrawerProps): react.JSX.Element;
524
+ /**
525
+ * 감싼 요소를 클릭하면 패널이 닫힌다.
526
+ * @example <DrawerClose asChild><Button>취소</Button></DrawerClose>
527
+ */
528
+ declare const DrawerClose: react.ForwardRefExoticComponent<Dialog.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
529
+
390
530
  /** 메뉴 루트. `open`/`defaultOpen`/`onOpenChange`/`modal` 을 받는다 */
391
531
  declare const DropdownMenu: react.FC<RadixMenu.DropdownMenuProps>;
392
532
  type DropdownMenuProps = ComponentPropsWithoutRef<typeof RadixMenu.Root>;
@@ -417,6 +557,26 @@ declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<RadixMenu.
417
557
  type DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof RadixMenu.Separator>;
418
558
  declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
419
559
 
560
+ interface IconButtonProps extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'children' | 'variant' | 'color' | 'size' | 'loading'> {
561
+ /** 시각적 스타일 (기본 ghost) */
562
+ variant?: 'solid' | 'soft' | 'outline' | 'ghost';
563
+ /** 의미 색상 (기본 neutral) */
564
+ color?: 'primary' | 'neutral' | 'danger';
565
+ /** 크기. 버튼 32·40·48px, 아이콘 16·20·24px */
566
+ size?: 'sm' | 'md' | 'lg';
567
+ /** 진행 중 상태. 아이콘 자리에 스피너를 보여 주고 `aria-busy` 를 붙이며 클릭을 막는다 (포커스는 유지) */
568
+ loading?: boolean;
569
+ /** 버튼이 하는 일을 설명하는 이름 (예: "삭제"). 아이콘만으로는 스크린리더가 알 수 없어 필수다 */
570
+ 'aria-label': string;
571
+ /** 아이콘. 크기는 버튼 size 에 맞춰 자동으로 조절된다 (sm 16px · md 20px · lg 24px) */
572
+ children: ReactNode;
573
+ }
574
+ /**
575
+ * 아이콘만 있는 정사각형 버튼. Button 과 같은 variant·color·size·loading 을 받고, 기본은 ghost·neutral 이다.
576
+ * 마우스 사용자에게도 이름을 보여 주려면 Tooltip 으로 감싼다.
577
+ */
578
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
579
+
420
580
  interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
421
581
  /** 크기 */
422
582
  size?: 'sm' | 'md' | 'lg';
@@ -443,6 +603,32 @@ interface TextFieldProps extends Omit<InputProps, 'invalid'> {
443
603
  }
444
604
  declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
445
605
 
606
+ interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
607
+ /**
608
+ * 렌더링할 요소. Next.js 등의 라우터 링크를 넘기면 그 컴포넌트로 렌더링한다 (예: `as={NextLink}`).
609
+ * 컴포넌트(함수)를 넘기므로 서버 컴포넌트에서는 쓸 수 없다 → 그때는 asChild 를 쓴다
610
+ */
611
+ as?: ElementType;
612
+ /**
613
+ * 자식 요소(라우터 링크 등)에 스타일과 속성을 입혀 그대로 렌더링한다. 서버 컴포넌트에서도 쓸 수 있다.
614
+ * external 아이콘·안내는 붙지 않는다.
615
+ * @example <Link asChild><NextLink href="/">홈</NextLink></Link>
616
+ */
617
+ asChild?: boolean;
618
+ /** 글자색. inherit 은 부모 글자색을 그대로 쓴다 */
619
+ color?: 'primary' | 'neutral' | 'inherit';
620
+ /** 밑줄. 문장 안의 링크는 색만으로 구분되지 않도록 always(기본)를 쓴다. 메뉴·목록처럼 링크임이 분명할 때 hover */
621
+ underline?: 'always' | 'hover';
622
+ /**
623
+ * 새 창으로 여는 외부 링크. `target="_blank"`·`rel="noopener noreferrer"` 를 붙이고,
624
+ * 아이콘과 스크린리더용 "(새 창)" 안내를 덧붙인다
625
+ */
626
+ external?: boolean;
627
+ /** external 일 때 스크린리더에 덧붙이는 안내 */
628
+ externalLabel?: string;
629
+ }
630
+ declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
631
+
446
632
  interface ModalProps {
447
633
  /** 열림 상태 (제어 모드) */
448
634
  open?: boolean;
@@ -534,6 +720,26 @@ declare function Popover({ content, children, title, 'aria-label': ariaLabel, sh
534
720
  */
535
721
  declare const PopoverClose: react.ForwardRefExoticComponent<RadixPopover.PopoverCloseProps & react.RefAttributes<HTMLButtonElement>>;
536
722
 
723
+ interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
724
+ /** 현재 값 (0 ~ max). 생략하거나 null 이면 진행률을 모르는 상태(indeterminate)로 움직이는 막대를 보여 준다 */
725
+ value?: number | null;
726
+ /** 최댓값 */
727
+ max?: number;
728
+ /** 막대 위에 보이는 레이블. progressbar 의 이름이 된다 */
729
+ label?: ReactNode;
730
+ /** 레이블이 없을 때 스크린리더용 이름 */
731
+ 'aria-label'?: string;
732
+ /** 오른쪽에 값 텍스트(기본 "42%")를 보여 준다 */
733
+ showValue?: boolean;
734
+ /** 값 텍스트 형식. 화면 표시와 스크린리더(aria-valuetext)에 함께 쓴다 (예: (v, max) => `${v}/${max}개`) */
735
+ formatValue?: (value: number, max: number) => string;
736
+ /** 막대 두께 (sm 4px · md 8px · lg 12px) */
737
+ size?: 'sm' | 'md' | 'lg';
738
+ /** 의미 색상 */
739
+ color?: 'primary' | 'neutral' | 'success' | 'warning' | 'danger';
740
+ }
741
+ declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
742
+
537
743
  interface RadioOption {
538
744
  value: string;
539
745
  label: ReactNode;
@@ -626,6 +832,48 @@ interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
626
832
  */
627
833
  declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLSpanElement>>;
628
834
 
835
+ interface SliderProps {
836
+ /** 값 (제어 모드). 손잡이 하나면 `[50]`, 범위면 `[20, 80]` */
837
+ value?: number[];
838
+ /** 처음 값 (비제어 모드) */
839
+ defaultValue?: number[];
840
+ /** 값이 바뀌는 동안 계속 호출된다 */
841
+ onValueChange?: (value: number[]) => void;
842
+ /** 드래그·키 입력이 끝났을 때 한 번 호출된다 (서버 저장 등) */
843
+ onValueCommit?: (value: number[]) => void;
844
+ min?: number;
845
+ max?: number;
846
+ step?: number;
847
+ /** 범위 슬라이더에서 두 손잡이 사이 최소 간격(step 개수) */
848
+ minStepsBetweenThumbs?: number;
849
+ /** 위에 표시하는 레이블. 손잡이(slider)의 이름이 된다 */
850
+ label?: ReactNode;
851
+ /** label 이 없을 때 스크린리더용 이름 */
852
+ 'aria-label'?: string;
853
+ /** 아래에 표시하는 보조 설명 (aria-describedby 로 연결) */
854
+ helperText?: ReactNode;
855
+ /** 오른쪽 위에 현재 값을 보여 준다 */
856
+ showValue?: boolean;
857
+ /** 값 텍스트 형식. 화면 표시와 스크린리더(aria-valuetext)에 함께 쓴다 (예: v => `${v.toLocaleString()}원`) */
858
+ formatValue?: (value: number) => string;
859
+ /**
860
+ * 범위 슬라이더에서 손잡이마다 덧붙일 이름 (기본 ["최소", "최대"]).
861
+ * 스크린리더는 "가격 최소", "가격 최대" 처럼 레이블과 함께 읽는다
862
+ */
863
+ thumbLabels?: string[];
864
+ size?: 'sm' | 'md';
865
+ disabled?: boolean;
866
+ /** form 제출 시 사용할 이름 */
867
+ name?: string;
868
+ id?: string;
869
+ className?: string;
870
+ }
871
+ /**
872
+ * 범위 안에서 값을 고르는 슬라이더. 손잡이를 끌거나 키보드(←→↑↓, PageUp/Down, Home/End)로 조절한다.
873
+ * Radix Slider 기반이라 손잡이마다 role="slider" 와 aria-valuemin/max/now 가 붙는다.
874
+ */
875
+ declare const Slider: react.ForwardRefExoticComponent<SliderProps & react.RefAttributes<HTMLSpanElement>>;
876
+
629
877
  interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
630
878
  /** 크기 (sm 16px, md 20px, lg 28px) */
631
879
  size?: 'sm' | 'md' | 'lg';
@@ -680,6 +928,55 @@ interface SwitchProps {
680
928
  }
681
929
  declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
682
930
 
931
+ type TableSize = 'sm' | 'md';
932
+ interface TableProps extends HTMLAttributes<HTMLTableElement> {
933
+ /** 셀 여백 */
934
+ size?: TableSize;
935
+ /** 짝수 행 배경을 칠한다 */
936
+ striped?: boolean;
937
+ /** 세로로 스크롤할 때 머리 행을 위에 고정한다 (containerStyle 등으로 높이를 제한해 쓴다) */
938
+ stickyHeader?: boolean;
939
+ /** 표 위에 보이는 제목. 표의 이름이 되고, 스크롤 영역의 이름으로도 쓰인다 */
940
+ caption?: ReactNode;
941
+ /** caption 이 없을 때 표의 이름 (스크린리더용) */
942
+ 'aria-label'?: string;
943
+ /** 바깥 스크롤 영역의 className (높이 제한 등) */
944
+ containerClassName?: string;
945
+ /** 바깥 스크롤 영역의 style */
946
+ containerStyle?: CSSProperties;
947
+ }
948
+ /**
949
+ * 데이터 표. 네이티브 `<table>` 에 스타일을 입힌다.
950
+ * 표가 넘치면 바깥 영역이 스크롤되고, 키보드로도 스크롤할 수 있도록 그 영역이 포커스를 받는다.
951
+ */
952
+ declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
953
+ declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
954
+ declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
955
+ declare const TableFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
956
+ interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
957
+ /** 선택된 행으로 강조한다 (`aria-selected` 는 grid 등 상호작용 표에서 직접 지정한다) */
958
+ selected?: boolean;
959
+ }
960
+ declare const TableRow: react.ForwardRefExoticComponent<TableRowProps & react.RefAttributes<HTMLTableRowElement>>;
961
+ type Align = 'left' | 'center' | 'right';
962
+ interface TableHeadProps extends Omit<ThHTMLAttributes<HTMLTableCellElement>, 'align'> {
963
+ /** 정렬 */
964
+ align?: Align;
965
+ /**
966
+ * 이 열의 정렬 상태. onSort 와 함께 주면 머리 셀이 정렬 버튼이 되고 `aria-sort` 를 붙인다.
967
+ * 정렬되지 않은 열은 'none'.
968
+ */
969
+ sortDirection?: 'ascending' | 'descending' | 'none';
970
+ /** 정렬 버튼을 눌렀을 때 호출된다. 다음 정렬 상태는 사용하는 쪽이 정한다 */
971
+ onSort?: () => void;
972
+ }
973
+ declare const TableHead: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableCellElement>>;
974
+ interface TableCellProps extends Omit<TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
975
+ /** 정렬 (숫자는 right 권장) */
976
+ align?: Align;
977
+ }
978
+ declare const TableCell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
979
+
683
980
  interface TabsProps extends Omit<ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'orientation'> {
684
981
  /** 시각적 스타일. line 은 밑줄, soft 는 배경이 있는 세그먼트 */
685
982
  variant?: 'line' | 'soft';
@@ -738,7 +1035,7 @@ interface ToastOptions {
738
1035
  /** 설명 */
739
1036
  description?: ReactNode;
740
1037
  /** 의미 색상 */
741
- variant?: 'default' | 'success' | 'danger';
1038
+ variant?: 'default' | 'success' | 'warning' | 'danger';
742
1039
  /** 자동으로 닫히기까지 시간(ms). Infinity 면 자동으로 닫히지 않는다 */
743
1040
  duration?: number;
744
1041
  /** 실행 버튼 */
@@ -797,7 +1094,7 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
797
1094
  /** 렌더링할 요소. 기본값은 variant 에 따라 결정된다 (h1, p, span 등) */
798
1095
  as?: ElementType;
799
1096
  /** 글자 색상 */
800
- color?: 'default' | 'muted' | 'subtle' | 'primary' | 'danger' | 'success' | 'inherit';
1097
+ color?: 'default' | 'muted' | 'subtle' | 'primary' | 'danger' | 'success' | 'warning' | 'inherit';
801
1098
  /** variant 의 기본 굵기를 덮어쓴다 */
802
1099
  weight?: 'regular' | 'medium' | 'semibold' | 'bold';
803
1100
  /** 정렬 */
@@ -807,4 +1104,4 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
807
1104
  }
808
1105
  declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
809
1106
 
810
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BestowTheme, Button, type ButtonProps, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, type DeepPartial, Divider, type DividerProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Input, type InputProps, type IntentName, Modal, ModalClose, type ModalProps, Pagination, type PaginationProps, Popover, PopoverClose, type PopoverProps, RadioGroup, type RadioGroupProps, type RadioOption, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TextField, type TextFieldProps, Textarea, type TextareaProps, type ThemeInput, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, type ThemeTokens, type ToastOptions, ToastProvider, type ToastProviderProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, contrastRatio, createIntentColors, createTheme, themeClass, usePortalClassName, usePortalProps, useTheme, useToast, vars };
1107
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BestowTheme, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, type ButtonProps, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, Combobox, type ComboboxOption, type ComboboxProps, type DeepPartial, Divider, type DividerProps, Drawer, DrawerClose, type DrawerProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, IconButton, type IconButtonProps, Input, type InputProps, type IntentName, Link, type LinkProps, Modal, ModalClose, type ModalProps, Pagination, type PaginationProps, Popover, PopoverClose, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, Table, TableBody, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TextField, type TextFieldProps, Textarea, type TextareaProps, type ThemeInput, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, type ThemeTokens, type ToastOptions, ToastProvider, type ToastProviderProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, contrastRatio, createIntentColors, createTheme, themeClass, usePortalClassName, usePortalProps, useTheme, useToast, vars };