@bestow-ui/react 0.6.0 → 0.8.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.cjs +624 -219
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +585 -64
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +189 -2
- package/dist/index.d.ts +189 -2
- package/dist/index.js +595 -209
- package/dist/index.js.map +1 -1
- package/package.json +7 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
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, ReactNode, ButtonHTMLAttributes, ElementType, InputHTMLAttributes,
|
|
4
|
+
import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, ButtonHTMLAttributes, ElementType, InputHTMLAttributes, ReactElement, TextareaHTMLAttributes } from 'react';
|
|
5
|
+
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
6
|
+
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
5
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
8
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
9
|
+
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
6
10
|
|
|
7
11
|
declare const lightTokens: {
|
|
8
12
|
color: _bestow_ui_tokens.SemanticColors;
|
|
@@ -273,6 +277,40 @@ declare function usePortalProps(): {
|
|
|
273
277
|
*/
|
|
274
278
|
declare function usePortalClassName(): string;
|
|
275
279
|
|
|
280
|
+
/**
|
|
281
|
+
* `type="single"`: 한 번에 하나만 열린다 (`value: string`). `collapsible` 이면 열린 항목을 다시 눌러 닫을 수 있다.
|
|
282
|
+
* `type="multiple"`: 여러 개를 함께 열 수 있다 (`value: string[]`).
|
|
283
|
+
*/
|
|
284
|
+
type AccordionProps = ComponentPropsWithoutRef<typeof RadixAccordion.Root>;
|
|
285
|
+
declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
286
|
+
interface AccordionItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixAccordion.Item>, 'title'> {
|
|
287
|
+
/** 항목 값. Accordion 의 value 와 비교한다 */
|
|
288
|
+
value: string;
|
|
289
|
+
/** 항목 제목 (펼침 버튼의 이름) */
|
|
290
|
+
title: ReactNode;
|
|
291
|
+
/** 제목을 감싸는 heading 수준. 페이지의 heading 구조에 맞춘다 (기본 3) */
|
|
292
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
293
|
+
/** 펼쳤을 때 보이는 내용 */
|
|
294
|
+
children?: ReactNode;
|
|
295
|
+
}
|
|
296
|
+
declare const AccordionItem: react.ForwardRefExoticComponent<AccordionItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
297
|
+
|
|
298
|
+
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
299
|
+
/** 이미지 주소. 없거나 불러오지 못하면 fallback 을 보여 준다 */
|
|
300
|
+
src?: string;
|
|
301
|
+
/** 스크린리더가 읽을 이름. 없으면 `name` 을 쓰고, 둘 다 없으면 장식용으로 숨긴다 */
|
|
302
|
+
alt?: string;
|
|
303
|
+
/** 사용자 이름. fallback 이니셜과 기본 접근 가능한 이름에 쓴다 */
|
|
304
|
+
name?: string;
|
|
305
|
+
/** fallback 을 직접 지정한다 (기본: 이니셜 → 사용자 아이콘) */
|
|
306
|
+
fallback?: ReactNode;
|
|
307
|
+
/** 크기 (sm 28px, md 36px, lg 48px) */
|
|
308
|
+
size?: 'sm' | 'md' | 'lg';
|
|
309
|
+
/** 모양 */
|
|
310
|
+
shape?: 'circle' | 'square';
|
|
311
|
+
}
|
|
312
|
+
declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLSpanElement>>;
|
|
313
|
+
|
|
276
314
|
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
277
315
|
/** 시각적 스타일 */
|
|
278
316
|
variant?: 'solid' | 'soft' | 'outline';
|
|
@@ -336,6 +374,49 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
|
|
|
336
374
|
}
|
|
337
375
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
338
376
|
|
|
377
|
+
interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
378
|
+
/** 방향. vertical 은 flex 행 안에서 부모 높이를 채운다 */
|
|
379
|
+
orientation?: 'horizontal' | 'vertical';
|
|
380
|
+
/** 시각적 구분만 하고 의미가 없으면 true — 스크린리더에서 숨긴다 */
|
|
381
|
+
decorative?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* 가운데에 표시할 텍스트 (예: "또는"). horizontal 에서만 쓴다.
|
|
384
|
+
* separator 역할의 자식은 스크린리더가 읽지 않으므로, 텍스트가 있으면 선만 숨기고 텍스트는 읽히게 둔다.
|
|
385
|
+
*/
|
|
386
|
+
children?: ReactNode;
|
|
387
|
+
}
|
|
388
|
+
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
389
|
+
|
|
390
|
+
/** 메뉴 루트. `open`/`defaultOpen`/`onOpenChange`/`modal` 을 받는다 */
|
|
391
|
+
declare const DropdownMenu: react.FC<RadixMenu.DropdownMenuProps>;
|
|
392
|
+
type DropdownMenuProps = ComponentPropsWithoutRef<typeof RadixMenu.Root>;
|
|
393
|
+
/** 메뉴를 여는 요소. 보통 `asChild` 로 Button 을 감싼다 */
|
|
394
|
+
declare const DropdownMenuTrigger: react.ForwardRefExoticComponent<RadixMenu.DropdownMenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
395
|
+
type DropdownMenuTriggerProps = ComponentPropsWithoutRef<typeof RadixMenu.Trigger>;
|
|
396
|
+
/** 항목 묶음 (role="group") */
|
|
397
|
+
declare const DropdownMenuGroup: react.ForwardRefExoticComponent<RadixMenu.DropdownMenuGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
398
|
+
interface DropdownMenuContentProps extends ComponentPropsWithoutRef<typeof RadixMenu.Content> {
|
|
399
|
+
/** 트리거 기준 표시 방향 */
|
|
400
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
401
|
+
/** 정렬 */
|
|
402
|
+
align?: 'start' | 'center' | 'end';
|
|
403
|
+
}
|
|
404
|
+
declare const DropdownMenuContent: react.ForwardRefExoticComponent<DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
405
|
+
interface DropdownMenuItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixMenu.Item>, 'color'> {
|
|
406
|
+
/** 텍스트 앞 아이콘 (장식용) */
|
|
407
|
+
icon?: ReactNode;
|
|
408
|
+
/** 오른쪽에 표시할 단축키 (예: "⌘K"). 표시용이라 항목 이름에는 포함되지 않는다 */
|
|
409
|
+
shortcut?: string;
|
|
410
|
+
/** danger 는 삭제처럼 되돌리기 어려운 동작 */
|
|
411
|
+
color?: 'default' | 'danger';
|
|
412
|
+
}
|
|
413
|
+
declare const DropdownMenuItem: react.ForwardRefExoticComponent<DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
414
|
+
type DropdownMenuLabelProps = ComponentPropsWithoutRef<typeof RadixMenu.Label>;
|
|
415
|
+
/** 항목 묶음의 제목 (선택할 수 없음) */
|
|
416
|
+
declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
417
|
+
type DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof RadixMenu.Separator>;
|
|
418
|
+
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
419
|
+
|
|
339
420
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
340
421
|
/** 크기 */
|
|
341
422
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -395,6 +476,64 @@ declare function Modal({ open, defaultOpen, onOpenChange, trigger, title, descri
|
|
|
395
476
|
*/
|
|
396
477
|
declare const ModalClose: react.ForwardRefExoticComponent<Dialog.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
397
478
|
|
|
479
|
+
type ItemType = 'previous' | 'next' | 'page';
|
|
480
|
+
interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
481
|
+
/** 전체 페이지 수. 1 미만이면 아무것도 렌더링하지 않는다 */
|
|
482
|
+
totalPages: number;
|
|
483
|
+
/** 현재 페이지, 1부터 (제어 모드) */
|
|
484
|
+
page?: number;
|
|
485
|
+
/** 처음 페이지 (비제어 모드, 기본 1) */
|
|
486
|
+
defaultPage?: number;
|
|
487
|
+
/** 페이지를 바꿀 때 호출된다 */
|
|
488
|
+
onPageChange?: (page: number) => void;
|
|
489
|
+
/** 현재 페이지 양옆에 항상 보일 페이지 수 (기본 1) */
|
|
490
|
+
siblingCount?: number;
|
|
491
|
+
/** 처음과 끝에 항상 보일 페이지 수 (기본 1) */
|
|
492
|
+
boundaryCount?: number;
|
|
493
|
+
/** 크기 */
|
|
494
|
+
size?: 'sm' | 'md';
|
|
495
|
+
/** 버튼의 스크린리더용 이름 (다국어 대응). 기본: "이전 페이지", "다음 페이지", "3 페이지" */
|
|
496
|
+
getItemLabel?: (type: ItemType, page: number) => string;
|
|
497
|
+
}
|
|
498
|
+
declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
|
|
499
|
+
|
|
500
|
+
interface PopoverProps {
|
|
501
|
+
/** 팝오버 내용 */
|
|
502
|
+
content: ReactNode;
|
|
503
|
+
/** 팝오버를 여는 요소. ref 를 받을 수 있는 요소 하나여야 한다 (보통 Button) */
|
|
504
|
+
children: ReactElement;
|
|
505
|
+
/** 제목. 팝오버(role="dialog")의 접근 가능한 이름이 된다 */
|
|
506
|
+
title?: ReactNode;
|
|
507
|
+
/** title 이 없을 때 스크린리더용 이름 */
|
|
508
|
+
'aria-label'?: string;
|
|
509
|
+
/** 오른쪽 위에 닫기(X) 버튼을 표시한다 */
|
|
510
|
+
showClose?: boolean;
|
|
511
|
+
/** 트리거를 가리키는 화살표를 표시한다 */
|
|
512
|
+
showArrow?: boolean;
|
|
513
|
+
/** 표시 방향 */
|
|
514
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
515
|
+
/** 정렬 */
|
|
516
|
+
align?: 'start' | 'center' | 'end';
|
|
517
|
+
/** 열림 상태 (제어 모드) */
|
|
518
|
+
open?: boolean;
|
|
519
|
+
/** 처음 열림 상태 (비제어 모드) */
|
|
520
|
+
defaultOpen?: boolean;
|
|
521
|
+
/** 열림 상태가 바뀔 때 호출된다 */
|
|
522
|
+
onOpenChange?: (open: boolean) => void;
|
|
523
|
+
/** true 이면 열려 있는 동안 바깥 요소와 상호작용할 수 없고 포커스가 팝오버 안에 갇힌다 */
|
|
524
|
+
modal?: boolean;
|
|
525
|
+
/** 팝오버 className */
|
|
526
|
+
className?: string;
|
|
527
|
+
/** 팝오버 style (너비 지정 등) */
|
|
528
|
+
style?: CSSProperties;
|
|
529
|
+
}
|
|
530
|
+
declare function Popover({ content, children, title, 'aria-label': ariaLabel, showClose, showArrow, side, align, open, defaultOpen, onOpenChange, modal, className, style, }: PopoverProps): react.JSX.Element;
|
|
531
|
+
/**
|
|
532
|
+
* 팝오버 내용 안에서 누르면 팝오버를 닫는 요소.
|
|
533
|
+
* @example <PopoverClose asChild><Button>확인</Button></PopoverClose>
|
|
534
|
+
*/
|
|
535
|
+
declare const PopoverClose: react.ForwardRefExoticComponent<RadixPopover.PopoverCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
536
|
+
|
|
398
537
|
interface RadioOption {
|
|
399
538
|
value: string;
|
|
400
539
|
label: ReactNode;
|
|
@@ -471,6 +610,22 @@ interface SelectProps {
|
|
|
471
610
|
}
|
|
472
611
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
473
612
|
|
|
613
|
+
interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
614
|
+
/** 모양. text 는 글자 높이(1em), circle 은 width 를 지름으로 쓴다 */
|
|
615
|
+
variant?: 'text' | 'rect' | 'circle';
|
|
616
|
+
/** 너비. 숫자는 px (기본: text·rect 100%, circle 40px) */
|
|
617
|
+
width?: number | string;
|
|
618
|
+
/** 높이. 숫자는 px (기본: text 1em, rect 100px, circle 은 width 와 같음) */
|
|
619
|
+
height?: number | string;
|
|
620
|
+
/** text 에서 여러 줄을 그린다. 마지막 줄은 60% 너비 */
|
|
621
|
+
lines?: number;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* 콘텐츠를 불러오는 동안 자리를 표시한다. 장식용이라 스크린리더에서 숨긴다 —
|
|
625
|
+
* 로딩 중인 영역(감싸는 요소)에 `aria-busy="true"` 를 붙여 상태를 알린다.
|
|
626
|
+
*/
|
|
627
|
+
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLSpanElement>>;
|
|
628
|
+
|
|
474
629
|
interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
475
630
|
/** 크기 (sm 16px, md 20px, lg 28px) */
|
|
476
631
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -525,6 +680,38 @@ interface SwitchProps {
|
|
|
525
680
|
}
|
|
526
681
|
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
527
682
|
|
|
683
|
+
interface TabsProps extends Omit<ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'orientation'> {
|
|
684
|
+
/** 시각적 스타일. line 은 밑줄, soft 는 배경이 있는 세그먼트 */
|
|
685
|
+
variant?: 'line' | 'soft';
|
|
686
|
+
/** 크기 */
|
|
687
|
+
size?: 'sm' | 'md';
|
|
688
|
+
/** 선택된 탭 (제어 모드) */
|
|
689
|
+
value?: string;
|
|
690
|
+
/** 처음 선택된 탭 (비제어 모드) */
|
|
691
|
+
defaultValue?: string;
|
|
692
|
+
/** 선택된 탭이 바뀔 때 호출된다 */
|
|
693
|
+
onValueChange?: (value: string) => void;
|
|
694
|
+
/**
|
|
695
|
+
* automatic(기본): 방향키로 포커스를 옮기면 바로 선택된다.
|
|
696
|
+
* manual: 방향키로 포커스만 옮기고 Enter/Space 로 선택한다 (탭 전환 비용이 클 때).
|
|
697
|
+
*/
|
|
698
|
+
activationMode?: 'automatic' | 'manual';
|
|
699
|
+
}
|
|
700
|
+
declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
|
|
701
|
+
type TabsListProps = ComponentPropsWithoutRef<typeof RadixTabs.List>;
|
|
702
|
+
/** 탭 버튼 목록 (role="tablist"). 접근 가능한 이름이 필요하면 aria-label 을 준다 */
|
|
703
|
+
declare const TabsList: react.ForwardRefExoticComponent<Omit<RadixTabs.TabsListProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
704
|
+
interface TabsTriggerProps extends ComponentPropsWithoutRef<typeof RadixTabs.Trigger> {
|
|
705
|
+
/** 이 탭의 값. 같은 값을 가진 TabsContent 와 연결된다 */
|
|
706
|
+
value: string;
|
|
707
|
+
}
|
|
708
|
+
declare const TabsTrigger: react.ForwardRefExoticComponent<TabsTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
709
|
+
interface TabsContentProps extends ComponentPropsWithoutRef<typeof RadixTabs.Content> {
|
|
710
|
+
/** 연결할 TabsTrigger 의 값 */
|
|
711
|
+
value: string;
|
|
712
|
+
}
|
|
713
|
+
declare const TabsContent: react.ForwardRefExoticComponent<TabsContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
714
|
+
|
|
528
715
|
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
529
716
|
/** 입력창 위에 표시할 레이블 */
|
|
530
717
|
label?: ReactNode;
|
|
@@ -620,4 +807,4 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
620
807
|
}
|
|
621
808
|
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
|
|
622
809
|
|
|
623
|
-
export { Badge, type BadgeProps, type BestowTheme, Button, type ButtonProps, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, type DeepPartial, Input, type InputProps, type IntentName, Modal, ModalClose, type ModalProps, RadioGroup, type RadioGroupProps, type RadioOption, Select, type SelectOption, type SelectProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
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, ReactNode, ButtonHTMLAttributes, ElementType, InputHTMLAttributes,
|
|
4
|
+
import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, ButtonHTMLAttributes, ElementType, InputHTMLAttributes, ReactElement, TextareaHTMLAttributes } from 'react';
|
|
5
|
+
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
6
|
+
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
5
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
8
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
9
|
+
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
6
10
|
|
|
7
11
|
declare const lightTokens: {
|
|
8
12
|
color: _bestow_ui_tokens.SemanticColors;
|
|
@@ -273,6 +277,40 @@ declare function usePortalProps(): {
|
|
|
273
277
|
*/
|
|
274
278
|
declare function usePortalClassName(): string;
|
|
275
279
|
|
|
280
|
+
/**
|
|
281
|
+
* `type="single"`: 한 번에 하나만 열린다 (`value: string`). `collapsible` 이면 열린 항목을 다시 눌러 닫을 수 있다.
|
|
282
|
+
* `type="multiple"`: 여러 개를 함께 열 수 있다 (`value: string[]`).
|
|
283
|
+
*/
|
|
284
|
+
type AccordionProps = ComponentPropsWithoutRef<typeof RadixAccordion.Root>;
|
|
285
|
+
declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
286
|
+
interface AccordionItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixAccordion.Item>, 'title'> {
|
|
287
|
+
/** 항목 값. Accordion 의 value 와 비교한다 */
|
|
288
|
+
value: string;
|
|
289
|
+
/** 항목 제목 (펼침 버튼의 이름) */
|
|
290
|
+
title: ReactNode;
|
|
291
|
+
/** 제목을 감싸는 heading 수준. 페이지의 heading 구조에 맞춘다 (기본 3) */
|
|
292
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
293
|
+
/** 펼쳤을 때 보이는 내용 */
|
|
294
|
+
children?: ReactNode;
|
|
295
|
+
}
|
|
296
|
+
declare const AccordionItem: react.ForwardRefExoticComponent<AccordionItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
297
|
+
|
|
298
|
+
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
299
|
+
/** 이미지 주소. 없거나 불러오지 못하면 fallback 을 보여 준다 */
|
|
300
|
+
src?: string;
|
|
301
|
+
/** 스크린리더가 읽을 이름. 없으면 `name` 을 쓰고, 둘 다 없으면 장식용으로 숨긴다 */
|
|
302
|
+
alt?: string;
|
|
303
|
+
/** 사용자 이름. fallback 이니셜과 기본 접근 가능한 이름에 쓴다 */
|
|
304
|
+
name?: string;
|
|
305
|
+
/** fallback 을 직접 지정한다 (기본: 이니셜 → 사용자 아이콘) */
|
|
306
|
+
fallback?: ReactNode;
|
|
307
|
+
/** 크기 (sm 28px, md 36px, lg 48px) */
|
|
308
|
+
size?: 'sm' | 'md' | 'lg';
|
|
309
|
+
/** 모양 */
|
|
310
|
+
shape?: 'circle' | 'square';
|
|
311
|
+
}
|
|
312
|
+
declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLSpanElement>>;
|
|
313
|
+
|
|
276
314
|
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
277
315
|
/** 시각적 스타일 */
|
|
278
316
|
variant?: 'solid' | 'soft' | 'outline';
|
|
@@ -336,6 +374,49 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
|
|
|
336
374
|
}
|
|
337
375
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
338
376
|
|
|
377
|
+
interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
378
|
+
/** 방향. vertical 은 flex 행 안에서 부모 높이를 채운다 */
|
|
379
|
+
orientation?: 'horizontal' | 'vertical';
|
|
380
|
+
/** 시각적 구분만 하고 의미가 없으면 true — 스크린리더에서 숨긴다 */
|
|
381
|
+
decorative?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* 가운데에 표시할 텍스트 (예: "또는"). horizontal 에서만 쓴다.
|
|
384
|
+
* separator 역할의 자식은 스크린리더가 읽지 않으므로, 텍스트가 있으면 선만 숨기고 텍스트는 읽히게 둔다.
|
|
385
|
+
*/
|
|
386
|
+
children?: ReactNode;
|
|
387
|
+
}
|
|
388
|
+
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
389
|
+
|
|
390
|
+
/** 메뉴 루트. `open`/`defaultOpen`/`onOpenChange`/`modal` 을 받는다 */
|
|
391
|
+
declare const DropdownMenu: react.FC<RadixMenu.DropdownMenuProps>;
|
|
392
|
+
type DropdownMenuProps = ComponentPropsWithoutRef<typeof RadixMenu.Root>;
|
|
393
|
+
/** 메뉴를 여는 요소. 보통 `asChild` 로 Button 을 감싼다 */
|
|
394
|
+
declare const DropdownMenuTrigger: react.ForwardRefExoticComponent<RadixMenu.DropdownMenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
395
|
+
type DropdownMenuTriggerProps = ComponentPropsWithoutRef<typeof RadixMenu.Trigger>;
|
|
396
|
+
/** 항목 묶음 (role="group") */
|
|
397
|
+
declare const DropdownMenuGroup: react.ForwardRefExoticComponent<RadixMenu.DropdownMenuGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
398
|
+
interface DropdownMenuContentProps extends ComponentPropsWithoutRef<typeof RadixMenu.Content> {
|
|
399
|
+
/** 트리거 기준 표시 방향 */
|
|
400
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
401
|
+
/** 정렬 */
|
|
402
|
+
align?: 'start' | 'center' | 'end';
|
|
403
|
+
}
|
|
404
|
+
declare const DropdownMenuContent: react.ForwardRefExoticComponent<DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
405
|
+
interface DropdownMenuItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixMenu.Item>, 'color'> {
|
|
406
|
+
/** 텍스트 앞 아이콘 (장식용) */
|
|
407
|
+
icon?: ReactNode;
|
|
408
|
+
/** 오른쪽에 표시할 단축키 (예: "⌘K"). 표시용이라 항목 이름에는 포함되지 않는다 */
|
|
409
|
+
shortcut?: string;
|
|
410
|
+
/** danger 는 삭제처럼 되돌리기 어려운 동작 */
|
|
411
|
+
color?: 'default' | 'danger';
|
|
412
|
+
}
|
|
413
|
+
declare const DropdownMenuItem: react.ForwardRefExoticComponent<DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
414
|
+
type DropdownMenuLabelProps = ComponentPropsWithoutRef<typeof RadixMenu.Label>;
|
|
415
|
+
/** 항목 묶음의 제목 (선택할 수 없음) */
|
|
416
|
+
declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
417
|
+
type DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof RadixMenu.Separator>;
|
|
418
|
+
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<RadixMenu.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
419
|
+
|
|
339
420
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
340
421
|
/** 크기 */
|
|
341
422
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -395,6 +476,64 @@ declare function Modal({ open, defaultOpen, onOpenChange, trigger, title, descri
|
|
|
395
476
|
*/
|
|
396
477
|
declare const ModalClose: react.ForwardRefExoticComponent<Dialog.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
397
478
|
|
|
479
|
+
type ItemType = 'previous' | 'next' | 'page';
|
|
480
|
+
interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
481
|
+
/** 전체 페이지 수. 1 미만이면 아무것도 렌더링하지 않는다 */
|
|
482
|
+
totalPages: number;
|
|
483
|
+
/** 현재 페이지, 1부터 (제어 모드) */
|
|
484
|
+
page?: number;
|
|
485
|
+
/** 처음 페이지 (비제어 모드, 기본 1) */
|
|
486
|
+
defaultPage?: number;
|
|
487
|
+
/** 페이지를 바꿀 때 호출된다 */
|
|
488
|
+
onPageChange?: (page: number) => void;
|
|
489
|
+
/** 현재 페이지 양옆에 항상 보일 페이지 수 (기본 1) */
|
|
490
|
+
siblingCount?: number;
|
|
491
|
+
/** 처음과 끝에 항상 보일 페이지 수 (기본 1) */
|
|
492
|
+
boundaryCount?: number;
|
|
493
|
+
/** 크기 */
|
|
494
|
+
size?: 'sm' | 'md';
|
|
495
|
+
/** 버튼의 스크린리더용 이름 (다국어 대응). 기본: "이전 페이지", "다음 페이지", "3 페이지" */
|
|
496
|
+
getItemLabel?: (type: ItemType, page: number) => string;
|
|
497
|
+
}
|
|
498
|
+
declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
|
|
499
|
+
|
|
500
|
+
interface PopoverProps {
|
|
501
|
+
/** 팝오버 내용 */
|
|
502
|
+
content: ReactNode;
|
|
503
|
+
/** 팝오버를 여는 요소. ref 를 받을 수 있는 요소 하나여야 한다 (보통 Button) */
|
|
504
|
+
children: ReactElement;
|
|
505
|
+
/** 제목. 팝오버(role="dialog")의 접근 가능한 이름이 된다 */
|
|
506
|
+
title?: ReactNode;
|
|
507
|
+
/** title 이 없을 때 스크린리더용 이름 */
|
|
508
|
+
'aria-label'?: string;
|
|
509
|
+
/** 오른쪽 위에 닫기(X) 버튼을 표시한다 */
|
|
510
|
+
showClose?: boolean;
|
|
511
|
+
/** 트리거를 가리키는 화살표를 표시한다 */
|
|
512
|
+
showArrow?: boolean;
|
|
513
|
+
/** 표시 방향 */
|
|
514
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
515
|
+
/** 정렬 */
|
|
516
|
+
align?: 'start' | 'center' | 'end';
|
|
517
|
+
/** 열림 상태 (제어 모드) */
|
|
518
|
+
open?: boolean;
|
|
519
|
+
/** 처음 열림 상태 (비제어 모드) */
|
|
520
|
+
defaultOpen?: boolean;
|
|
521
|
+
/** 열림 상태가 바뀔 때 호출된다 */
|
|
522
|
+
onOpenChange?: (open: boolean) => void;
|
|
523
|
+
/** true 이면 열려 있는 동안 바깥 요소와 상호작용할 수 없고 포커스가 팝오버 안에 갇힌다 */
|
|
524
|
+
modal?: boolean;
|
|
525
|
+
/** 팝오버 className */
|
|
526
|
+
className?: string;
|
|
527
|
+
/** 팝오버 style (너비 지정 등) */
|
|
528
|
+
style?: CSSProperties;
|
|
529
|
+
}
|
|
530
|
+
declare function Popover({ content, children, title, 'aria-label': ariaLabel, showClose, showArrow, side, align, open, defaultOpen, onOpenChange, modal, className, style, }: PopoverProps): react.JSX.Element;
|
|
531
|
+
/**
|
|
532
|
+
* 팝오버 내용 안에서 누르면 팝오버를 닫는 요소.
|
|
533
|
+
* @example <PopoverClose asChild><Button>확인</Button></PopoverClose>
|
|
534
|
+
*/
|
|
535
|
+
declare const PopoverClose: react.ForwardRefExoticComponent<RadixPopover.PopoverCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
536
|
+
|
|
398
537
|
interface RadioOption {
|
|
399
538
|
value: string;
|
|
400
539
|
label: ReactNode;
|
|
@@ -471,6 +610,22 @@ interface SelectProps {
|
|
|
471
610
|
}
|
|
472
611
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
473
612
|
|
|
613
|
+
interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
614
|
+
/** 모양. text 는 글자 높이(1em), circle 은 width 를 지름으로 쓴다 */
|
|
615
|
+
variant?: 'text' | 'rect' | 'circle';
|
|
616
|
+
/** 너비. 숫자는 px (기본: text·rect 100%, circle 40px) */
|
|
617
|
+
width?: number | string;
|
|
618
|
+
/** 높이. 숫자는 px (기본: text 1em, rect 100px, circle 은 width 와 같음) */
|
|
619
|
+
height?: number | string;
|
|
620
|
+
/** text 에서 여러 줄을 그린다. 마지막 줄은 60% 너비 */
|
|
621
|
+
lines?: number;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* 콘텐츠를 불러오는 동안 자리를 표시한다. 장식용이라 스크린리더에서 숨긴다 —
|
|
625
|
+
* 로딩 중인 영역(감싸는 요소)에 `aria-busy="true"` 를 붙여 상태를 알린다.
|
|
626
|
+
*/
|
|
627
|
+
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLSpanElement>>;
|
|
628
|
+
|
|
474
629
|
interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
475
630
|
/** 크기 (sm 16px, md 20px, lg 28px) */
|
|
476
631
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -525,6 +680,38 @@ interface SwitchProps {
|
|
|
525
680
|
}
|
|
526
681
|
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
527
682
|
|
|
683
|
+
interface TabsProps extends Omit<ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'orientation'> {
|
|
684
|
+
/** 시각적 스타일. line 은 밑줄, soft 는 배경이 있는 세그먼트 */
|
|
685
|
+
variant?: 'line' | 'soft';
|
|
686
|
+
/** 크기 */
|
|
687
|
+
size?: 'sm' | 'md';
|
|
688
|
+
/** 선택된 탭 (제어 모드) */
|
|
689
|
+
value?: string;
|
|
690
|
+
/** 처음 선택된 탭 (비제어 모드) */
|
|
691
|
+
defaultValue?: string;
|
|
692
|
+
/** 선택된 탭이 바뀔 때 호출된다 */
|
|
693
|
+
onValueChange?: (value: string) => void;
|
|
694
|
+
/**
|
|
695
|
+
* automatic(기본): 방향키로 포커스를 옮기면 바로 선택된다.
|
|
696
|
+
* manual: 방향키로 포커스만 옮기고 Enter/Space 로 선택한다 (탭 전환 비용이 클 때).
|
|
697
|
+
*/
|
|
698
|
+
activationMode?: 'automatic' | 'manual';
|
|
699
|
+
}
|
|
700
|
+
declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
|
|
701
|
+
type TabsListProps = ComponentPropsWithoutRef<typeof RadixTabs.List>;
|
|
702
|
+
/** 탭 버튼 목록 (role="tablist"). 접근 가능한 이름이 필요하면 aria-label 을 준다 */
|
|
703
|
+
declare const TabsList: react.ForwardRefExoticComponent<Omit<RadixTabs.TabsListProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
704
|
+
interface TabsTriggerProps extends ComponentPropsWithoutRef<typeof RadixTabs.Trigger> {
|
|
705
|
+
/** 이 탭의 값. 같은 값을 가진 TabsContent 와 연결된다 */
|
|
706
|
+
value: string;
|
|
707
|
+
}
|
|
708
|
+
declare const TabsTrigger: react.ForwardRefExoticComponent<TabsTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
709
|
+
interface TabsContentProps extends ComponentPropsWithoutRef<typeof RadixTabs.Content> {
|
|
710
|
+
/** 연결할 TabsTrigger 의 값 */
|
|
711
|
+
value: string;
|
|
712
|
+
}
|
|
713
|
+
declare const TabsContent: react.ForwardRefExoticComponent<TabsContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
714
|
+
|
|
528
715
|
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
529
716
|
/** 입력창 위에 표시할 레이블 */
|
|
530
717
|
label?: ReactNode;
|
|
@@ -620,4 +807,4 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
620
807
|
}
|
|
621
808
|
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
|
|
622
809
|
|
|
623
|
-
export { Badge, type BadgeProps, type BestowTheme, Button, type ButtonProps, Card, CardBody, CardFooter, CardHeader, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, type DeepPartial, Input, type InputProps, type IntentName, Modal, ModalClose, type ModalProps, RadioGroup, type RadioGroupProps, type RadioOption, Select, type SelectOption, type SelectProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, 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 };
|
|
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 };
|