@amineslab/ui 0.1.0-next.20260925131012 → 0.1.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/form-fields-B1bIqSFO.d.cts +517 -0
- package/dist/form-fields-B1bIqSFO.d.ts +517 -0
- package/dist/label-1M8BaNQZ.d.cts +573 -0
- package/dist/label-1M8BaNQZ.d.ts +573 -0
- package/dist/label-B5sC6OFk.d.cts +565 -0
- package/dist/label-B5sC6OFk.d.ts +565 -0
- package/dist/label-BALpBplm.d.cts +565 -0
- package/dist/label-BALpBplm.d.ts +565 -0
- package/dist/label-BEgWK5BT.d.cts +588 -0
- package/dist/label-BEgWK5BT.d.ts +588 -0
- package/dist/label-BOY-jYQ0.d.cts +581 -0
- package/dist/label-BOY-jYQ0.d.ts +581 -0
- package/dist/label-BPY4z_UR.d.cts +588 -0
- package/dist/label-BPY4z_UR.d.ts +588 -0
- package/dist/label-BTlFxyV0.d.cts +586 -0
- package/dist/label-BTlFxyV0.d.ts +586 -0
- package/dist/label-BoJzJasZ.d.cts +582 -0
- package/dist/label-BoJzJasZ.d.ts +582 -0
- package/dist/label-BzBMyN3M.d.cts +577 -0
- package/dist/label-BzBMyN3M.d.ts +577 -0
- package/dist/label-C25JWmwg.d.cts +575 -0
- package/dist/label-C25JWmwg.d.ts +575 -0
- package/dist/label-C39geBGu.d.cts +569 -0
- package/dist/label-C39geBGu.d.ts +569 -0
- package/dist/label-CFa7H0MJ.d.cts +581 -0
- package/dist/label-CFa7H0MJ.d.ts +581 -0
- package/dist/label-CHN6RDds.d.cts +570 -0
- package/dist/label-CHN6RDds.d.ts +570 -0
- package/dist/label-CR4YDuK3.d.cts +576 -0
- package/dist/label-CR4YDuK3.d.ts +576 -0
- package/dist/label-CVCQcIB5.d.cts +581 -0
- package/dist/label-CVCQcIB5.d.ts +581 -0
- package/dist/label-Ccb4jRcY.d.cts +588 -0
- package/dist/label-Ccb4jRcY.d.ts +588 -0
- package/dist/label-CkBy2dW7.d.cts +591 -0
- package/dist/label-CkBy2dW7.d.ts +591 -0
- package/dist/label-CpDbegkn.d.cts +555 -0
- package/dist/label-CpDbegkn.d.ts +555 -0
- package/dist/label-D1UMApWv.d.cts +598 -0
- package/dist/label-D1UMApWv.d.ts +598 -0
- package/dist/label-DGHM7QEj.d.cts +591 -0
- package/dist/label-DGHM7QEj.d.ts +591 -0
- package/dist/label-DaXK-RuI.d.cts +576 -0
- package/dist/label-DaXK-RuI.d.ts +576 -0
- package/dist/label-DbfulioI.d.cts +581 -0
- package/dist/label-DbfulioI.d.ts +581 -0
- package/dist/label-DeyDJRuK.d.cts +600 -0
- package/dist/label-DeyDJRuK.d.ts +600 -0
- package/dist/label-Dx8QsMPn.d.cts +598 -0
- package/dist/label-Dx8QsMPn.d.ts +598 -0
- package/dist/label-Dz0DrmrO.d.cts +588 -0
- package/dist/label-Dz0DrmrO.d.ts +588 -0
- package/dist/label-DziZP2VL.d.cts +590 -0
- package/dist/label-DziZP2VL.d.ts +590 -0
- package/dist/label-FFoDgC1Z.d.cts +583 -0
- package/dist/label-FFoDgC1Z.d.ts +583 -0
- package/dist/label-NUIyafzR.d.cts +588 -0
- package/dist/label-NUIyafzR.d.ts +588 -0
- package/dist/label-NwHLobGQ.d.cts +590 -0
- package/dist/label-NwHLobGQ.d.ts +590 -0
- package/dist/label-SoZfJG7i.d.cts +571 -0
- package/dist/label-SoZfJG7i.d.ts +571 -0
- package/dist/label-YrBpLATh.d.cts +570 -0
- package/dist/label-YrBpLATh.d.ts +570 -0
- package/dist/label-Z97Pco2v.d.cts +567 -0
- package/dist/label-Z97Pco2v.d.ts +567 -0
- package/dist/label-a0g6Y_Q8.d.cts +543 -0
- package/dist/label-a0g6Y_Q8.d.ts +543 -0
- package/dist/label-gpy0nv42.d.cts +598 -0
- package/dist/label-gpy0nv42.d.ts +598 -0
- package/dist/label-ixshRIuw.d.cts +569 -0
- package/dist/label-ixshRIuw.d.ts +569 -0
- package/dist/label-voR-52GX.d.cts +588 -0
- package/dist/label-voR-52GX.d.ts +588 -0
- package/dist/use-submit-guard-AFkewFH5.d.cts +600 -0
- package/dist/use-submit-guard-AFkewFH5.d.ts +600 -0
- package/dist/use-submit-guard-BhJ0rrq_.d.cts +562 -0
- package/dist/use-submit-guard-BhJ0rrq_.d.ts +562 -0
- package/dist/use-submit-guard-D-knm_JT.d.cts +600 -0
- package/dist/use-submit-guard-D-knm_JT.d.ts +600 -0
- package/dist/use-submit-guard-D1dbZ2fP.d.cts +600 -0
- package/dist/use-submit-guard-D1dbZ2fP.d.ts +600 -0
- package/dist/use-submit-guard-DAoHfwqu.d.cts +600 -0
- package/dist/use-submit-guard-DAoHfwqu.d.ts +600 -0
- package/dist/use-submit-guard-DyOToVDM.d.cts +600 -0
- package/dist/use-submit-guard-DyOToVDM.d.ts +600 -0
- package/dist/use-submit-guard-P8ekrSuw.d.cts +600 -0
- package/dist/use-submit-guard-P8ekrSuw.d.ts +600 -0
- package/package.json +1 -1
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ReactNode, ComponentType, ExoticComponent } from 'react';
|
|
5
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
6
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
7
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
8
|
+
|
|
9
|
+
type FieldControlVariant = 'filled' | 'outline';
|
|
10
|
+
/** Shared surface contract for text fields and selection triggers. */
|
|
11
|
+
interface FieldControlProps {
|
|
12
|
+
variant?: FieldControlVariant;
|
|
13
|
+
/** Add an opaque theme surface beneath the elevation layer. */
|
|
14
|
+
background?: boolean;
|
|
15
|
+
/** Preserve error styling while focused or open. */
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const fieldControlVariants: (props?: ({
|
|
19
|
+
background?: boolean | null | undefined;
|
|
20
|
+
variant?: "outline" | "filled" | null | undefined;
|
|
21
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
22
|
+
type FieldControlVariants = VariantProps<typeof fieldControlVariants>;
|
|
23
|
+
|
|
24
|
+
/** FileUpload와 PhotoField가 공유하는 drop surface 표현입니다. */
|
|
25
|
+
type FileDropzoneVariant = FieldControlVariant;
|
|
26
|
+
/** 레이아웃은 소유하지 않고 표면·focus·drag·invalid 상태만 제공하는 공통 variant입니다. */
|
|
27
|
+
declare const fileDropzoneVariants: (props?: ({
|
|
28
|
+
variant?: "outline" | "filled" | null | undefined;
|
|
29
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
30
|
+
type FileDropzoneVariants = VariantProps<typeof fileDropzoneVariants>;
|
|
31
|
+
|
|
32
|
+
/** FileInput·FileUpload·FilePicker가 공유하는 파일 모델과 검증 함수. */
|
|
33
|
+
type FileItem = {
|
|
34
|
+
kind: 'local';
|
|
35
|
+
file: File;
|
|
36
|
+
id: string;
|
|
37
|
+
} | {
|
|
38
|
+
kind: 'remote';
|
|
39
|
+
name: string;
|
|
40
|
+
url: string;
|
|
41
|
+
size?: number;
|
|
42
|
+
mimeType?: string;
|
|
43
|
+
id?: string;
|
|
44
|
+
};
|
|
45
|
+
type FileErrorReason = 'too-large' | 'invalid-type' | 'too-many';
|
|
46
|
+
interface FileError {
|
|
47
|
+
fileName: string;
|
|
48
|
+
reason: FileErrorReason;
|
|
49
|
+
message: string;
|
|
50
|
+
}
|
|
51
|
+
declare function getFileName(item: FileItem): string;
|
|
52
|
+
declare function getFileSize(item: FileItem): number | undefined;
|
|
53
|
+
declare function getItemKey(item: FileItem): string;
|
|
54
|
+
declare function formatBytes(bytes: number): string;
|
|
55
|
+
/** MIME type, MIME glob, 확장자를 모두 지원하는 accept 매칭. */
|
|
56
|
+
declare function matchesAccept(file: File, accept?: string): boolean;
|
|
57
|
+
declare function newLocalId(): string;
|
|
58
|
+
declare function isImageFile(item: FileItem): boolean;
|
|
59
|
+
declare function isPdfFile(item: FileItem): boolean;
|
|
60
|
+
|
|
61
|
+
declare const fileInputVariants: (props?: ({
|
|
62
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
63
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
64
|
+
interface FileInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'onError'>, VariantProps<typeof fileInputVariants> {
|
|
65
|
+
background?: FieldControlProps['background'];
|
|
66
|
+
variant?: FieldControlProps['variant'];
|
|
67
|
+
value?: FileItem[];
|
|
68
|
+
defaultValue?: FileItem[];
|
|
69
|
+
onChange?: (files: FileItem[]) => void;
|
|
70
|
+
multiple?: boolean;
|
|
71
|
+
accept?: string;
|
|
72
|
+
maxSize?: number;
|
|
73
|
+
maxFiles?: number;
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
uploading?: boolean;
|
|
76
|
+
onError?: (errors: FileError[]) => void;
|
|
77
|
+
placeholder?: React.ReactNode;
|
|
78
|
+
triggerLabel?: React.ReactNode;
|
|
79
|
+
invalid?: boolean;
|
|
80
|
+
id?: string;
|
|
81
|
+
}
|
|
82
|
+
/** 한 줄 폼 리듬에 맞춘 파일 선택기. DnD가 필요하면 FileUpload를 사용한다. */
|
|
83
|
+
declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
|
|
85
|
+
declare const fileDropAreaVariants: (props?: ({
|
|
86
|
+
variant?: "outline" | "filled" | null | undefined;
|
|
87
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
88
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
89
|
+
interface FileUploadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'onError'>, Omit<VariantProps<typeof fileDropAreaVariants>, 'variant'> {
|
|
90
|
+
variant?: FileDropzoneVariant;
|
|
91
|
+
background?: FieldControlProps['background'];
|
|
92
|
+
value?: FileItem[];
|
|
93
|
+
defaultValue?: FileItem[];
|
|
94
|
+
onChange?: (files: FileItem[]) => void;
|
|
95
|
+
multiple?: boolean;
|
|
96
|
+
accept?: string;
|
|
97
|
+
maxSize?: number;
|
|
98
|
+
maxFiles?: number;
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
uploading?: boolean;
|
|
101
|
+
onError?: (errors: FileError[]) => void;
|
|
102
|
+
placeholder?: React.ReactNode;
|
|
103
|
+
helpText?: React.ReactNode;
|
|
104
|
+
invalid?: boolean;
|
|
105
|
+
itemsClassName?: string;
|
|
106
|
+
itemsPlacement?: 'outside' | 'inside';
|
|
107
|
+
id?: string;
|
|
108
|
+
}
|
|
109
|
+
/** 클릭·키보드·드래그앤드롭과 로컬/원격 미리보기를 하나의 파일 수명주기로 묶는다. */
|
|
110
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLDivElement>>;
|
|
111
|
+
|
|
112
|
+
/** An icon component reference, or a rendered node such as an SVG or emoji. */
|
|
113
|
+
type ButtonIcon = ReactNode | ComponentType<{
|
|
114
|
+
className?: string;
|
|
115
|
+
size?: number;
|
|
116
|
+
}> | ExoticComponent<{
|
|
117
|
+
className?: string;
|
|
118
|
+
size?: number;
|
|
119
|
+
}>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 단일 날짜 선택기 · `Popover` + 트리거 `Button`(outline) + `Calendar` 조합.
|
|
123
|
+
* value/onChange 는 `YYYY-MM-DD` 문자열(`includeTime` 시 `YYYY-MM-DDTHH:mm`)을 주고받는다.
|
|
124
|
+
* controlled 컴포넌트이므로 호출부에서 상태를 관리한다 · react-hook-form 연동은
|
|
125
|
+
* `<FormField render={({ field }) => <DatePicker value={field.value} onChange={field.onChange} />} />`.
|
|
126
|
+
*/
|
|
127
|
+
interface DatePickerProps {
|
|
128
|
+
/** YYYY-MM-DD 문자열 (includeTime 시 YYYY-MM-DDTHH:mm) */
|
|
129
|
+
value?: string;
|
|
130
|
+
onChange?: (value: string) => void;
|
|
131
|
+
placeholder?: string;
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
/** 선택 가능한 최소 날짜 (YYYY-MM-DD) */
|
|
134
|
+
minDate?: string;
|
|
135
|
+
/** 선택 가능한 최대 날짜 (YYYY-MM-DD) */
|
|
136
|
+
maxDate?: string;
|
|
137
|
+
/** 시간(HH:mm)까지 선택한다. value 형식이 YYYY-MM-DDTHH:mm 으로 바뀐다. */
|
|
138
|
+
includeTime?: boolean;
|
|
139
|
+
/** 팝오버/드로어가 닫힐 때(편집 완료) 호출. 소비측이 시작↔종료 정합성 보정 등에 쓴다. */
|
|
140
|
+
onClose?: () => void;
|
|
141
|
+
/** true면 danger 상태 outline과 `aria-invalid`를 적용한다. */
|
|
142
|
+
invalid?: boolean;
|
|
143
|
+
/** 기본은 부모 면 위 alpha surface, 명시적 경계가 필요하면 outline을 선택한다. */
|
|
144
|
+
background?: FieldControlProps['background'];
|
|
145
|
+
variant?: FieldControlProps['variant'];
|
|
146
|
+
/** FormControl이 주입하는 설명/오류 메시지 연결 ID. 실제 트리거에 전달한다. */
|
|
147
|
+
'aria-describedby'?: string;
|
|
148
|
+
/** 필수 입력 상태를 실제 트리거에 전달한다. */
|
|
149
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
150
|
+
/** FormControl이 주입하는 invalid 상태. `invalid`와 병합해 실제 트리거에 전달한다. */
|
|
151
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
152
|
+
/** 트리거가 포커스를 잃을 때 호출합니다. RHF touched 처리에 사용합니다. */
|
|
153
|
+
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
154
|
+
className?: string;
|
|
155
|
+
id?: string;
|
|
156
|
+
}
|
|
157
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 시작일/종료일을 선택하는 날짜 범위 입력기 · `Calendar`(range mode).
|
|
161
|
+
* 기본은 `DatePicker` 와 같은 1개월 뷰이고, `numberOfMonths={2}` 로 2개월을 좌우로 펼친다.
|
|
162
|
+
* value/onChange 는 `{ from, to }` (각각 `YYYY-MM-DD` 문자열, 미선택 시 빈 문자열)을 주고받는다.
|
|
163
|
+
* `includeTime` 시 `from`/`to` 형식이 `YYYY-MM-DDTHH:mm` 으로 바뀐다.
|
|
164
|
+
*
|
|
165
|
+
* **반응형 캡슐화** · 데스크톱은 `Popover`, 모바일은 vaul `Drawer`(content-height, multi-detent)
|
|
166
|
+
* 로 풀폭 캘린더를 띄운다. 사용처는 분기 없이 한 번만 쓴다.
|
|
167
|
+
*
|
|
168
|
+
* **C2 전면 전환(plan 079)**: 이미 시트 안(`useInSheetPanel`)에서 열릴 때 종전엔 인라인
|
|
169
|
+
* `Collapsible` 아코디언으로 펼쳤으나, 본 플랜에서 **중첩 content-height 시트**(vaul NestedRoot)로
|
|
170
|
+
* 띄운다. nested 전환은 `Drawer` 프리미티브 내부에서 `useInSheetPanel()` 자동 감지로 처리되므로,
|
|
171
|
+
* 모바일이면 시트 안/밖 무관하게 동일하게 `Drawer` 를 렌더한다(`Combobox`·`Select` 와 동일 패턴).
|
|
172
|
+
*
|
|
173
|
+
* `to >= from` 같은 기간 정합성은 컴포넌트가 강제하지 않는다 · 소비측 zod refine 책임.
|
|
174
|
+
*/
|
|
175
|
+
interface DateRange {
|
|
176
|
+
/** YYYY-MM-DD 문자열 (includeTime 시 YYYY-MM-DDTHH:mm), 미선택 시 빈 문자열 */
|
|
177
|
+
from: string;
|
|
178
|
+
/** YYYY-MM-DD 문자열 (includeTime 시 YYYY-MM-DDTHH:mm), 미선택 시 빈 문자열 */
|
|
179
|
+
to: string;
|
|
180
|
+
}
|
|
181
|
+
interface DateRangePickerProps {
|
|
182
|
+
value: DateRange;
|
|
183
|
+
onChange: (range: DateRange) => void;
|
|
184
|
+
placeholder?: string;
|
|
185
|
+
disabled?: boolean;
|
|
186
|
+
/** 시작·종료 시간(HH:mm)까지 선택한다. value.from/to 형식이 YYYY-MM-DDTHH:mm 으로 바뀐다. */
|
|
187
|
+
includeTime?: boolean;
|
|
188
|
+
/** 캘린더에 펼칠 개월 수. 기본 1(DatePicker 와 동일한 단일 뷰), 2 로 두 달을 좌우로 펼친다. */
|
|
189
|
+
numberOfMonths?: 1 | 2;
|
|
190
|
+
/**
|
|
191
|
+
* 트리거+팝오버 대신 **캘린더를 그 자리에 인라인**으로 렌더한다(중첩 오버레이 회피).
|
|
192
|
+
* 모바일 필터 시트처럼 이미 떠 있는 표면 안에서 날짜를 고를 때 사용 · 시트 위에 또
|
|
193
|
+
* 작은 팝오버를 띄우지 않는다(연구 권고). `className` 은 인라인 래퍼에 적용된다.
|
|
194
|
+
*/
|
|
195
|
+
inline?: boolean;
|
|
196
|
+
/** true면 danger 상태 outline과 `aria-invalid`를 적용한다. */
|
|
197
|
+
invalid?: boolean;
|
|
198
|
+
/** 기본은 부모 면 위 alpha surface, 명시적 경계가 필요하면 outline을 선택한다. */
|
|
199
|
+
background?: FieldControlProps['background'];
|
|
200
|
+
variant?: FieldControlProps['variant'];
|
|
201
|
+
/** FormControl이 주입하는 설명/오류 메시지 연결 ID. 실제 트리거에 전달한다. */
|
|
202
|
+
'aria-describedby'?: string;
|
|
203
|
+
/** 필수 입력 상태를 실제 트리거에 전달한다. */
|
|
204
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
205
|
+
/** FormControl이 주입하는 invalid 상태. `invalid`와 병합해 실제 트리거에 전달한다. */
|
|
206
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
207
|
+
/** inline 캘린더 group의 접근 가능한 이름. 트리거 모드에서는 필요하지 않다. */
|
|
208
|
+
'aria-label'?: string;
|
|
209
|
+
/** inline 캘린더 group을 외부 제목에 연결한다. */
|
|
210
|
+
'aria-labelledby'?: string;
|
|
211
|
+
/** 트리거가 포커스를 잃을 때 호출합니다. RHF touched 처리에 사용합니다. */
|
|
212
|
+
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
213
|
+
className?: string;
|
|
214
|
+
id?: string;
|
|
215
|
+
}
|
|
216
|
+
declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
217
|
+
|
|
218
|
+
interface TimeInputProps {
|
|
219
|
+
/** `'HH:mm'` 24시간 문자열 */
|
|
220
|
+
value?: string;
|
|
221
|
+
onChange?: (value: string) => void;
|
|
222
|
+
placeholder?: string;
|
|
223
|
+
/** 트리거 없이 시·분 선택을 직접 표시합니다. PC는 직접 입력, 모바일은 휠을 표시합니다. */
|
|
224
|
+
inline?: boolean;
|
|
225
|
+
/** 표시 형식. value/onChange는 항상 24시간 HH:mm입니다. */
|
|
226
|
+
hourCycle?: 12 | 24;
|
|
227
|
+
inlineLabel?: string;
|
|
228
|
+
inlineLabelPosition?: 'top' | 'left';
|
|
229
|
+
disabled?: boolean;
|
|
230
|
+
/** 선택 가능한 최소 시간 (`'HH:mm'`). */
|
|
231
|
+
minTime?: string;
|
|
232
|
+
/** 선택 가능한 최대 시간 (`'HH:mm'`). */
|
|
233
|
+
maxTime?: string;
|
|
234
|
+
/** 분 단위 step (1·5·10·15·30 등). 기본 1. */
|
|
235
|
+
step?: number;
|
|
236
|
+
/** 입력 또는 모바일 트리거 크기. */
|
|
237
|
+
size?: 'sm' | 'md' | 'lg';
|
|
238
|
+
/** invalid 시 destructive 보더. */
|
|
239
|
+
invalid?: boolean;
|
|
240
|
+
/** FormControl이 주입하는 설명/오류 메시지 연결 ID. 실제 트리거에 전달한다. */
|
|
241
|
+
'aria-describedby'?: string;
|
|
242
|
+
/** 필수 입력 상태를 실제 트리거에 전달한다. */
|
|
243
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
244
|
+
/** FormControl이 주입하는 invalid 상태. `invalid`와 병합해 실제 트리거에 전달한다. */
|
|
245
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
246
|
+
/** 트리거가 포커스를 잃을 때 호출합니다. RHF touched 처리에 사용합니다. */
|
|
247
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement | HTMLButtonElement | HTMLFieldSetElement>;
|
|
248
|
+
/** 기본은 부모 면 위 alpha surface, 명시적 경계가 필요하면 outline을 선택한다. */
|
|
249
|
+
background?: FieldControlProps['background'];
|
|
250
|
+
variant?: FieldControlProps['variant'];
|
|
251
|
+
className?: string;
|
|
252
|
+
id?: string;
|
|
253
|
+
'aria-label'?: string;
|
|
254
|
+
'aria-labelledby'?: string;
|
|
255
|
+
}
|
|
256
|
+
type TimeInputElement = HTMLInputElement | HTMLButtonElement | HTMLFieldSetElement;
|
|
257
|
+
/** One time field: direct masked input on desktop, wheel on mobile. */
|
|
258
|
+
declare const TimeInput: React.ForwardRefExoticComponent<TimeInputProps & React.RefAttributes<TimeInputElement>>;
|
|
259
|
+
|
|
260
|
+
declare const checkboxVariants: (props?: ({
|
|
261
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
262
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
263
|
+
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
264
|
+
label?: React.ReactNode;
|
|
265
|
+
indeterminate?: boolean;
|
|
266
|
+
}
|
|
267
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
268
|
+
|
|
269
|
+
declare const inputVariants: (props?: ({
|
|
270
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
271
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
272
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
273
|
+
variant?: FieldControlProps['variant'];
|
|
274
|
+
/** Place an opaque theme surface below the elevation layer. Defaults to false. */
|
|
275
|
+
background?: FieldControlProps['background'];
|
|
276
|
+
invalid?: boolean;
|
|
277
|
+
leftSlot?: ButtonIcon;
|
|
278
|
+
rightSlot?: ButtonIcon;
|
|
279
|
+
wrapperClassName?: string;
|
|
280
|
+
}
|
|
281
|
+
interface InputFrameProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
282
|
+
leftSlot?: React.ReactNode;
|
|
283
|
+
rightSlot?: React.ReactNode;
|
|
284
|
+
disabled?: boolean;
|
|
285
|
+
}
|
|
286
|
+
declare const InputFrame: React.ForwardRefExoticComponent<InputFrameProps & React.RefAttributes<HTMLDivElement>>;
|
|
287
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
288
|
+
|
|
289
|
+
type InputSize = NonNullable<InputProps['size']>;
|
|
290
|
+
|
|
291
|
+
declare const radioItemVariants: (props?: ({
|
|
292
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
293
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
294
|
+
declare const RadioGroupRoot: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
295
|
+
label?: React.ReactNode;
|
|
296
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
297
|
+
interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioItemVariants> {
|
|
298
|
+
label?: React.ReactNode;
|
|
299
|
+
}
|
|
300
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
301
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
302
|
+
label?: React.ReactNode;
|
|
303
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
304
|
+
Root: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
305
|
+
label?: React.ReactNode;
|
|
306
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
307
|
+
Item: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
308
|
+
};
|
|
309
|
+
type RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupRoot>;
|
|
310
|
+
|
|
311
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
312
|
+
declare const SelectValue: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
313
|
+
declare const selectTriggerVariants: (props?: ({
|
|
314
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
315
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
316
|
+
interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
|
|
317
|
+
invalid?: FieldControlProps['invalid'];
|
|
318
|
+
background?: FieldControlProps['background'];
|
|
319
|
+
variant?: FieldControlProps['variant'];
|
|
320
|
+
required?: boolean;
|
|
321
|
+
}
|
|
322
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
323
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
324
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
325
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
326
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
327
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
328
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
329
|
+
interface SelectProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root> {
|
|
330
|
+
}
|
|
331
|
+
declare function Select({ value: controlled, defaultValue, onValueChange, disabled, open: openProp, defaultOpen, onOpenChange, children, ...rootProps }: SelectProps): React.JSX.Element;
|
|
332
|
+
declare namespace Select {
|
|
333
|
+
var displayName: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
declare const textareaVariants: (props?: ({
|
|
337
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
338
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
339
|
+
interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, VariantProps<typeof textareaVariants> {
|
|
340
|
+
resize?: TextareaResize;
|
|
341
|
+
showCount?: boolean;
|
|
342
|
+
footer?: React.ReactNode;
|
|
343
|
+
wrapperClassName?: string;
|
|
344
|
+
background?: FieldControlProps['background'];
|
|
345
|
+
variant?: FieldControlProps['variant'];
|
|
346
|
+
invalid?: boolean;
|
|
347
|
+
}
|
|
348
|
+
type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
349
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
350
|
+
|
|
351
|
+
interface ComboboxOption {
|
|
352
|
+
value: string;
|
|
353
|
+
label: string;
|
|
354
|
+
keywords?: readonly string[];
|
|
355
|
+
disabled?: boolean;
|
|
356
|
+
leading?: React.ReactNode;
|
|
357
|
+
}
|
|
358
|
+
interface ComboboxProps {
|
|
359
|
+
options: readonly ComboboxOption[];
|
|
360
|
+
value?: string;
|
|
361
|
+
defaultValue?: string;
|
|
362
|
+
onValueChange?: (value: string) => void;
|
|
363
|
+
placeholder?: string;
|
|
364
|
+
searchPlaceholder?: string;
|
|
365
|
+
/** Accessible name for the search input inside the list surface. */
|
|
366
|
+
searchLabel?: string;
|
|
367
|
+
emptyLabel?: string;
|
|
368
|
+
disabled?: boolean;
|
|
369
|
+
invalid?: boolean;
|
|
370
|
+
triggerClassName?: string;
|
|
371
|
+
contentClassName?: string;
|
|
372
|
+
align?: 'start' | 'center' | 'end';
|
|
373
|
+
'aria-label'?: string;
|
|
374
|
+
'aria-describedby'?: string;
|
|
375
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
376
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
377
|
+
/** 트리거가 포커스를 잃을 때 호출합니다. RHF touched 처리에 사용합니다. */
|
|
378
|
+
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
379
|
+
background?: FieldControlProps['background'];
|
|
380
|
+
variant?: FieldControlProps['variant'];
|
|
381
|
+
id?: string;
|
|
382
|
+
}
|
|
383
|
+
/** Searchable single selection that renders as a popover on pointer-fine screens and a Drawer on mobile. */
|
|
384
|
+
declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
385
|
+
|
|
386
|
+
declare const FormStack: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
387
|
+
interface FormLayoutFieldProps {
|
|
388
|
+
label?: React.ReactNode;
|
|
389
|
+
htmlFor?: string;
|
|
390
|
+
/** 복합 컨트롤의 accessible name을 연결할 label id입니다. */
|
|
391
|
+
labelId?: string;
|
|
392
|
+
required?: boolean;
|
|
393
|
+
description?: React.ReactNode;
|
|
394
|
+
error?: React.ReactNode;
|
|
395
|
+
descriptionId?: string;
|
|
396
|
+
errorId?: string;
|
|
397
|
+
labelClassName?: string;
|
|
398
|
+
className?: string;
|
|
399
|
+
children: React.ReactNode;
|
|
400
|
+
}
|
|
401
|
+
/** RHF 여부와 무관하게 라벨·설명·오류 리듬을 동일하게 유지하는 필드 레이아웃. */
|
|
402
|
+
declare function FormLayoutField({ children, className, description, descriptionId, error, errorId, htmlFor, label, labelId, labelClassName, required, }: FormLayoutFieldProps): React.JSX.Element;
|
|
403
|
+
declare namespace FormLayoutField {
|
|
404
|
+
var displayName: string;
|
|
405
|
+
}
|
|
406
|
+
/** Daeium의 `Field`와 같은 의미를 명시적으로 드러내는 별칭. */
|
|
407
|
+
declare const FieldLayout: typeof FormLayoutField;
|
|
408
|
+
|
|
409
|
+
interface NumberInputProps extends Omit<InputProps, 'type' | 'value' | 'onChange' | 'inputMode'> {
|
|
410
|
+
/** 천 단위 구분 기호를 표시한다. 기본값은 true다. */
|
|
411
|
+
commaize?: boolean;
|
|
412
|
+
/** 표시 문자열 정렬. */
|
|
413
|
+
textAlign?: 'left' | 'right';
|
|
414
|
+
/** 소비자가 받는 실제 숫자 값. 빈 값은 null이다. */
|
|
415
|
+
value?: number | null;
|
|
416
|
+
onChange?: (value: number | null) => void;
|
|
417
|
+
}
|
|
418
|
+
/** 표시 문자열과 실제 number 값을 분리하는 숫자 입력. */
|
|
419
|
+
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
420
|
+
|
|
421
|
+
interface PasswordInputProps extends Omit<InputProps, 'type'> {
|
|
422
|
+
showToggle?: boolean;
|
|
423
|
+
}
|
|
424
|
+
/** 비밀번호 표시 상태를 키보드·스크린리더와 함께 제공하는 입력. */
|
|
425
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
426
|
+
|
|
427
|
+
interface PhoneInputProps extends Omit<InputProps, 'type' | 'value' | 'onChange' | 'inputMode'> {
|
|
428
|
+
value?: string;
|
|
429
|
+
onChange?: (value: string) => void;
|
|
430
|
+
onValidityChange?: (valid: boolean) => void;
|
|
431
|
+
}
|
|
432
|
+
/** 입력 중에도 캐럿 위치를 보존하는 한국 전화번호 입력. */
|
|
433
|
+
declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
434
|
+
|
|
435
|
+
interface ManagedFieldProps<Value> extends Omit<FormLayoutFieldProps, 'children' | 'className'> {
|
|
436
|
+
/** 필드 레이아웃에만 적용할 클래스. `className`은 실제 컨트롤에 전달됩니다. */
|
|
437
|
+
containerClassName?: string;
|
|
438
|
+
value?: Value;
|
|
439
|
+
onChange?: (value: Value) => void;
|
|
440
|
+
onAfterChange?: (value: Value) => void;
|
|
441
|
+
}
|
|
442
|
+
interface TextFieldProps extends ManagedFieldProps<string>, Omit<InputProps, 'value' | 'onChange' | 'size'> {
|
|
443
|
+
size?: InputProps['size'];
|
|
444
|
+
submitOnEnter?: boolean;
|
|
445
|
+
}
|
|
446
|
+
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
447
|
+
interface PasswordFieldProps extends ManagedFieldProps<string>, Omit<PasswordInputProps, 'value' | 'onChange' | 'size'> {
|
|
448
|
+
size?: PasswordInputProps['size'];
|
|
449
|
+
submitOnEnter?: boolean;
|
|
450
|
+
}
|
|
451
|
+
declare const PasswordField: React.ForwardRefExoticComponent<PasswordFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
452
|
+
interface NumberFieldProps extends ManagedFieldProps<number | null>, Omit<NumberInputProps, 'value' | 'onChange'> {
|
|
453
|
+
submitOnEnter?: boolean;
|
|
454
|
+
}
|
|
455
|
+
declare const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
456
|
+
interface PhoneFieldProps extends ManagedFieldProps<string>, Omit<PhoneInputProps, 'value' | 'onChange'> {
|
|
457
|
+
submitOnEnter?: boolean;
|
|
458
|
+
}
|
|
459
|
+
declare const PhoneField: React.ForwardRefExoticComponent<PhoneFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
460
|
+
interface TextareaFieldProps extends ManagedFieldProps<string>, Omit<TextareaProps, 'value' | 'onChange'> {
|
|
461
|
+
}
|
|
462
|
+
declare const TextareaField: React.ForwardRefExoticComponent<TextareaFieldProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
463
|
+
interface CheckboxFieldProps extends ManagedFieldProps<boolean>, Omit<CheckboxProps, 'checked' | 'onCheckedChange' | 'onChange' | 'label' | 'value'> {
|
|
464
|
+
invalid?: boolean;
|
|
465
|
+
}
|
|
466
|
+
declare function CheckboxField({ 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-invalid': ariaInvalid, className, containerClassName, description, error, htmlFor, id, invalid, label, labelClassName, onAfterChange, onChange, required, value, ...props }: CheckboxFieldProps): React.JSX.Element;
|
|
467
|
+
declare namespace CheckboxField {
|
|
468
|
+
var displayName: string;
|
|
469
|
+
}
|
|
470
|
+
interface RadioOption extends Pick<RadioGroupItemProps, 'value' | 'disabled'> {
|
|
471
|
+
label: React.ReactNode;
|
|
472
|
+
}
|
|
473
|
+
interface RadioGroupFieldProps extends ManagedFieldProps<string>, Omit<React.ComponentPropsWithoutRef<typeof RadioGroup>, 'value' | 'onValueChange' | 'onChange' | 'children'> {
|
|
474
|
+
/** 간단한 라디오 목록을 만들 때 사용합니다. `children`과 함께 쓸 수 없습니다. */
|
|
475
|
+
options?: RadioOption[];
|
|
476
|
+
/** RadioGroupItem을 직접 조합할 때 사용합니다. */
|
|
477
|
+
children?: React.ReactNode;
|
|
478
|
+
invalid?: boolean;
|
|
479
|
+
}
|
|
480
|
+
declare function RadioGroupField({ 'aria-describedby': ariaDescribedBy, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, className, containerClassName, children, description, error, htmlFor: _htmlFor, id, invalid, label, labelClassName: _labelClassName, onAfterChange, onChange, options, required, value, ...props }: RadioGroupFieldProps): React.JSX.Element;
|
|
481
|
+
declare namespace RadioGroupField {
|
|
482
|
+
var displayName: string;
|
|
483
|
+
}
|
|
484
|
+
interface SelectOption {
|
|
485
|
+
value: string;
|
|
486
|
+
label: React.ReactNode;
|
|
487
|
+
disabled?: boolean;
|
|
488
|
+
}
|
|
489
|
+
interface SelectFieldProps extends ManagedFieldProps<string>, FieldControlProps, Omit<React.ComponentPropsWithoutRef<typeof Select>, 'value' | 'onValueChange' | 'children'> {
|
|
490
|
+
options: SelectOption[];
|
|
491
|
+
placeholder?: string;
|
|
492
|
+
triggerProps?: React.ComponentPropsWithoutRef<typeof SelectTrigger>;
|
|
493
|
+
/** 트리거에 적용할 추가 클래스. */
|
|
494
|
+
className?: string;
|
|
495
|
+
invalid?: boolean;
|
|
496
|
+
'aria-describedby'?: string;
|
|
497
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
498
|
+
}
|
|
499
|
+
declare function SelectField({ variant, background, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, containerClassName, description, error, htmlFor: _htmlFor, invalid, label, labelClassName: _labelClassName, onAfterChange, onChange, options, placeholder, required, triggerProps, value, ...props }: SelectFieldProps): React.JSX.Element;
|
|
500
|
+
declare namespace SelectField {
|
|
501
|
+
var displayName: string;
|
|
502
|
+
}
|
|
503
|
+
/** 검색 가능한 선택 필드. Combobox가 PC Popover·모바일 Drawer 전환을 소유한다. */
|
|
504
|
+
interface ComboboxFieldProps extends ManagedFieldProps<string>, Omit<ComboboxProps, 'value' | 'onValueChange' | 'defaultValue' | 'invalid'> {
|
|
505
|
+
invalid?: boolean;
|
|
506
|
+
}
|
|
507
|
+
declare function ComboboxField({ 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-invalid': ariaInvalid, containerClassName, description, error, htmlFor: _htmlFor, id, invalid, label, labelClassName, onAfterChange, onChange, required, value, ...props }: ComboboxFieldProps): React.JSX.Element;
|
|
508
|
+
declare namespace ComboboxField {
|
|
509
|
+
var displayName: string;
|
|
510
|
+
}
|
|
511
|
+
interface DateFieldProps extends ManagedFieldProps<string>, Omit<DatePickerProps, 'value' | 'onChange'> {
|
|
512
|
+
}
|
|
513
|
+
declare function DateField({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, containerClassName, description, id, error, htmlFor, invalid, label, labelClassName, onAfterChange, onChange, required, value, ...props }: DateFieldProps): React.JSX.Element;
|
|
514
|
+
declare namespace DateField {
|
|
515
|
+
var displayName: string;
|
|
516
|
+
}
|
|
517
|
+
interface TimeFieldProps extends ManagedFieldProps<string>, Omit<TimeInputProps, 'value' | 'onChange'> {
|
|
518
|
+
}
|
|
519
|
+
declare function TimeField({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, containerClassName, description, id, error, htmlFor, invalid, label, labelClassName, onAfterChange, onChange, required, value, ...props }: TimeFieldProps): React.JSX.Element;
|
|
520
|
+
declare namespace TimeField {
|
|
521
|
+
var displayName: string;
|
|
522
|
+
}
|
|
523
|
+
interface DateRangeFieldProps extends ManagedFieldProps<DateRange>, Omit<DateRangePickerProps, 'value' | 'onChange'> {
|
|
524
|
+
}
|
|
525
|
+
declare function DateRangeField({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, containerClassName, description, id, error, htmlFor, invalid, label, labelClassName, onAfterChange, onChange, required, value, ...props }: DateRangeFieldProps): React.JSX.Element;
|
|
526
|
+
declare namespace DateRangeField {
|
|
527
|
+
var displayName: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** 폼 검증 오류에서 사용자에게 보여 줄 첫 번째 메시지를 찾는다. */
|
|
531
|
+
declare function firstInvalidMessage(errors: unknown): string | null;
|
|
532
|
+
interface InvalidSubmitOptions {
|
|
533
|
+
/** 제품의 toast·알림 시스템을 주입한다. 생략하면 메시지를 반환하기만 한다. */
|
|
534
|
+
notify?: (message: string) => void;
|
|
535
|
+
fallback?: string;
|
|
536
|
+
}
|
|
537
|
+
/** 숨겨진/조건부 필드 때문에 조용히 실패하는 제출을 보완하는 프레임워크 독립 핸들러. */
|
|
538
|
+
declare function reportInvalidSubmit(errors: unknown, { fallback, notify }?: InvalidSubmitOptions): string;
|
|
539
|
+
|
|
540
|
+
interface SubmitGuardSchema {
|
|
541
|
+
safeParse: (value: unknown) => {
|
|
542
|
+
success: boolean;
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
interface SubmitGuardOptions {
|
|
546
|
+
busy?: boolean;
|
|
547
|
+
busyReason?: string;
|
|
548
|
+
incompleteReason?: string;
|
|
549
|
+
}
|
|
550
|
+
interface SubmitGuard {
|
|
551
|
+
canSubmit: boolean;
|
|
552
|
+
complete: boolean;
|
|
553
|
+
reason: string | null;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* 검증 스키마와 현재 값을 연결하는 프레임워크 독립 제출 게이트.
|
|
557
|
+
* React Hook Form 연결은 optional subpath에서 values를 구독해 이 훅에 넘긴다.
|
|
558
|
+
*/
|
|
559
|
+
declare function useSubmitGuard(values: unknown, schema: SubmitGuardSchema, { busy, busyReason, incompleteReason }?: SubmitGuardOptions): SubmitGuard;
|
|
560
|
+
|
|
561
|
+
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
562
|
+
asChild?: boolean;
|
|
563
|
+
}
|
|
564
|
+
/** Standalone label. Use Field.Label when the surrounding Field owns IDs and validation. */
|
|
565
|
+
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
566
|
+
|
|
567
|
+
export { type InvalidSubmitOptions as $, type FieldControlVariant as A, type ButtonIcon as B, type CheckboxFieldProps as C, type DateFieldProps as D, type FieldControlVariants as E, type FileInputProps as F, FieldLayout as G, type FileDropzoneVariant as H, type InputProps as I, type FileDropzoneVariants as J, type FileError as K, type LabelProps as L, type FileErrorReason as M, type NumberFieldProps as N, FileInput as O, type PasswordFieldProps as P, type FileItem as Q, type RadioGroupFieldProps as R, type SubmitGuardOptions as S, type TextFieldProps as T, FileUpload as U, FormLayoutField as V, type FormLayoutFieldProps as W, FormStack as X, Input as Y, InputFrame as Z, type InputSize as _, type ComboboxFieldProps as a, Label as a0, NumberField as a1, NumberInput as a2, type NumberInputProps as a3, PasswordField as a4, PasswordInput as a5, type PasswordInputProps as a6, PhoneField as a7, PhoneInput as a8, type PhoneInputProps as a9, TimeInput as aA, type TimeInputElement as aB, type TimeInputProps as aC, checkboxVariants as aD, fileDropAreaVariants as aE, fieldControlVariants as aF, fileDropzoneVariants as aG, fileInputVariants as aH, formatBytes as aI, getFileName as aJ, getFileSize as aK, getItemKey as aL, inputVariants as aM, isImageFile as aN, isPdfFile as aO, matchesAccept as aP, newLocalId as aQ, radioItemVariants as aR, selectTriggerVariants as aS, textareaVariants as aT, useSubmitGuard as aU, RadioGroup as aa, RadioGroupField as ab, RadioGroupItem as ac, type RadioGroupItemProps as ad, type RadioGroupProps as ae, RadioGroupRoot as af, Select as ag, SelectContent as ah, SelectField as ai, SelectGroup as aj, SelectItem as ak, SelectLabel as al, type SelectOption as am, type SelectProps as an, SelectScrollDownButton as ao, SelectScrollUpButton as ap, SelectSeparator as aq, SelectTrigger as ar, type SelectTriggerProps as as, SelectValue as at, TextField as au, Textarea as av, TextareaField as aw, type TextareaProps as ax, type TextareaResize as ay, TimeField as az, type DateRangeFieldProps as b, type FileUploadProps as c, type PhoneFieldProps as d, type SelectFieldProps as e, type TextareaFieldProps as f, type TimeFieldProps as g, type SubmitGuardSchema as h, type SubmitGuard as i, firstInvalidMessage as j, type FieldControlProps as k, Checkbox as l, CheckboxField as m, type CheckboxProps as n, Combobox as o, ComboboxField as p, type ComboboxOption as q, reportInvalidSubmit as r, type ComboboxProps as s, DateField as t, DatePicker as u, type DatePickerProps as v, type DateRange as w, DateRangeField as x, DateRangePicker as y, type DateRangePickerProps as z };
|