@bestow-ui/react 1.6.1 → 1.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/README.md +8 -6
- package/dist/{chunk-NKLDAXUR.js → chunk-MP5VSIWQ.js} +33 -11
- package/dist/chunk-MP5VSIWQ.js.map +1 -0
- package/dist/client.js +1173 -716
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +1616 -999
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +631 -133
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +252 -22
- package/dist/index.d.ts +252 -22
- package/dist/shared.js +211 -52
- package/dist/shared.js.map +1 -1
- package/package.json +5 -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 는 넘긴 색을 그대로 쓴다 (다크모드에서 너무 어두우면 조금 밝힌다). 단 흰 글자·짙은 글자 모두
|
|
@@ -325,6 +335,7 @@ interface BestowMessages {
|
|
|
325
335
|
/** Stepper — 목록 이름 "진행 단계", 완료한 단계에 붙는 "완료" (1.0 이후 추가, 선택 키) */
|
|
326
336
|
steps?: string;
|
|
327
337
|
stepCompleted?: string;
|
|
338
|
+
stepInProgress?: string;
|
|
328
339
|
/**
|
|
329
340
|
* FileUpload (1.0 이후 추가, 선택 키) — "파일 선택", "또는 여기로 끌어다 놓으세요", "선택한 파일", "○○ 삭제",
|
|
330
341
|
* "파일 2개 선택됨", "○○ 삭제됨", 크기·형식·개수 초과 안내
|
|
@@ -364,6 +375,14 @@ interface BestowMessages {
|
|
|
364
375
|
businessNumber: string;
|
|
365
376
|
businessNumberInvalid: string;
|
|
366
377
|
businessNumberIncomplete: string;
|
|
378
|
+
/** ResidentNumberInput — "주민등록번호", 두 칸의 이름, 검증 문구 (1.0 이후 추가, 선택 키) */
|
|
379
|
+
residentNumber?: string;
|
|
380
|
+
residentNumberFront?: string;
|
|
381
|
+
residentNumberBack?: string;
|
|
382
|
+
/** 앞 7자리만 받을 때 뒷칸 이름 — "뒷자리 첫 숫자" */
|
|
383
|
+
residentNumberBackFirst?: string;
|
|
384
|
+
residentNumberInvalid?: string;
|
|
385
|
+
residentNumberIncomplete?: (digits: number) => string;
|
|
367
386
|
/** AmountInput — "금액", "원" */
|
|
368
387
|
amount: string;
|
|
369
388
|
currencyUnit: string;
|
|
@@ -425,6 +444,31 @@ declare function toISODate(date: Date): string;
|
|
|
425
444
|
/** 'YYYY-MM-DD' → Date (로컬 자정). 형식이 틀리거나 없는 날짜(2월 30일 등)면 null */
|
|
426
445
|
declare function parseISODate(value: string | null | undefined): Date | null;
|
|
427
446
|
|
|
447
|
+
/**
|
|
448
|
+
* 반응형 구간 미디어쿼리(모바일 우선 min-width). `@bestow-ui/tokens` 의 breakpoint(px)를 em 으로 바꾼 값 —
|
|
449
|
+
* em 이라 브라우저 기본 글꼴 크기를 키우면 구간도 따라 바뀐다. 값을 직접 적는다(최상위에서 tokens 객체 속성을 읽으면
|
|
450
|
+
* tokens 전체가 번들에 딸려 온다 — responsive.test.ts 가 tokens 와 같은지 확인).
|
|
451
|
+
*
|
|
452
|
+
* @example style({ flexDirection: 'column', '@media': { [media.md]: { flexDirection: 'row' } } }) // vanilla-extract
|
|
453
|
+
*/
|
|
454
|
+
declare const media: {
|
|
455
|
+
readonly sm: "(min-width: 40em)";
|
|
456
|
+
readonly md: "(min-width: 48em)";
|
|
457
|
+
readonly lg: "(min-width: 64em)";
|
|
458
|
+
readonly xl: "(min-width: 80em)";
|
|
459
|
+
};
|
|
460
|
+
type Breakpoint = keyof typeof media;
|
|
461
|
+
/**
|
|
462
|
+
* 한 값 또는 구간별 값. 구간 값은 그 폭 이상에서 쓰이고, 주지 않은 구간은 앞(좁은) 구간 값을 이어받는다.
|
|
463
|
+
*
|
|
464
|
+
* @example direction={{ base: 'column', md: 'row' }} // 768px 미만은 세로, 이상은 가로
|
|
465
|
+
*/
|
|
466
|
+
type Responsive<T> = T | ({
|
|
467
|
+
base?: T;
|
|
468
|
+
} & {
|
|
469
|
+
[K in Breakpoint]?: T;
|
|
470
|
+
});
|
|
471
|
+
|
|
428
472
|
/** 주소 검색 결과 */
|
|
429
473
|
interface AddressSearchResult {
|
|
430
474
|
/** 우편번호 (5자리 국가기초구역번호) */
|
|
@@ -461,8 +505,8 @@ declare function hasAllRequiredAgreements(items: AgreementItem[], value: string[
|
|
|
461
505
|
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
462
506
|
/** 시각적 스타일 */
|
|
463
507
|
variant?: 'solid' | 'soft' | 'outline';
|
|
464
|
-
/** 의미
|
|
465
|
-
color?: 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
508
|
+
/** 의미 색상. 일반 안내는 info (브랜드 색과 따로 파랑) */
|
|
509
|
+
color?: 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
466
510
|
/** 크기 */
|
|
467
511
|
size?: 'sm' | 'md' | 'lg';
|
|
468
512
|
/** 텍스트 앞에 표시할 아이콘 (장식용 — 의미는 텍스트로 전달한다) */
|
|
@@ -488,6 +532,17 @@ declare const CardBody: react.ForwardRefExoticComponent<CardSectionProps & react
|
|
|
488
532
|
/** 버튼 등 동작 영역. 오른쪽 정렬 */
|
|
489
533
|
declare const CardFooter: react.ForwardRefExoticComponent<CardSectionProps & react.RefAttributes<HTMLDivElement>>;
|
|
490
534
|
|
|
535
|
+
interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
536
|
+
/** 렌더링할 요소 (페이지 본문이면 'main') */
|
|
537
|
+
as?: ElementType;
|
|
538
|
+
/** 최대 폭 — sm 640 · md 768 · lg 1024(기본) · xl 1280px(구간 폭과 같음, 기본 글꼴 크기를 따름), full 은 제한 없음 */
|
|
539
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
540
|
+
/** 좌우 여백을 없앤다 (기본은 좁은 화면 16px, md 구간부터 24px) */
|
|
541
|
+
flush?: boolean;
|
|
542
|
+
}
|
|
543
|
+
/** 내용을 가운데에 두고 최대 폭과 좌우 여백을 정하는 페이지 틀 */
|
|
544
|
+
declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLElement>>;
|
|
545
|
+
|
|
491
546
|
interface DescriptionListItem {
|
|
492
547
|
/** 이름 (dt) */
|
|
493
548
|
term: ReactNode;
|
|
@@ -540,6 +595,64 @@ interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
540
595
|
}
|
|
541
596
|
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
|
|
542
597
|
|
|
598
|
+
/**
|
|
599
|
+
* FormField 가 자식에게 넘기는 연결 속성. 입력 요소(또는 입력 역할을 하는 요소)에 그대로 펼쳐 넣는다.
|
|
600
|
+
* role="group" 처럼 aria-invalid·aria-required 를 받지 못하는 역할이면 그 둘은 빼고 안의 컨트롤에 준다(axe aria-allowed-attr).
|
|
601
|
+
*/
|
|
602
|
+
interface FormFieldControlProps {
|
|
603
|
+
id: string;
|
|
604
|
+
'aria-describedby'?: string;
|
|
605
|
+
'aria-invalid'?: true;
|
|
606
|
+
'aria-required'?: true;
|
|
607
|
+
}
|
|
608
|
+
/** render 함수의 둘째 인자 — 입력에 펼치지 않는 정보 */
|
|
609
|
+
interface FormFieldMeta {
|
|
610
|
+
/** 레이블 요소의 id — label 로 이름을 받을 수 없는 요소(div role="combobox" 등)는 aria-labelledby 에 넣는다 */
|
|
611
|
+
labelId?: string;
|
|
612
|
+
/** 도움말 요소의 id */
|
|
613
|
+
helperId?: string;
|
|
614
|
+
}
|
|
615
|
+
interface FormFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'id'> {
|
|
616
|
+
/** 입력 위에 표시할 레이블 (짧게 — 보조 설명은 helperText) */
|
|
617
|
+
label?: ReactNode;
|
|
618
|
+
/** 입력 아래 도움말. error 일 때는 오류 메시지로 표시된다 */
|
|
619
|
+
helperText?: ReactNode;
|
|
620
|
+
/** 오류 상태 — 자식에 aria-invalid 를 넘기고 helperText 를 오류 색으로 */
|
|
621
|
+
error?: boolean;
|
|
622
|
+
/** 필수 — 레이블에 * 를 붙이고 자식에 aria-required 를 넘긴다(네이티브 검증이 필요하면 입력에 required 를 직접) */
|
|
623
|
+
required?: boolean;
|
|
624
|
+
/** 입력 요소의 id. 생략하면 만든다 (ErrorSummary 링크·focusField 가 이 id 로 찾아간다) */
|
|
625
|
+
id?: string;
|
|
626
|
+
/** 부모 너비를 꽉 채운다 */
|
|
627
|
+
fullWidth?: boolean;
|
|
628
|
+
/**
|
|
629
|
+
* 입력을 그리는 함수. 첫째 인자를 입력 요소에 그대로 펼쳐 넣는다.
|
|
630
|
+
* @example {(field) => <input {...field} />}
|
|
631
|
+
* @example {(field, { labelId }) => <CustomSelect {...field} aria-labelledby={labelId} />}
|
|
632
|
+
*/
|
|
633
|
+
children: (control: FormFieldControlProps, meta: FormFieldMeta) => ReactNode;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* 직접 만든 입력·다른 라이브러리 입력에 TextField 와 같은 레이블·도움말·오류 연결을 붙인다.
|
|
637
|
+
* hook 은 useId 뿐이라 서버 컴포넌트에서도 쓸 수 있다.
|
|
638
|
+
*/
|
|
639
|
+
declare const FormField: react.ForwardRefExoticComponent<FormFieldProps & react.RefAttributes<HTMLDivElement>>;
|
|
640
|
+
|
|
641
|
+
interface GridProps extends HTMLAttributes<HTMLElement> {
|
|
642
|
+
/** 렌더링할 요소 (목록이면 'ul') */
|
|
643
|
+
as?: ElementType;
|
|
644
|
+
/** 열 개수 (같은 폭). 구간별로: `{ base: 1, md: 2, lg: 3 }`. 생략하면 한 열 */
|
|
645
|
+
columns?: Responsive<number>;
|
|
646
|
+
/**
|
|
647
|
+
* 칸의 최소 폭(CSS 길이, 예: '220px'·'14rem'). 주면 화면 폭에 맞춰 열 개수를 자동으로 정한다(columns 대신).
|
|
648
|
+
* 화면이 이 폭보다 좁으면 칸이 화면 폭으로 줄어든다(가로 스크롤 없음).
|
|
649
|
+
*/
|
|
650
|
+
minItemWidth?: string;
|
|
651
|
+
/** 칸 사이 간격 (space 토큰 키). 구간별 값도 받는다 */
|
|
652
|
+
gap?: Responsive<keyof typeof space>;
|
|
653
|
+
}
|
|
654
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLElement>>;
|
|
655
|
+
|
|
543
656
|
interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
544
657
|
/** 현재 값 (0 ~ max). 생략하거나 null 이면 진행률을 모르는 상태(indeterminate)로 움직이는 막대를 보여 준다 */
|
|
545
658
|
value?: number | null;
|
|
@@ -576,17 +689,21 @@ interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
576
689
|
*/
|
|
577
690
|
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLSpanElement>>;
|
|
578
691
|
|
|
692
|
+
type Direction = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
693
|
+
type Align = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
694
|
+
type Justify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
695
|
+
type SpaceKey = keyof typeof space;
|
|
579
696
|
interface StackProps extends HTMLAttributes<HTMLElement> {
|
|
580
697
|
/** 렌더링할 요소 */
|
|
581
698
|
as?: ElementType;
|
|
582
|
-
/** 배치 방향 */
|
|
583
|
-
direction?:
|
|
584
|
-
/** 자식 사이 간격 (space 토큰 키) */
|
|
585
|
-
gap?:
|
|
586
|
-
/** 교차축 정렬 (align-items) */
|
|
587
|
-
align?:
|
|
588
|
-
/** 주축 정렬 (justify-content) */
|
|
589
|
-
justify?:
|
|
699
|
+
/** 배치 방향 (기본 column). 구간별로: `{ base: 'column', md: 'row' }` */
|
|
700
|
+
direction?: Responsive<Direction>;
|
|
701
|
+
/** 자식 사이 간격 (space 토큰 키). 구간별로: `{ base: 3, lg: 6 }` */
|
|
702
|
+
gap?: Responsive<SpaceKey>;
|
|
703
|
+
/** 교차축 정렬 (align-items). 구간별 값도 받는다 */
|
|
704
|
+
align?: Responsive<Align>;
|
|
705
|
+
/** 주축 정렬 (justify-content). 구간별 값도 받는다 */
|
|
706
|
+
justify?: Responsive<Justify>;
|
|
590
707
|
/** 줄바꿈 허용 */
|
|
591
708
|
wrap?: boolean;
|
|
592
709
|
}
|
|
@@ -627,8 +744,11 @@ declare const VisuallyHidden: react.ForwardRefExoticComponent<VisuallyHiddenProp
|
|
|
627
744
|
declare function focusField(target: string | HTMLElement | null | undefined): boolean;
|
|
628
745
|
|
|
629
746
|
interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
630
|
-
/**
|
|
631
|
-
|
|
747
|
+
/**
|
|
748
|
+
* 라이트/다크 모드. `'system'` 은 OS 설정을 따르고 바뀌면 바로 반영한다 — 서버 렌더링에서도 CSS 미디어쿼리로 그려
|
|
749
|
+
* 첫 화면이 깜빡이지 않는다. 생략하면 바깥 ThemeProvider 의 모드를 이어받는다 (최상위는 light).
|
|
750
|
+
*/
|
|
751
|
+
theme?: ThemeMode;
|
|
632
752
|
/**
|
|
633
753
|
* createTheme 으로 만든 브랜드 테마. 모드를 바꿔도 유지되고, 중첩된 ThemeProvider 는 바깥 값을 이어받는다
|
|
634
754
|
* (안쪽에서 준 값이 우선).
|
|
@@ -636,7 +756,10 @@ interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
636
756
|
overrides?: BestowTheme;
|
|
637
757
|
}
|
|
638
758
|
declare const ThemeProvider: react.ForwardRefExoticComponent<ThemeProviderProps & react.RefAttributes<HTMLDivElement>>;
|
|
639
|
-
/**
|
|
759
|
+
/**
|
|
760
|
+
* 현재 적용 중인 모드(light/dark)를 반환한다. `theme="system"` 이면 OS 설정에 따른 값이다 —
|
|
761
|
+
* 단, 서버 렌더링과 hydration 첫 렌더에서는 OS 설정을 몰라 'light' 이고, 그 직후 실제 값으로 다시 렌더링된다.
|
|
762
|
+
*/
|
|
640
763
|
declare function useTheme(): ThemeName;
|
|
641
764
|
/**
|
|
642
765
|
* Portal 로 ThemeProvider 바깥(body)에 렌더링되는 요소에 펼쳐 넣을 props.
|
|
@@ -742,11 +865,11 @@ interface AgreementGroupProps {
|
|
|
742
865
|
*/
|
|
743
866
|
declare const AgreementGroup: react.ForwardRefExoticComponent<AgreementGroupProps & react.RefAttributes<HTMLFieldSetElement>>;
|
|
744
867
|
|
|
745
|
-
type AlertColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
868
|
+
type AlertColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
746
869
|
interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'title'> {
|
|
747
870
|
/** 시각적 스타일 */
|
|
748
871
|
variant?: 'soft' | 'outline' | 'solid';
|
|
749
|
-
/** 의미 색상.
|
|
872
|
+
/** 의미 색상. 일반 안내(공지·도움말)는 info — 브랜드 색(primary)을 바꿔도 파랑으로 남는다 */
|
|
750
873
|
color?: AlertColor;
|
|
751
874
|
/** 굵게 표시되는 제목 */
|
|
752
875
|
title?: ReactNode;
|
|
@@ -939,6 +1062,13 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'col
|
|
|
939
1062
|
* `disabled` 와 달리 포커스는 유지된다.
|
|
940
1063
|
*/
|
|
941
1064
|
loading?: boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* 자식 요소(라우터 링크 등)에 버튼 모양과 속성을 입혀 그대로 렌더링한다. 서버 컴포넌트에서도 쓸 수 있다.
|
|
1067
|
+
* 페이지를 이동하는 주요 동작에 쓰고, 자식은 요소 하나여야 한다.
|
|
1068
|
+
* `disabled` 면 `aria-disabled` 를 붙이고 Tab 순서에서 빼며 클릭을 막는다. 휠 클릭은 막지 못하니 링크는 되도록 비활성으로 두지 않는다.
|
|
1069
|
+
* @example <Button asChild><NextLink href="/signup">시작하기</NextLink></Button>
|
|
1070
|
+
*/
|
|
1071
|
+
asChild?: boolean;
|
|
942
1072
|
}
|
|
943
1073
|
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
944
1074
|
|
|
@@ -990,6 +1120,53 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
|
|
|
990
1120
|
}
|
|
991
1121
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
992
1122
|
|
|
1123
|
+
interface CheckboxOption {
|
|
1124
|
+
value: string;
|
|
1125
|
+
label: ReactNode;
|
|
1126
|
+
/** 레이블 아래 보조 설명 (접근 가능한 이름이 아니라 설명으로 읽힌다) */
|
|
1127
|
+
description?: ReactNode;
|
|
1128
|
+
disabled?: boolean;
|
|
1129
|
+
}
|
|
1130
|
+
interface CheckboxGroupProps {
|
|
1131
|
+
/** 선택지 목록 */
|
|
1132
|
+
options: CheckboxOption[];
|
|
1133
|
+
/** 선택된 값들 (제어 모드). undefined 를 넘기면 아무것도 선택하지 않은 상태 */
|
|
1134
|
+
value?: string[];
|
|
1135
|
+
/** 처음 선택된 값들 (비제어 모드) */
|
|
1136
|
+
defaultValue?: string[];
|
|
1137
|
+
/** 값이 바뀔 때 호출된다 — options 순서대로 정렬한 배열 */
|
|
1138
|
+
onValueChange?: (value: string[]) => void;
|
|
1139
|
+
/** 묶음 위에 표시할 레이블 */
|
|
1140
|
+
label?: ReactNode;
|
|
1141
|
+
/** 묶음 아래 도움말. error 일 때는 오류 메시지로 표시된다 */
|
|
1142
|
+
helperText?: ReactNode;
|
|
1143
|
+
/** 오류 상태 — 각 체크박스에 aria-invalid */
|
|
1144
|
+
error?: boolean;
|
|
1145
|
+
/** 배치 방향 */
|
|
1146
|
+
orientation?: 'vertical' | 'horizontal';
|
|
1147
|
+
/** 크기 */
|
|
1148
|
+
size?: 'sm' | 'md';
|
|
1149
|
+
disabled?: boolean;
|
|
1150
|
+
/**
|
|
1151
|
+
* 하나 이상 골라야 함 — 레이블에 * 와 스크린리더용 "필수" 를 붙인다. "몇 개 이상" 검증은 폼(react-hook-form 등)에서 한다
|
|
1152
|
+
* (체크박스마다 네이티브 required 를 주면 "모두 골라야 함" 이 되어 쓰지 않는다).
|
|
1153
|
+
*/
|
|
1154
|
+
required?: boolean;
|
|
1155
|
+
/** form 제출 시 사용할 이름 — 고른 값마다 같은 이름으로 제출된다(FormData.getAll) */
|
|
1156
|
+
name?: string;
|
|
1157
|
+
/** 묶음의 id (ErrorSummary 링크·focusField 가 이 id 로 첫(또는 선택된) 체크박스를 찾는다) */
|
|
1158
|
+
id?: string;
|
|
1159
|
+
/** label 이 없을 때 스크린리더용 이름 */
|
|
1160
|
+
'aria-label'?: string;
|
|
1161
|
+
/** 바깥 래퍼 className */
|
|
1162
|
+
className?: string;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* 여러 선택지 중 여러 개를 고르는 체크박스 묶음. 묶음 레이블·도움말·오류를 한 번에 연결한다.
|
|
1166
|
+
* 약관 동의(전체 동의·필수/선택 표시·보기)는 AgreementGroup 을 쓴다.
|
|
1167
|
+
*/
|
|
1168
|
+
declare const CheckboxGroup: react.ForwardRefExoticComponent<CheckboxGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
1169
|
+
|
|
993
1170
|
interface ComboboxOption {
|
|
994
1171
|
value: string;
|
|
995
1172
|
/** 표시·검색에 쓰는 이름 */
|
|
@@ -1306,6 +1483,8 @@ interface IconButtonProps extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'f
|
|
|
1306
1483
|
loading?: boolean;
|
|
1307
1484
|
/** 버튼이 하는 일을 설명하는 이름 (예: "삭제"). 아이콘만으로는 스크린리더가 알 수 없어 필수다 */
|
|
1308
1485
|
'aria-label': string;
|
|
1486
|
+
/** 자식 요소(라우터 링크 등)에 모양과 속성을 입혀 그대로 렌더링한다. 아이콘은 그 요소 안에 넣는다 */
|
|
1487
|
+
asChild?: boolean;
|
|
1309
1488
|
/** 아이콘. 크기는 버튼 size 에 맞춰 자동으로 조절된다 (sm 16px · md 20px · lg 24px) */
|
|
1310
1489
|
children: ReactNode;
|
|
1311
1490
|
}
|
|
@@ -1561,6 +1740,52 @@ interface RadioGroupProps {
|
|
|
1561
1740
|
*/
|
|
1562
1741
|
declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
1563
1742
|
|
|
1743
|
+
interface ResidentNumberInputProps {
|
|
1744
|
+
/** 숫자만 있는 값 (제어 모드). 예: "9001011234567" (digits={7} 이면 "9001011") */
|
|
1745
|
+
value?: string;
|
|
1746
|
+
/** 처음 값 (비제어 모드) */
|
|
1747
|
+
defaultValue?: string;
|
|
1748
|
+
/** 숫자만 있는 값과, 다 채웠을 때 생년월일·뒷자리 첫 숫자가 맞는지로 호출된다 (다 채우기 전에는 valid 가 null) */
|
|
1749
|
+
onValueChange?: (digits: string, valid: boolean | null) => void;
|
|
1750
|
+
/**
|
|
1751
|
+
* 받을 자릿수. 13(기본)은 뒤 7자리를 가려서(password) 받고, 7 은 생년월일 + 뒷자리 첫 숫자만 받는다(나이·성별 확인 —
|
|
1752
|
+
* 주민번호 전체가 필요 없으면 7 을 쓴다).
|
|
1753
|
+
*/
|
|
1754
|
+
digits?: 13 | 7;
|
|
1755
|
+
/**
|
|
1756
|
+
* 다 채웠는데 생년월일·뒷자리 첫 숫자가 맞지 않으면 자동으로 오류를 보여 준다 (기본 true). 마지막 검증 숫자는 보지 않는다
|
|
1757
|
+
* (2020년 10월 이후 번호는 임의 번호). 직접 error·helperText 를 주면 그 값이 우선한다.
|
|
1758
|
+
*/
|
|
1759
|
+
validate?: boolean;
|
|
1760
|
+
/** 자동 검증 오류 문구 */
|
|
1761
|
+
invalidText?: string;
|
|
1762
|
+
/** 위에 표시할 레이블 (기본 "주민등록번호") */
|
|
1763
|
+
label?: ReactNode;
|
|
1764
|
+
/** 아래 도움말. error 일 때는 오류 메시지로 표시된다 */
|
|
1765
|
+
helperText?: ReactNode;
|
|
1766
|
+
/** 오류 상태 */
|
|
1767
|
+
error?: boolean;
|
|
1768
|
+
/** 필수 입력 (레이블에 * 표시, required 속성) */
|
|
1769
|
+
required?: boolean;
|
|
1770
|
+
disabled?: boolean;
|
|
1771
|
+
/** 크기 */
|
|
1772
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1773
|
+
/** form 제출 시 사용할 이름 — 숫자만 있는 값을 숨긴 input 으로 제출한다 */
|
|
1774
|
+
name?: string;
|
|
1775
|
+
/** 묶음 id — 앞칸은 `${id}-front`, 뒷칸은 `${id}-back` (ErrorSummary 링크·focusField 는 이 id 로 앞칸을 찾는다) */
|
|
1776
|
+
id?: string;
|
|
1777
|
+
/** 바깥 래퍼 className */
|
|
1778
|
+
className?: string;
|
|
1779
|
+
onBlur?: (event: FocusEvent<HTMLDivElement>) => void;
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* 주민·외국인등록번호 입력 — 앞 6자리와 뒷자리를 두 칸으로 받고 뒷자리는 가린다(password). 번호를 통째로 앞칸에 붙여 넣으면 두 칸에 나눠 넣는다.
|
|
1783
|
+
* 앞칸을 다 채워도 포커스를 옮기지 않는다(예고 없는 포커스 이동은 WCAG 3.2.2). 뒷칸이 비었을 때 Backspace 는 앞칸으로 간다.
|
|
1784
|
+
*
|
|
1785
|
+
* 주민등록번호는 법령에 근거가 있을 때만 수집할 수 있다(개인정보 보호법 제24조의2). 나이·성별만 필요하면 `digits={7}`.
|
|
1786
|
+
*/
|
|
1787
|
+
declare const ResidentNumberInput: react.ForwardRefExoticComponent<ResidentNumberInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1788
|
+
|
|
1564
1789
|
interface SegmentedControlOption {
|
|
1565
1790
|
value: string;
|
|
1566
1791
|
/** 칸에 보이는 글자 (접근 가능한 이름이 된다) */
|
|
@@ -1743,6 +1968,11 @@ interface StepperProps extends Omit<OlHTMLAttributes<HTMLOListElement>, 'childre
|
|
|
1743
1968
|
current: number;
|
|
1744
1969
|
/** horizontal(기본): 가로로 나란히, 이름은 원 아래. vertical: 세로로, 이름은 원 오른쪽(설명이 길 때) */
|
|
1745
1970
|
orientation?: 'horizontal' | 'vertical';
|
|
1971
|
+
/**
|
|
1972
|
+
* 현재 단계가 진행 중이다(AI 응답·업로드 처리 등). 원 안에 스피너를 보여 주고 이름에 "(진행 중)" 을 함께 읽는다.
|
|
1973
|
+
* 단계가 바뀌는 순간을 스크린리더에 알리려면 `role="status"` 영역을 따로 둔다.
|
|
1974
|
+
*/
|
|
1975
|
+
loading?: boolean;
|
|
1746
1976
|
/** 목록 이름 (기본 "진행 단계") */
|
|
1747
1977
|
'aria-label'?: string;
|
|
1748
1978
|
}
|
|
@@ -1950,7 +2180,7 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
1950
2180
|
}
|
|
1951
2181
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1952
2182
|
|
|
1953
|
-
type ToastColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
2183
|
+
type ToastColor = 'primary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
1954
2184
|
interface ToastOptions {
|
|
1955
2185
|
/** 제목 */
|
|
1956
2186
|
title: ReactNode;
|
|
@@ -2048,5 +2278,5 @@ interface VerificationCodeInputProps {
|
|
|
2048
2278
|
*/
|
|
2049
2279
|
declare const VerificationCodeInput: react.ForwardRefExoticComponent<VerificationCodeInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
2050
2280
|
|
|
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 };
|
|
2281
|
+
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 };
|
|
2282
|
+
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 };
|