@canonical/react-ds-core-form 0.9.0-experimental.10 → 0.9.0-experimental.11
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/esm/ui/Field/Field.js +3 -5
- package/dist/esm/ui/Field/Field.js.map +1 -1
- package/dist/esm/ui/Field/common/Error/Error.js +12 -0
- package/dist/esm/ui/Field/common/Error/Error.js.map +1 -0
- package/dist/esm/ui/Field/common/Error/index.js +4 -0
- package/dist/esm/ui/Field/common/Error/index.js.map +1 -0
- package/dist/esm/ui/Field/common/Error/styles.css +7 -0
- package/dist/esm/ui/Field/common/Error/types.js +2 -0
- package/dist/esm/ui/Field/common/Error/types.js.map +1 -0
- package/dist/esm/ui/Field/common/Label/Label.js +7 -3
- package/dist/esm/ui/Field/common/Label/Label.js.map +1 -1
- package/dist/esm/ui/Field/common/Wrapper/Wrapper.js +13 -4
- package/dist/esm/ui/Field/common/Wrapper/Wrapper.js.map +1 -1
- package/dist/esm/ui/Field/common/Wrapper/hooks/index.js +2 -0
- package/dist/esm/ui/Field/common/Wrapper/hooks/index.js.map +1 -0
- package/dist/esm/ui/Field/common/Wrapper/hooks/useFieldWrapper.js +41 -0
- package/dist/esm/ui/Field/common/Wrapper/hooks/useFieldWrapper.js.map +1 -0
- package/dist/esm/ui/Field/common/Wrapper/messages.js +4 -0
- package/dist/esm/ui/Field/common/Wrapper/messages.js.map +1 -0
- package/dist/esm/ui/Field/common/Wrapper/styles.css +1 -1
- package/dist/esm/ui/Field/common/Wrapper/withWrapper.js +24 -1
- package/dist/esm/ui/Field/common/Wrapper/withWrapper.js.map +1 -1
- package/dist/esm/ui/Field/common/index.js +1 -0
- package/dist/esm/ui/Field/common/index.js.map +1 -1
- package/dist/esm/ui/Field/constants.js +2 -0
- package/dist/esm/ui/Field/constants.js.map +1 -0
- package/dist/esm/ui/Field/hooks/index.js +3 -0
- package/dist/esm/ui/Field/hooks/index.js.map +1 -0
- package/dist/esm/ui/Field/hooks/useFieldAriaProperties.js +31 -0
- package/dist/esm/ui/Field/hooks/useFieldAriaProperties.js.map +1 -0
- package/dist/esm/ui/Field/hooks/useFieldError.js +28 -0
- package/dist/esm/ui/Field/hooks/useFieldError.js.map +1 -0
- package/dist/esm/ui/Field/inputs/Checkbox/Checkbox.js +4 -2
- package/dist/esm/ui/Field/inputs/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/ui/Field/inputs/Checkbox/styles.css +1 -1
- package/dist/esm/ui/Field/inputs/Text/Text.js +3 -2
- package/dist/esm/ui/Field/inputs/Text/Text.js.map +1 -1
- package/dist/esm/ui/Field/inputs/Text/styles.css +1 -1
- package/dist/esm/ui/Field/inputs/Textarea/Textarea.js +3 -2
- package/dist/esm/ui/Field/inputs/Textarea/Textarea.js.map +1 -1
- package/dist/esm/ui/Field/inputs/Textarea/styles.css +1 -1
- package/dist/esm/ui/Field/types.js +1 -18
- package/dist/esm/ui/Field/types.js.map +1 -1
- package/dist/types/ui/Field/Field.d.ts +1 -5
- package/dist/types/ui/Field/Field.d.ts.map +1 -1
- package/dist/types/ui/Field/common/Error/Error.d.ts +10 -0
- package/dist/types/ui/Field/common/Error/Error.d.ts.map +1 -0
- package/dist/types/ui/Field/common/Error/index.d.ts +3 -0
- package/dist/types/ui/Field/common/Error/index.d.ts.map +1 -0
- package/dist/types/ui/Field/common/Error/types.d.ts +8 -0
- package/dist/types/ui/Field/common/Error/types.d.ts.map +1 -0
- package/dist/types/ui/Field/common/Label/Label.d.ts +1 -1
- package/dist/types/ui/Field/common/Label/Label.d.ts.map +1 -1
- package/dist/types/ui/Field/common/Label/types.d.ts +9 -0
- package/dist/types/ui/Field/common/Label/types.d.ts.map +1 -1
- package/dist/types/ui/Field/common/Wrapper/Wrapper.d.ts +1 -1
- package/dist/types/ui/Field/common/Wrapper/Wrapper.d.ts.map +1 -1
- package/dist/types/ui/Field/common/Wrapper/hooks/index.d.ts +2 -0
- package/dist/types/ui/Field/common/Wrapper/hooks/index.d.ts.map +1 -0
- package/dist/types/ui/Field/common/Wrapper/hooks/useFieldWrapper.d.ts +497 -0
- package/dist/types/ui/Field/common/Wrapper/hooks/useFieldWrapper.d.ts.map +1 -0
- package/dist/types/ui/Field/common/Wrapper/messages.d.ts +5 -0
- package/dist/types/ui/Field/common/Wrapper/messages.d.ts.map +1 -0
- package/dist/types/ui/Field/common/Wrapper/types.d.ts +13 -2
- package/dist/types/ui/Field/common/Wrapper/types.d.ts.map +1 -1
- package/dist/types/ui/Field/common/Wrapper/withWrapper.d.ts +7 -1
- package/dist/types/ui/Field/common/Wrapper/withWrapper.d.ts.map +1 -1
- package/dist/types/ui/Field/common/index.d.ts +1 -0
- package/dist/types/ui/Field/common/index.d.ts.map +1 -1
- package/dist/types/ui/Field/constants.d.ts +2 -0
- package/dist/types/ui/Field/constants.d.ts.map +1 -0
- package/dist/types/ui/Field/hooks/index.d.ts +3 -0
- package/dist/types/ui/Field/hooks/index.d.ts.map +1 -0
- package/dist/types/ui/Field/hooks/useFieldAriaProperties.d.ts +26 -0
- package/dist/types/ui/Field/hooks/useFieldAriaProperties.d.ts.map +1 -0
- package/dist/types/ui/Field/hooks/useFieldError.d.ts +4 -0
- package/dist/types/ui/Field/hooks/useFieldError.d.ts.map +1 -0
- package/dist/types/ui/Field/inputs/Checkbox/Checkbox.d.ts +2 -7
- package/dist/types/ui/Field/inputs/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/ui/Field/inputs/Text/Text.d.ts +2 -7
- package/dist/types/ui/Field/inputs/Text/Text.d.ts.map +1 -1
- package/dist/types/ui/Field/inputs/Textarea/Textarea.d.ts +2 -7
- package/dist/types/ui/Field/inputs/Textarea/Textarea.d.ts.map +1 -1
- package/dist/types/ui/Field/inputs/index.d.ts +1 -0
- package/dist/types/ui/Field/inputs/index.d.ts.map +1 -1
- package/dist/types/ui/Field/inputs/types.d.ts +4 -0
- package/dist/types/ui/Field/inputs/types.d.ts.map +1 -1
- package/dist/types/ui/Field/types.d.ts +25 -14
- package/dist/types/ui/Field/types.d.ts.map +1 -1
- package/package.json +3 -3
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/Field/common/Wrapper/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
@@ -0,0 +1,497 @@
|
|
1
|
+
import { type RegisterOptions } from "react-hook-form";
|
2
|
+
type UseFieldWrapperOptions = {
|
3
|
+
label?: string;
|
4
|
+
isOptional?: boolean;
|
5
|
+
userRegisterProps?: RegisterOptions;
|
6
|
+
nestedRegisterProps?: RegisterOptions;
|
7
|
+
unregisterOnUnmount?: boolean;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* Hook to provide field wrapper utilities
|
11
|
+
* @param name - The name of the field
|
12
|
+
* @param options - Additional options
|
13
|
+
*/
|
14
|
+
declare const useFieldWrapper: (name: string, options?: UseFieldWrapperOptions) => {
|
15
|
+
fieldError: import("react-hook-form").FieldError | undefined;
|
16
|
+
isError: boolean;
|
17
|
+
ariaProps: {
|
18
|
+
input: {
|
19
|
+
id: string;
|
20
|
+
"aria-labelledby": string;
|
21
|
+
"aria-describedby": string;
|
22
|
+
"aria-errormessage": string;
|
23
|
+
"aria-invalid": boolean;
|
24
|
+
};
|
25
|
+
label: {
|
26
|
+
id: string;
|
27
|
+
};
|
28
|
+
description: {
|
29
|
+
id: string;
|
30
|
+
};
|
31
|
+
error: {
|
32
|
+
id: string;
|
33
|
+
};
|
34
|
+
};
|
35
|
+
registerProps: {
|
36
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
37
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
38
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
39
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
40
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
41
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
42
|
+
value?: any;
|
43
|
+
setValueAs?: ((value: any) => any) | undefined;
|
44
|
+
shouldUnregister?: boolean;
|
45
|
+
onChange?: (event: any) => void;
|
46
|
+
onBlur?: (event: any) => void;
|
47
|
+
disabled?: boolean | undefined;
|
48
|
+
deps?: string | string[] | undefined;
|
49
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
50
|
+
valueAsNumber?: false;
|
51
|
+
valueAsDate?: false;
|
52
|
+
} | {
|
53
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
54
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
55
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
56
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
57
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
58
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
59
|
+
value?: any;
|
60
|
+
setValueAs?: ((value: any) => any) | undefined;
|
61
|
+
shouldUnregister?: boolean;
|
62
|
+
onChange?: (event: any) => void;
|
63
|
+
onBlur?: (event: any) => void;
|
64
|
+
disabled?: boolean | undefined;
|
65
|
+
deps?: string | string[] | undefined;
|
66
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
67
|
+
valueAsNumber?: false;
|
68
|
+
valueAsDate?: boolean | undefined;
|
69
|
+
} | {
|
70
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
71
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
72
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
73
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
74
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
75
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
76
|
+
value?: any;
|
77
|
+
setValueAs?: ((value: any) => any) | undefined;
|
78
|
+
shouldUnregister?: boolean;
|
79
|
+
onChange?: (event: any) => void;
|
80
|
+
onBlur?: (event: any) => void;
|
81
|
+
disabled?: boolean | undefined;
|
82
|
+
deps?: string | string[] | undefined;
|
83
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
84
|
+
valueAsNumber?: boolean | undefined;
|
85
|
+
valueAsDate?: false;
|
86
|
+
} | {
|
87
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
88
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
89
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
90
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
91
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
92
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
93
|
+
value?: any;
|
94
|
+
setValueAs?: ((value: any) => any) | undefined;
|
95
|
+
shouldUnregister?: boolean;
|
96
|
+
onChange?: (event: any) => void;
|
97
|
+
onBlur?: (event: any) => void;
|
98
|
+
disabled?: boolean | undefined;
|
99
|
+
deps?: string | string[] | undefined;
|
100
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
101
|
+
valueAsNumber?: false;
|
102
|
+
valueAsDate?: boolean | undefined;
|
103
|
+
} | {
|
104
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
105
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
106
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
107
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
108
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
109
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
110
|
+
value?: any;
|
111
|
+
setValueAs?: ((value: any) => any) | undefined;
|
112
|
+
shouldUnregister?: boolean;
|
113
|
+
onChange?: (event: any) => void;
|
114
|
+
onBlur?: (event: any) => void;
|
115
|
+
disabled?: boolean | undefined;
|
116
|
+
deps?: string | string[] | undefined;
|
117
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
118
|
+
valueAsNumber?: false;
|
119
|
+
valueAsDate?: boolean | undefined;
|
120
|
+
} | {
|
121
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
122
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
123
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
124
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
125
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
126
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
127
|
+
value?: any;
|
128
|
+
setValueAs?: ((value: any) => any) | undefined;
|
129
|
+
shouldUnregister?: boolean;
|
130
|
+
onChange?: (event: any) => void;
|
131
|
+
onBlur?: (event: any) => void;
|
132
|
+
disabled?: boolean | undefined;
|
133
|
+
deps?: string | string[] | undefined;
|
134
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
135
|
+
valueAsNumber?: boolean | undefined;
|
136
|
+
valueAsDate?: boolean | undefined;
|
137
|
+
} | {
|
138
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
139
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
140
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
141
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
142
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
143
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
144
|
+
value?: any;
|
145
|
+
setValueAs?: ((value: any) => any) | undefined;
|
146
|
+
shouldUnregister?: boolean;
|
147
|
+
onChange?: (event: any) => void;
|
148
|
+
onBlur?: (event: any) => void;
|
149
|
+
disabled?: boolean | undefined;
|
150
|
+
deps?: string | string[] | undefined;
|
151
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
152
|
+
valueAsNumber?: boolean | undefined;
|
153
|
+
valueAsDate?: false;
|
154
|
+
} | {
|
155
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
156
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
157
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
158
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
159
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
160
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
161
|
+
value?: any;
|
162
|
+
setValueAs?: ((value: any) => any) | undefined;
|
163
|
+
shouldUnregister?: boolean;
|
164
|
+
onChange?: (event: any) => void;
|
165
|
+
onBlur?: (event: any) => void;
|
166
|
+
disabled?: boolean | undefined;
|
167
|
+
deps?: string | string[] | undefined;
|
168
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
169
|
+
valueAsNumber?: boolean | undefined;
|
170
|
+
valueAsDate?: boolean | undefined;
|
171
|
+
} | {
|
172
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
173
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
174
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
175
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
176
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
177
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
178
|
+
value?: any;
|
179
|
+
setValueAs?: ((value: any) => any) | undefined;
|
180
|
+
shouldUnregister?: boolean;
|
181
|
+
onChange?: (event: any) => void;
|
182
|
+
onBlur?: (event: any) => void;
|
183
|
+
disabled?: boolean | undefined;
|
184
|
+
deps?: string | string[] | undefined;
|
185
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp>;
|
186
|
+
valueAsNumber?: boolean | undefined;
|
187
|
+
valueAsDate?: false;
|
188
|
+
} | {
|
189
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
190
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
191
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
192
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
193
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
194
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
195
|
+
value?: any;
|
196
|
+
setValueAs?: ((value: any) => any) | undefined;
|
197
|
+
shouldUnregister?: boolean;
|
198
|
+
onChange?: (event: any) => void;
|
199
|
+
onBlur?: (event: any) => void;
|
200
|
+
disabled?: boolean | undefined;
|
201
|
+
deps?: string | string[] | undefined;
|
202
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
203
|
+
valueAsNumber?: false;
|
204
|
+
valueAsDate?: boolean | undefined;
|
205
|
+
} | {
|
206
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
207
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
208
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
209
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
210
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
211
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
212
|
+
value?: any;
|
213
|
+
setValueAs?: ((value: any) => any) | undefined;
|
214
|
+
shouldUnregister?: boolean;
|
215
|
+
onChange?: (event: any) => void;
|
216
|
+
onBlur?: (event: any) => void;
|
217
|
+
disabled?: boolean | undefined;
|
218
|
+
deps?: string | string[] | undefined;
|
219
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
220
|
+
valueAsNumber?: false;
|
221
|
+
valueAsDate?: boolean | undefined;
|
222
|
+
} | {
|
223
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
224
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
225
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
226
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
227
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
228
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
229
|
+
value?: any;
|
230
|
+
setValueAs?: ((value: any) => any) | undefined;
|
231
|
+
shouldUnregister?: boolean;
|
232
|
+
onChange?: (event: any) => void;
|
233
|
+
onBlur?: (event: any) => void;
|
234
|
+
disabled?: boolean | undefined;
|
235
|
+
deps?: string | string[] | undefined;
|
236
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
237
|
+
valueAsNumber?: boolean | undefined;
|
238
|
+
valueAsDate?: boolean | undefined;
|
239
|
+
} | {
|
240
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
241
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
242
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
243
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
244
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
245
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
246
|
+
value?: any;
|
247
|
+
setValueAs?: ((value: any) => any) | undefined;
|
248
|
+
shouldUnregister?: boolean;
|
249
|
+
onChange?: (event: any) => void;
|
250
|
+
onBlur?: (event: any) => void;
|
251
|
+
disabled?: boolean | undefined;
|
252
|
+
deps?: string | string[] | undefined;
|
253
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
254
|
+
valueAsNumber?: false;
|
255
|
+
valueAsDate?: boolean | undefined;
|
256
|
+
} | {
|
257
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
258
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
259
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
260
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
261
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
262
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
263
|
+
value?: any;
|
264
|
+
setValueAs?: ((value: any) => any) | undefined;
|
265
|
+
shouldUnregister?: boolean;
|
266
|
+
onChange?: (event: any) => void;
|
267
|
+
onBlur?: (event: any) => void;
|
268
|
+
disabled?: boolean | undefined;
|
269
|
+
deps?: string | string[] | undefined;
|
270
|
+
pattern?: undefined;
|
271
|
+
valueAsNumber?: false;
|
272
|
+
valueAsDate?: true;
|
273
|
+
} | {
|
274
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
275
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
276
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
277
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
278
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
279
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
280
|
+
value?: any;
|
281
|
+
setValueAs?: ((value: any) => any) | undefined;
|
282
|
+
shouldUnregister?: boolean;
|
283
|
+
onChange?: (event: any) => void;
|
284
|
+
onBlur?: (event: any) => void;
|
285
|
+
disabled?: boolean | undefined;
|
286
|
+
deps?: string | string[] | undefined;
|
287
|
+
pattern?: undefined;
|
288
|
+
valueAsNumber?: boolean | undefined;
|
289
|
+
valueAsDate?: boolean | undefined;
|
290
|
+
} | {
|
291
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
292
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
293
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
294
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
295
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
296
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
297
|
+
value?: any;
|
298
|
+
setValueAs?: ((value: any) => any) | undefined;
|
299
|
+
shouldUnregister?: boolean;
|
300
|
+
onChange?: (event: any) => void;
|
301
|
+
onBlur?: (event: any) => void;
|
302
|
+
disabled?: boolean | undefined;
|
303
|
+
deps?: string | string[] | undefined;
|
304
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
305
|
+
valueAsNumber?: boolean | undefined;
|
306
|
+
valueAsDate?: boolean | undefined;
|
307
|
+
} | {
|
308
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
309
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
310
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
311
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
312
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
313
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
314
|
+
value?: any;
|
315
|
+
setValueAs?: ((value: any) => any) | undefined;
|
316
|
+
shouldUnregister?: boolean;
|
317
|
+
onChange?: (event: any) => void;
|
318
|
+
onBlur?: (event: any) => void;
|
319
|
+
disabled?: boolean | undefined;
|
320
|
+
deps?: string | string[] | undefined;
|
321
|
+
pattern?: undefined;
|
322
|
+
valueAsNumber?: boolean | undefined;
|
323
|
+
valueAsDate?: boolean | undefined;
|
324
|
+
} | {
|
325
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
326
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
327
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
328
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
329
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
330
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
331
|
+
value?: any;
|
332
|
+
setValueAs?: ((value: any) => any) | undefined;
|
333
|
+
shouldUnregister?: boolean;
|
334
|
+
onChange?: (event: any) => void;
|
335
|
+
onBlur?: (event: any) => void;
|
336
|
+
disabled?: boolean | undefined;
|
337
|
+
deps?: string | string[] | undefined;
|
338
|
+
pattern?: undefined;
|
339
|
+
valueAsNumber?: boolean | undefined;
|
340
|
+
valueAsDate?: boolean | undefined;
|
341
|
+
} | {
|
342
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
343
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
344
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
345
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
346
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
347
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
348
|
+
value?: any;
|
349
|
+
setValueAs?: ((value: any) => any) | undefined;
|
350
|
+
shouldUnregister?: boolean;
|
351
|
+
onChange?: (event: any) => void;
|
352
|
+
onBlur?: (event: any) => void;
|
353
|
+
disabled?: boolean | undefined;
|
354
|
+
deps?: string | string[] | undefined;
|
355
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
356
|
+
valueAsNumber?: boolean | undefined;
|
357
|
+
valueAsDate?: false;
|
358
|
+
} | {
|
359
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
360
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
361
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
362
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
363
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
364
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
365
|
+
value?: any;
|
366
|
+
setValueAs?: ((value: any) => any) | undefined;
|
367
|
+
shouldUnregister?: boolean;
|
368
|
+
onChange?: (event: any) => void;
|
369
|
+
onBlur?: (event: any) => void;
|
370
|
+
disabled?: boolean | undefined;
|
371
|
+
deps?: string | string[] | undefined;
|
372
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
373
|
+
valueAsNumber?: boolean | undefined;
|
374
|
+
valueAsDate?: boolean | undefined;
|
375
|
+
} | {
|
376
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
377
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
378
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
379
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
380
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
381
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
382
|
+
value?: any;
|
383
|
+
setValueAs?: ((value: any) => any) | undefined;
|
384
|
+
shouldUnregister?: boolean;
|
385
|
+
onChange?: (event: any) => void;
|
386
|
+
onBlur?: (event: any) => void;
|
387
|
+
disabled?: boolean | undefined;
|
388
|
+
deps?: string | string[] | undefined;
|
389
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
390
|
+
valueAsNumber?: boolean | undefined;
|
391
|
+
valueAsDate?: false;
|
392
|
+
} | {
|
393
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
394
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
395
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
396
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
397
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
398
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
399
|
+
value?: any;
|
400
|
+
setValueAs?: ((value: any) => any) | undefined;
|
401
|
+
shouldUnregister?: boolean;
|
402
|
+
onChange?: (event: any) => void;
|
403
|
+
onBlur?: (event: any) => void;
|
404
|
+
disabled?: boolean | undefined;
|
405
|
+
deps?: string | string[] | undefined;
|
406
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
407
|
+
valueAsNumber?: boolean | undefined;
|
408
|
+
valueAsDate?: boolean | undefined;
|
409
|
+
} | {
|
410
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
411
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
412
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
413
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
414
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
415
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
416
|
+
value?: any;
|
417
|
+
setValueAs?: ((value: any) => any) | undefined;
|
418
|
+
shouldUnregister?: boolean;
|
419
|
+
onChange?: (event: any) => void;
|
420
|
+
onBlur?: (event: any) => void;
|
421
|
+
disabled?: boolean | undefined;
|
422
|
+
deps?: string | string[] | undefined;
|
423
|
+
pattern?: undefined;
|
424
|
+
valueAsNumber?: boolean | undefined;
|
425
|
+
valueAsDate?: boolean | undefined;
|
426
|
+
} | {
|
427
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
428
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
429
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
430
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
431
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
432
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
433
|
+
value?: any;
|
434
|
+
setValueAs?: ((value: any) => any) | undefined;
|
435
|
+
shouldUnregister?: boolean;
|
436
|
+
onChange?: (event: any) => void;
|
437
|
+
onBlur?: (event: any) => void;
|
438
|
+
disabled?: boolean | undefined;
|
439
|
+
deps?: string | string[] | undefined;
|
440
|
+
pattern?: undefined;
|
441
|
+
valueAsNumber?: boolean | undefined;
|
442
|
+
valueAsDate?: boolean | undefined;
|
443
|
+
} | {
|
444
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
445
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
446
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
447
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
448
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
449
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
450
|
+
value?: any;
|
451
|
+
setValueAs?: ((value: any) => any) | undefined;
|
452
|
+
shouldUnregister?: boolean;
|
453
|
+
onChange?: (event: any) => void;
|
454
|
+
onBlur?: (event: any) => void;
|
455
|
+
disabled?: boolean | undefined;
|
456
|
+
deps?: string | string[] | undefined;
|
457
|
+
pattern?: import("react-hook-form").ValidationRule<RegExp> | undefined;
|
458
|
+
valueAsNumber?: boolean | undefined;
|
459
|
+
valueAsDate?: false;
|
460
|
+
} | {
|
461
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
462
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
463
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
464
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
465
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
466
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
467
|
+
value?: any;
|
468
|
+
setValueAs?: ((value: any) => any) | undefined;
|
469
|
+
shouldUnregister?: boolean;
|
470
|
+
onChange?: (event: any) => void;
|
471
|
+
onBlur?: (event: any) => void;
|
472
|
+
disabled?: boolean | undefined;
|
473
|
+
deps?: string | string[] | undefined;
|
474
|
+
pattern?: undefined;
|
475
|
+
valueAsNumber?: boolean | undefined;
|
476
|
+
valueAsDate?: boolean | undefined;
|
477
|
+
} | {
|
478
|
+
required?: string | import("react-hook-form").ValidationRule<boolean> | undefined;
|
479
|
+
min?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
480
|
+
max?: import("react-hook-form").ValidationRule<string | number> | undefined;
|
481
|
+
maxLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
482
|
+
minLength?: import("react-hook-form").ValidationRule<number> | undefined;
|
483
|
+
validate?: import("react-hook-form").Validate<any, import("react-hook-form").FieldValues> | Record<string, import("react-hook-form").Validate<any, import("react-hook-form").FieldValues>> | undefined;
|
484
|
+
value?: any;
|
485
|
+
setValueAs?: ((value: any) => any) | undefined;
|
486
|
+
shouldUnregister?: boolean;
|
487
|
+
onChange?: (event: any) => void;
|
488
|
+
onBlur?: (event: any) => void;
|
489
|
+
disabled?: boolean | undefined;
|
490
|
+
deps?: string | string[] | undefined;
|
491
|
+
pattern?: undefined;
|
492
|
+
valueAsNumber?: true;
|
493
|
+
valueAsDate?: false;
|
494
|
+
};
|
495
|
+
};
|
496
|
+
export default useFieldWrapper;
|
497
|
+
//# sourceMappingURL=useFieldWrapper.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useFieldWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/Field/common/Wrapper/hooks/useFieldWrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAKvE,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,mBAAmB,CAAC,EAAE,eAAe,CAAC;IACtC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,eAAe,SACb,MAAM,YACH,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8ChC,CAAC;AACF,eAAe,eAAe,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Field/common/Wrapper/messages.ts"],"names":[],"mappings":";qBACmB,MAAM;;AADzB,wBAEE"}
|
@@ -1,8 +1,19 @@
|
|
1
1
|
import type React from "react";
|
2
|
-
|
2
|
+
import type { BaseInputProps } from "../../inputs/index.ts";
|
3
|
+
import type { BaseFieldProps, BaseWrapperProps } from "../../types.js";
|
4
|
+
type BaseComponentProps = BaseInputProps & BaseWrapperProps;
|
5
|
+
export type WrapperProps<ComponentProps extends BaseComponentProps = BaseFieldProps> = BaseFieldProps & {
|
3
6
|
id?: string;
|
4
7
|
className?: string;
|
5
8
|
children?: React.ReactNode;
|
6
9
|
style?: React.CSSProperties;
|
7
|
-
|
10
|
+
description?: string;
|
11
|
+
label?: string;
|
12
|
+
isOptional?: boolean;
|
13
|
+
nestedRegisterProps?: Record<string, unknown>;
|
14
|
+
unregisterOnUnmount?: boolean;
|
15
|
+
mockLabel?: boolean;
|
16
|
+
Component: React.ComponentType<ComponentProps>;
|
17
|
+
};
|
18
|
+
export {};
|
8
19
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Field/common/Wrapper/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Field/common/Wrapper/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,KAAK,kBAAkB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAE5D,MAAM,MAAM,YAAY,CACtB,cAAc,SAAS,kBAAkB,GAAG,cAAc,IACxD,cAAc,GAAG;IAEnB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAG5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAG9C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAG9B,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;CAChD,CAAC"}
|
@@ -1,2 +1,8 @@
|
|
1
|
-
|
1
|
+
import * as React from "react";
|
2
|
+
import type { InputProps } from "../../inputs/index.js";
|
3
|
+
import type { BaseFieldProps } from "../../types.js";
|
4
|
+
import DefaultWrapper from "./Wrapper.js";
|
5
|
+
import type { WrapperProps } from "./types.js";
|
6
|
+
declare const withWrapper: (Component: React.ComponentType<InputProps>, options?: WrapperProps, Wrapper?: typeof DefaultWrapper) => ({ middleware, WrapperComponent, ...props }: BaseFieldProps) => React.ReactElement;
|
7
|
+
export default withWrapper;
|
2
8
|
//# sourceMappingURL=withWrapper.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"withWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Field/common/Wrapper/withWrapper.ts"],"names":[],"mappings":""}
|
1
|
+
{"version":3,"file":"withWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Field/common/Wrapper/withWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAA4B,MAAM,gBAAgB,CAAC;AAC/E,OAAO,cAAc,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,QAAA,MAAM,WAAW,cACJ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,YAChC,YAAY,YACb,OAAO,cAAc,kDAQ3B,cAAc,KAAG,KAAK,CAAC,YAsB3B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Field/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,oBAAoB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Field/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ui/Field/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,UAAU,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Field/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* Generates common ARIA properties for form field elements including input, label, description, and error state.
|
3
|
+
* @param {string} name - The name of the field.
|
4
|
+
* @param {boolean} isError - Indicates if the field is in an error state.
|
5
|
+
* @returns An object containing ARIA attributes for input, label, description, and error state.
|
6
|
+
*/
|
7
|
+
declare const useFieldAriaProps: (name: string, isError: boolean) => {
|
8
|
+
input: {
|
9
|
+
id: string;
|
10
|
+
"aria-labelledby": string;
|
11
|
+
"aria-describedby": string;
|
12
|
+
"aria-errormessage": string;
|
13
|
+
"aria-invalid": boolean;
|
14
|
+
};
|
15
|
+
label: {
|
16
|
+
id: string;
|
17
|
+
};
|
18
|
+
description: {
|
19
|
+
id: string;
|
20
|
+
};
|
21
|
+
error: {
|
22
|
+
id: string;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export default useFieldAriaProps;
|
26
|
+
//# sourceMappingURL=useFieldAriaProperties.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useFieldAriaProperties.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Field/hooks/useFieldAriaProperties.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,SAAU,MAAM,WAAW,OAAO;;;;;;;;;;;;;;;;;CAuBpC,CAAC;AAEtB,eAAe,iBAAiB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useFieldError.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Field/hooks/useFieldError.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAEzB,iBAAS,aAAa,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,EACnE,IAAI,EAAE,MAAM,0BA+Bb;AAED,eAAe,aAAa,CAAC"}
|