@bestow-ui/react 0.8.3 → 0.9.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 +4 -4
- package/dist/index.cjs +658 -371
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +601 -36
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +179 -18
- package/dist/index.d.ts +179 -18
- package/dist/index.js +630 -350
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
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,
|
|
4
|
+
import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, ElementType, ButtonHTMLAttributes, InputHTMLAttributes, AnchorHTMLAttributes, ReactElement, 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';
|
|
@@ -387,6 +443,45 @@ interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
387
443
|
}
|
|
388
444
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
389
445
|
|
|
446
|
+
interface DrawerProps {
|
|
447
|
+
/** 열림 상태 (제어 모드) */
|
|
448
|
+
open?: boolean;
|
|
449
|
+
/** 처음 열림 상태 (비제어 모드) */
|
|
450
|
+
defaultOpen?: boolean;
|
|
451
|
+
/** 열림 상태가 바뀔 때 호출된다 */
|
|
452
|
+
onOpenChange?: (open: boolean) => void;
|
|
453
|
+
/** 클릭하면 패널을 여는 요소. 버튼 등 포커스 가능한 요소 하나여야 한다 */
|
|
454
|
+
trigger?: ReactNode;
|
|
455
|
+
/** 제목 (스크린리더가 패널 이름으로 읽는다) */
|
|
456
|
+
title: ReactNode;
|
|
457
|
+
/** 제목 아래 설명 */
|
|
458
|
+
description?: ReactNode;
|
|
459
|
+
/** 본문. 길면 본문 영역만 스크롤된다 */
|
|
460
|
+
children?: ReactNode;
|
|
461
|
+
/** 하단 고정 버튼 영역. 닫기 버튼은 DrawerClose 로 감싼다 */
|
|
462
|
+
footer?: ReactNode;
|
|
463
|
+
/** 나타나는 방향 (기본 right) */
|
|
464
|
+
side?: 'right' | 'left' | 'top' | 'bottom';
|
|
465
|
+
/** 크기. 좌우는 너비 320/420/640px, 위아래는 높이 30/50/80vh */
|
|
466
|
+
size?: 'sm' | 'md' | 'lg';
|
|
467
|
+
/** 오른쪽 위 닫기(X) 버튼 숨기기 */
|
|
468
|
+
hideCloseButton?: boolean;
|
|
469
|
+
/** 바깥 영역 클릭으로 닫기 (기본 true) */
|
|
470
|
+
closeOnOverlayClick?: boolean;
|
|
471
|
+
/** 패널 className */
|
|
472
|
+
className?: string;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 화면 가장자리에서 밀려 나오는 패널(시트). 필터·상세 보기·모바일 메뉴 등에 쓴다.
|
|
476
|
+
* Modal 과 같은 Radix Dialog 기반이라 포커스 가두기, Esc 로 닫기, 닫힌 뒤 trigger 로 포커스 복귀를 지원한다.
|
|
477
|
+
*/
|
|
478
|
+
declare function Drawer({ open, defaultOpen, onOpenChange, trigger, title, description, children, footer, side, size, hideCloseButton, closeOnOverlayClick, className, }: DrawerProps): react.JSX.Element;
|
|
479
|
+
/**
|
|
480
|
+
* 감싼 요소를 클릭하면 패널이 닫힌다.
|
|
481
|
+
* @example <DrawerClose asChild><Button>취소</Button></DrawerClose>
|
|
482
|
+
*/
|
|
483
|
+
declare const DrawerClose: react.ForwardRefExoticComponent<Dialog.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
484
|
+
|
|
390
485
|
/** 메뉴 루트. `open`/`defaultOpen`/`onOpenChange`/`modal` 을 받는다 */
|
|
391
486
|
declare const DropdownMenu: react.FC<RadixMenu.DropdownMenuProps>;
|
|
392
487
|
type DropdownMenuProps = ComponentPropsWithoutRef<typeof RadixMenu.Root>;
|
|
@@ -417,6 +512,26 @@ declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<RadixMenu.
|
|
|
417
512
|
type DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof RadixMenu.Separator>;
|
|
418
513
|
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
419
514
|
|
|
515
|
+
interface IconButtonProps extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'children' | 'variant' | 'color' | 'size' | 'loading'> {
|
|
516
|
+
/** 시각적 스타일 (기본 ghost) */
|
|
517
|
+
variant?: 'solid' | 'soft' | 'outline' | 'ghost';
|
|
518
|
+
/** 의미 색상 (기본 neutral) */
|
|
519
|
+
color?: 'primary' | 'neutral' | 'danger';
|
|
520
|
+
/** 크기. 버튼 32·40·48px, 아이콘 16·20·24px */
|
|
521
|
+
size?: 'sm' | 'md' | 'lg';
|
|
522
|
+
/** 진행 중 상태. 아이콘 자리에 스피너를 보여 주고 `aria-busy` 를 붙이며 클릭을 막는다 (포커스는 유지) */
|
|
523
|
+
loading?: boolean;
|
|
524
|
+
/** 버튼이 하는 일을 설명하는 이름 (예: "삭제"). 아이콘만으로는 스크린리더가 알 수 없어 필수다 */
|
|
525
|
+
'aria-label': string;
|
|
526
|
+
/** 아이콘. 크기는 버튼 size 에 맞춰 자동으로 조절된다 (sm 16px · md 20px · lg 24px) */
|
|
527
|
+
children: ReactNode;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* 아이콘만 있는 정사각형 버튼. Button 과 같은 variant·color·size·loading 을 받고, 기본은 ghost·neutral 이다.
|
|
531
|
+
* 마우스 사용자에게도 이름을 보여 주려면 Tooltip 으로 감싼다.
|
|
532
|
+
*/
|
|
533
|
+
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
534
|
+
|
|
420
535
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
421
536
|
/** 크기 */
|
|
422
537
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -443,6 +558,32 @@ interface TextFieldProps extends Omit<InputProps, 'invalid'> {
|
|
|
443
558
|
}
|
|
444
559
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
445
560
|
|
|
561
|
+
interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
562
|
+
/**
|
|
563
|
+
* 렌더링할 요소. Next.js 등의 라우터 링크를 넘기면 그 컴포넌트로 렌더링한다 (예: `as={NextLink}`).
|
|
564
|
+
* 컴포넌트(함수)를 넘기므로 서버 컴포넌트에서는 쓸 수 없다 → 그때는 asChild 를 쓴다
|
|
565
|
+
*/
|
|
566
|
+
as?: ElementType;
|
|
567
|
+
/**
|
|
568
|
+
* 자식 요소(라우터 링크 등)에 스타일과 속성을 입혀 그대로 렌더링한다. 서버 컴포넌트에서도 쓸 수 있다.
|
|
569
|
+
* external 아이콘·안내는 붙지 않는다.
|
|
570
|
+
* @example <Link asChild><NextLink href="/">홈</NextLink></Link>
|
|
571
|
+
*/
|
|
572
|
+
asChild?: boolean;
|
|
573
|
+
/** 글자색. inherit 은 부모 글자색을 그대로 쓴다 */
|
|
574
|
+
color?: 'primary' | 'neutral' | 'inherit';
|
|
575
|
+
/** 밑줄. 문장 안의 링크는 색만으로 구분되지 않도록 always(기본)를 쓴다. 메뉴·목록처럼 링크임이 분명할 때 hover */
|
|
576
|
+
underline?: 'always' | 'hover';
|
|
577
|
+
/**
|
|
578
|
+
* 새 창으로 여는 외부 링크. `target="_blank"`·`rel="noopener noreferrer"` 를 붙이고,
|
|
579
|
+
* 아이콘과 스크린리더용 "(새 창)" 안내를 덧붙인다
|
|
580
|
+
*/
|
|
581
|
+
external?: boolean;
|
|
582
|
+
/** external 일 때 스크린리더에 덧붙이는 안내 */
|
|
583
|
+
externalLabel?: string;
|
|
584
|
+
}
|
|
585
|
+
declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
586
|
+
|
|
446
587
|
interface ModalProps {
|
|
447
588
|
/** 열림 상태 (제어 모드) */
|
|
448
589
|
open?: boolean;
|
|
@@ -534,6 +675,26 @@ declare function Popover({ content, children, title, 'aria-label': ariaLabel, sh
|
|
|
534
675
|
*/
|
|
535
676
|
declare const PopoverClose: react.ForwardRefExoticComponent<RadixPopover.PopoverCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
536
677
|
|
|
678
|
+
interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
679
|
+
/** 현재 값 (0 ~ max). 생략하거나 null 이면 진행률을 모르는 상태(indeterminate)로 움직이는 막대를 보여 준다 */
|
|
680
|
+
value?: number | null;
|
|
681
|
+
/** 최댓값 */
|
|
682
|
+
max?: number;
|
|
683
|
+
/** 막대 위에 보이는 레이블. progressbar 의 이름이 된다 */
|
|
684
|
+
label?: ReactNode;
|
|
685
|
+
/** 레이블이 없을 때 스크린리더용 이름 */
|
|
686
|
+
'aria-label'?: string;
|
|
687
|
+
/** 오른쪽에 값 텍스트(기본 "42%")를 보여 준다 */
|
|
688
|
+
showValue?: boolean;
|
|
689
|
+
/** 값 텍스트 형식. 화면 표시와 스크린리더(aria-valuetext)에 함께 쓴다 (예: (v, max) => `${v}/${max}개`) */
|
|
690
|
+
formatValue?: (value: number, max: number) => string;
|
|
691
|
+
/** 막대 두께 (sm 4px · md 8px · lg 12px) */
|
|
692
|
+
size?: 'sm' | 'md' | 'lg';
|
|
693
|
+
/** 의미 색상 */
|
|
694
|
+
color?: 'primary' | 'neutral' | 'success' | 'warning' | 'danger';
|
|
695
|
+
}
|
|
696
|
+
declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
|
|
697
|
+
|
|
537
698
|
interface RadioOption {
|
|
538
699
|
value: string;
|
|
539
700
|
label: ReactNode;
|
|
@@ -738,7 +899,7 @@ interface ToastOptions {
|
|
|
738
899
|
/** 설명 */
|
|
739
900
|
description?: ReactNode;
|
|
740
901
|
/** 의미 색상 */
|
|
741
|
-
variant?: 'default' | 'success' | 'danger';
|
|
902
|
+
variant?: 'default' | 'success' | 'warning' | 'danger';
|
|
742
903
|
/** 자동으로 닫히기까지 시간(ms). Infinity 면 자동으로 닫히지 않는다 */
|
|
743
904
|
duration?: number;
|
|
744
905
|
/** 실행 버튼 */
|
|
@@ -797,7 +958,7 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
797
958
|
/** 렌더링할 요소. 기본값은 variant 에 따라 결정된다 (h1, p, span 등) */
|
|
798
959
|
as?: ElementType;
|
|
799
960
|
/** 글자 색상 */
|
|
800
|
-
color?: 'default' | 'muted' | 'subtle' | 'primary' | 'danger' | 'success' | 'inherit';
|
|
961
|
+
color?: 'default' | 'muted' | 'subtle' | 'primary' | 'danger' | 'success' | 'warning' | 'inherit';
|
|
801
962
|
/** variant 의 기본 굵기를 덮어쓴다 */
|
|
802
963
|
weight?: 'regular' | 'medium' | 'semibold' | 'bold';
|
|
803
964
|
/** 정렬 */
|
|
@@ -807,4 +968,4 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
807
968
|
}
|
|
808
969
|
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
|
|
809
970
|
|
|
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 };
|
|
971
|
+
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, 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, 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 };
|
package/dist/index.d.ts
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,
|
|
4
|
+
import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, ElementType, ButtonHTMLAttributes, InputHTMLAttributes, AnchorHTMLAttributes, ReactElement, 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';
|
|
@@ -387,6 +443,45 @@ interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
387
443
|
}
|
|
388
444
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
389
445
|
|
|
446
|
+
interface DrawerProps {
|
|
447
|
+
/** 열림 상태 (제어 모드) */
|
|
448
|
+
open?: boolean;
|
|
449
|
+
/** 처음 열림 상태 (비제어 모드) */
|
|
450
|
+
defaultOpen?: boolean;
|
|
451
|
+
/** 열림 상태가 바뀔 때 호출된다 */
|
|
452
|
+
onOpenChange?: (open: boolean) => void;
|
|
453
|
+
/** 클릭하면 패널을 여는 요소. 버튼 등 포커스 가능한 요소 하나여야 한다 */
|
|
454
|
+
trigger?: ReactNode;
|
|
455
|
+
/** 제목 (스크린리더가 패널 이름으로 읽는다) */
|
|
456
|
+
title: ReactNode;
|
|
457
|
+
/** 제목 아래 설명 */
|
|
458
|
+
description?: ReactNode;
|
|
459
|
+
/** 본문. 길면 본문 영역만 스크롤된다 */
|
|
460
|
+
children?: ReactNode;
|
|
461
|
+
/** 하단 고정 버튼 영역. 닫기 버튼은 DrawerClose 로 감싼다 */
|
|
462
|
+
footer?: ReactNode;
|
|
463
|
+
/** 나타나는 방향 (기본 right) */
|
|
464
|
+
side?: 'right' | 'left' | 'top' | 'bottom';
|
|
465
|
+
/** 크기. 좌우는 너비 320/420/640px, 위아래는 높이 30/50/80vh */
|
|
466
|
+
size?: 'sm' | 'md' | 'lg';
|
|
467
|
+
/** 오른쪽 위 닫기(X) 버튼 숨기기 */
|
|
468
|
+
hideCloseButton?: boolean;
|
|
469
|
+
/** 바깥 영역 클릭으로 닫기 (기본 true) */
|
|
470
|
+
closeOnOverlayClick?: boolean;
|
|
471
|
+
/** 패널 className */
|
|
472
|
+
className?: string;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 화면 가장자리에서 밀려 나오는 패널(시트). 필터·상세 보기·모바일 메뉴 등에 쓴다.
|
|
476
|
+
* Modal 과 같은 Radix Dialog 기반이라 포커스 가두기, Esc 로 닫기, 닫힌 뒤 trigger 로 포커스 복귀를 지원한다.
|
|
477
|
+
*/
|
|
478
|
+
declare function Drawer({ open, defaultOpen, onOpenChange, trigger, title, description, children, footer, side, size, hideCloseButton, closeOnOverlayClick, className, }: DrawerProps): react.JSX.Element;
|
|
479
|
+
/**
|
|
480
|
+
* 감싼 요소를 클릭하면 패널이 닫힌다.
|
|
481
|
+
* @example <DrawerClose asChild><Button>취소</Button></DrawerClose>
|
|
482
|
+
*/
|
|
483
|
+
declare const DrawerClose: react.ForwardRefExoticComponent<Dialog.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
484
|
+
|
|
390
485
|
/** 메뉴 루트. `open`/`defaultOpen`/`onOpenChange`/`modal` 을 받는다 */
|
|
391
486
|
declare const DropdownMenu: react.FC<RadixMenu.DropdownMenuProps>;
|
|
392
487
|
type DropdownMenuProps = ComponentPropsWithoutRef<typeof RadixMenu.Root>;
|
|
@@ -417,6 +512,26 @@ declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<RadixMenu.
|
|
|
417
512
|
type DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof RadixMenu.Separator>;
|
|
418
513
|
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
419
514
|
|
|
515
|
+
interface IconButtonProps extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'children' | 'variant' | 'color' | 'size' | 'loading'> {
|
|
516
|
+
/** 시각적 스타일 (기본 ghost) */
|
|
517
|
+
variant?: 'solid' | 'soft' | 'outline' | 'ghost';
|
|
518
|
+
/** 의미 색상 (기본 neutral) */
|
|
519
|
+
color?: 'primary' | 'neutral' | 'danger';
|
|
520
|
+
/** 크기. 버튼 32·40·48px, 아이콘 16·20·24px */
|
|
521
|
+
size?: 'sm' | 'md' | 'lg';
|
|
522
|
+
/** 진행 중 상태. 아이콘 자리에 스피너를 보여 주고 `aria-busy` 를 붙이며 클릭을 막는다 (포커스는 유지) */
|
|
523
|
+
loading?: boolean;
|
|
524
|
+
/** 버튼이 하는 일을 설명하는 이름 (예: "삭제"). 아이콘만으로는 스크린리더가 알 수 없어 필수다 */
|
|
525
|
+
'aria-label': string;
|
|
526
|
+
/** 아이콘. 크기는 버튼 size 에 맞춰 자동으로 조절된다 (sm 16px · md 20px · lg 24px) */
|
|
527
|
+
children: ReactNode;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* 아이콘만 있는 정사각형 버튼. Button 과 같은 variant·color·size·loading 을 받고, 기본은 ghost·neutral 이다.
|
|
531
|
+
* 마우스 사용자에게도 이름을 보여 주려면 Tooltip 으로 감싼다.
|
|
532
|
+
*/
|
|
533
|
+
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
534
|
+
|
|
420
535
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
421
536
|
/** 크기 */
|
|
422
537
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -443,6 +558,32 @@ interface TextFieldProps extends Omit<InputProps, 'invalid'> {
|
|
|
443
558
|
}
|
|
444
559
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
445
560
|
|
|
561
|
+
interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
562
|
+
/**
|
|
563
|
+
* 렌더링할 요소. Next.js 등의 라우터 링크를 넘기면 그 컴포넌트로 렌더링한다 (예: `as={NextLink}`).
|
|
564
|
+
* 컴포넌트(함수)를 넘기므로 서버 컴포넌트에서는 쓸 수 없다 → 그때는 asChild 를 쓴다
|
|
565
|
+
*/
|
|
566
|
+
as?: ElementType;
|
|
567
|
+
/**
|
|
568
|
+
* 자식 요소(라우터 링크 등)에 스타일과 속성을 입혀 그대로 렌더링한다. 서버 컴포넌트에서도 쓸 수 있다.
|
|
569
|
+
* external 아이콘·안내는 붙지 않는다.
|
|
570
|
+
* @example <Link asChild><NextLink href="/">홈</NextLink></Link>
|
|
571
|
+
*/
|
|
572
|
+
asChild?: boolean;
|
|
573
|
+
/** 글자색. inherit 은 부모 글자색을 그대로 쓴다 */
|
|
574
|
+
color?: 'primary' | 'neutral' | 'inherit';
|
|
575
|
+
/** 밑줄. 문장 안의 링크는 색만으로 구분되지 않도록 always(기본)를 쓴다. 메뉴·목록처럼 링크임이 분명할 때 hover */
|
|
576
|
+
underline?: 'always' | 'hover';
|
|
577
|
+
/**
|
|
578
|
+
* 새 창으로 여는 외부 링크. `target="_blank"`·`rel="noopener noreferrer"` 를 붙이고,
|
|
579
|
+
* 아이콘과 스크린리더용 "(새 창)" 안내를 덧붙인다
|
|
580
|
+
*/
|
|
581
|
+
external?: boolean;
|
|
582
|
+
/** external 일 때 스크린리더에 덧붙이는 안내 */
|
|
583
|
+
externalLabel?: string;
|
|
584
|
+
}
|
|
585
|
+
declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
586
|
+
|
|
446
587
|
interface ModalProps {
|
|
447
588
|
/** 열림 상태 (제어 모드) */
|
|
448
589
|
open?: boolean;
|
|
@@ -534,6 +675,26 @@ declare function Popover({ content, children, title, 'aria-label': ariaLabel, sh
|
|
|
534
675
|
*/
|
|
535
676
|
declare const PopoverClose: react.ForwardRefExoticComponent<RadixPopover.PopoverCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
536
677
|
|
|
678
|
+
interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
679
|
+
/** 현재 값 (0 ~ max). 생략하거나 null 이면 진행률을 모르는 상태(indeterminate)로 움직이는 막대를 보여 준다 */
|
|
680
|
+
value?: number | null;
|
|
681
|
+
/** 최댓값 */
|
|
682
|
+
max?: number;
|
|
683
|
+
/** 막대 위에 보이는 레이블. progressbar 의 이름이 된다 */
|
|
684
|
+
label?: ReactNode;
|
|
685
|
+
/** 레이블이 없을 때 스크린리더용 이름 */
|
|
686
|
+
'aria-label'?: string;
|
|
687
|
+
/** 오른쪽에 값 텍스트(기본 "42%")를 보여 준다 */
|
|
688
|
+
showValue?: boolean;
|
|
689
|
+
/** 값 텍스트 형식. 화면 표시와 스크린리더(aria-valuetext)에 함께 쓴다 (예: (v, max) => `${v}/${max}개`) */
|
|
690
|
+
formatValue?: (value: number, max: number) => string;
|
|
691
|
+
/** 막대 두께 (sm 4px · md 8px · lg 12px) */
|
|
692
|
+
size?: 'sm' | 'md' | 'lg';
|
|
693
|
+
/** 의미 색상 */
|
|
694
|
+
color?: 'primary' | 'neutral' | 'success' | 'warning' | 'danger';
|
|
695
|
+
}
|
|
696
|
+
declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
|
|
697
|
+
|
|
537
698
|
interface RadioOption {
|
|
538
699
|
value: string;
|
|
539
700
|
label: ReactNode;
|
|
@@ -738,7 +899,7 @@ interface ToastOptions {
|
|
|
738
899
|
/** 설명 */
|
|
739
900
|
description?: ReactNode;
|
|
740
901
|
/** 의미 색상 */
|
|
741
|
-
variant?: 'default' | 'success' | 'danger';
|
|
902
|
+
variant?: 'default' | 'success' | 'warning' | 'danger';
|
|
742
903
|
/** 자동으로 닫히기까지 시간(ms). Infinity 면 자동으로 닫히지 않는다 */
|
|
743
904
|
duration?: number;
|
|
744
905
|
/** 실행 버튼 */
|
|
@@ -797,7 +958,7 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
797
958
|
/** 렌더링할 요소. 기본값은 variant 에 따라 결정된다 (h1, p, span 등) */
|
|
798
959
|
as?: ElementType;
|
|
799
960
|
/** 글자 색상 */
|
|
800
|
-
color?: 'default' | 'muted' | 'subtle' | 'primary' | 'danger' | 'success' | 'inherit';
|
|
961
|
+
color?: 'default' | 'muted' | 'subtle' | 'primary' | 'danger' | 'success' | 'warning' | 'inherit';
|
|
801
962
|
/** variant 의 기본 굵기를 덮어쓴다 */
|
|
802
963
|
weight?: 'regular' | 'medium' | 'semibold' | 'bold';
|
|
803
964
|
/** 정렬 */
|
|
@@ -807,4 +968,4 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
807
968
|
}
|
|
808
969
|
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
|
|
809
970
|
|
|
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 };
|
|
971
|
+
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, 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, 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 };
|