@gmcode/forms 0.0.8 → 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/en-kNGdq3xk.mjs +27 -0
- package/dist/en-kNGdq3xk.mjs.map +1 -0
- package/dist/index.d.mts +32 -199
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +904 -1
- package/dist/index.mjs.map +1 -1
- package/dist/locales.d.mts +6 -0
- package/dist/locales.d.mts.map +1 -1
- package/dist/locales.mjs +33 -1
- package/dist/locales.mjs.map +1 -1
- package/package.json +9 -14
- package/dist/en-CnkPOj-4.mjs +0 -2
- package/dist/en-CnkPOj-4.mjs.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/locales/en.ts
|
|
2
|
+
var en_default = { translation: {
|
|
3
|
+
array: "The field must be an array.",
|
|
4
|
+
date: "The field must be a valid date",
|
|
5
|
+
decrease: "Decrease",
|
|
6
|
+
email: "The field must be a valid email address.",
|
|
7
|
+
hasMixed: "The field must contain at least one uppercase and one lowercase letter.",
|
|
8
|
+
hasNumber: "The field must contain at least one number.",
|
|
9
|
+
hasSymbol: "The field must contain at least one symbol.",
|
|
10
|
+
increase: "Increase",
|
|
11
|
+
integer: "The field must be an integer.",
|
|
12
|
+
maxChars: "The field must not be greater than {{max}} characters.",
|
|
13
|
+
maxValue: "The field must not be greater than {{max}}.",
|
|
14
|
+
minChars: "The field must be at least {{min}} characters.",
|
|
15
|
+
minValue: "The field must be at least {{min}}.",
|
|
16
|
+
missing: "The value is not supported.",
|
|
17
|
+
number: "The field must be a number.",
|
|
18
|
+
numeric: "The field must be a number.",
|
|
19
|
+
required: "The field is required.",
|
|
20
|
+
reset: "Reset",
|
|
21
|
+
string: "The field must be a string.",
|
|
22
|
+
submit: "Submit"
|
|
23
|
+
} };
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { en_default as t };
|
|
27
|
+
//# sourceMappingURL=en-kNGdq3xk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-kNGdq3xk.mjs","names":[],"sources":["../src/locales/en.ts"],"sourcesContent":["import type { Resource } from 'i18next'\n\nexport default {\n translation: {\n array: 'The field must be an array.',\n date: 'The field must be a valid date',\n decrease: 'Decrease',\n email: 'The field must be a valid email address.',\n hasMixed:\n 'The field must contain at least one uppercase and one lowercase letter.',\n hasNumber: 'The field must contain at least one number.',\n hasSymbol: 'The field must contain at least one symbol.',\n increase: 'Increase',\n integer: 'The field must be an integer.',\n maxChars: 'The field must not be greater than {{max}} characters.',\n maxValue: 'The field must not be greater than {{max}}.',\n minChars: 'The field must be at least {{min}} characters.',\n minValue: 'The field must be at least {{min}}.',\n missing: 'The value is not supported.',\n number: 'The field must be a number.',\n numeric: 'The field must be a number.',\n required: 'The field is required.',\n reset: 'Reset',\n string: 'The field must be a string.',\n submit: 'Submit'\n }\n} satisfies Resource\n"],"mappings":";AAEA,iBAAe,EACb,aAAa;CACX,OAAO;CACP,MAAM;CACN,UAAU;CACV,OAAO;CACP,UACE;CACF,WAAW;CACX,WAAW;CACX,UAAU;CACV,SAAS;CACT,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ;AACV,EACF"}
|
package/dist/index.d.mts
CHANGED
|
@@ -2,13 +2,12 @@ import { i18n as i18n$1 } from "i18next";
|
|
|
2
2
|
import { Button, Field, FieldSet } from "@gmcode/react-ui";
|
|
3
3
|
import { Control, ControllerRenderProps, DefaultValues, FieldPath, FieldValues, FieldValues as FieldValues$1, UseFormReturn, UseFormSetValue } from "react-hook-form";
|
|
4
4
|
import { InferSchema, InferSchema as InferSchema$1, useTsvResolver } from "@gmcode/tsv-hookform";
|
|
5
|
-
import { ComponentProps, FC, HTMLInputAutoCompleteAttribute, HTMLInputTypeAttribute, ReactNode, SVGProps } from "react";
|
|
6
|
-
import { InputCheckboxRule, InputColorRule, InputEmailRule, InputNumberRule, InputRule, InputSelectRule, InputTextRule, Message, MessageParams, MessageParams as MessageParams$1, Ruleset, Ruleset as Ruleset$1, Sanitized, SanitizedValues, Schema, SchemaOptions, SchemaRule, SchemaValues } from "@gmcode/tsv-input";
|
|
5
|
+
import { ChangeEventHandler, ComponentProps, FC, HTMLInputAutoCompleteAttribute, HTMLInputTypeAttribute, ReactNode, SVGProps } from "react";
|
|
6
|
+
import { InputCheckboxRule, InputColorRule, InputEmailRule, InputNumberRule, InputPasswordRule, InputRule, InputSelectRule, InputTextRule, Message, MessageParams, MessageParams as MessageParams$1, Ruleset, Ruleset as Ruleset$1, Sanitized, SanitizedValues, Schema, SchemaOptions, SchemaRule, SchemaValues } from "@gmcode/tsv-input";
|
|
7
7
|
import { DayPickerLocale, Matcher } from "react-day-picker";
|
|
8
8
|
import { Checkbox as Checkbox$1 } from "radix-ui";
|
|
9
9
|
import { CancelTokenCallback, FormDataErrors, GlobalEventCallback, RequestPayload } from "@inertiajs/core";
|
|
10
10
|
import { TextareaHeightChangeMeta } from "react-textarea-autosize";
|
|
11
|
-
|
|
12
11
|
//#region src/i18n.d.ts
|
|
13
12
|
declare const i18n: i18n$1;
|
|
14
13
|
//#endregion
|
|
@@ -33,17 +32,7 @@ interface ErrorData {
|
|
|
33
32
|
}
|
|
34
33
|
//#endregion
|
|
35
34
|
//#region src/components/calendar-field.d.ts
|
|
36
|
-
declare function CalendarField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
37
|
-
control,
|
|
38
|
-
dateToString,
|
|
39
|
-
disabled,
|
|
40
|
-
inputId,
|
|
41
|
-
inputName,
|
|
42
|
-
label,
|
|
43
|
-
locale,
|
|
44
|
-
stringToDate,
|
|
45
|
-
...props
|
|
46
|
-
}: ComponentProps<typeof Field> & {
|
|
35
|
+
declare function CalendarField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, dateToString, disabled, inputId, inputName, label, locale, stringToDate, ...props }: ComponentProps<typeof Field> & {
|
|
47
36
|
control: Control<TFieldValues>;
|
|
48
37
|
dateToString?: (date: Date) => string;
|
|
49
38
|
disabled?: Matcher | Matcher[];
|
|
@@ -55,19 +44,7 @@ declare function CalendarField<TFieldValues extends FieldValues$1 = FieldValues$
|
|
|
55
44
|
}): import("react").JSX.Element;
|
|
56
45
|
//#endregion
|
|
57
46
|
//#region src/components/checkbox-field.d.ts
|
|
58
|
-
declare function CheckboxField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
59
|
-
control,
|
|
60
|
-
disabled,
|
|
61
|
-
inputId,
|
|
62
|
-
inputName,
|
|
63
|
-
label,
|
|
64
|
-
onCheckedChange,
|
|
65
|
-
orientation,
|
|
66
|
-
readOnly,
|
|
67
|
-
uncheckedValue,
|
|
68
|
-
value,
|
|
69
|
-
...props
|
|
70
|
-
}: ComponentProps<typeof Field> & {
|
|
47
|
+
declare function CheckboxField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
71
48
|
control: Control<TFieldValues>;
|
|
72
49
|
disabled?: boolean;
|
|
73
50
|
inputId?: string;
|
|
@@ -80,55 +57,29 @@ declare function CheckboxField<TFieldValues extends FieldValues$1 = FieldValues$
|
|
|
80
57
|
}): import("react").JSX.Element;
|
|
81
58
|
//#endregion
|
|
82
59
|
//#region src/components/input-field.d.ts
|
|
83
|
-
declare function InputField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
84
|
-
autoComplete,
|
|
85
|
-
control,
|
|
86
|
-
disabled,
|
|
87
|
-
inputId,
|
|
88
|
-
inputName,
|
|
89
|
-
label,
|
|
90
|
-
placeholder,
|
|
91
|
-
readOnly,
|
|
92
|
-
type,
|
|
93
|
-
...props
|
|
94
|
-
}: ComponentProps<typeof Field> & {
|
|
60
|
+
declare function InputField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, disabled, inputId, inputName, label, placeholder, readOnly, type, ...props }: Omit<ComponentProps<typeof Field>, 'onChange'> & {
|
|
95
61
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
96
62
|
control: Control<TFieldValues>;
|
|
97
63
|
disabled?: boolean;
|
|
98
64
|
inputId?: string;
|
|
99
65
|
inputName: FieldPath<TFieldValues>;
|
|
100
66
|
label?: string;
|
|
67
|
+
onChange?: ChangeEventHandler<HTMLDivElement, HTMLInputElement>;
|
|
101
68
|
placeholder?: string;
|
|
102
69
|
readOnly?: boolean;
|
|
103
70
|
type?: HTMLInputTypeAttribute;
|
|
104
71
|
}): import("react").JSX.Element;
|
|
105
72
|
//#endregion
|
|
106
73
|
//#region src/components/email-field.d.ts
|
|
107
|
-
declare function EmailField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
108
|
-
autoComplete,
|
|
109
|
-
type,
|
|
110
|
-
...props
|
|
111
|
-
}: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
74
|
+
declare function EmailField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
112
75
|
//#endregion
|
|
113
76
|
//#region src/components/error-monitor.d.ts
|
|
114
|
-
declare function ErrorMonitor({
|
|
115
|
-
error
|
|
116
|
-
}: {
|
|
77
|
+
declare function ErrorMonitor({ error }: {
|
|
117
78
|
error?: ErrorData;
|
|
118
79
|
}): import("react").JSX.Element | null;
|
|
119
80
|
//#endregion
|
|
120
81
|
//#region src/components/fancy-radio-field.d.ts
|
|
121
|
-
declare function FancyRadioField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
122
|
-
control,
|
|
123
|
-
defaultValue,
|
|
124
|
-
description,
|
|
125
|
-
disabled,
|
|
126
|
-
groupId,
|
|
127
|
-
inputName,
|
|
128
|
-
label,
|
|
129
|
-
options,
|
|
130
|
-
...props
|
|
131
|
-
}: ComponentProps<typeof FieldSet> & {
|
|
82
|
+
declare function FancyRadioField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, defaultValue, description, disabled, groupId, inputName, label, options, ...props }: ComponentProps<typeof FieldSet> & {
|
|
132
83
|
control: Control<TFieldValues>;
|
|
133
84
|
defaultValue: string;
|
|
134
85
|
description?: string;
|
|
@@ -142,51 +93,15 @@ declare function FancyRadioField<TFieldValues extends FieldValues$1 = FieldValue
|
|
|
142
93
|
}): import("react").JSX.Element;
|
|
143
94
|
//#endregion
|
|
144
95
|
//#region src/components/form.d.ts
|
|
145
|
-
type RenderFN<TValues extends FieldValues$1> = ({
|
|
146
|
-
errors,
|
|
147
|
-
form,
|
|
148
|
-
loading
|
|
149
|
-
}: {
|
|
96
|
+
type RenderFN<TValues extends FieldValues$1> = ({ errors, form, loading }: {
|
|
150
97
|
errors: FormDataErrors<object>;
|
|
151
98
|
form: UseFormReturn<TValues>;
|
|
152
99
|
loading: boolean;
|
|
153
100
|
}) => ReactNode;
|
|
154
|
-
declare function Form<TRuleset extends Ruleset$1, TSchema extends Schema<TRuleset>, TValues extends InferSchema$1<TSchema>>({
|
|
155
|
-
children,
|
|
156
|
-
className,
|
|
157
|
-
defaults,
|
|
158
|
-
rootError: displayRootError,
|
|
159
|
-
onBefore,
|
|
160
|
-
onBeforeUpdate,
|
|
161
|
-
onCancel,
|
|
162
|
-
onCancelToken,
|
|
163
|
-
onError,
|
|
164
|
-
onFinish,
|
|
165
|
-
onFlash,
|
|
166
|
-
onPrefetched,
|
|
167
|
-
onPrefetching,
|
|
168
|
-
onProgress,
|
|
169
|
-
onStart,
|
|
170
|
-
onSuccess,
|
|
171
|
-
preserveScroll,
|
|
172
|
-
resetOnSuccess,
|
|
173
|
-
route,
|
|
174
|
-
schema,
|
|
175
|
-
setDefaultsOnSuccess
|
|
176
|
-
}: {
|
|
101
|
+
declare function Form<TRuleset extends Ruleset$1, TSchema extends Schema<TRuleset>, TValues extends InferSchema$1<TSchema>>({ children, className, defaults, onBefore, onBeforeUpdate, onCancel, onCancelToken, onError, onFinish, onFlash, onPrefetched, onPrefetching, onProgress, onStart, onSuccess, preserveScroll, resetOnSuccess, rootError: displayRootError, route, schema, setDefaultsOnSuccess }: {
|
|
177
102
|
children: RenderFN<TValues>;
|
|
178
103
|
className?: string;
|
|
179
104
|
defaults?: Partial<DefaultValues<TValues>>;
|
|
180
|
-
/**
|
|
181
|
-
* How to display the root error from inertia.
|
|
182
|
-
*
|
|
183
|
-
* - `"flash"` - use the Toaster component
|
|
184
|
-
* - `"monitor"` - use the ErrorMonitor component
|
|
185
|
-
* - `"none"` - don't display the root error
|
|
186
|
-
*
|
|
187
|
-
* @defaultValue `"flash"`
|
|
188
|
-
*/
|
|
189
|
-
rootError?: 'flash' | 'monitor' | 'none';
|
|
190
105
|
onBefore?: GlobalEventCallback<'before', RequestPayload>;
|
|
191
106
|
onBeforeUpdate?: GlobalEventCallback<'beforeUpdate', RequestPayload>;
|
|
192
107
|
onCancel?: GlobalEventCallback<'cancel', RequestPayload>;
|
|
@@ -206,6 +121,16 @@ declare function Form<TRuleset extends Ruleset$1, TSchema extends Schema<TRulese
|
|
|
206
121
|
* @defaultValue `true`
|
|
207
122
|
*/
|
|
208
123
|
resetOnSuccess?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* How to display the root error from inertia.
|
|
126
|
+
*
|
|
127
|
+
* - `"flash"` - use the Toaster component
|
|
128
|
+
* - `"monitor"` - use the ErrorMonitor component
|
|
129
|
+
* - `"none"` - don't display the root error
|
|
130
|
+
*
|
|
131
|
+
* @defaultValue `"flash"`
|
|
132
|
+
*/
|
|
133
|
+
rootError?: 'flash' | 'monitor' | 'none';
|
|
209
134
|
route: RouteDefinition<Method>;
|
|
210
135
|
schema: Schema<TRuleset>;
|
|
211
136
|
/**
|
|
@@ -217,30 +142,10 @@ declare function Form<TRuleset extends Ruleset$1, TSchema extends Schema<TRulese
|
|
|
217
142
|
}): import("react").JSX.Element;
|
|
218
143
|
//#endregion
|
|
219
144
|
//#region src/components/hidden-field.d.ts
|
|
220
|
-
declare function HiddenField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
221
|
-
autoComplete,
|
|
222
|
-
className,
|
|
223
|
-
type,
|
|
224
|
-
...props
|
|
225
|
-
}: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
145
|
+
declare function HiddenField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, className, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
226
146
|
//#endregion
|
|
227
147
|
//#region src/components/info-checkbox-field.d.ts
|
|
228
|
-
declare function InfoCheckboxField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
229
|
-
children,
|
|
230
|
-
className,
|
|
231
|
-
control,
|
|
232
|
-
disabled,
|
|
233
|
-
inputId,
|
|
234
|
-
inputName,
|
|
235
|
-
label,
|
|
236
|
-
onCheckedChange,
|
|
237
|
-
orientation,
|
|
238
|
-
readOnly,
|
|
239
|
-
text,
|
|
240
|
-
uncheckedValue,
|
|
241
|
-
value,
|
|
242
|
-
...props
|
|
243
|
-
}: ComponentProps<typeof Field> & {
|
|
148
|
+
declare function InfoCheckboxField<TFieldValues extends FieldValues$1 = FieldValues$1>({ children, className, control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, text, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
244
149
|
control: Control<TFieldValues>;
|
|
245
150
|
disabled?: boolean;
|
|
246
151
|
inputId?: string;
|
|
@@ -254,19 +159,7 @@ declare function InfoCheckboxField<TFieldValues extends FieldValues$1 = FieldVal
|
|
|
254
159
|
}): import("react").JSX.Element;
|
|
255
160
|
//#endregion
|
|
256
161
|
//#region src/components/nullable-select-field.d.ts
|
|
257
|
-
declare function NullableSelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
258
|
-
autoComplete,
|
|
259
|
-
control,
|
|
260
|
-
description,
|
|
261
|
-
disabled,
|
|
262
|
-
inputId,
|
|
263
|
-
inputName,
|
|
264
|
-
label,
|
|
265
|
-
options,
|
|
266
|
-
placeholder,
|
|
267
|
-
setValue,
|
|
268
|
-
...props
|
|
269
|
-
}: ComponentProps<typeof Field> & {
|
|
162
|
+
declare function NullableSelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, description, disabled, inputId, inputName, label, options, placeholder, setValue, ...props }: ComponentProps<typeof Field> & {
|
|
270
163
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
271
164
|
control: Control<TFieldValues>;
|
|
272
165
|
description?: string;
|
|
@@ -281,19 +174,7 @@ declare function NullableSelectField<TFieldValues extends FieldValues$1 = FieldV
|
|
|
281
174
|
}): import("react").JSX.Element;
|
|
282
175
|
//#endregion
|
|
283
176
|
//#region src/components/numeric-field.d.ts
|
|
284
|
-
declare function NumericField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
285
|
-
autoComplete,
|
|
286
|
-
control,
|
|
287
|
-
disabled,
|
|
288
|
-
inputId,
|
|
289
|
-
inputMode,
|
|
290
|
-
inputName,
|
|
291
|
-
label,
|
|
292
|
-
placeholder,
|
|
293
|
-
type,
|
|
294
|
-
ui,
|
|
295
|
-
...props
|
|
296
|
-
}: ComponentProps<typeof Field> & {
|
|
177
|
+
declare function NumericField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, disabled, inputId, inputMode, inputName, label, placeholder, type, ui, ...props }: ComponentProps<typeof Field> & {
|
|
297
178
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
298
179
|
control: Control<TFieldValues>;
|
|
299
180
|
disabled?: boolean;
|
|
@@ -312,25 +193,10 @@ declare function NumericField<TFieldValues extends FieldValues$1 = FieldValues$1
|
|
|
312
193
|
}): import("react").JSX.Element;
|
|
313
194
|
//#endregion
|
|
314
195
|
//#region src/components/password-field.d.ts
|
|
315
|
-
declare function PasswordField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
316
|
-
autoComplete,
|
|
317
|
-
type,
|
|
318
|
-
...props
|
|
319
|
-
}: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
196
|
+
declare function PasswordField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
320
197
|
//#endregion
|
|
321
198
|
//#region src/components/select-field.d.ts
|
|
322
|
-
declare function SelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
323
|
-
autoComplete,
|
|
324
|
-
control,
|
|
325
|
-
description,
|
|
326
|
-
disabled,
|
|
327
|
-
inputId,
|
|
328
|
-
inputName,
|
|
329
|
-
label,
|
|
330
|
-
options,
|
|
331
|
-
placeholder,
|
|
332
|
-
...props
|
|
333
|
-
}: ComponentProps<typeof Field> & {
|
|
199
|
+
declare function SelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, description, disabled, inputId, inputName, label, options, placeholder, ...props }: ComponentProps<typeof Field> & {
|
|
334
200
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
335
201
|
control: Control<TFieldValues>;
|
|
336
202
|
description?: string;
|
|
@@ -344,30 +210,13 @@ declare function SelectField<TFieldValues extends FieldValues$1 = FieldValues$1>
|
|
|
344
210
|
}): import("react").JSX.Element;
|
|
345
211
|
//#endregion
|
|
346
212
|
//#region src/components/submit.d.ts
|
|
347
|
-
declare function Submit({
|
|
348
|
-
label,
|
|
349
|
-
loading,
|
|
350
|
-
type,
|
|
351
|
-
...props
|
|
352
|
-
}: ComponentProps<typeof Button> & {
|
|
213
|
+
declare function Submit({ label, loading, type, ...props }: ComponentProps<typeof Button> & {
|
|
353
214
|
label?: string;
|
|
354
215
|
loading?: boolean;
|
|
355
216
|
}): import("react").JSX.Element;
|
|
356
217
|
//#endregion
|
|
357
218
|
//#region src/components/switch-field.d.ts
|
|
358
|
-
declare function SwitchField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
359
|
-
control,
|
|
360
|
-
disabled,
|
|
361
|
-
inputId,
|
|
362
|
-
inputName,
|
|
363
|
-
label,
|
|
364
|
-
onCheckedChange,
|
|
365
|
-
orientation,
|
|
366
|
-
readOnly,
|
|
367
|
-
uncheckedValue,
|
|
368
|
-
value,
|
|
369
|
-
...props
|
|
370
|
-
}: ComponentProps<typeof Field> & {
|
|
219
|
+
declare function SwitchField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
371
220
|
control: Control<TFieldValues>;
|
|
372
221
|
disabled?: boolean;
|
|
373
222
|
inputId?: string;
|
|
@@ -380,26 +229,10 @@ declare function SwitchField<TFieldValues extends FieldValues$1 = FieldValues$1>
|
|
|
380
229
|
}): import("react").JSX.Element;
|
|
381
230
|
//#endregion
|
|
382
231
|
//#region src/components/text-field.d.ts
|
|
383
|
-
declare function TextField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
384
|
-
autoComplete,
|
|
385
|
-
type,
|
|
386
|
-
...props
|
|
387
|
-
}: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
232
|
+
declare function TextField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
388
233
|
//#endregion
|
|
389
234
|
//#region src/components/textarea-field.d.ts
|
|
390
|
-
declare function TextareaField<TFieldValues extends FieldValues$1 = FieldValues$1>({
|
|
391
|
-
cacheMeasurements,
|
|
392
|
-
control,
|
|
393
|
-
inputId,
|
|
394
|
-
inputName,
|
|
395
|
-
label,
|
|
396
|
-
maxRows,
|
|
397
|
-
minRows,
|
|
398
|
-
onHeightChange,
|
|
399
|
-
placeholder,
|
|
400
|
-
resize,
|
|
401
|
-
...props
|
|
402
|
-
}: ComponentProps<typeof Field> & {
|
|
235
|
+
declare function TextareaField<TFieldValues extends FieldValues$1 = FieldValues$1>({ cacheMeasurements, control, inputId, inputName, label, maxRows, minRows, onHeightChange, placeholder, resize, ...props }: ComponentProps<typeof Field> & {
|
|
403
236
|
cacheMeasurements?: boolean;
|
|
404
237
|
control: Control<TFieldValues>;
|
|
405
238
|
inputId?: string;
|
|
@@ -412,5 +245,5 @@ declare function TextareaField<TFieldValues extends FieldValues$1 = FieldValues$
|
|
|
412
245
|
resize?: 'both' | 'none' | 'x' | 'y';
|
|
413
246
|
}): import("react").JSX.Element;
|
|
414
247
|
//#endregion
|
|
415
|
-
export { CalendarField, CheckboxField, EmailField, type ErrorData, ErrorMonitor, FancyRadioField, type FieldValues, Form, HiddenField, type InferSchema, InfoCheckboxField, InputCheckboxRule, InputColorRule, InputEmailRule, InputField, InputNumberRule, InputRule, InputSelectRule, InputTextRule, Message, type MessageParams, type Method, NullableSelectField, NumericField, type Option, PasswordField, type RouteDefinition, type Ruleset, type Sanitized, type SanitizedValues, Schema, type SchemaOptions, type SchemaRule, type SchemaValues, SelectField, Submit, SwitchField, TextField, TextareaField, i18n, useTsvResolver };
|
|
248
|
+
export { CalendarField, CheckboxField, EmailField, type ErrorData, ErrorMonitor, FancyRadioField, type FieldValues, Form, HiddenField, type InferSchema, InfoCheckboxField, InputCheckboxRule, InputColorRule, InputEmailRule, InputField, InputNumberRule, InputPasswordRule, InputRule, InputSelectRule, InputTextRule, Message, type MessageParams, type Method, NullableSelectField, NumericField, type Option, PasswordField, type RouteDefinition, type Ruleset, type Sanitized, type SanitizedValues, Schema, type SchemaOptions, type SchemaRule, type SchemaValues, SelectField, Submit, SwitchField, TextField, TextareaField, i18n, useTsvResolver };
|
|
416
249
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/i18n.ts","../src/types/index.d.ts","../src/components/calendar-field.tsx","../src/components/checkbox-field.tsx","../src/components/input-field.tsx","../src/components/email-field.tsx","../src/components/error-monitor.tsx","../src/components/fancy-radio-field.tsx","../src/components/form.tsx","../src/components/hidden-field.tsx","../src/components/info-checkbox-field.tsx","../src/components/nullable-select-field.tsx","../src/components/numeric-field.tsx","../src/components/password-field.tsx","../src/components/select-field.tsx","../src/components/submit.tsx","../src/components/switch-field.tsx","../src/components/text-field.tsx","../src/components/textarea-field.tsx"],"mappings":"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"}
|