@bestow-ui/react 0.9.0 → 0.11.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 +3 -2
- package/dist/index.cjs +1931 -628
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1189 -700
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +408 -29
- package/dist/index.d.ts +408 -29
- package/dist/index.js +1909 -616
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, ElementType, ButtonHTMLAttributes,
|
|
4
|
+
import { HTMLAttributes, CSSProperties, ComponentPropsWithoutRef, ReactNode, InputHTMLAttributes, ElementType, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, TdHTMLAttributes, ThHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
5
5
|
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
6
6
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
7
7
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
@@ -303,6 +303,122 @@ interface AccordionItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixA
|
|
|
303
303
|
}
|
|
304
304
|
declare const AccordionItem: react.ForwardRefExoticComponent<AccordionItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
305
305
|
|
|
306
|
+
/** 주소 검색 결과 */
|
|
307
|
+
interface AddressSearchResult {
|
|
308
|
+
/** 우편번호 (5자리 국가기초구역번호) */
|
|
309
|
+
zonecode: string;
|
|
310
|
+
/** 기본 주소 (도로명 또는 지번) */
|
|
311
|
+
address: string;
|
|
312
|
+
/** 참고 항목 (도로명 주소일 때 법정동·건물명, 예: " (역삼동, 래미안아파트)") */
|
|
313
|
+
extraAddress?: string;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* 주소 검색 공급자. container 안에 검색 화면을 그리고, 사용자가 고르면 onSelect 를 부른다.
|
|
317
|
+
* 정리 함수를 돌려주면 검색 창이 닫힐 때 부른다. 다른 주소 서비스(행정안전부 도로명주소 API 등)로 바꿔 끼울 수 있다.
|
|
318
|
+
*/
|
|
319
|
+
type AddressProvider = (container: HTMLElement, onSelect: (result: AddressSearchResult) => void) => void | (() => void) | Promise<void | (() => void)>;
|
|
320
|
+
interface KakaoPostcodeData {
|
|
321
|
+
zonecode: string;
|
|
322
|
+
userSelectedType: 'R' | 'J';
|
|
323
|
+
roadAddress: string;
|
|
324
|
+
jibunAddress: string;
|
|
325
|
+
autoJibunAddress?: string;
|
|
326
|
+
bname: string;
|
|
327
|
+
buildingName: string;
|
|
328
|
+
apartment: 'Y' | 'N';
|
|
329
|
+
}
|
|
330
|
+
/** 카카오 가이드의 방식으로 도로명 주소의 참고 항목(법정동, 공동주택 건물명)을 만든다 */
|
|
331
|
+
declare function composeExtraAddress(data: Pick<KakaoPostcodeData, 'userSelectedType' | 'bname' | 'buildingName' | 'apartment'>): string;
|
|
332
|
+
/**
|
|
333
|
+
* 기본 공급자: 카카오(다음) 우편번호 서비스. 처음 쓸 때 스크립트를 불러오므로 코어 번들 크기에 영향이 없다.
|
|
334
|
+
* 사용 조건은 서비스 가이드를 따른다.
|
|
335
|
+
*/
|
|
336
|
+
declare const kakaoPostcodeProvider: AddressProvider;
|
|
337
|
+
|
|
338
|
+
interface AddressValue {
|
|
339
|
+
/** 우편번호 */
|
|
340
|
+
zonecode: string;
|
|
341
|
+
/** 기본 주소 */
|
|
342
|
+
address: string;
|
|
343
|
+
/** 참고 항목 (예: " (역삼동, 래미안아파트)") */
|
|
344
|
+
extraAddress?: string;
|
|
345
|
+
/** 상세 주소 (사용자가 입력) */
|
|
346
|
+
detail: string;
|
|
347
|
+
}
|
|
348
|
+
interface AddressInputProps {
|
|
349
|
+
/** 주소 값 (제어 모드) */
|
|
350
|
+
value?: AddressValue;
|
|
351
|
+
/** 처음 값 (비제어 모드) */
|
|
352
|
+
defaultValue?: AddressValue;
|
|
353
|
+
/** 주소를 고르거나 상세 주소를 입력할 때 호출된다 */
|
|
354
|
+
onValueChange?: (value: AddressValue) => void;
|
|
355
|
+
/** 그룹 제목 */
|
|
356
|
+
label?: ReactNode;
|
|
357
|
+
required?: boolean;
|
|
358
|
+
/** 아래 도움말. error 일 때는 에러 메시지로 표시된다 */
|
|
359
|
+
helperText?: ReactNode;
|
|
360
|
+
error?: boolean;
|
|
361
|
+
disabled?: boolean;
|
|
362
|
+
/** 주소 검색 공급자. 기본은 카카오(다음) 우편번호 서비스 — 처음 검색할 때 스크립트를 불러온다 */
|
|
363
|
+
provider?: AddressProvider;
|
|
364
|
+
/** 검색 버튼·검색 창 제목 */
|
|
365
|
+
searchLabel?: string;
|
|
366
|
+
detailPlaceholder?: string;
|
|
367
|
+
/** 검색 화면을 불러오지 못했을 때 문구 */
|
|
368
|
+
loadErrorText?: string;
|
|
369
|
+
/** form 제출 시 이름. `${name}[zonecode]`, `${name}[address]`, `${name}[detail]` 로 제출된다 */
|
|
370
|
+
name?: string;
|
|
371
|
+
className?: string;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* 주소 입력 (우편번호 · 기본 주소 · 상세 주소). "주소 검색" 을 누르면 검색 창(Modal)에서 주소를 고르고,
|
|
375
|
+
* 고르면 상세 주소 입력창으로 포커스를 옮긴다.
|
|
376
|
+
*/
|
|
377
|
+
declare const AddressInput: react.ForwardRefExoticComponent<AddressInputProps & react.RefAttributes<HTMLFieldSetElement>>;
|
|
378
|
+
|
|
379
|
+
interface AgreementItem {
|
|
380
|
+
value: string;
|
|
381
|
+
/** 약관 이름 (예: "서비스 이용약관 동의") */
|
|
382
|
+
label: ReactNode;
|
|
383
|
+
/** 필수 동의 여부. 이름 앞에 "필수"/"선택" 이 붙는다 */
|
|
384
|
+
required?: boolean;
|
|
385
|
+
/** 펼쳐서 보여 줄 약관 내용. 있으면 "보기" 버튼이 생긴다 */
|
|
386
|
+
content?: ReactNode;
|
|
387
|
+
}
|
|
388
|
+
interface AgreementGroupProps {
|
|
389
|
+
items: AgreementItem[];
|
|
390
|
+
/** 동의한 항목의 value 목록 (제어 모드) */
|
|
391
|
+
value?: string[];
|
|
392
|
+
/** 처음 동의한 항목 (비제어 모드) */
|
|
393
|
+
defaultValue?: string[];
|
|
394
|
+
/** 동의 항목이 바뀔 때 호출된다 */
|
|
395
|
+
onValueChange?: (value: string[]) => void;
|
|
396
|
+
/** 그룹 제목 (fieldset 의 legend) */
|
|
397
|
+
label?: ReactNode;
|
|
398
|
+
/** "전체 동의" 문구 */
|
|
399
|
+
allLabel?: ReactNode;
|
|
400
|
+
/** 아래 도움말. error 일 때는 에러 메시지로 표시된다 (예: "필수 약관에 동의해 주세요") */
|
|
401
|
+
helperText?: ReactNode;
|
|
402
|
+
error?: boolean;
|
|
403
|
+
disabled?: boolean;
|
|
404
|
+
/** 필수·선택 표시 문구 (다국어) */
|
|
405
|
+
requiredText?: string;
|
|
406
|
+
optionalText?: string;
|
|
407
|
+
/** 약관 내용 펼치기 버튼 문구 */
|
|
408
|
+
showText?: string;
|
|
409
|
+
hideText?: string;
|
|
410
|
+
/** form 제출 시 사용할 이름. 동의한 value 마다 hidden input 이 생긴다 */
|
|
411
|
+
name?: string;
|
|
412
|
+
className?: string;
|
|
413
|
+
}
|
|
414
|
+
/** 필수 항목에 모두 동의했는지 */
|
|
415
|
+
declare function hasAllRequiredAgreements(items: AgreementItem[], value: string[]): boolean;
|
|
416
|
+
/**
|
|
417
|
+
* 약관 동의 묶음. "전체 동의" 와 개별 항목이 서로 맞춰지고(일부만 동의하면 전체 동의는 부분 선택 상태),
|
|
418
|
+
* 항목마다 필수·선택 표시와 약관 내용 펼쳐 보기를 지원한다.
|
|
419
|
+
*/
|
|
420
|
+
declare const AgreementGroup: react.ForwardRefExoticComponent<AgreementGroupProps & react.RefAttributes<HTMLFieldSetElement>>;
|
|
421
|
+
|
|
306
422
|
type AlertColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
307
423
|
interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'title'> {
|
|
308
424
|
/** 시각적 스타일 */
|
|
@@ -327,6 +443,55 @@ interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'tit
|
|
|
327
443
|
*/
|
|
328
444
|
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
329
445
|
|
|
446
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
447
|
+
/** 크기 */
|
|
448
|
+
size?: 'sm' | 'md' | 'lg';
|
|
449
|
+
/** 에러 상태 표시 (aria-invalid 도 함께 설정된다) */
|
|
450
|
+
invalid?: boolean;
|
|
451
|
+
/** 부모 너비를 꽉 채운다 */
|
|
452
|
+
fullWidth?: boolean;
|
|
453
|
+
/** 입력창 앞에 표시할 요소 (아이콘, 단위 등) */
|
|
454
|
+
startAdornment?: ReactNode;
|
|
455
|
+
/** 입력창 뒤에 표시할 요소 */
|
|
456
|
+
endAdornment?: ReactNode;
|
|
457
|
+
/** 바깥 래퍼에 적용할 className. className 은 input 요소에 적용된다 */
|
|
458
|
+
rootClassName?: string;
|
|
459
|
+
}
|
|
460
|
+
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
461
|
+
|
|
462
|
+
interface TextFieldProps extends Omit<InputProps, 'invalid'> {
|
|
463
|
+
/** 입력창 위에 표시할 레이블 */
|
|
464
|
+
label?: ReactNode;
|
|
465
|
+
/** 입력창 아래에 표시할 도움말. error 일 때는 에러 메시지로 표시된다 */
|
|
466
|
+
helperText?: ReactNode;
|
|
467
|
+
/** 에러 상태 */
|
|
468
|
+
error?: boolean;
|
|
469
|
+
}
|
|
470
|
+
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
471
|
+
|
|
472
|
+
interface AmountInputProps extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'type' | 'inputMode' | 'endAdornment'> {
|
|
473
|
+
/** 금액 (제어 모드). 비어 있으면 null */
|
|
474
|
+
value?: number | null;
|
|
475
|
+
/** 처음 금액 (비제어 모드) */
|
|
476
|
+
defaultValue?: number | null;
|
|
477
|
+
/** 금액이 바뀔 때 호출된다. 비우면 null */
|
|
478
|
+
onValueChange?: (amount: number | null) => void;
|
|
479
|
+
/** 최댓값. 넘게 입력하면 최댓값으로 맞춘다 */
|
|
480
|
+
max?: number;
|
|
481
|
+
/** 단위 (입력창 뒤에 표시, 한글 읽기에도 붙는다) */
|
|
482
|
+
unit?: string;
|
|
483
|
+
/**
|
|
484
|
+
* 아래에 "12만 5,000원" 처럼 읽기 쉬운 금액을 보여 준다 (기본 true).
|
|
485
|
+
* helperText 를 주면 그 아래 줄로 함께 보여 준다.
|
|
486
|
+
*/
|
|
487
|
+
showKoreanAmount?: boolean;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* 금액 입력. 천 단위 쉼표를 넣고 뒤에 단위("원")를 붙이며, 아래에 "12만 5,000원" 처럼 읽기 쉬운 금액을 보여 준다.
|
|
491
|
+
* 값은 숫자(number)로 넘긴다.
|
|
492
|
+
*/
|
|
493
|
+
declare const AmountInput: react.ForwardRefExoticComponent<AmountInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
494
|
+
|
|
330
495
|
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
331
496
|
/** 이미지 주소. 없거나 불러오지 못하면 fallback 을 보여 준다 */
|
|
332
497
|
src?: string;
|
|
@@ -379,6 +544,27 @@ interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
|
|
|
379
544
|
*/
|
|
380
545
|
declare const Breadcrumb: react.ForwardRefExoticComponent<BreadcrumbProps & react.RefAttributes<HTMLElement>>;
|
|
381
546
|
|
|
547
|
+
interface BusinessNumberInputProps extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'type' | 'inputMode'> {
|
|
548
|
+
/** 숫자만 있는 사업자등록번호 (제어 모드). 예: "1248100998" */
|
|
549
|
+
value?: string;
|
|
550
|
+
/** 처음 값 (비제어 모드) */
|
|
551
|
+
defaultValue?: string;
|
|
552
|
+
/** 숫자만 있는 값과, 10자리를 다 채웠을 때 검증 공식 통과 여부로 호출된다 (다 채우기 전에는 valid 가 null) */
|
|
553
|
+
onValueChange?: (digits: string, valid: boolean | null) => void;
|
|
554
|
+
/**
|
|
555
|
+
* 10자리를 다 채웠는데 검증 공식에 맞지 않으면 자동으로 오류를 보여 준다 (기본 true).
|
|
556
|
+
* 직접 error·helperText 를 주면 그 값이 우선한다.
|
|
557
|
+
*/
|
|
558
|
+
validate?: boolean;
|
|
559
|
+
/** 자동 검증 오류 문구 */
|
|
560
|
+
invalidText?: string;
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* 사업자등록번호 입력. 123-45-67890 형식으로 하이픈을 넣고, 10자리를 채우면 검증 공식으로 확인한다.
|
|
564
|
+
* (검증 공식은 오타를 거르는 용도 — 실제 등록·휴폐업 여부는 국세청 조회가 필요하다)
|
|
565
|
+
*/
|
|
566
|
+
declare const BusinessNumberInput: react.ForwardRefExoticComponent<BusinessNumberInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
567
|
+
|
|
382
568
|
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
|
|
383
569
|
/** 시각적 스타일 */
|
|
384
570
|
variant?: 'solid' | 'soft' | 'outline' | 'ghost';
|
|
@@ -430,6 +616,51 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
|
|
|
430
616
|
}
|
|
431
617
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
432
618
|
|
|
619
|
+
interface ComboboxOption {
|
|
620
|
+
value: string;
|
|
621
|
+
/** 표시·검색에 쓰는 이름 */
|
|
622
|
+
label: string;
|
|
623
|
+
disabled?: boolean;
|
|
624
|
+
}
|
|
625
|
+
interface ComboboxProps {
|
|
626
|
+
/** 선택지 목록 */
|
|
627
|
+
options: ComboboxOption[];
|
|
628
|
+
/** 선택된 값 (제어 모드). undefined 면 선택 없음 */
|
|
629
|
+
value?: string;
|
|
630
|
+
/** 처음 선택된 값 (비제어 모드) */
|
|
631
|
+
defaultValue?: string;
|
|
632
|
+
/** 값이 바뀔 때 호출된다 */
|
|
633
|
+
onValueChange?: (value: string) => void;
|
|
634
|
+
/** 입력한 글자로 선택지를 거르는 함수 (기본: 대소문자 구분 없이 label 에 포함) */
|
|
635
|
+
filter?: (option: ComboboxOption, query: string) => boolean;
|
|
636
|
+
/** 검색 결과가 없을 때 문구 */
|
|
637
|
+
emptyMessage?: ReactNode;
|
|
638
|
+
placeholder?: string;
|
|
639
|
+
/** 위에 표시할 레이블 */
|
|
640
|
+
label?: ReactNode;
|
|
641
|
+
/** 아래에 표시할 도움말. error 일 때는 에러 메시지로 표시된다 */
|
|
642
|
+
helperText?: ReactNode;
|
|
643
|
+
error?: boolean;
|
|
644
|
+
size?: 'sm' | 'md' | 'lg';
|
|
645
|
+
fullWidth?: boolean;
|
|
646
|
+
disabled?: boolean;
|
|
647
|
+
required?: boolean;
|
|
648
|
+
/** form 제출 시 사용할 이름 (선택된 value 가 제출된다) */
|
|
649
|
+
name?: string;
|
|
650
|
+
id?: string;
|
|
651
|
+
/** label 이 없을 때 스크린리더용 이름 */
|
|
652
|
+
'aria-label'?: string;
|
|
653
|
+
/** 목록 열기 버튼의 이름 */
|
|
654
|
+
toggleLabel?: string;
|
|
655
|
+
/** 입력창 래퍼 className */
|
|
656
|
+
className?: string;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* 입력해서 거르며 고르는 선택 상자 (WAI-ARIA combobox + listbox 패턴).
|
|
660
|
+
* ↓/↑ 로 목록을 열고 이동, Enter 로 선택, Esc 로 닫는다. 목록에 없는 값은 입력할 수 없다(선택만).
|
|
661
|
+
*/
|
|
662
|
+
declare const Combobox: react.ForwardRefExoticComponent<ComboboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
663
|
+
|
|
433
664
|
interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
434
665
|
/** 방향. vertical 은 flex 행 안에서 부모 높이를 채운다 */
|
|
435
666
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -532,32 +763,6 @@ interface IconButtonProps extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'f
|
|
|
532
763
|
*/
|
|
533
764
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
534
765
|
|
|
535
|
-
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
536
|
-
/** 크기 */
|
|
537
|
-
size?: 'sm' | 'md' | 'lg';
|
|
538
|
-
/** 에러 상태 표시 (aria-invalid 도 함께 설정된다) */
|
|
539
|
-
invalid?: boolean;
|
|
540
|
-
/** 부모 너비를 꽉 채운다 */
|
|
541
|
-
fullWidth?: boolean;
|
|
542
|
-
/** 입력창 앞에 표시할 요소 (아이콘, 단위 등) */
|
|
543
|
-
startAdornment?: ReactNode;
|
|
544
|
-
/** 입력창 뒤에 표시할 요소 */
|
|
545
|
-
endAdornment?: ReactNode;
|
|
546
|
-
/** 바깥 래퍼에 적용할 className. className 은 input 요소에 적용된다 */
|
|
547
|
-
rootClassName?: string;
|
|
548
|
-
}
|
|
549
|
-
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
550
|
-
|
|
551
|
-
interface TextFieldProps extends Omit<InputProps, 'invalid'> {
|
|
552
|
-
/** 입력창 위에 표시할 레이블 */
|
|
553
|
-
label?: ReactNode;
|
|
554
|
-
/** 입력창 아래에 표시할 도움말. error 일 때는 에러 메시지로 표시된다 */
|
|
555
|
-
helperText?: ReactNode;
|
|
556
|
-
/** 에러 상태 */
|
|
557
|
-
error?: boolean;
|
|
558
|
-
}
|
|
559
|
-
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
560
|
-
|
|
561
766
|
interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
562
767
|
/**
|
|
563
768
|
* 렌더링할 요소. Next.js 등의 라우터 링크를 넘기면 그 컴포넌트로 렌더링한다 (예: `as={NextLink}`).
|
|
@@ -609,8 +814,13 @@ interface ModalProps {
|
|
|
609
814
|
closeOnOverlayClick?: boolean;
|
|
610
815
|
/** 내용 영역 className */
|
|
611
816
|
className?: string;
|
|
817
|
+
/**
|
|
818
|
+
* 닫힐 때 포커스를 어디로 보낼지 정한다. 기본은 모달을 연 요소로 돌아간다.
|
|
819
|
+
* `event.preventDefault()` 후 원하는 요소에 focus() 하면 그쪽으로 보낸다 (예: 주소 선택 뒤 상세 주소 입력창).
|
|
820
|
+
*/
|
|
821
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
612
822
|
}
|
|
613
|
-
declare function Modal({ open, defaultOpen, onOpenChange, trigger, title, description, children, footer, size, hideCloseButton, closeOnOverlayClick, className, }: ModalProps): react.JSX.Element;
|
|
823
|
+
declare function Modal({ open, defaultOpen, onOpenChange, trigger, title, description, children, footer, size, hideCloseButton, closeOnOverlayClick, className, onCloseAutoFocus, }: ModalProps): react.JSX.Element;
|
|
614
824
|
/**
|
|
615
825
|
* 감싼 요소를 클릭하면 모달이 닫힌다.
|
|
616
826
|
* @example <ModalClose asChild><Button>취소</Button></ModalClose>
|
|
@@ -638,6 +848,20 @@ interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'>
|
|
|
638
848
|
}
|
|
639
849
|
declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
|
|
640
850
|
|
|
851
|
+
interface PhoneNumberInputProps extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'type' | 'inputMode'> {
|
|
852
|
+
/** 숫자만 있는 전화번호 (제어 모드). 예: "01012345678" */
|
|
853
|
+
value?: string;
|
|
854
|
+
/** 처음 값 (비제어 모드) */
|
|
855
|
+
defaultValue?: string;
|
|
856
|
+
/** 숫자만 있는 값으로 호출된다 (하이픈 없음) */
|
|
857
|
+
onValueChange?: (digits: string) => void;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* 전화번호 입력. 입력하는 대로 하이픈을 넣고(010-1234-5678, 02-123-4567, 1588-1234), 값은 숫자만 넘긴다.
|
|
861
|
+
* 휴대폰에서 전화 키패드를 띄우고 브라우저의 전화번호 자동 완성을 받는다.
|
|
862
|
+
*/
|
|
863
|
+
declare const PhoneNumberInput: react.ForwardRefExoticComponent<PhoneNumberInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
864
|
+
|
|
641
865
|
interface PopoverProps {
|
|
642
866
|
/** 팝오버 내용 */
|
|
643
867
|
content: ReactNode;
|
|
@@ -787,6 +1011,48 @@ interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
787
1011
|
*/
|
|
788
1012
|
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLSpanElement>>;
|
|
789
1013
|
|
|
1014
|
+
interface SliderProps {
|
|
1015
|
+
/** 값 (제어 모드). 손잡이 하나면 `[50]`, 범위면 `[20, 80]` */
|
|
1016
|
+
value?: number[];
|
|
1017
|
+
/** 처음 값 (비제어 모드) */
|
|
1018
|
+
defaultValue?: number[];
|
|
1019
|
+
/** 값이 바뀌는 동안 계속 호출된다 */
|
|
1020
|
+
onValueChange?: (value: number[]) => void;
|
|
1021
|
+
/** 드래그·키 입력이 끝났을 때 한 번 호출된다 (서버 저장 등) */
|
|
1022
|
+
onValueCommit?: (value: number[]) => void;
|
|
1023
|
+
min?: number;
|
|
1024
|
+
max?: number;
|
|
1025
|
+
step?: number;
|
|
1026
|
+
/** 범위 슬라이더에서 두 손잡이 사이 최소 간격(step 개수) */
|
|
1027
|
+
minStepsBetweenThumbs?: number;
|
|
1028
|
+
/** 위에 표시하는 레이블. 손잡이(slider)의 이름이 된다 */
|
|
1029
|
+
label?: ReactNode;
|
|
1030
|
+
/** label 이 없을 때 스크린리더용 이름 */
|
|
1031
|
+
'aria-label'?: string;
|
|
1032
|
+
/** 아래에 표시하는 보조 설명 (aria-describedby 로 연결) */
|
|
1033
|
+
helperText?: ReactNode;
|
|
1034
|
+
/** 오른쪽 위에 현재 값을 보여 준다 */
|
|
1035
|
+
showValue?: boolean;
|
|
1036
|
+
/** 값 텍스트 형식. 화면 표시와 스크린리더(aria-valuetext)에 함께 쓴다 (예: v => `${v.toLocaleString()}원`) */
|
|
1037
|
+
formatValue?: (value: number) => string;
|
|
1038
|
+
/**
|
|
1039
|
+
* 범위 슬라이더에서 손잡이마다 덧붙일 이름 (기본 ["최소", "최대"]).
|
|
1040
|
+
* 스크린리더는 "가격 최소", "가격 최대" 처럼 레이블과 함께 읽는다
|
|
1041
|
+
*/
|
|
1042
|
+
thumbLabels?: string[];
|
|
1043
|
+
size?: 'sm' | 'md';
|
|
1044
|
+
disabled?: boolean;
|
|
1045
|
+
/** form 제출 시 사용할 이름 */
|
|
1046
|
+
name?: string;
|
|
1047
|
+
id?: string;
|
|
1048
|
+
className?: string;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* 범위 안에서 값을 고르는 슬라이더. 손잡이를 끌거나 키보드(←→↑↓, PageUp/Down, Home/End)로 조절한다.
|
|
1052
|
+
* Radix Slider 기반이라 손잡이마다 role="slider" 와 aria-valuemin/max/now 가 붙는다.
|
|
1053
|
+
*/
|
|
1054
|
+
declare const Slider: react.ForwardRefExoticComponent<SliderProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1055
|
+
|
|
790
1056
|
interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
791
1057
|
/** 크기 (sm 16px, md 20px, lg 28px) */
|
|
792
1058
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -841,6 +1107,55 @@ interface SwitchProps {
|
|
|
841
1107
|
}
|
|
842
1108
|
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
843
1109
|
|
|
1110
|
+
type TableSize = 'sm' | 'md';
|
|
1111
|
+
interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
1112
|
+
/** 셀 여백 */
|
|
1113
|
+
size?: TableSize;
|
|
1114
|
+
/** 짝수 행 배경을 칠한다 */
|
|
1115
|
+
striped?: boolean;
|
|
1116
|
+
/** 세로로 스크롤할 때 머리 행을 위에 고정한다 (containerStyle 등으로 높이를 제한해 쓴다) */
|
|
1117
|
+
stickyHeader?: boolean;
|
|
1118
|
+
/** 표 위에 보이는 제목. 표의 이름이 되고, 스크롤 영역의 이름으로도 쓰인다 */
|
|
1119
|
+
caption?: ReactNode;
|
|
1120
|
+
/** caption 이 없을 때 표의 이름 (스크린리더용) */
|
|
1121
|
+
'aria-label'?: string;
|
|
1122
|
+
/** 바깥 스크롤 영역의 className (높이 제한 등) */
|
|
1123
|
+
containerClassName?: string;
|
|
1124
|
+
/** 바깥 스크롤 영역의 style */
|
|
1125
|
+
containerStyle?: CSSProperties;
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* 데이터 표. 네이티브 `<table>` 에 스타일을 입힌다.
|
|
1129
|
+
* 표가 넘치면 바깥 영역이 스크롤되고, 키보드로도 스크롤할 수 있도록 그 영역이 포커스를 받는다.
|
|
1130
|
+
*/
|
|
1131
|
+
declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
|
|
1132
|
+
declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1133
|
+
declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1134
|
+
declare const TableFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1135
|
+
interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
1136
|
+
/** 선택된 행으로 강조한다 (`aria-selected` 는 grid 등 상호작용 표에서 직접 지정한다) */
|
|
1137
|
+
selected?: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
declare const TableRow: react.ForwardRefExoticComponent<TableRowProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
1140
|
+
type Align = 'left' | 'center' | 'right';
|
|
1141
|
+
interface TableHeadProps extends Omit<ThHTMLAttributes<HTMLTableCellElement>, 'align'> {
|
|
1142
|
+
/** 정렬 */
|
|
1143
|
+
align?: Align;
|
|
1144
|
+
/**
|
|
1145
|
+
* 이 열의 정렬 상태. onSort 와 함께 주면 머리 셀이 정렬 버튼이 되고 `aria-sort` 를 붙인다.
|
|
1146
|
+
* 정렬되지 않은 열은 'none'.
|
|
1147
|
+
*/
|
|
1148
|
+
sortDirection?: 'ascending' | 'descending' | 'none';
|
|
1149
|
+
/** 정렬 버튼을 눌렀을 때 호출된다. 다음 정렬 상태는 사용하는 쪽이 정한다 */
|
|
1150
|
+
onSort?: () => void;
|
|
1151
|
+
}
|
|
1152
|
+
declare const TableHead: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1153
|
+
interface TableCellProps extends Omit<TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
|
|
1154
|
+
/** 정렬 (숫자는 right 권장) */
|
|
1155
|
+
align?: Align;
|
|
1156
|
+
}
|
|
1157
|
+
declare const TableCell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1158
|
+
|
|
844
1159
|
interface TabsProps extends Omit<ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'orientation'> {
|
|
845
1160
|
/** 시각적 스타일. line 은 밑줄, soft 는 배경이 있는 세그먼트 */
|
|
846
1161
|
variant?: 'line' | 'soft';
|
|
@@ -968,4 +1283,68 @@ interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
|
968
1283
|
}
|
|
969
1284
|
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
|
|
970
1285
|
|
|
971
|
-
|
|
1286
|
+
interface VerificationCodeInputProps {
|
|
1287
|
+
/** 자릿수 */
|
|
1288
|
+
length?: number;
|
|
1289
|
+
/** 입력값 (제어 모드) */
|
|
1290
|
+
value?: string;
|
|
1291
|
+
/** 처음 입력값 (비제어 모드) */
|
|
1292
|
+
defaultValue?: string;
|
|
1293
|
+
/** 입력값이 바뀔 때 호출된다 */
|
|
1294
|
+
onValueChange?: (value: string) => void;
|
|
1295
|
+
/** 모든 자리를 채웠을 때 호출된다 (자동 제출 등) */
|
|
1296
|
+
onComplete?: (value: string) => void;
|
|
1297
|
+
/** 받을 문자. numeric 이면 숫자 키패드를 띄우고 숫자만 받는다 */
|
|
1298
|
+
type?: 'numeric' | 'alphanumeric';
|
|
1299
|
+
/** 레이블 (입력창의 이름) */
|
|
1300
|
+
label?: ReactNode;
|
|
1301
|
+
/** 아래 도움말. 생략하면 "6자리 숫자를 입력하세요" 처럼 자릿수를 안내한다. error 일 때는 에러 메시지로 표시된다 */
|
|
1302
|
+
helperText?: ReactNode;
|
|
1303
|
+
error?: boolean;
|
|
1304
|
+
disabled?: boolean;
|
|
1305
|
+
autoFocus?: boolean;
|
|
1306
|
+
/** 유효 시간(초). 주면 남은 시간을 보여 주고, 0 이 되면 onExpire 를 호출하고 만료 안내를 읽어 준다 */
|
|
1307
|
+
expiresIn?: number;
|
|
1308
|
+
onExpire?: () => void;
|
|
1309
|
+
/** 주면 재전송 버튼이 생긴다. 누르면 호출되고 입력값과 남은 시간을 처음으로 되돌린다 */
|
|
1310
|
+
onResend?: () => void;
|
|
1311
|
+
resendText?: string;
|
|
1312
|
+
/** 만료 안내 문구 */
|
|
1313
|
+
expiredText?: string;
|
|
1314
|
+
/** form 제출 시 사용할 이름 */
|
|
1315
|
+
name?: string;
|
|
1316
|
+
id?: string;
|
|
1317
|
+
className?: string;
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* 문자로 받은 인증번호 입력. 실제 입력창은 하나라서 문자 자동 채우기(`autocomplete="one-time-code"`)·붙여넣기가 그대로 되고,
|
|
1321
|
+
* 스크린리더는 칸마다가 아니라 "인증번호" 하나로 읽는다. 칸 모양은 화면 표시용이다.
|
|
1322
|
+
*/
|
|
1323
|
+
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* 숫자만 있는 전화번호에 하이픈을 넣는다. 입력 중인 값도 자연스럽게 나눈다.
|
|
1327
|
+
* @example formatPhoneNumber('01012345678') // '010-1234-5678'
|
|
1328
|
+
* @example formatPhoneNumber('021234567') // '02-123-4567'
|
|
1329
|
+
* @example formatPhoneNumber('15881234') // '1588-1234'
|
|
1330
|
+
*/
|
|
1331
|
+
declare function formatPhoneNumber(input: string): string;
|
|
1332
|
+
/**
|
|
1333
|
+
* 사업자등록번호(10자리)에 하이픈을 넣는다.
|
|
1334
|
+
* @example formatBusinessNumber('1234567890') // '123-45-67890'
|
|
1335
|
+
*/
|
|
1336
|
+
declare function formatBusinessNumber(input: string): string;
|
|
1337
|
+
/**
|
|
1338
|
+
* 사업자등록번호 검증 공식(가중치 1,3,7,1,3,7,1,3,5)으로 확인한다. 실제로 등록된 번호인지는 국세청 조회가 필요하다.
|
|
1339
|
+
* @example isValidBusinessNumber('124-81-00998') // true
|
|
1340
|
+
*/
|
|
1341
|
+
declare function isValidBusinessNumber(input: string): boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* 금액을 만·억·조 단위로 읽기 쉽게 쓴다.
|
|
1344
|
+
* @example formatKoreanAmount(125000) // '12만 5,000원'
|
|
1345
|
+
* @example formatKoreanAmount(150000000) // '1억 5,000만원'
|
|
1346
|
+
* @example formatKoreanAmount(0) // '0원'
|
|
1347
|
+
*/
|
|
1348
|
+
declare function formatKoreanAmount(amount: number, unit?: string): string;
|
|
1349
|
+
|
|
1350
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, AddressInput, type AddressInputProps, type AddressProvider, type AddressSearchResult, type AddressValue, AgreementGroup, type AgreementGroupProps, type AgreementItem, Alert, type AlertProps, AmountInput, type AmountInputProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BestowTheme, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, BusinessNumberInput, type BusinessNumberInputProps, 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, PhoneNumberInput, type PhoneNumberInputProps, 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, VerificationCodeInput, type VerificationCodeInputProps, composeExtraAddress, contrastRatio, createIntentColors, createTheme, formatBusinessNumber, formatKoreanAmount, formatPhoneNumber, hasAllRequiredAgreements, isValidBusinessNumber, kakaoPostcodeProvider, themeClass, usePortalClassName, usePortalProps, useTheme, useToast, vars };
|