@bestow-ui/react 1.6.1 → 1.7.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 +7 -5
- package/dist/{chunk-NKLDAXUR.js → chunk-YYLDXZWR.js} +26 -5
- package/dist/chunk-YYLDXZWR.js.map +1 -0
- package/dist/client.js +826 -538
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +1298 -847
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +600 -116
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +237 -22
- package/dist/index.d.ts +237 -22
- package/dist/shared.js +210 -52
- package/dist/shared.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-NKLDAXUR.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 { ReactNode, HTMLAttributes, ElementType, CSSProperties, ComponentPropsWithoutRef, InputHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, SelectHTMLAttributes, OlHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
5
|
-
export { composeExtraAddress, formatBusinessNumber, formatKoreanAmount, formatKoreanDate, formatPhoneNumber, isValidBusinessNumber } from '@bestow-ui/korean-utils';
|
|
4
|
+
import { ReactNode, HTMLAttributes, ElementType, CSSProperties, ComponentPropsWithoutRef, InputHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, FocusEvent, SelectHTMLAttributes, OlHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
5
|
+
export { ResidentNumberInfo, composeExtraAddress, formatBusinessNumber, formatKoreanAmount, formatKoreanDate, formatPhoneNumber, formatResidentNumber, isValidBusinessNumber, isValidResidentNumber, maskCardNumber, maskDigits, maskName, maskPhoneNumber, maskResidentNumber, parseResidentNumber } from '@bestow-ui/korean-utils';
|
|
6
6
|
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
7
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
8
8
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
@@ -10,7 +10,7 @@ import * as RadixPopover from '@radix-ui/react-popover';
|
|
|
10
10
|
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
11
11
|
|
|
12
12
|
declare const lightTokens: {
|
|
13
|
-
color: _bestow_ui_tokens.
|
|
13
|
+
color: _bestow_ui_tokens.DefaultSemanticColors;
|
|
14
14
|
shadow: {
|
|
15
15
|
readonly sm: "0 1px 2px rgba(0, 0, 0, 0.06)";
|
|
16
16
|
readonly md: "0 4px 12px rgba(0, 0, 0, 0.08)";
|
|
@@ -161,6 +161,14 @@ declare const vars: {
|
|
|
161
161
|
subtleHover: `var(--${string})`;
|
|
162
162
|
text: `var(--${string})`;
|
|
163
163
|
};
|
|
164
|
+
info: {
|
|
165
|
+
solid: `var(--${string})`;
|
|
166
|
+
solidHover: `var(--${string})`;
|
|
167
|
+
contrast: `var(--${string})`;
|
|
168
|
+
subtle: `var(--${string})`;
|
|
169
|
+
subtleHover: `var(--${string})`;
|
|
170
|
+
text: `var(--${string})`;
|
|
171
|
+
};
|
|
164
172
|
};
|
|
165
173
|
shadow: {
|
|
166
174
|
readonly sm: `var(--${string})`;
|
|
@@ -233,6 +241,8 @@ declare const themeClass: {
|
|
|
233
241
|
dark: string;
|
|
234
242
|
};
|
|
235
243
|
type ThemeName = keyof typeof themeClass;
|
|
244
|
+
/** ThemeProvider 의 `theme`. `'system'` 은 OS 의 라이트·다크 설정을 따른다(바꾸면 바로 반영). */
|
|
245
|
+
type ThemeMode = ThemeName | 'system';
|
|
236
246
|
|
|
237
247
|
type DeepPartial<T> = {
|
|
238
248
|
[K in keyof T]?: T[K] extends string ? string : DeepPartial<T[K]>;
|
|
@@ -263,7 +273,7 @@ declare function createTheme(...inputs: ThemeInput[]): BestowTheme;
|
|
|
263
273
|
|
|
264
274
|
/** WCAG 대비율 (1 ~ 21) */
|
|
265
275
|
declare function contrastRatio(a: string, b: string): number;
|
|
266
|
-
type IntentName = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
276
|
+
type IntentName = 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
267
277
|
/**
|
|
268
278
|
* 대표색 하나로 intent(primary 등)의 라이트·다크 색 세트를 만든다. 결과는 createTheme 에 넘긴다.
|
|
269
279
|
* - solid 는 넘긴 색을 그대로 쓴다 (다크모드에서 너무 어두우면 조금 밝힌다). 단 흰 글자·짙은 글자 모두
|
|
@@ -364,6 +374,14 @@ interface BestowMessages {
|
|
|
364
374
|
businessNumber: string;
|
|
365
375
|
businessNumberInvalid: string;
|
|
366
376
|
businessNumberIncomplete: string;
|
|
377
|
+
/** ResidentNumberInput — "주민등록번호", 두 칸의 이름, 검증 문구 (1.0 이후 추가, 선택 키) */
|
|
378
|
+
residentNumber?: string;
|
|
379
|
+
residentNumberFront?: string;
|
|
380
|
+
residentNumberBack?: string;
|
|
381
|
+
/** 앞 7자리만 받을 때 뒷칸 이름 — "뒷자리 첫 숫자" */
|
|
382
|
+
residentNumberBackFirst?: string;
|
|
383
|
+
residentNumberInvalid?: string;
|
|
384
|
+
residentNumberIncomplete?: (digits: number) => string;
|
|
367
385
|
/** AmountInput — "금액", "원" */
|
|
368
386
|
amount: string;
|
|
369
387
|
currencyUnit: string;
|
|
@@ -425,6 +443,31 @@ declare function toISODate(date: Date): string;
|
|
|
425
443
|
/** 'YYYY-MM-DD' → Date (로컬 자정). 형식이 틀리거나 없는 날짜(2월 30일 등)면 null */
|
|
426
444
|
declare function parseISODate(value: string | null | undefined): Date | null;
|
|
427
445
|
|
|
446
|
+
/**
|
|
447
|
+
* 반응형 구간 미디어쿼리(모바일 우선 min-width). `@bestow-ui/tokens` 의 breakpoint(px)를 em 으로 바꾼 값 —
|
|
448
|
+
* em 이라 브라우저 기본 글꼴 크기를 키우면 구간도 따라 바뀐다. 값을 직접 적는다(최상위에서 tokens 객체 속성을 읽으면
|
|
449
|
+
* tokens 전체가 번들에 딸려 온다 — responsive.test.ts 가 tokens 와 같은지 확인).
|
|
450
|
+
*
|
|
451
|
+
* @example style({ flexDirection: 'column', '@media': { [media.md]: { flexDirection: 'row' } } }) // vanilla-extract
|
|
452
|
+
*/
|
|
453
|
+
declare const media: {
|
|
454
|
+
readonly sm: "(min-width: 40em)";
|
|
455
|
+
readonly md: "(min-width: 48em)";
|
|
456
|
+
readonly lg: "(min-width: 64em)";
|
|
457
|
+
readonly xl: "(min-width: 80em)";
|
|
458
|
+
};
|
|
459
|
+
type Breakpoint = keyof typeof media;
|
|
460
|
+
/**
|
|
461
|
+
* 한 값 또는 구간별 값. 구간 값은 그 폭 이상에서 쓰이고, 주지 않은 구간은 앞(좁은) 구간 값을 이어받는다.
|
|
462
|
+
*
|
|
463
|
+
* @example direction={{ base: 'column', md: 'row' }} // 768px 미만은 세로, 이상은 가로
|
|
464
|
+
*/
|
|
465
|
+
type Responsive<T> = T | ({
|
|
466
|
+
base?: T;
|
|
467
|
+
} & {
|
|
468
|
+
[K in Breakpoint]?: T;
|
|
469
|
+
});
|
|
470
|
+
|
|
428
471
|
/** 주소 검색 결과 */
|
|
429
472
|
interface AddressSearchResult {
|
|
430
473
|
/** 우편번호 (5자리 국가기초구역번호) */
|
|
@@ -461,8 +504,8 @@ declare function hasAllRequiredAgreements(items: AgreementItem[], value: string[
|
|
|
461
504
|
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
462
505
|
/** 시각적 스타일 */
|
|
463
506
|
variant?: 'solid' | 'soft' | 'outline';
|
|
464
|
-
/** 의미
|
|
465
|
-
color?: 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
507
|
+
/** 의미 색상. 일반 안내는 info (브랜드 색과 따로 파랑) */
|
|
508
|
+
color?: 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
466
509
|
/** 크기 */
|
|
467
510
|
size?: 'sm' | 'md' | 'lg';
|
|
468
511
|
/** 텍스트 앞에 표시할 아이콘 (장식용 — 의미는 텍스트로 전달한다) */
|
|
@@ -488,6 +531,17 @@ declare const CardBody: react.ForwardRefExoticComponent<CardSectionProps & react
|
|
|
488
531
|
/** 버튼 등 동작 영역. 오른쪽 정렬 */
|
|
489
532
|
declare const CardFooter: react.ForwardRefExoticComponent<CardSectionProps & react.RefAttributes<HTMLDivElement>>;
|
|
490
533
|
|
|
534
|
+
interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
535
|
+
/** 렌더링할 요소 (페이지 본문이면 'main') */
|
|
536
|
+
as?: ElementType;
|
|
537
|
+
/** 최대 폭 — sm 640 · md 768 · lg 1024(기본) · xl 1280px(구간 폭과 같음, 기본 글꼴 크기를 따름), full 은 제한 없음 */
|
|
538
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
539
|
+
/** 좌우 여백을 없앤다 (기본은 좁은 화면 16px, md 구간부터 24px) */
|
|
540
|
+
flush?: boolean;
|
|
541
|
+
}
|
|
542
|
+
/** 내용을 가운데에 두고 최대 폭과 좌우 여백을 정하는 페이지 틀 */
|
|
543
|
+
declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLElement>>;
|
|
544
|
+
|
|
491
545
|
interface DescriptionListItem {
|
|
492
546
|
/** 이름 (dt) */
|
|
493
547
|
term: ReactNode;
|
|
@@ -540,6 +594,64 @@ interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
540
594
|
}
|
|
541
595
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
542
596
|
|
|
597
|
+
/**
|
|
598
|
+
* FormField 가 자식에게 넘기는 연결 속성. 입력 요소(또는 입력 역할을 하는 요소)에 그대로 펼쳐 넣는다.
|
|
599
|
+
* role="group" 처럼 aria-invalid·aria-required 를 받지 못하는 역할이면 그 둘은 빼고 안의 컨트롤에 준다(axe aria-allowed-attr).
|
|
600
|
+
*/
|
|
601
|
+
interface FormFieldControlProps {
|
|
602
|
+
id: string;
|
|
603
|
+
'aria-describedby'?: string;
|
|
604
|
+
'aria-invalid'?: true;
|
|
605
|
+
'aria-required'?: true;
|
|
606
|
+
}
|
|
607
|
+
/** render 함수의 둘째 인자 — 입력에 펼치지 않는 정보 */
|
|
608
|
+
interface FormFieldMeta {
|
|
609
|
+
/** 레이블 요소의 id — label 로 이름을 받을 수 없는 요소(div role="combobox" 등)는 aria-labelledby 에 넣는다 */
|
|
610
|
+
labelId?: string;
|
|
611
|
+
/** 도움말 요소의 id */
|
|
612
|
+
helperId?: string;
|
|
613
|
+
}
|
|
614
|
+
interface FormFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'id'> {
|
|
615
|
+
/** 입력 위에 표시할 레이블 (짧게 — 보조 설명은 helperText) */
|
|
616
|
+
label?: ReactNode;
|
|
617
|
+
/** 입력 아래 도움말. error 일 때는 오류 메시지로 표시된다 */
|
|
618
|
+
helperText?: ReactNode;
|
|
619
|
+
/** 오류 상태 — 자식에 aria-invalid 를 넘기고 helperText 를 오류 색으로 */
|
|
620
|
+
error?: boolean;
|
|
621
|
+
/** 필수 — 레이블에 * 를 붙이고 자식에 aria-required 를 넘긴다(네이티브 검증이 필요하면 입력에 required 를 직접) */
|
|
622
|
+
required?: boolean;
|
|
623
|
+
/** 입력 요소의 id. 생략하면 만든다 (ErrorSummary 링크·focusField 가 이 id 로 찾아간다) */
|
|
624
|
+
id?: string;
|
|
625
|
+
/** 부모 너비를 꽉 채운다 */
|
|
626
|
+
fullWidth?: boolean;
|
|
627
|
+
/**
|
|
628
|
+
* 입력을 그리는 함수. 첫째 인자를 입력 요소에 그대로 펼쳐 넣는다.
|
|
629
|
+
* @example {(field) => <input {...field} />}
|
|
630
|
+
* @example {(field, { labelId }) => <CustomSelect {...field} aria-labelledby={labelId} />}
|
|
631
|
+
*/
|
|
632
|
+
children: (control: FormFieldControlProps, meta: FormFieldMeta) => ReactNode;
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* 직접 만든 입력·다른 라이브러리 입력에 TextField 와 같은 레이블·도움말·오류 연결을 붙인다.
|
|
636
|
+
* hook 은 useId 뿐이라 서버 컴포넌트에서도 쓸 수 있다.
|
|
637
|
+
*/
|
|
638
|
+
declare const FormField: react.ForwardRefExoticComponent<FormFieldProps & react.RefAttributes<HTMLDivElement>>;
|
|
639
|
+
|
|
640
|
+
interface GridProps extends HTMLAttributes<HTMLElement> {
|
|
641
|
+
/** 렌더링할 요소 (목록이면 'ul') */
|
|
642
|
+
as?: ElementType;
|
|
643
|
+
/** 열 개수 (같은 폭). 구간별로: `{ base: 1, md: 2, lg: 3 }`. 생략하면 한 열 */
|
|
644
|
+
columns?: Responsive<number>;
|
|
645
|
+
/**
|
|
646
|
+
* 칸의 최소 폭(CSS 길이, 예: '220px'·'14rem'). 주면 화면 폭에 맞춰 열 개수를 자동으로 정한다(columns 대신).
|
|
647
|
+
* 화면이 이 폭보다 좁으면 칸이 화면 폭으로 줄어든다(가로 스크롤 없음).
|
|
648
|
+
*/
|
|
649
|
+
minItemWidth?: string;
|
|
650
|
+
/** 칸 사이 간격 (space 토큰 키). 구간별 값도 받는다 */
|
|
651
|
+
gap?: Responsive<keyof typeof space>;
|
|
652
|
+
}
|
|
653
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLElement>>;
|
|
654
|
+
|
|
543
655
|
interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
544
656
|
/** 현재 값 (0 ~ max). 생략하거나 null 이면 진행률을 모르는 상태(indeterminate)로 움직이는 막대를 보여 준다 */
|
|
545
657
|
value?: number | null;
|
|
@@ -576,17 +688,21 @@ interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
576
688
|
*/
|
|
577
689
|
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLSpanElement>>;
|
|
578
690
|
|
|
691
|
+
type Direction = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
692
|
+
type Align = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
693
|
+
type Justify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
694
|
+
type SpaceKey = keyof typeof space;
|
|
579
695
|
interface StackProps extends HTMLAttributes<HTMLElement> {
|
|
580
696
|
/** 렌더링할 요소 */
|
|
581
697
|
as?: ElementType;
|
|
582
|
-
/** 배치 방향 */
|
|
583
|
-
direction?:
|
|
584
|
-
/** 자식 사이 간격 (space 토큰 키) */
|
|
585
|
-
gap?:
|
|
586
|
-
/** 교차축 정렬 (align-items) */
|
|
587
|
-
align?:
|
|
588
|
-
/** 주축 정렬 (justify-content) */
|
|
589
|
-
justify?:
|
|
698
|
+
/** 배치 방향 (기본 column). 구간별로: `{ base: 'column', md: 'row' }` */
|
|
699
|
+
direction?: Responsive<Direction>;
|
|
700
|
+
/** 자식 사이 간격 (space 토큰 키). 구간별로: `{ base: 3, lg: 6 }` */
|
|
701
|
+
gap?: Responsive<SpaceKey>;
|
|
702
|
+
/** 교차축 정렬 (align-items). 구간별 값도 받는다 */
|
|
703
|
+
align?: Responsive<Align>;
|
|
704
|
+
/** 주축 정렬 (justify-content). 구간별 값도 받는다 */
|
|
705
|
+
justify?: Responsive<Justify>;
|
|
590
706
|
/** 줄바꿈 허용 */
|
|
591
707
|
wrap?: boolean;
|
|
592
708
|
}
|
|
@@ -627,8 +743,11 @@ declare const VisuallyHidden: react.ForwardRefExoticComponent<VisuallyHiddenProp
|
|
|
627
743
|
declare function focusField(target: string | HTMLElement | null | undefined): boolean;
|
|
628
744
|
|
|
629
745
|
interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
630
|
-
/**
|
|
631
|
-
|
|
746
|
+
/**
|
|
747
|
+
* 라이트/다크 모드. `'system'` 은 OS 설정을 따르고 바뀌면 바로 반영한다 — 서버 렌더링에서도 CSS 미디어쿼리로 그려
|
|
748
|
+
* 첫 화면이 깜빡이지 않는다. 생략하면 바깥 ThemeProvider 의 모드를 이어받는다 (최상위는 light).
|
|
749
|
+
*/
|
|
750
|
+
theme?: ThemeMode;
|
|
632
751
|
/**
|
|
633
752
|
* createTheme 으로 만든 브랜드 테마. 모드를 바꿔도 유지되고, 중첩된 ThemeProvider 는 바깥 값을 이어받는다
|
|
634
753
|
* (안쪽에서 준 값이 우선).
|
|
@@ -636,7 +755,10 @@ interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
636
755
|
overrides?: BestowTheme;
|
|
637
756
|
}
|
|
638
757
|
declare const ThemeProvider: react.ForwardRefExoticComponent<ThemeProviderProps & react.RefAttributes<HTMLDivElement>>;
|
|
639
|
-
/**
|
|
758
|
+
/**
|
|
759
|
+
* 현재 적용 중인 모드(light/dark)를 반환한다. `theme="system"` 이면 OS 설정에 따른 값이다 —
|
|
760
|
+
* 단, 서버 렌더링과 hydration 첫 렌더에서는 OS 설정을 몰라 'light' 이고, 그 직후 실제 값으로 다시 렌더링된다.
|
|
761
|
+
*/
|
|
640
762
|
declare function useTheme(): ThemeName;
|
|
641
763
|
/**
|
|
642
764
|
* Portal 로 ThemeProvider 바깥(body)에 렌더링되는 요소에 펼쳐 넣을 props.
|
|
@@ -742,11 +864,11 @@ interface AgreementGroupProps {
|
|
|
742
864
|
*/
|
|
743
865
|
declare const AgreementGroup: react.ForwardRefExoticComponent<AgreementGroupProps & react.RefAttributes<HTMLFieldSetElement>>;
|
|
744
866
|
|
|
745
|
-
type AlertColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
867
|
+
type AlertColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
746
868
|
interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'title'> {
|
|
747
869
|
/** 시각적 스타일 */
|
|
748
870
|
variant?: 'soft' | 'outline' | 'solid';
|
|
749
|
-
/** 의미 색상.
|
|
871
|
+
/** 의미 색상. 일반 안내(공지·도움말)는 info — 브랜드 색(primary)을 바꿔도 파랑으로 남는다 */
|
|
750
872
|
color?: AlertColor;
|
|
751
873
|
/** 굵게 표시되는 제목 */
|
|
752
874
|
title?: ReactNode;
|
|
@@ -990,6 +1112,53 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
|
|
|
990
1112
|
}
|
|
991
1113
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
992
1114
|
|
|
1115
|
+
interface CheckboxOption {
|
|
1116
|
+
value: string;
|
|
1117
|
+
label: ReactNode;
|
|
1118
|
+
/** 레이블 아래 보조 설명 (접근 가능한 이름이 아니라 설명으로 읽힌다) */
|
|
1119
|
+
description?: ReactNode;
|
|
1120
|
+
disabled?: boolean;
|
|
1121
|
+
}
|
|
1122
|
+
interface CheckboxGroupProps {
|
|
1123
|
+
/** 선택지 목록 */
|
|
1124
|
+
options: CheckboxOption[];
|
|
1125
|
+
/** 선택된 값들 (제어 모드). undefined 를 넘기면 아무것도 선택하지 않은 상태 */
|
|
1126
|
+
value?: string[];
|
|
1127
|
+
/** 처음 선택된 값들 (비제어 모드) */
|
|
1128
|
+
defaultValue?: string[];
|
|
1129
|
+
/** 값이 바뀔 때 호출된다 — options 순서대로 정렬한 배열 */
|
|
1130
|
+
onValueChange?: (value: string[]) => void;
|
|
1131
|
+
/** 묶음 위에 표시할 레이블 */
|
|
1132
|
+
label?: ReactNode;
|
|
1133
|
+
/** 묶음 아래 도움말. error 일 때는 오류 메시지로 표시된다 */
|
|
1134
|
+
helperText?: ReactNode;
|
|
1135
|
+
/** 오류 상태 — 각 체크박스에 aria-invalid */
|
|
1136
|
+
error?: boolean;
|
|
1137
|
+
/** 배치 방향 */
|
|
1138
|
+
orientation?: 'vertical' | 'horizontal';
|
|
1139
|
+
/** 크기 */
|
|
1140
|
+
size?: 'sm' | 'md';
|
|
1141
|
+
disabled?: boolean;
|
|
1142
|
+
/**
|
|
1143
|
+
* 하나 이상 골라야 함 — 레이블에 * 와 스크린리더용 "필수" 를 붙인다. "몇 개 이상" 검증은 폼(react-hook-form 등)에서 한다
|
|
1144
|
+
* (체크박스마다 네이티브 required 를 주면 "모두 골라야 함" 이 되어 쓰지 않는다).
|
|
1145
|
+
*/
|
|
1146
|
+
required?: boolean;
|
|
1147
|
+
/** form 제출 시 사용할 이름 — 고른 값마다 같은 이름으로 제출된다(FormData.getAll) */
|
|
1148
|
+
name?: string;
|
|
1149
|
+
/** 묶음의 id (ErrorSummary 링크·focusField 가 이 id 로 첫(또는 선택된) 체크박스를 찾는다) */
|
|
1150
|
+
id?: string;
|
|
1151
|
+
/** label 이 없을 때 스크린리더용 이름 */
|
|
1152
|
+
'aria-label'?: string;
|
|
1153
|
+
/** 바깥 래퍼 className */
|
|
1154
|
+
className?: string;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* 여러 선택지 중 여러 개를 고르는 체크박스 묶음. 묶음 레이블·도움말·오류를 한 번에 연결한다.
|
|
1158
|
+
* 약관 동의(전체 동의·필수/선택 표시·보기)는 AgreementGroup 을 쓴다.
|
|
1159
|
+
*/
|
|
1160
|
+
declare const CheckboxGroup: react.ForwardRefExoticComponent<CheckboxGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
1161
|
+
|
|
993
1162
|
interface ComboboxOption {
|
|
994
1163
|
value: string;
|
|
995
1164
|
/** 표시·검색에 쓰는 이름 */
|
|
@@ -1561,6 +1730,52 @@ interface RadioGroupProps {
|
|
|
1561
1730
|
*/
|
|
1562
1731
|
declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
1563
1732
|
|
|
1733
|
+
interface ResidentNumberInputProps {
|
|
1734
|
+
/** 숫자만 있는 값 (제어 모드). 예: "9001011234567" (digits={7} 이면 "9001011") */
|
|
1735
|
+
value?: string;
|
|
1736
|
+
/** 처음 값 (비제어 모드) */
|
|
1737
|
+
defaultValue?: string;
|
|
1738
|
+
/** 숫자만 있는 값과, 다 채웠을 때 생년월일·뒷자리 첫 숫자가 맞는지로 호출된다 (다 채우기 전에는 valid 가 null) */
|
|
1739
|
+
onValueChange?: (digits: string, valid: boolean | null) => void;
|
|
1740
|
+
/**
|
|
1741
|
+
* 받을 자릿수. 13(기본)은 뒤 7자리를 가려서(password) 받고, 7 은 생년월일 + 뒷자리 첫 숫자만 받는다(나이·성별 확인 —
|
|
1742
|
+
* 주민번호 전체가 필요 없으면 7 을 쓴다).
|
|
1743
|
+
*/
|
|
1744
|
+
digits?: 13 | 7;
|
|
1745
|
+
/**
|
|
1746
|
+
* 다 채웠는데 생년월일·뒷자리 첫 숫자가 맞지 않으면 자동으로 오류를 보여 준다 (기본 true). 마지막 검증 숫자는 보지 않는다
|
|
1747
|
+
* (2020년 10월 이후 번호는 임의 번호). 직접 error·helperText 를 주면 그 값이 우선한다.
|
|
1748
|
+
*/
|
|
1749
|
+
validate?: boolean;
|
|
1750
|
+
/** 자동 검증 오류 문구 */
|
|
1751
|
+
invalidText?: string;
|
|
1752
|
+
/** 위에 표시할 레이블 (기본 "주민등록번호") */
|
|
1753
|
+
label?: ReactNode;
|
|
1754
|
+
/** 아래 도움말. error 일 때는 오류 메시지로 표시된다 */
|
|
1755
|
+
helperText?: ReactNode;
|
|
1756
|
+
/** 오류 상태 */
|
|
1757
|
+
error?: boolean;
|
|
1758
|
+
/** 필수 입력 (레이블에 * 표시, required 속성) */
|
|
1759
|
+
required?: boolean;
|
|
1760
|
+
disabled?: boolean;
|
|
1761
|
+
/** 크기 */
|
|
1762
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1763
|
+
/** form 제출 시 사용할 이름 — 숫자만 있는 값을 숨긴 input 으로 제출한다 */
|
|
1764
|
+
name?: string;
|
|
1765
|
+
/** 묶음 id — 앞칸은 `${id}-front`, 뒷칸은 `${id}-back` (ErrorSummary 링크·focusField 는 이 id 로 앞칸을 찾는다) */
|
|
1766
|
+
id?: string;
|
|
1767
|
+
/** 바깥 래퍼 className */
|
|
1768
|
+
className?: string;
|
|
1769
|
+
onBlur?: (event: FocusEvent<HTMLDivElement>) => void;
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* 주민·외국인등록번호 입력 — 앞 6자리와 뒷자리를 두 칸으로 받고 뒷자리는 가린다(password). 번호를 통째로 앞칸에 붙여 넣으면 두 칸에 나눠 넣는다.
|
|
1773
|
+
* 앞칸을 다 채워도 포커스를 옮기지 않는다(예고 없는 포커스 이동은 WCAG 3.2.2). 뒷칸이 비었을 때 Backspace 는 앞칸으로 간다.
|
|
1774
|
+
*
|
|
1775
|
+
* 주민등록번호는 법령에 근거가 있을 때만 수집할 수 있다(개인정보 보호법 제24조의2). 나이·성별만 필요하면 `digits={7}`.
|
|
1776
|
+
*/
|
|
1777
|
+
declare const ResidentNumberInput: react.ForwardRefExoticComponent<ResidentNumberInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1778
|
+
|
|
1564
1779
|
interface SegmentedControlOption {
|
|
1565
1780
|
value: string;
|
|
1566
1781
|
/** 칸에 보이는 글자 (접근 가능한 이름이 된다) */
|
|
@@ -1950,7 +2165,7 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
1950
2165
|
}
|
|
1951
2166
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1952
2167
|
|
|
1953
|
-
type ToastColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
2168
|
+
type ToastColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
1954
2169
|
interface ToastOptions {
|
|
1955
2170
|
/** 제목 */
|
|
1956
2171
|
title: ReactNode;
|
|
@@ -2048,5 +2263,5 @@ interface VerificationCodeInputProps {
|
|
|
2048
2263
|
*/
|
|
2049
2264
|
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
2050
2265
|
|
|
2051
|
-
export { Accordion, AccordionItem, AddressInput, AgreementGroup, Alert, AmountInput, Avatar, Badge, Breadcrumb, BusinessNumberInput, Button, Calendar, Card, CardBody, CardFooter, CardHeader, Checkbox, Combobox, DatePicker, DateRangePicker, DescriptionList, Divider, Drawer, DrawerClose, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorSummary, FileUpload, IconButton, Input, Link, LocaleProvider, Modal, ModalClose, NativeSelect, NumberInput, Pagination, PhoneNumberInput, Popover, PopoverClose, Progress, RadioGroup, SegmentedControl, Select, Skeleton, SkipLink, Slider, Spinner, Stack, Stepper, Switch, Table, TableBody, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TextField, Textarea, ThemeProvider, ToastProvider, Tooltip, Typography, VerificationCodeInput, VisuallyHidden, contrastRatio, createIntentColors, createTheme, dateRangePresets, en, focusField, hasAllRequiredAgreements, kakaoPostcodeProvider, parseISODate, presetRange, strongInputBorders, themeClass, toISODate, useMessages, usePortalProps, useTableSelection, useTheme, useToast, vars };
|
|
2052
|
-
export type { AccordionItemProps, AccordionProps, AddressInputProps, AddressProvider, AddressSearchResult, AddressValue, AgreementGroupProps, AgreementItem, AlertColor, AlertProps, AmountInputProps, AvatarProps, BadgeProps, BestowMessages, BestowTheme, BreadcrumbItemData, BreadcrumbProps, BusinessNumberInputProps, ButtonProps, CalendarProps, CardProps, CardSectionProps, CheckboxProps, ComboboxOption, ComboboxProps, DatePickerProps, DateRange, DateRangePickerProps, DateRangePreset, DeepPartial, DescriptionListItem, DescriptionListProps, DividerProps, DrawerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps, ErrorSummaryItem, ErrorSummaryProps, FileRejection, FileRejectionReason, FileUploadProps, IconButtonProps, InputProps, IntentName, LinkProps, LocaleProviderProps, Messages, ModalProps, NativeSelectOption, NativeSelectProps, NumberInputProps, PaginationItemType, PaginationProps, PhoneNumberInputProps, PopoverProps, ProgressProps, RadioGroupProps, RadioOption, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SkeletonProps, SkipLinkProps, SliderProps, SpinnerProps, StackProps, StepperProps, StepperStep, SwitchProps, TableAlign, TableCellProps, TableEmptyProps, TableHeadProps, TableProps, TableRowProps, TableSize, TableSkeletonProps, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TextFieldProps, TextareaProps, ThemeInput, ThemeName, ThemeOverrides, ThemeProviderProps, ThemeTokens, ToastColor, ToastContextValue, ToastOptions, ToastProviderProps, TooltipProps, TypographyProps, TypographyVariant, VerificationCodeInputProps, VisuallyHiddenProps };
|
|
2266
|
+
export { Accordion, AccordionItem, AddressInput, AgreementGroup, Alert, AmountInput, Avatar, Badge, Breadcrumb, BusinessNumberInput, Button, Calendar, Card, CardBody, CardFooter, CardHeader, Checkbox, CheckboxGroup, Combobox, Container, DatePicker, DateRangePicker, DescriptionList, Divider, Drawer, DrawerClose, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorSummary, FileUpload, FormField, Grid, IconButton, Input, Link, LocaleProvider, Modal, ModalClose, NativeSelect, NumberInput, Pagination, PhoneNumberInput, Popover, PopoverClose, Progress, RadioGroup, ResidentNumberInput, SegmentedControl, Select, Skeleton, SkipLink, Slider, Spinner, Stack, Stepper, Switch, Table, TableBody, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TextField, Textarea, ThemeProvider, ToastProvider, Tooltip, Typography, VerificationCodeInput, VisuallyHidden, contrastRatio, createIntentColors, createTheme, dateRangePresets, en, focusField, hasAllRequiredAgreements, kakaoPostcodeProvider, media, parseISODate, presetRange, strongInputBorders, themeClass, toISODate, useMessages, usePortalProps, useTableSelection, useTheme, useToast, vars };
|
|
2267
|
+
export type { AccordionItemProps, AccordionProps, AddressInputProps, AddressProvider, AddressSearchResult, AddressValue, AgreementGroupProps, AgreementItem, AlertColor, AlertProps, AmountInputProps, AvatarProps, BadgeProps, BestowMessages, BestowTheme, BreadcrumbItemData, BreadcrumbProps, Breakpoint, BusinessNumberInputProps, ButtonProps, CalendarProps, CardProps, CardSectionProps, CheckboxGroupProps, CheckboxOption, CheckboxProps, ComboboxOption, ComboboxProps, ContainerProps, DatePickerProps, DateRange, DateRangePickerProps, DateRangePreset, DeepPartial, DescriptionListItem, DescriptionListProps, DividerProps, DrawerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps, ErrorSummaryItem, ErrorSummaryProps, FileRejection, FileRejectionReason, FileUploadProps, FormFieldControlProps, FormFieldMeta, FormFieldProps, GridProps, IconButtonProps, InputProps, IntentName, LinkProps, LocaleProviderProps, Messages, ModalProps, NativeSelectOption, NativeSelectProps, NumberInputProps, PaginationItemType, PaginationProps, PhoneNumberInputProps, PopoverProps, ProgressProps, RadioGroupProps, RadioOption, ResidentNumberInputProps, Responsive, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SkeletonProps, SkipLinkProps, SliderProps, SpinnerProps, StackProps, StepperProps, StepperStep, SwitchProps, TableAlign, TableCellProps, TableEmptyProps, TableHeadProps, TableProps, TableRowProps, TableSize, TableSkeletonProps, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TextFieldProps, TextareaProps, ThemeInput, ThemeMode, ThemeName, ThemeOverrides, ThemeProviderProps, ThemeTokens, ToastColor, ToastContextValue, ToastOptions, ToastProviderProps, TooltipProps, TypographyProps, TypographyVariant, VerificationCodeInputProps, VisuallyHiddenProps };
|