@gmcode/forms 0.2.0 → 0.2.2
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/index.d.mts +20 -18
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +47 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -5
package/dist/index.d.mts
CHANGED
|
@@ -35,7 +35,7 @@ interface ErrorData {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/components/calendar-field.d.ts
|
|
38
|
-
declare function CalendarField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, dateToString, disabled, inputId, inputName, label, locale, stringToDate, ...props }: ComponentProps<typeof Field> & {
|
|
38
|
+
export declare function CalendarField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, dateToString, disabled, inputId, inputName, label, locale, stringToDate, ...props }: ComponentProps<typeof Field> & {
|
|
39
39
|
control: Control<TFieldValues>;
|
|
40
40
|
dateToString?: (date: Date) => string;
|
|
41
41
|
disabled?: Matcher | Matcher[];
|
|
@@ -47,7 +47,7 @@ declare function CalendarField<TFieldValues extends FieldValues$1 = FieldValues$
|
|
|
47
47
|
}): import("react").JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/components/checkbox-field.d.ts
|
|
50
|
-
declare function CheckboxField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
50
|
+
export declare function CheckboxField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
51
51
|
control: Control<TFieldValues>;
|
|
52
52
|
disabled?: boolean;
|
|
53
53
|
inputId?: string;
|
|
@@ -60,13 +60,15 @@ declare function CheckboxField<TFieldValues extends FieldValues$1 = FieldValues$
|
|
|
60
60
|
}): import("react").JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/components/input-field.d.ts
|
|
63
|
-
declare function InputField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, disabled, inputId, inputName, label, placeholder, readOnly, type, ...props }: Omit<ComponentProps<typeof Field>, 'onChange'> & {
|
|
63
|
+
export declare function InputField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, disabled, inputClassName, inputId, inputName, label, labelClassName, placeholder, readOnly, type, ...props }: Omit<ComponentProps<typeof Field>, 'onChange'> & {
|
|
64
64
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
65
65
|
control: Control<TFieldValues>;
|
|
66
66
|
disabled?: boolean;
|
|
67
|
+
inputClassName?: string;
|
|
67
68
|
inputId?: string;
|
|
68
69
|
inputName: FieldPath<TFieldValues>;
|
|
69
70
|
label?: string;
|
|
71
|
+
labelClassName?: string;
|
|
70
72
|
onChange?: ChangeEventHandler<HTMLDivElement, HTMLInputElement>;
|
|
71
73
|
placeholder?: string;
|
|
72
74
|
readOnly?: boolean;
|
|
@@ -74,15 +76,15 @@ declare function InputField<TFieldValues extends FieldValues$1 = FieldValues$1>(
|
|
|
74
76
|
}): import("react").JSX.Element;
|
|
75
77
|
//#endregion
|
|
76
78
|
//#region src/components/email-field.d.ts
|
|
77
|
-
declare function EmailField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
79
|
+
export declare function EmailField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
78
80
|
//#endregion
|
|
79
81
|
//#region src/components/error-monitor.d.ts
|
|
80
|
-
declare function ErrorMonitor({ error }: {
|
|
82
|
+
export declare function ErrorMonitor({ error }: {
|
|
81
83
|
error?: ErrorData;
|
|
82
84
|
}): import("react").JSX.Element | null;
|
|
83
85
|
//#endregion
|
|
84
86
|
//#region src/components/fancy-radio-field.d.ts
|
|
85
|
-
declare function FancyRadioField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, defaultValue, description, disabled, groupId, inputName, label, options, ...props }: ComponentProps<typeof FieldSet> & {
|
|
87
|
+
export declare function FancyRadioField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, defaultValue, description, disabled, groupId, inputName, label, options, ...props }: ComponentProps<typeof FieldSet> & {
|
|
86
88
|
control: Control<TFieldValues>;
|
|
87
89
|
defaultValue: string;
|
|
88
90
|
description?: string;
|
|
@@ -101,7 +103,7 @@ type RenderFN<TValues extends FieldValues$1> = ({ errors, form, loading }: {
|
|
|
101
103
|
form: UseFormReturn<TValues>;
|
|
102
104
|
loading: boolean;
|
|
103
105
|
}) => ReactNode;
|
|
104
|
-
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, ...props }: Omit<ComponentProps<'form'>, 'action' | 'children' | 'method' | 'onSubmit'> & {
|
|
106
|
+
export 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, ...props }: Omit<ComponentProps<'form'>, 'action' | 'children' | 'method' | 'onSubmit'> & {
|
|
105
107
|
children: RenderFN<TValues>;
|
|
106
108
|
defaults?: Partial<DefaultValues<TValues>>;
|
|
107
109
|
onBefore?: GlobalEventCallback<'before', RequestPayload>;
|
|
@@ -144,10 +146,10 @@ declare function Form<TRuleset extends Ruleset$1, TSchema extends Schema<TRulese
|
|
|
144
146
|
}): import("react").JSX.Element;
|
|
145
147
|
//#endregion
|
|
146
148
|
//#region src/components/hidden-field.d.ts
|
|
147
|
-
declare function HiddenField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, className, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
149
|
+
export declare function HiddenField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, className, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
148
150
|
//#endregion
|
|
149
151
|
//#region src/components/info-checkbox-field.d.ts
|
|
150
|
-
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> & {
|
|
152
|
+
export 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> & {
|
|
151
153
|
control: Control<TFieldValues>;
|
|
152
154
|
disabled?: boolean;
|
|
153
155
|
inputId?: string;
|
|
@@ -161,7 +163,7 @@ declare function InfoCheckboxField<TFieldValues extends FieldValues$1 = FieldVal
|
|
|
161
163
|
}): import("react").JSX.Element;
|
|
162
164
|
//#endregion
|
|
163
165
|
//#region src/components/nullable-select-field.d.ts
|
|
164
|
-
declare function NullableSelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, description, disabled, inputId, inputName, label, options, placeholder, setValue, ...props }: ComponentProps<typeof Field> & {
|
|
166
|
+
export declare function NullableSelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, description, disabled, inputId, inputName, label, options, placeholder, setValue, ...props }: ComponentProps<typeof Field> & {
|
|
165
167
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
166
168
|
control: Control<TFieldValues>;
|
|
167
169
|
description?: string;
|
|
@@ -176,7 +178,7 @@ declare function NullableSelectField<TFieldValues extends FieldValues$1 = FieldV
|
|
|
176
178
|
}): import("react").JSX.Element;
|
|
177
179
|
//#endregion
|
|
178
180
|
//#region src/components/numeric-field.d.ts
|
|
179
|
-
declare function NumericField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, disabled, inputId, inputMode, inputName, label, placeholder, type, ui, ...props }: ComponentProps<typeof Field> & {
|
|
181
|
+
export declare function NumericField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, disabled, inputId, inputMode, inputName, label, placeholder, type, ui, ...props }: ComponentProps<typeof Field> & {
|
|
180
182
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
181
183
|
control: Control<TFieldValues>;
|
|
182
184
|
disabled?: boolean;
|
|
@@ -195,10 +197,10 @@ declare function NumericField<TFieldValues extends FieldValues$1 = FieldValues$1
|
|
|
195
197
|
}): import("react").JSX.Element;
|
|
196
198
|
//#endregion
|
|
197
199
|
//#region src/components/password-field.d.ts
|
|
198
|
-
declare function PasswordField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
200
|
+
export declare function PasswordField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
199
201
|
//#endregion
|
|
200
202
|
//#region src/components/select-field.d.ts
|
|
201
|
-
declare function SelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, description, disabled, inputId, inputName, label, options, placeholder, ...props }: ComponentProps<typeof Field> & {
|
|
203
|
+
export declare function SelectField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, control, description, disabled, inputId, inputName, label, options, placeholder, ...props }: ComponentProps<typeof Field> & {
|
|
202
204
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
203
205
|
control: Control<TFieldValues>;
|
|
204
206
|
description?: string;
|
|
@@ -212,13 +214,13 @@ declare function SelectField<TFieldValues extends FieldValues$1 = FieldValues$1>
|
|
|
212
214
|
}): import("react").JSX.Element;
|
|
213
215
|
//#endregion
|
|
214
216
|
//#region src/components/submit.d.ts
|
|
215
|
-
declare function Submit({ label, loading, type, ...props }: ComponentProps<typeof Button> & {
|
|
217
|
+
export declare function Submit({ label, loading, type, ...props }: ComponentProps<typeof Button> & {
|
|
216
218
|
label?: string;
|
|
217
219
|
loading?: boolean;
|
|
218
220
|
}): import("react").JSX.Element;
|
|
219
221
|
//#endregion
|
|
220
222
|
//#region src/components/switch-field.d.ts
|
|
221
|
-
declare function SwitchField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
223
|
+
export declare function SwitchField<TFieldValues extends FieldValues$1 = FieldValues$1>({ control, disabled, inputId, inputName, label, onCheckedChange, orientation, readOnly, uncheckedValue, value, ...props }: ComponentProps<typeof Field> & {
|
|
222
224
|
control: Control<TFieldValues>;
|
|
223
225
|
disabled?: boolean;
|
|
224
226
|
inputId?: string;
|
|
@@ -231,10 +233,10 @@ declare function SwitchField<TFieldValues extends FieldValues$1 = FieldValues$1>
|
|
|
231
233
|
}): import("react").JSX.Element;
|
|
232
234
|
//#endregion
|
|
233
235
|
//#region src/components/text-field.d.ts
|
|
234
|
-
declare function TextField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
236
|
+
export declare function TextField<TFieldValues extends FieldValues$1 = FieldValues$1>({ autoComplete, type, ...props }: ComponentProps<typeof InputField<TFieldValues>>): import("react").JSX.Element;
|
|
235
237
|
//#endregion
|
|
236
238
|
//#region src/components/textarea-field.d.ts
|
|
237
|
-
declare function TextareaField<TFieldValues extends FieldValues$1 = FieldValues$1>({ cacheMeasurements, control, inputId, inputName, label, maxRows, minRows, onHeightChange, placeholder, resize, ...props }: ComponentProps<typeof Field> & {
|
|
239
|
+
export declare function TextareaField<TFieldValues extends FieldValues$1 = FieldValues$1>({ cacheMeasurements, control, inputId, inputName, label, maxRows, minRows, onHeightChange, placeholder, resize, ...props }: ComponentProps<typeof Field> & {
|
|
238
240
|
cacheMeasurements?: boolean;
|
|
239
241
|
control: Control<TFieldValues>;
|
|
240
242
|
inputId?: string;
|
|
@@ -247,5 +249,5 @@ declare function TextareaField<TFieldValues extends FieldValues$1 = FieldValues$
|
|
|
247
249
|
resize?: 'both' | 'none' | 'x' | 'y';
|
|
248
250
|
}): import("react").JSX.Element;
|
|
249
251
|
//#endregion
|
|
250
|
-
export {
|
|
252
|
+
export { type ErrorData, type FieldValues, type InferSchema, InputCheckboxRule, InputColorRule, InputEmailRule, InputNumberRule, InputPasswordRule, InputRule, InputSelectRule, InputTextRule, Message, type MessageParams, type Method, type Option, type RouteDefinition, type Ruleset, type Sanitized, type SanitizedValues, Schema, type SchemaOptions, type SchemaRule, type SchemaValues, i18n, useTsvResolver };
|
|
251
253
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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":";;;;;;;;;;;;;;cAMM,MAAM;;;KCHA;KAEA,gBAAgB,gBAAgB,SAAS;EACnD;KACG,gBAAgB;EAAa,SAAS;;EAAc,QAAQ;;UAEhD;EACf;EACA;EACA,OAAO;EACP;;UAGe;EACf;EACA,SAAS;;;;
|
|
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":";;;;;;;;;;;;;;cAMM,MAAM;;;KCHA;KAEA,gBAAgB,gBAAgB,SAAS;EACnD;KACG,gBAAgB;EAAa,SAAS;;EAAc,QAAQ;;UAEhD;EACf;EACA;EACA,OAAO;EACP;;UAGe;EACf;EACA,SAAS;;;;wBCPK,cAAc,qBAAqB,gBAAc,iBAC/D,SACA,cACA,UACA,SACA,WACA,OACA,QACA,iBACG,SACF,sBAAsB;EACvB,SAAS,QAAQ;EACjB,gBAAgB,MAAM;EACtB,WAAW,UAAU;EACrB;EACA,WAAW,UAAU;EACrB;EACA,SAAS,QAAQ;EACjB,gBAAgB,+BAA+B;oBAChD,IAAA;;;wBCvBe,cAAc,qBAAqB,gBAAc,iBAC/D,SACA,UACA,SACA,WACA,OACA,iBACA,aACA,UACA,gBACA,UACG,SACF,sBAAsB;EACvB,SAAS,QAAQ;EACjB;EACA;EACA,WAAW,UAAU;EACrB;EACA,mBACE,SAAS,WAAkB,cAC3B,OAAO,sBAAsB,cAAc,UAAU;EAEvD;EACA;EACA;oBACD,IAAA;;;wBCrBe,WAAW,qBAAqB,gBAAc,iBAC5D,cACA,SACA,UACA,gBACA,SACA,WACA,OACA,gBACA,aACA,UACA,SACG,SACF,KAAK,sBAAsB;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C,kBACd,qBAAqB,gBAAc,iBAEnC,UACA,WACA,SACA,UACA,SACA,WACA,OACA,iBACA,aACA,UACA,MACA,gBACA,UACG,SACF,sBAAsB;EACvB,SAAS,QAAQ;EACjB;EACA;EACA,WAAW,UAAU;EACrB;EACA,mBACE,SAAS,WAAkB,cAC3B,OAAO,sBAAsB,cAAc,UAAU;EAEvD;EACA;EACA;EACA;oBACD,IAAA;;;wBCXe,oBACd,qBAAqB,gBAAc,iBAEnC,cACA,SACA,aACA,UACA,SACA,WACA,OACA,SACA,aACA,aACG,SACF,sBAAsB;EACvB,eAAe;EACf,SAAS,QAAQ;EACjB;EACA;EACA;EACA,WAAW,UAAU;EACrB;EACA,SAAS;EACT;EACA,UAAU,gBAAgB;EAC1B,OAAO;oBACR,IAAA;;;wBCAe,aAAa,qBAAqB,gBAAc,iBAC9D,cACA,SACA,UACA,SACA,WACA,WACA,OACA,aACA,MACA,OACG,SACF,sBAAsB;EACvB,eAAe;EACf,SAAS,QAAQ;EACjB;EACA;EACA;EACA,WAAW,UAAU;EACrB;EACA;EACA,OAAO;EACP;IACE;IACA;IACA,UAAU,gBAAgB;IAC1B;;oBAEH,IAAA;;;wBC7Ee,cAAc,qBAAqB,gBAAc,iBAC/D,cACA,SACG,SACF,sBAAsB,WAAW,iCAAc,IAAA;;;wBCYlC,YAAY,qBAAqB,gBAAc,iBAC7D,cACA,SACA,aACA,UACA,SACA,WACA,OACA,SACA,gBACG,SACF,sBAAsB;EACvB,eAAe;EACf,SAAS,QAAQ;EACjB;EACA;EACA;EACA,WAAW,UAAU;EACrB;EACA,SAAS;EACT;EACA,OAAO;oBACR,IAAA;;;wBCtCe,SACd,OACA,SACA,SACG,SACF,sBAAsB;EACvB;EACA;oBACD,IAAA;;;wBCLe,YAAY,qBAAqB,gBAAc,iBAC7D,SACA,UACA,SACA,WACA,OACA,iBACA,aACA,UACA,gBACA,UACG,SACF,sBAAsB;EACvB,SAAS,QAAQ;EACjB;EACA;EACA,WAAW,UAAU;EACrB;EACA,mBACE,SAAS,WAAkB,cAC3B,OAAO,sBAAsB,cAAc,UAAU;EAEvD;EACA;EACA;oBACD,IAAA;;;wBC5Be,UAAU,qBAAqB,gBAAc,iBAC3D,cACA,SACG,SACF,sBAAsB,WAAW,iCAAc,IAAA;;;wBCDlC,cAAc,qBAAqB,gBAAc,iBAC/D,mBACA,SACA,SACA,WACA,OACA,SACA,SACA,gBACA,aACA,WACG,SACF,sBAAsB;EACvB;EACA,SAAS,QAAQ;EACjB;EACA,WAAW,UAAU;EACrB;EACA;EACA;EACA,kBAAkB,gBAAgB,MAAM;EACxC;EACA;oBACD,IAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -152,48 +152,54 @@ function CheckboxField({ control, disabled, inputId, inputName, label, onChecked
|
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/components/input-field.tsx
|
|
154
154
|
function InputField(t0) {
|
|
155
|
-
const $ = c(
|
|
156
|
-
if ($[0] !== "
|
|
157
|
-
for (let $i = 0; $i <
|
|
158
|
-
$[0] = "
|
|
155
|
+
const $ = c(30);
|
|
156
|
+
if ($[0] !== "aab99ea89f82bf9ad035187c77f9a074c946660203bd56d7567ddbfe835f48cb") {
|
|
157
|
+
for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
158
|
+
$[0] = "aab99ea89f82bf9ad035187c77f9a074c946660203bd56d7567ddbfe835f48cb";
|
|
159
159
|
}
|
|
160
160
|
let autoComplete;
|
|
161
161
|
let control;
|
|
162
162
|
let disabled;
|
|
163
|
+
let inputClassName;
|
|
163
164
|
let inputId;
|
|
164
165
|
let inputName;
|
|
165
166
|
let label;
|
|
167
|
+
let labelClassName;
|
|
166
168
|
let placeholder;
|
|
167
169
|
let props;
|
|
168
170
|
let readOnly;
|
|
169
171
|
let type;
|
|
170
172
|
if ($[1] !== t0) {
|
|
171
|
-
({autoComplete, control, disabled, inputId, inputName, label, placeholder, readOnly, type, ...props} = t0);
|
|
173
|
+
({autoComplete, control, disabled, inputClassName, inputId, inputName, label, labelClassName, placeholder, readOnly, type, ...props} = t0);
|
|
172
174
|
$[1] = t0;
|
|
173
175
|
$[2] = autoComplete;
|
|
174
176
|
$[3] = control;
|
|
175
177
|
$[4] = disabled;
|
|
176
|
-
$[5] =
|
|
177
|
-
$[6] =
|
|
178
|
-
$[7] =
|
|
179
|
-
$[8] =
|
|
180
|
-
$[9] =
|
|
181
|
-
$[10] =
|
|
182
|
-
$[11] =
|
|
178
|
+
$[5] = inputClassName;
|
|
179
|
+
$[6] = inputId;
|
|
180
|
+
$[7] = inputName;
|
|
181
|
+
$[8] = label;
|
|
182
|
+
$[9] = labelClassName;
|
|
183
|
+
$[10] = placeholder;
|
|
184
|
+
$[11] = props;
|
|
185
|
+
$[12] = readOnly;
|
|
186
|
+
$[13] = type;
|
|
183
187
|
} else {
|
|
184
188
|
autoComplete = $[2];
|
|
185
189
|
control = $[3];
|
|
186
190
|
disabled = $[4];
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
inputClassName = $[5];
|
|
192
|
+
inputId = $[6];
|
|
193
|
+
inputName = $[7];
|
|
194
|
+
label = $[8];
|
|
195
|
+
labelClassName = $[9];
|
|
196
|
+
placeholder = $[10];
|
|
197
|
+
props = $[11];
|
|
198
|
+
readOnly = $[12];
|
|
199
|
+
type = $[13];
|
|
194
200
|
}
|
|
195
201
|
let t1;
|
|
196
|
-
if ($[
|
|
202
|
+
if ($[14] !== autoComplete || $[15] !== inputClassName || $[16] !== inputId || $[17] !== inputName || $[18] !== label || $[19] !== labelClassName || $[20] !== placeholder || $[21] !== props || $[22] !== readOnly || $[23] !== type) {
|
|
197
203
|
t1 = (t2) => {
|
|
198
204
|
const { field, fieldState } = t2;
|
|
199
205
|
return /* @__PURE__ */ jsxs(Field, {
|
|
@@ -201,12 +207,14 @@ function InputField(t0) {
|
|
|
201
207
|
...props,
|
|
202
208
|
children: [
|
|
203
209
|
label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
210
|
+
className: labelClassName,
|
|
204
211
|
htmlFor: inputId ?? inputName,
|
|
205
212
|
children: label
|
|
206
213
|
}),
|
|
207
214
|
/* @__PURE__ */ jsx(Input, {
|
|
208
215
|
"aria-invalid": fieldState.invalid,
|
|
209
216
|
autoComplete,
|
|
217
|
+
className: inputClassName,
|
|
210
218
|
id: inputId ?? (label ? inputName : void 0),
|
|
211
219
|
placeholder,
|
|
212
220
|
readOnly,
|
|
@@ -217,30 +225,32 @@ function InputField(t0) {
|
|
|
217
225
|
]
|
|
218
226
|
});
|
|
219
227
|
};
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
|
|
228
|
+
$[14] = autoComplete;
|
|
229
|
+
$[15] = inputClassName;
|
|
230
|
+
$[16] = inputId;
|
|
231
|
+
$[17] = inputName;
|
|
232
|
+
$[18] = label;
|
|
233
|
+
$[19] = labelClassName;
|
|
234
|
+
$[20] = placeholder;
|
|
235
|
+
$[21] = props;
|
|
236
|
+
$[22] = readOnly;
|
|
237
|
+
$[23] = type;
|
|
238
|
+
$[24] = t1;
|
|
239
|
+
} else t1 = $[24];
|
|
230
240
|
let t2;
|
|
231
|
-
if ($[
|
|
241
|
+
if ($[25] !== control || $[26] !== disabled || $[27] !== inputName || $[28] !== t1) {
|
|
232
242
|
t2 = /* @__PURE__ */ jsx(Controller, {
|
|
233
243
|
control,
|
|
234
244
|
disabled,
|
|
235
245
|
name: inputName,
|
|
236
246
|
render: t1
|
|
237
247
|
});
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
} else t2 = $[
|
|
248
|
+
$[25] = control;
|
|
249
|
+
$[26] = disabled;
|
|
250
|
+
$[27] = inputName;
|
|
251
|
+
$[28] = t1;
|
|
252
|
+
$[29] = t2;
|
|
253
|
+
} else t2 = $[29];
|
|
244
254
|
return t2;
|
|
245
255
|
}
|
|
246
256
|
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["error","label","autoComplete","placeholder","readOnly","type","control","disabled","inputName","label","description","defaultValue","control","disabled","inputName","label","autoComplete","placeholder","description","control","disabled","inputName","$","label","autoComplete","placeholder","description","control","disabled","inputName"],"sources":["../src/i18n.ts","../src/components/error-monitor.tsx","../src/lib/utils.ts","../src/components/calendar-field.tsx","../src/components/checkbox-field.tsx","../src/components/input-field.tsx","../src/components/email-field.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"],"sourcesContent":["import { type i18n as Ti18n, createInstance } from 'i18next'\nimport en from '@/locales/en'\n\n/**\n * @deprecated Use the `forms` namespace instead.\n */\nconst i18n: Ti18n = createInstance({\n fallbackLng: 'en',\n interpolation: { escapeValue: false },\n resources: { en }\n})\n\nvoid i18n.init()\n\nexport default i18n\n","import { FieldError } from '@gmcode/react-ui'\nimport { useTranslation } from 'react-i18next'\nimport type { ErrorData } from '@/types'\n\nexport function ErrorMonitor({ error }: { error?: ErrorData }) {\n // i18n\n const { t } = useTranslation('forms')\n\n if (!error?.message) {\n return null\n }\n\n if (t.name === 'notReadyT') {\n return <FieldError errors={error} />\n }\n\n // @ts-expect-error: assert error.message to be a translation key\n return <FieldError errors={{ message: t(error.message, error.params) }} />\n}\n","/**\n * Convert a javascript `Date` object to a string with the format `aaaa-mm-dd`.\n */\nexport function dateToString(date: Date): string {\n return `${date.getFullYear()}-${(date.getMonth() + 1 + '').padStart(2, '0')}-${(date.getDate() + '').padStart(2, '0')}`\n}\n\n/**\n * Convert a string to a javascript `Date` object or undefined if the string is\n * not a valid date.\n */\nexport function stringToDate(string: string | undefined): Date | undefined {\n if (!string) {\n return undefined\n }\n\n const date = new Date(string)\n\n if (isNaN(date.getFullYear())) {\n return undefined\n }\n\n return date\n}\n","import { Calendar, Field, FieldLabel } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport type { DayPickerLocale, Matcher } from 'react-day-picker'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport {\n dateToString as defaultDateToString,\n stringToDate as defaultStringToDate\n} from '@/lib/utils'\n\nexport function CalendarField<TFieldValues extends FieldValues = FieldValues>({\n control,\n dateToString = defaultDateToString,\n disabled,\n inputId,\n inputName,\n label,\n locale,\n stringToDate = defaultStringToDate,\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n dateToString?: (date: Date) => string\n disabled?: Matcher | Matcher[]\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n locale?: Partial<DayPickerLocale>\n stringToDate?: (string: string | undefined) => Date | undefined\n}) {\n return (\n <Controller\n control={control}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <Calendar\n aria-invalid={fieldState.invalid}\n className=\"w-full rounded-md border\"\n disabled={disabled}\n fixedWeeks={true}\n id={inputId ?? (label ? inputName : undefined)}\n locale={locale}\n mode=\"single\"\n onSelect={(date) => field.onChange(date ? dateToString(date) : '')}\n selected={stringToDate(field.value)}\n />\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import { Checkbox, Field, FieldLabel } from '@gmcode/react-ui'\nimport type { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { ControllerRenderProps, FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function CheckboxField<TFieldValues extends FieldValues = FieldValues>({\n control,\n disabled,\n inputId,\n inputName,\n label,\n onCheckedChange,\n orientation = 'horizontal',\n readOnly,\n uncheckedValue = '',\n value = 'true',\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onCheckedChange?: (\n checked: CheckboxPrimitive.CheckedState,\n field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>\n ) => void\n readOnly?: boolean\n uncheckedValue?: string\n value?: string\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n orientation={orientation}\n {...props}\n >\n <Checkbox\n aria-invalid={fieldState.invalid}\n aria-readonly={readOnly}\n checked={field.value === value}\n className=\"aria-readonly:opacity-50\"\n disabled={field.disabled}\n id={inputId ?? (label ? inputName : undefined)}\n name={field.name}\n onBlur={field.onBlur}\n onCheckedChange={(checked) => {\n if (!readOnly) {\n field.onChange(checked === true ? value : uncheckedValue)\n if (onCheckedChange) onCheckedChange(checked, field)\n }\n }}\n ref={field.ref}\n value={value}\n />\n\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import { Field, FieldLabel, Input } from '@gmcode/react-ui'\nimport type {\n ChangeEventHandler,\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function InputField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete,\n control,\n disabled,\n inputId,\n inputName,\n label,\n placeholder,\n readOnly,\n type,\n ...props\n}: Omit<ComponentProps<typeof Field>, 'onChange'> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onChange?: ChangeEventHandler<HTMLDivElement, HTMLInputElement>\n placeholder?: string\n readOnly?: boolean\n type?: HTMLInputTypeAttribute\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <Input\n aria-invalid={fieldState.invalid}\n autoComplete={autoComplete}\n id={inputId ?? (label ? inputName : undefined)}\n placeholder={placeholder}\n readOnly={readOnly}\n type={type}\n {...field}\n />\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function EmailField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'on',\n type = 'email',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n type={type}\n {...props}\n />\n )\n}\n","import {\n FieldDescription,\n FieldLabel,\n FieldSet,\n Label,\n RadioGroup,\n RadioGroupItem\n} from '@gmcode/react-ui'\nimport type { ComponentProps, FC, SVGProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Option } from '@/types'\n\nexport function FancyRadioField<\n TFieldValues extends FieldValues = FieldValues\n>({\n control,\n defaultValue,\n description,\n disabled,\n groupId,\n inputName,\n label,\n options,\n ...props\n}: ComponentProps<typeof FieldSet> & {\n control: Control<TFieldValues>\n defaultValue: string\n description?: string\n disabled?: boolean\n groupId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n options: Array<Option & { Icon?: FC<SVGProps<SVGSVGElement>> }>\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <FieldSet\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={groupId ?? inputName}>{label}</FieldLabel>\n )}\n\n {description && <FieldDescription>{description}</FieldDescription>}\n\n <ErrorMonitor error={fieldState.error} />\n\n <RadioGroup\n defaultValue={defaultValue}\n disabled={field.disabled}\n id={groupId ?? (label ? inputName : undefined)}\n name={field.name}\n onBlur={field.onBlur}\n onValueChange={field.onChange}\n ref={field.ref}\n >\n {options.map((option) => (\n <Label\n className=\"rounded-md border ring-ring/50 transition-all hover:bg-accent/50 has-focus-visible:ring-[3px]\"\n data-slot=\"field-label\"\n key={option.key ?? option.id ?? option.value}\n >\n <div className=\"flex w-full items-center gap-3 rounded-md p-3 transition-all has-aria-checked:border-l-8 has-aria-checked:border-ring\">\n <RadioGroupItem\n className=\"sr-only\"\n id={option.id}\n value={option.value}\n />\n {option.Icon && <option.Icon />}\n {option.label}\n </div>\n </Label>\n ))}\n </RadioGroup>\n </FieldSet>\n )}\n />\n )\n}\n","import { cn, flash } from '@gmcode/react-ui'\nimport { type InferSchema, useTsvResolver } from '@gmcode/tsv-hookform'\nimport type { Ruleset } from '@gmcode/tsv-input'\nimport type {\n CancelTokenCallback,\n Errors,\n FormDataErrors,\n GlobalEventCallback,\n Page,\n RequestPayload,\n SharedPageProps\n} from '@inertiajs/core'\nimport { useForm as useInertiaForm } from '@inertiajs/react'\nimport { type ComponentProps, type ReactNode, useEffect, useState } from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Path,\n UseFormReturn\n} from 'react-hook-form'\nimport { useForm as userReactForm } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Schema } from '@/index'\nimport type { ErrorData, Method, RouteDefinition } from '@/types'\n\ntype RenderFN<TValues extends FieldValues> = ({\n errors,\n form,\n loading\n}: {\n errors: FormDataErrors<object>\n form: UseFormReturn<TValues>\n loading: boolean\n}) => ReactNode\n\nexport function Form<\n TRuleset extends Ruleset,\n TSchema extends Schema<TRuleset>,\n TValues extends InferSchema<TSchema>\n>({\n children,\n className,\n defaults = {},\n onBefore,\n onBeforeUpdate,\n onCancel,\n onCancelToken,\n onError,\n onFinish,\n onFlash,\n onPrefetched,\n onPrefetching,\n onProgress,\n onStart,\n onSuccess,\n preserveScroll = true,\n resetOnSuccess = true,\n rootError: displayRootError = 'flash',\n route,\n schema,\n setDefaultsOnSuccess = false,\n ...props\n}: Omit<\n ComponentProps<'form'>,\n 'action' | 'children' | 'method' | 'onSubmit'\n> & {\n children: RenderFN<TValues>\n defaults?: Partial<DefaultValues<TValues>>\n onBefore?: GlobalEventCallback<'before', RequestPayload>\n onBeforeUpdate?: GlobalEventCallback<'beforeUpdate', RequestPayload>\n onCancel?: GlobalEventCallback<'cancel', RequestPayload>\n onCancelToken?: CancelTokenCallback\n onError?: GlobalEventCallback<'error', RequestPayload>\n onFinish?: GlobalEventCallback<'finish', RequestPayload>\n onFlash?: GlobalEventCallback<'flash', RequestPayload>\n onPrefetched?: GlobalEventCallback<'prefetched', RequestPayload>\n onPrefetching?: GlobalEventCallback<'prefetching', RequestPayload>\n onProgress?: GlobalEventCallback<'progress', RequestPayload>\n onStart?: GlobalEventCallback<'start', RequestPayload>\n onSuccess?: GlobalEventCallback<'success', RequestPayload>\n preserveScroll?: boolean\n /**\n * Reset input values to their defaults on success.\n *\n * @defaultValue `true`\n */\n resetOnSuccess?: boolean\n /**\n * How to display the root error from inertia.\n *\n * - `\"flash\"` - use the Toaster component\n * - `\"monitor\"` - use the ErrorMonitor component\n * - `\"none\"` - don't display the root error\n *\n * @defaultValue `\"flash\"`\n */\n rootError?: 'flash' | 'monitor' | 'none'\n route: RouteDefinition<Method>\n schema: Schema<TRuleset>\n /**\n * Set the submitted values as default values on success.\n *\n * @defaultValue `false`\n */\n setDefaultsOnSuccess?: boolean\n}) {\n const [rootError, setRootError] = useState<ErrorData>()\n\n const defaultValues = Object.fromEntries(\n Object.keys(schema.ruleset).map((field) => [field, defaults[field] ?? ''])\n ) as DefaultValues<TValues>\n\n // React Hook Form\n const reactForm = userReactForm<TValues>({\n defaultValues,\n resolver: useTsvResolver(schema)\n })\n\n // Inertia\n const inertiaForm = useInertiaForm<object>(defaultValues)\n\n function onErrorWithToast(errors: Errors) {\n if (errors.root) {\n if (displayRootError === 'flash') {\n flash({ level: 'error', title: errors.root })\n } else if (displayRootError === 'monitor') {\n setRootError({ message: errors.root })\n }\n }\n\n if (onError) {\n onError(errors)\n }\n }\n\n function onSuccessWithReset(page: Page<SharedPageProps>) {\n if (setDefaultsOnSuccess) {\n inertiaForm.setDefaults()\n reactForm.reset(reactForm.getValues())\n }\n\n if (resetOnSuccess) {\n inertiaForm.reset()\n reactForm.reset()\n }\n\n if (onSuccess) {\n onSuccess(page)\n }\n }\n\n // Submit handler\n function onSubmit(values: TValues) {\n inertiaForm.transform(() => values)\n inertiaForm[route.method](route.url, {\n onBefore,\n onBeforeUpdate,\n onCancel,\n onCancelToken,\n onError: onErrorWithToast,\n onFinish,\n onFlash,\n onPrefetched,\n onPrefetching,\n onProgress,\n onStart,\n onSuccess: onSuccessWithReset,\n preserveScroll\n })\n }\n\n // Add inertia (server) errors to react form.\n useEffect(() => {\n for (const [key, error] of Object.entries(inertiaForm.errors)) {\n if (error) {\n reactForm.setError(key as Path<TValues>, {\n message: error as string,\n type: 'inertia'\n })\n }\n }\n }, [inertiaForm.errors, reactForm])\n\n return (\n <form\n action={route.url}\n className={cn('grid gap-6', className)}\n method={route.method}\n onSubmit={reactForm.handleSubmit(onSubmit)}\n {...props}\n >\n <>\n {children({\n errors: inertiaForm.errors,\n form: reactForm,\n loading: inertiaForm.processing\n })}\n </>\n\n {displayRootError === 'monitor' && <ErrorMonitor error={rootError} />}\n </form>\n )\n}\n","import { cn } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function HiddenField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'off',\n className,\n type = 'hidden',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n className={cn('hidden', className)}\n type={type}\n {...props}\n />\n )\n}\n","import { Checkbox, Field, Label, cn } from '@gmcode/react-ui'\nimport type { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { ControllerRenderProps, FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function InfoCheckboxField<\n TFieldValues extends FieldValues = FieldValues\n>({\n children,\n className,\n control,\n disabled,\n inputId,\n inputName,\n label,\n onCheckedChange,\n orientation = 'horizontal',\n readOnly,\n text,\n uncheckedValue = '',\n value = 'true',\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onCheckedChange?: (\n checked: CheckboxPrimitive.CheckedState,\n field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>\n ) => void\n readOnly?: boolean\n text?: string\n uncheckedValue?: string\n value?: string\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n className={cn('block', className)}\n data-invalid={fieldState.invalid}\n orientation={orientation}\n {...props}\n >\n <Label\n className=\"flex items-start gap-3 rounded-lg border p-3 hover:bg-accent/50 has-aria-checked:border-info-foreground has-aria-checked:bg-info\"\n data-slot=\"field-label\"\n >\n <Checkbox\n aria-invalid={fieldState.invalid}\n aria-readonly={readOnly}\n checked={field.value === value}\n className=\"aria-readonly:opacity-50 data-[state=checked]:border-info-foreground data-[state=checked]:bg-info-foreground data-[state=checked]:text-white dark:data-[state=checked]:border-info-foreground dark:data-[state=checked]:bg-info-foreground\"\n disabled={field.disabled}\n id={inputId}\n name={field.name}\n onBlur={field.onBlur}\n onCheckedChange={(checked) => {\n if (!readOnly) {\n field.onChange(checked === true ? value : uncheckedValue)\n if (onCheckedChange) onCheckedChange(checked, field)\n }\n }}\n ref={field.ref}\n value={value}\n />\n\n <div className=\"grid gap-1.5 font-normal\">\n <p className=\"text-sm leading-none font-medium\">{label}</p>\n {text ? (\n <p className=\"text-sm text-muted-foreground\">{text}</p>\n ) : (\n children\n )}\n <ErrorMonitor error={fieldState.error} />\n </div>\n </Label>\n </Field>\n )}\n />\n )\n}\n","import {\n Button,\n Field,\n FieldDescription,\n FieldLabel,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue\n} from '@gmcode/react-ui'\nimport { X } from 'lucide-react'\nimport type {\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type {\n FieldPathValue,\n FieldValues,\n UseFormSetValue\n} from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Option } from '@/types'\n\nexport function NullableSelectField<\n TFieldValues extends FieldValues = FieldValues\n>({\n autoComplete,\n control,\n description,\n disabled,\n inputId,\n inputName,\n label,\n options,\n placeholder,\n setValue,\n ...props\n}: ComponentProps<typeof Field> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n description?: string\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n options: Option[]\n placeholder?: string\n setValue: UseFormSetValue<TFieldValues>\n type?: HTMLInputTypeAttribute\n}) {\n // i18n\n const { t } = useTranslation('forms')\n\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <div className=\"flex items-end gap-4\">\n <Select\n autoComplete={autoComplete}\n disabled={field.disabled}\n name={field.name}\n onValueChange={field.onChange}\n value={field.value}\n >\n <SelectTrigger\n aria-invalid={fieldState.invalid}\n className=\"flex-1 overflow-hidden\"\n id={inputId ?? (label ? inputName : undefined)}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem\n id={option.id}\n key={option.key ?? option.id ?? option.value}\n value={option.value}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n\n <Button\n aria-label={t(($) => $.reset)}\n className=\"flex-none\"\n onClick={() =>\n setValue(\n inputName,\n '' as FieldPathValue<TFieldValues, FieldPath<TFieldValues>>\n )\n }\n type=\"button\"\n variant=\"outline\"\n >\n <X />\n </Button>\n </div>\n\n {description && <FieldDescription>{description}</FieldDescription>}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import {\n Field,\n FieldLabel,\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput\n} from '@gmcode/react-ui'\nimport { Minus, Plus } from 'lucide-react'\nimport type {\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type {\n FieldPathValue,\n FieldValues,\n UseFormSetValue\n} from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nfunction stepInput(\n original: string,\n add: boolean,\n step?: number,\n min?: number,\n max?: number\n) {\n let parsed = Number(original)\n\n if (isNaN(parsed)) {\n return ''\n }\n\n if (add) {\n parsed += step === undefined ? 1 : step\n } else {\n parsed -= step === undefined ? 1 : step\n }\n\n if (min !== undefined) {\n parsed = Math.max(parsed, min)\n }\n\n if (max !== undefined) {\n parsed = Math.min(parsed, max)\n }\n\n return parsed.toString()\n}\n\nexport function NumericField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete,\n control,\n disabled,\n inputId,\n inputMode = 'numeric',\n inputName,\n label,\n placeholder,\n type,\n ui,\n ...props\n}: ComponentProps<typeof Field> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputMode?: 'decimal' | 'numeric'\n inputName: FieldPath<TFieldValues>\n label?: string\n placeholder?: string\n type?: HTMLInputTypeAttribute\n ui?: {\n max?: number\n min?: number\n setValue: UseFormSetValue<TFieldValues>\n step?: number\n }\n}) {\n // i18n\n const { t } = useTranslation('forms')\n\n function stepValue(value: string, add: boolean) {\n if (ui?.setValue) {\n ui.setValue(\n inputName,\n stepInput(value, add, ui.step, ui.min, ui.max) as FieldPathValue<\n TFieldValues,\n FieldPath<TFieldValues>\n >,\n { shouldValidate: true }\n )\n }\n }\n\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <InputGroup>\n <InputGroupInput\n aria-invalid={fieldState.invalid}\n autoComplete={autoComplete}\n id={inputId ?? (label ? inputName : undefined)}\n inputMode={inputMode}\n placeholder={placeholder}\n type={type}\n {...field}\n />\n\n {ui && (\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n aria-label={t(($) => $.decrease)}\n disabled={disabled}\n onClick={() => stepValue(field.value, false)}\n size=\"icon-xs\"\n >\n <Minus />\n </InputGroupButton>\n\n <InputGroupButton\n aria-label={t(($) => $.increase)}\n disabled={disabled}\n onClick={() => stepValue(field.value, true)}\n size=\"icon-xs\"\n >\n <Plus />\n </InputGroupButton>\n </InputGroupAddon>\n )}\n </InputGroup>\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function PasswordField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'off',\n type = 'password',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n type={type}\n {...props}\n />\n )\n}\n","import {\n Field,\n FieldDescription,\n FieldLabel,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue\n} from '@gmcode/react-ui'\nimport type {\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Option } from '@/types'\n\nexport function SelectField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete,\n control,\n description,\n disabled,\n inputId,\n inputName,\n label,\n options,\n placeholder,\n ...props\n}: ComponentProps<typeof Field> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n description?: string\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n options: Option[]\n placeholder?: string\n type?: HTMLInputTypeAttribute\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <Select\n autoComplete={autoComplete}\n disabled={field.disabled}\n name={field.name}\n onValueChange={field.onChange}\n value={field.value}\n >\n <SelectTrigger\n aria-invalid={fieldState.invalid}\n id={inputId ?? (label ? inputName : undefined)}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem\n id={option.id}\n key={option.key ?? option.id ?? option.value}\n value={option.value}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n\n {description && <FieldDescription>{description}</FieldDescription>}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import { Button, Spinner, cn } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nexport function Submit({\n label,\n loading = false,\n type = 'submit',\n ...props\n}: ComponentProps<typeof Button> & {\n label?: string\n loading?: boolean\n}) {\n // i18n\n const { t } = useTranslation('forms')\n\n return (\n <Button\n disabled={loading}\n type={type}\n {...props}\n >\n <div className=\"relative\">\n <span className={cn({ invisible: loading })}>\n {label ?? t(($) => $.submit)}\n </span>\n <Spinner\n className={cn(\n 'trans absolute top-1/2 left-1/2 hidden -translate-x-1/2 -translate-y-1/2',\n { block: loading }\n )}\n />\n </div>\n </Button>\n )\n}\n","import { Field, FieldLabel, Switch } from '@gmcode/react-ui'\nimport type { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { ControllerRenderProps, FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function SwitchField<TFieldValues extends FieldValues = FieldValues>({\n control,\n disabled,\n inputId,\n inputName,\n label,\n onCheckedChange,\n orientation = 'horizontal',\n readOnly,\n uncheckedValue = '',\n value = 'true',\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onCheckedChange?: (\n checked: CheckboxPrimitive.CheckedState,\n field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>\n ) => void\n readOnly?: boolean\n uncheckedValue?: string\n value?: string\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n orientation={orientation}\n {...props}\n >\n <Switch\n aria-invalid={fieldState.invalid}\n aria-readonly={readOnly}\n checked={field.value === value}\n className=\"aria-readonly:opacity-50\"\n disabled={field.disabled}\n id={inputId ?? (label ? inputName : undefined)}\n name={field.name}\n onBlur={field.onBlur}\n onCheckedChange={(checked) => {\n if (!readOnly) {\n field.onChange(checked === true ? value : uncheckedValue)\n if (onCheckedChange) onCheckedChange(checked, field)\n }\n }}\n ref={field.ref}\n value={value}\n />\n\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function TextField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'on',\n type = 'text',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n type={type}\n {...props}\n />\n )\n}\n","import { Field, FieldLabel, TextareaAutosize, cn } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport type { TextareaHeightChangeMeta } from 'react-textarea-autosize'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function TextareaField<TFieldValues extends FieldValues = FieldValues>({\n cacheMeasurements,\n control,\n inputId,\n inputName,\n label,\n maxRows,\n minRows,\n onHeightChange,\n placeholder,\n resize = 'none',\n ...props\n}: ComponentProps<typeof Field> & {\n cacheMeasurements?: boolean\n control: Control<TFieldValues>\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n maxRows?: number\n minRows?: number\n onHeightChange?: (height: number, meta: TextareaHeightChangeMeta) => void\n placeholder?: string\n resize?: 'both' | 'none' | 'x' | 'y'\n}) {\n return (\n <Controller\n control={control}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <TextareaAutosize\n aria-invalid={fieldState.invalid}\n autoComplete=\"off\"\n cacheMeasurements={cacheMeasurements}\n className={cn({\n resize: resize === 'both',\n 'resize-none': resize === 'none',\n 'resize-x': resize === 'x',\n 'resize-y': resize === 'y'\n })}\n id={inputId ?? (label ? inputName : undefined)}\n maxRows={maxRows}\n minRows={minRows}\n onHeightChange={onHeightChange}\n placeholder={placeholder}\n {...field}\n />\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAMA,MAAM,OAAc,eAAe;CACjC,aAAa;CACb,eAAe,EAAE,aAAa,MAAM;CACpC,WAAW,EAAE,eAAG;AAClB,CAAC;AAEI,KAAK,KAAK;;;;ACRf,SAAO,aAAA,IAAA;CAAA,MAAA,IAAA,EAAA,CAAA;CAAA,IAAA,EAAA,OAAA,oEAAA;EAAA,KAAA,IAAA,KAAA,GAAA,KAAA,GAAA,MAAA,GAAA,EAAA,MAAA,OAAA,IAAA,2BAAA;EAAA,EAAA,KAAA;CAAA;CAAsB,MAAA,EAAA,UAAA;CAE3B,MAAA,EAAA,MAAc,eAAe,OAAO;CAEpC,IAAI,CAAC,OAAK,SAAS,OACV;CAGT,IAAI,EAAC,SAAU,aAAW;EAAA,IAAA;EAAA,IAAA,EAAA,OAAA,OAAA;GACjB,KAAA,oBAAC,YAAD,EAAoBA,QAAA,MAAK;GAAI,EAAA,KAAA;GAAA,EAAA,KAAA;EAAA,OAAA,KAAA,EAAA;EAAA,OAA7B;CAA6B;CACrC,IAAA;CAAA,IAAA,EAAA,OAAA,MAAA,WAAA,EAAA,OAAA,MAAA,UAAA,EAAA,OAAA,GAAA;EAGqC,KAAA,EAAE,MAAK,SAAU,MAAK,MAAO;EAAC,EAAA,KAAA,MAAA;EAAA,EAAA,KAAA,MAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAA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OACE,oBAAC,YAAD;EACW;EACT,MAAM;EACN,SAAS,EAAE,OAAO,iBAChB,qBAAC,OAAD;GACE,gBAAc,WAAW;GACzB,GAAI;aAFN;IAIG,SACC,oBAAC,YAAD;KAAY,SAAS,WAAW;eAAY;IAAkB;IAGhE,oBAAC,kBAAD;KACE,gBAAc,WAAW;KACzB,cAAa;KACM;KACnB,WAAW,GAAG;MACZ,QAAQ,WAAW;MACnB,eAAe,WAAW;MAC1B,YAAY,WAAW;MACvB,YAAY,WAAW;KACzB,CAAC;KACD,IAAI,YAAY,QAAQ,YAAY;KAC3B;KACA;KACO;KACH;KACb,GAAI;IAAM;IAGZ,oBAAC,cAAD,EAAc,OAAO,WAAW,MAAM;GACjC;;CACP;AAGR"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["error","labelClassName","label","autoComplete","inputClassName","placeholder","readOnly","type","control","disabled","inputName","label","description","defaultValue","control","disabled","inputName","label","autoComplete","placeholder","description","control","disabled","inputName","$","label","autoComplete","placeholder","description","control","disabled","inputName"],"sources":["../src/i18n.ts","../src/components/error-monitor.tsx","../src/lib/utils.ts","../src/components/calendar-field.tsx","../src/components/checkbox-field.tsx","../src/components/input-field.tsx","../src/components/email-field.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"],"sourcesContent":["import { type i18n as Ti18n, createInstance } from 'i18next'\nimport en from '@/locales/en'\n\n/**\n * @deprecated Use the `forms` namespace instead.\n */\nconst i18n: Ti18n = createInstance({\n fallbackLng: 'en',\n interpolation: { escapeValue: false },\n resources: { en }\n})\n\nvoid i18n.init()\n\nexport default i18n\n","import { FieldError } from '@gmcode/react-ui'\nimport { useTranslation } from 'react-i18next'\nimport type { ErrorData } from '@/types'\n\nexport function ErrorMonitor({ error }: { error?: ErrorData }) {\n // i18n\n const { t } = useTranslation('forms')\n\n if (!error?.message) {\n return null\n }\n\n if (t.name === 'notReadyT') {\n return <FieldError errors={error} />\n }\n\n // @ts-expect-error: assert error.message to be a translation key\n return <FieldError errors={{ message: t(error.message, error.params) }} />\n}\n","/**\n * Convert a javascript `Date` object to a string with the format `aaaa-mm-dd`.\n */\nexport function dateToString(date: Date): string {\n return `${date.getFullYear()}-${(date.getMonth() + 1 + '').padStart(2, '0')}-${(date.getDate() + '').padStart(2, '0')}`\n}\n\n/**\n * Convert a string to a javascript `Date` object or undefined if the string is\n * not a valid date.\n */\nexport function stringToDate(string: string | undefined): Date | undefined {\n if (!string) {\n return undefined\n }\n\n const date = new Date(string)\n\n if (isNaN(date.getFullYear())) {\n return undefined\n }\n\n return date\n}\n","import { Calendar, Field, FieldLabel } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport type { DayPickerLocale, Matcher } from 'react-day-picker'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport {\n dateToString as defaultDateToString,\n stringToDate as defaultStringToDate\n} from '@/lib/utils'\n\nexport function CalendarField<TFieldValues extends FieldValues = FieldValues>({\n control,\n dateToString = defaultDateToString,\n disabled,\n inputId,\n inputName,\n label,\n locale,\n stringToDate = defaultStringToDate,\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n dateToString?: (date: Date) => string\n disabled?: Matcher | Matcher[]\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n locale?: Partial<DayPickerLocale>\n stringToDate?: (string: string | undefined) => Date | undefined\n}) {\n return (\n <Controller\n control={control}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <Calendar\n aria-invalid={fieldState.invalid}\n className=\"w-full rounded-md border\"\n disabled={disabled}\n fixedWeeks={true}\n id={inputId ?? (label ? inputName : undefined)}\n locale={locale}\n mode=\"single\"\n onSelect={(date) => field.onChange(date ? dateToString(date) : '')}\n selected={stringToDate(field.value)}\n />\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import { Checkbox, Field, FieldLabel } from '@gmcode/react-ui'\nimport type { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { ControllerRenderProps, FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function CheckboxField<TFieldValues extends FieldValues = FieldValues>({\n control,\n disabled,\n inputId,\n inputName,\n label,\n onCheckedChange,\n orientation = 'horizontal',\n readOnly,\n uncheckedValue = '',\n value = 'true',\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onCheckedChange?: (\n checked: CheckboxPrimitive.CheckedState,\n field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>\n ) => void\n readOnly?: boolean\n uncheckedValue?: string\n value?: string\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n orientation={orientation}\n {...props}\n >\n <Checkbox\n aria-invalid={fieldState.invalid}\n aria-readonly={readOnly}\n checked={field.value === value}\n className=\"aria-readonly:opacity-50\"\n disabled={field.disabled}\n id={inputId ?? (label ? inputName : undefined)}\n name={field.name}\n onBlur={field.onBlur}\n onCheckedChange={(checked) => {\n if (!readOnly) {\n field.onChange(checked === true ? value : uncheckedValue)\n if (onCheckedChange) onCheckedChange(checked, field)\n }\n }}\n ref={field.ref}\n value={value}\n />\n\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import { Field, FieldLabel, Input } from '@gmcode/react-ui'\nimport type {\n ChangeEventHandler,\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function InputField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete,\n control,\n disabled,\n inputClassName,\n inputId,\n inputName,\n label,\n labelClassName,\n placeholder,\n readOnly,\n type,\n ...props\n}: Omit<ComponentProps<typeof Field>, 'onChange'> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n disabled?: boolean\n inputClassName?: string\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n labelClassName?: string\n onChange?: ChangeEventHandler<HTMLDivElement, HTMLInputElement>\n placeholder?: string\n readOnly?: boolean\n type?: HTMLInputTypeAttribute\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel\n className={labelClassName}\n htmlFor={inputId ?? inputName}\n >\n {label}\n </FieldLabel>\n )}\n\n <Input\n aria-invalid={fieldState.invalid}\n autoComplete={autoComplete}\n className={inputClassName}\n id={inputId ?? (label ? inputName : undefined)}\n placeholder={placeholder}\n readOnly={readOnly}\n type={type}\n {...field}\n />\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function EmailField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'on',\n type = 'email',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n type={type}\n {...props}\n />\n )\n}\n","import {\n FieldDescription,\n FieldLabel,\n FieldSet,\n Label,\n RadioGroup,\n RadioGroupItem\n} from '@gmcode/react-ui'\nimport type { ComponentProps, FC, SVGProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Option } from '@/types'\n\nexport function FancyRadioField<\n TFieldValues extends FieldValues = FieldValues\n>({\n control,\n defaultValue,\n description,\n disabled,\n groupId,\n inputName,\n label,\n options,\n ...props\n}: ComponentProps<typeof FieldSet> & {\n control: Control<TFieldValues>\n defaultValue: string\n description?: string\n disabled?: boolean\n groupId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n options: Array<Option & { Icon?: FC<SVGProps<SVGSVGElement>> }>\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <FieldSet\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={groupId ?? inputName}>{label}</FieldLabel>\n )}\n\n {description && <FieldDescription>{description}</FieldDescription>}\n\n <ErrorMonitor error={fieldState.error} />\n\n <RadioGroup\n defaultValue={defaultValue}\n disabled={field.disabled}\n id={groupId ?? (label ? inputName : undefined)}\n name={field.name}\n onBlur={field.onBlur}\n onValueChange={field.onChange}\n ref={field.ref}\n >\n {options.map((option) => (\n <Label\n className=\"rounded-md border ring-ring/50 transition-all hover:bg-accent/50 has-focus-visible:ring-[3px]\"\n data-slot=\"field-label\"\n key={option.key ?? option.id ?? option.value}\n >\n <div className=\"flex w-full items-center gap-3 rounded-md p-3 transition-all has-aria-checked:border-l-8 has-aria-checked:border-ring\">\n <RadioGroupItem\n className=\"sr-only\"\n id={option.id}\n value={option.value}\n />\n {option.Icon && <option.Icon />}\n {option.label}\n </div>\n </Label>\n ))}\n </RadioGroup>\n </FieldSet>\n )}\n />\n )\n}\n","import { cn, flash } from '@gmcode/react-ui'\nimport { type InferSchema, useTsvResolver } from '@gmcode/tsv-hookform'\nimport type { Ruleset } from '@gmcode/tsv-input'\nimport type {\n CancelTokenCallback,\n Errors,\n FormDataErrors,\n GlobalEventCallback,\n Page,\n RequestPayload,\n SharedPageProps\n} from '@inertiajs/core'\nimport { useForm as useInertiaForm } from '@inertiajs/react'\nimport { type ComponentProps, type ReactNode, useEffect, useState } from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Path,\n UseFormReturn\n} from 'react-hook-form'\nimport { useForm as userReactForm } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Schema } from '@/index'\nimport type { ErrorData, Method, RouteDefinition } from '@/types'\n\ntype RenderFN<TValues extends FieldValues> = ({\n errors,\n form,\n loading\n}: {\n errors: FormDataErrors<object>\n form: UseFormReturn<TValues>\n loading: boolean\n}) => ReactNode\n\nexport function Form<\n TRuleset extends Ruleset,\n TSchema extends Schema<TRuleset>,\n TValues extends InferSchema<TSchema>\n>({\n children,\n className,\n defaults = {},\n onBefore,\n onBeforeUpdate,\n onCancel,\n onCancelToken,\n onError,\n onFinish,\n onFlash,\n onPrefetched,\n onPrefetching,\n onProgress,\n onStart,\n onSuccess,\n preserveScroll = true,\n resetOnSuccess = true,\n rootError: displayRootError = 'flash',\n route,\n schema,\n setDefaultsOnSuccess = false,\n ...props\n}: Omit<\n ComponentProps<'form'>,\n 'action' | 'children' | 'method' | 'onSubmit'\n> & {\n children: RenderFN<TValues>\n defaults?: Partial<DefaultValues<TValues>>\n onBefore?: GlobalEventCallback<'before', RequestPayload>\n onBeforeUpdate?: GlobalEventCallback<'beforeUpdate', RequestPayload>\n onCancel?: GlobalEventCallback<'cancel', RequestPayload>\n onCancelToken?: CancelTokenCallback\n onError?: GlobalEventCallback<'error', RequestPayload>\n onFinish?: GlobalEventCallback<'finish', RequestPayload>\n onFlash?: GlobalEventCallback<'flash', RequestPayload>\n onPrefetched?: GlobalEventCallback<'prefetched', RequestPayload>\n onPrefetching?: GlobalEventCallback<'prefetching', RequestPayload>\n onProgress?: GlobalEventCallback<'progress', RequestPayload>\n onStart?: GlobalEventCallback<'start', RequestPayload>\n onSuccess?: GlobalEventCallback<'success', RequestPayload>\n preserveScroll?: boolean\n /**\n * Reset input values to their defaults on success.\n *\n * @defaultValue `true`\n */\n resetOnSuccess?: boolean\n /**\n * How to display the root error from inertia.\n *\n * - `\"flash\"` - use the Toaster component\n * - `\"monitor\"` - use the ErrorMonitor component\n * - `\"none\"` - don't display the root error\n *\n * @defaultValue `\"flash\"`\n */\n rootError?: 'flash' | 'monitor' | 'none'\n route: RouteDefinition<Method>\n schema: Schema<TRuleset>\n /**\n * Set the submitted values as default values on success.\n *\n * @defaultValue `false`\n */\n setDefaultsOnSuccess?: boolean\n}) {\n const [rootError, setRootError] = useState<ErrorData>()\n\n const defaultValues = Object.fromEntries(\n Object.keys(schema.ruleset).map((field) => [field, defaults[field] ?? ''])\n ) as DefaultValues<TValues>\n\n // React Hook Form\n const reactForm = userReactForm<TValues>({\n defaultValues,\n resolver: useTsvResolver(schema)\n })\n\n // Inertia\n const inertiaForm = useInertiaForm<object>(defaultValues)\n\n function onErrorWithToast(errors: Errors) {\n if (errors.root) {\n if (displayRootError === 'flash') {\n flash({ level: 'error', title: errors.root })\n } else if (displayRootError === 'monitor') {\n setRootError({ message: errors.root })\n }\n }\n\n if (onError) {\n onError(errors)\n }\n }\n\n function onSuccessWithReset(page: Page<SharedPageProps>) {\n if (setDefaultsOnSuccess) {\n inertiaForm.setDefaults()\n reactForm.reset(reactForm.getValues())\n }\n\n if (resetOnSuccess) {\n inertiaForm.reset()\n reactForm.reset()\n }\n\n if (onSuccess) {\n onSuccess(page)\n }\n }\n\n // Submit handler\n function onSubmit(values: TValues) {\n inertiaForm.transform(() => values)\n inertiaForm[route.method](route.url, {\n onBefore,\n onBeforeUpdate,\n onCancel,\n onCancelToken,\n onError: onErrorWithToast,\n onFinish,\n onFlash,\n onPrefetched,\n onPrefetching,\n onProgress,\n onStart,\n onSuccess: onSuccessWithReset,\n preserveScroll\n })\n }\n\n // Add inertia (server) errors to react form.\n useEffect(() => {\n for (const [key, error] of Object.entries(inertiaForm.errors)) {\n if (error) {\n reactForm.setError(key as Path<TValues>, {\n message: error as string,\n type: 'inertia'\n })\n }\n }\n }, [inertiaForm.errors, reactForm])\n\n return (\n <form\n action={route.url}\n className={cn('grid gap-6', className)}\n method={route.method}\n onSubmit={reactForm.handleSubmit(onSubmit)}\n {...props}\n >\n <>\n {children({\n errors: inertiaForm.errors,\n form: reactForm,\n loading: inertiaForm.processing\n })}\n </>\n\n {displayRootError === 'monitor' && <ErrorMonitor error={rootError} />}\n </form>\n )\n}\n","import { cn } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function HiddenField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'off',\n className,\n type = 'hidden',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n className={cn('hidden', className)}\n type={type}\n {...props}\n />\n )\n}\n","import { Checkbox, Field, Label, cn } from '@gmcode/react-ui'\nimport type { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { ControllerRenderProps, FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function InfoCheckboxField<\n TFieldValues extends FieldValues = FieldValues\n>({\n children,\n className,\n control,\n disabled,\n inputId,\n inputName,\n label,\n onCheckedChange,\n orientation = 'horizontal',\n readOnly,\n text,\n uncheckedValue = '',\n value = 'true',\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onCheckedChange?: (\n checked: CheckboxPrimitive.CheckedState,\n field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>\n ) => void\n readOnly?: boolean\n text?: string\n uncheckedValue?: string\n value?: string\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n className={cn('block', className)}\n data-invalid={fieldState.invalid}\n orientation={orientation}\n {...props}\n >\n <Label\n className=\"flex items-start gap-3 rounded-lg border p-3 hover:bg-accent/50 has-aria-checked:border-info-foreground has-aria-checked:bg-info\"\n data-slot=\"field-label\"\n >\n <Checkbox\n aria-invalid={fieldState.invalid}\n aria-readonly={readOnly}\n checked={field.value === value}\n className=\"aria-readonly:opacity-50 data-[state=checked]:border-info-foreground data-[state=checked]:bg-info-foreground data-[state=checked]:text-white dark:data-[state=checked]:border-info-foreground dark:data-[state=checked]:bg-info-foreground\"\n disabled={field.disabled}\n id={inputId}\n name={field.name}\n onBlur={field.onBlur}\n onCheckedChange={(checked) => {\n if (!readOnly) {\n field.onChange(checked === true ? value : uncheckedValue)\n if (onCheckedChange) onCheckedChange(checked, field)\n }\n }}\n ref={field.ref}\n value={value}\n />\n\n <div className=\"grid gap-1.5 font-normal\">\n <p className=\"text-sm leading-none font-medium\">{label}</p>\n {text ? (\n <p className=\"text-sm text-muted-foreground\">{text}</p>\n ) : (\n children\n )}\n <ErrorMonitor error={fieldState.error} />\n </div>\n </Label>\n </Field>\n )}\n />\n )\n}\n","import {\n Button,\n Field,\n FieldDescription,\n FieldLabel,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue\n} from '@gmcode/react-ui'\nimport { X } from 'lucide-react'\nimport type {\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type {\n FieldPathValue,\n FieldValues,\n UseFormSetValue\n} from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Option } from '@/types'\n\nexport function NullableSelectField<\n TFieldValues extends FieldValues = FieldValues\n>({\n autoComplete,\n control,\n description,\n disabled,\n inputId,\n inputName,\n label,\n options,\n placeholder,\n setValue,\n ...props\n}: ComponentProps<typeof Field> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n description?: string\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n options: Option[]\n placeholder?: string\n setValue: UseFormSetValue<TFieldValues>\n type?: HTMLInputTypeAttribute\n}) {\n // i18n\n const { t } = useTranslation('forms')\n\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <div className=\"flex items-end gap-4\">\n <Select\n autoComplete={autoComplete}\n disabled={field.disabled}\n name={field.name}\n onValueChange={field.onChange}\n value={field.value}\n >\n <SelectTrigger\n aria-invalid={fieldState.invalid}\n className=\"flex-1 overflow-hidden\"\n id={inputId ?? (label ? inputName : undefined)}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem\n id={option.id}\n key={option.key ?? option.id ?? option.value}\n value={option.value}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n\n <Button\n aria-label={t(($) => $.reset)}\n className=\"flex-none\"\n onClick={() =>\n setValue(\n inputName,\n '' as FieldPathValue<TFieldValues, FieldPath<TFieldValues>>\n )\n }\n type=\"button\"\n variant=\"outline\"\n >\n <X />\n </Button>\n </div>\n\n {description && <FieldDescription>{description}</FieldDescription>}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import {\n Field,\n FieldLabel,\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput\n} from '@gmcode/react-ui'\nimport { Minus, Plus } from 'lucide-react'\nimport type {\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type {\n FieldPathValue,\n FieldValues,\n UseFormSetValue\n} from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nfunction stepInput(\n original: string,\n add: boolean,\n step?: number,\n min?: number,\n max?: number\n) {\n let parsed = Number(original)\n\n if (isNaN(parsed)) {\n return ''\n }\n\n if (add) {\n parsed += step === undefined ? 1 : step\n } else {\n parsed -= step === undefined ? 1 : step\n }\n\n if (min !== undefined) {\n parsed = Math.max(parsed, min)\n }\n\n if (max !== undefined) {\n parsed = Math.min(parsed, max)\n }\n\n return parsed.toString()\n}\n\nexport function NumericField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete,\n control,\n disabled,\n inputId,\n inputMode = 'numeric',\n inputName,\n label,\n placeholder,\n type,\n ui,\n ...props\n}: ComponentProps<typeof Field> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputMode?: 'decimal' | 'numeric'\n inputName: FieldPath<TFieldValues>\n label?: string\n placeholder?: string\n type?: HTMLInputTypeAttribute\n ui?: {\n max?: number\n min?: number\n setValue: UseFormSetValue<TFieldValues>\n step?: number\n }\n}) {\n // i18n\n const { t } = useTranslation('forms')\n\n function stepValue(value: string, add: boolean) {\n if (ui?.setValue) {\n ui.setValue(\n inputName,\n stepInput(value, add, ui.step, ui.min, ui.max) as FieldPathValue<\n TFieldValues,\n FieldPath<TFieldValues>\n >,\n { shouldValidate: true }\n )\n }\n }\n\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <InputGroup>\n <InputGroupInput\n aria-invalid={fieldState.invalid}\n autoComplete={autoComplete}\n id={inputId ?? (label ? inputName : undefined)}\n inputMode={inputMode}\n placeholder={placeholder}\n type={type}\n {...field}\n />\n\n {ui && (\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n aria-label={t(($) => $.decrease)}\n disabled={disabled}\n onClick={() => stepValue(field.value, false)}\n size=\"icon-xs\"\n >\n <Minus />\n </InputGroupButton>\n\n <InputGroupButton\n aria-label={t(($) => $.increase)}\n disabled={disabled}\n onClick={() => stepValue(field.value, true)}\n size=\"icon-xs\"\n >\n <Plus />\n </InputGroupButton>\n </InputGroupAddon>\n )}\n </InputGroup>\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function PasswordField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'off',\n type = 'password',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n type={type}\n {...props}\n />\n )\n}\n","import {\n Field,\n FieldDescription,\n FieldLabel,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue\n} from '@gmcode/react-ui'\nimport type {\n ComponentProps,\n HTMLInputAutoCompleteAttribute,\n HTMLInputTypeAttribute\n} from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\nimport type { Option } from '@/types'\n\nexport function SelectField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete,\n control,\n description,\n disabled,\n inputId,\n inputName,\n label,\n options,\n placeholder,\n ...props\n}: ComponentProps<typeof Field> & {\n autoComplete?: HTMLInputAutoCompleteAttribute\n control: Control<TFieldValues>\n description?: string\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n options: Option[]\n placeholder?: string\n type?: HTMLInputTypeAttribute\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <Select\n autoComplete={autoComplete}\n disabled={field.disabled}\n name={field.name}\n onValueChange={field.onChange}\n value={field.value}\n >\n <SelectTrigger\n aria-invalid={fieldState.invalid}\n id={inputId ?? (label ? inputName : undefined)}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem\n id={option.id}\n key={option.key ?? option.id ?? option.value}\n value={option.value}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n\n {description && <FieldDescription>{description}</FieldDescription>}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import { Button, Spinner, cn } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nexport function Submit({\n label,\n loading = false,\n type = 'submit',\n ...props\n}: ComponentProps<typeof Button> & {\n label?: string\n loading?: boolean\n}) {\n // i18n\n const { t } = useTranslation('forms')\n\n return (\n <Button\n disabled={loading}\n type={type}\n {...props}\n >\n <div className=\"relative\">\n <span className={cn({ invisible: loading })}>\n {label ?? t(($) => $.submit)}\n </span>\n <Spinner\n className={cn(\n 'trans absolute top-1/2 left-1/2 hidden -translate-x-1/2 -translate-y-1/2',\n { block: loading }\n )}\n />\n </div>\n </Button>\n )\n}\n","import { Field, FieldLabel, Switch } from '@gmcode/react-ui'\nimport type { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { ControllerRenderProps, FieldValues } from 'react-hook-form'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function SwitchField<TFieldValues extends FieldValues = FieldValues>({\n control,\n disabled,\n inputId,\n inputName,\n label,\n onCheckedChange,\n orientation = 'horizontal',\n readOnly,\n uncheckedValue = '',\n value = 'true',\n ...props\n}: ComponentProps<typeof Field> & {\n control: Control<TFieldValues>\n disabled?: boolean\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n onCheckedChange?: (\n checked: CheckboxPrimitive.CheckedState,\n field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>\n ) => void\n readOnly?: boolean\n uncheckedValue?: string\n value?: string\n}) {\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n orientation={orientation}\n {...props}\n >\n <Switch\n aria-invalid={fieldState.invalid}\n aria-readonly={readOnly}\n checked={field.value === value}\n className=\"aria-readonly:opacity-50\"\n disabled={field.disabled}\n id={inputId ?? (label ? inputName : undefined)}\n name={field.name}\n onBlur={field.onBlur}\n onCheckedChange={(checked) => {\n if (!readOnly) {\n field.onChange(checked === true ? value : uncheckedValue)\n if (onCheckedChange) onCheckedChange(checked, field)\n }\n }}\n ref={field.ref}\n value={value}\n />\n\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport type { FieldValues } from 'react-hook-form'\nimport { InputField } from '@/components/input-field'\n\nexport function TextField<TFieldValues extends FieldValues = FieldValues>({\n autoComplete = 'on',\n type = 'text',\n ...props\n}: ComponentProps<typeof InputField<TFieldValues>>) {\n return (\n <InputField\n autoComplete={autoComplete}\n type={type}\n {...props}\n />\n )\n}\n","import { Field, FieldLabel, TextareaAutosize, cn } from '@gmcode/react-ui'\nimport type { ComponentProps } from 'react'\nimport { type Control, Controller, type FieldPath } from 'react-hook-form'\nimport type { FieldValues } from 'react-hook-form'\nimport type { TextareaHeightChangeMeta } from 'react-textarea-autosize'\nimport { ErrorMonitor } from '@/components/error-monitor'\n\nexport function TextareaField<TFieldValues extends FieldValues = FieldValues>({\n cacheMeasurements,\n control,\n inputId,\n inputName,\n label,\n maxRows,\n minRows,\n onHeightChange,\n placeholder,\n resize = 'none',\n ...props\n}: ComponentProps<typeof Field> & {\n cacheMeasurements?: boolean\n control: Control<TFieldValues>\n inputId?: string\n inputName: FieldPath<TFieldValues>\n label?: string\n maxRows?: number\n minRows?: number\n onHeightChange?: (height: number, meta: TextareaHeightChangeMeta) => void\n placeholder?: string\n resize?: 'both' | 'none' | 'x' | 'y'\n}) {\n return (\n <Controller\n control={control}\n name={inputName}\n render={({ field, fieldState }) => (\n <Field\n data-invalid={fieldState.invalid}\n {...props}\n >\n {label && (\n <FieldLabel htmlFor={inputId ?? inputName}>{label}</FieldLabel>\n )}\n\n <TextareaAutosize\n aria-invalid={fieldState.invalid}\n autoComplete=\"off\"\n cacheMeasurements={cacheMeasurements}\n className={cn({\n resize: resize === 'both',\n 'resize-none': resize === 'none',\n 'resize-x': resize === 'x',\n 'resize-y': resize === 'y'\n })}\n id={inputId ?? (label ? inputName : undefined)}\n maxRows={maxRows}\n minRows={minRows}\n onHeightChange={onHeightChange}\n placeholder={placeholder}\n {...field}\n />\n\n <ErrorMonitor error={fieldState.error} />\n </Field>\n )}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAMA,MAAM,OAAc,eAAe;CACjC,aAAa;CACb,eAAe,EAAE,aAAa,MAAM;CACpC,WAAW,EAAE,eAAG;AAClB,CAAC;AAEI,KAAK,KAAK;;;;ACRf,SAAO,aAAA,IAAA;CAAA,MAAA,IAAA,EAAA,CAAA;CAAA,IAAA,EAAA,OAAA,oEAAA;EAAA,KAAA,IAAA,KAAA,GAAA,KAAA,GAAA,MAAA,GAAA,EAAA,MAAA,OAAA,IAAA,2BAAA;EAAA,EAAA,KAAA;CAAA;CAAsB,MAAA,EAAA,UAAA;CAE3B,MAAA,EAAA,MAAc,eAAe,OAAO;CAEpC,IAAI,CAAC,OAAK,SAAS,OACV;CAGT,IAAI,EAAC,SAAU,aAAW;EAAA,IAAA;EAAA,IAAA,EAAA,OA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AI,YAAY,QAAQ,YAAY;KACpC,MAAM,MAAM;KACZ,QAAQ,MAAM;KACd,kBAAkB,YAAY;MAC5B,IAAI,CAAC,UAAU;OACb,MAAM,SAAS,YAAY,OAAO,QAAQ,cAAc;OACxD,IAAI,iBAAiB,gBAAgB,SAAS,KAAK;MACrD;KACF;KACA,KAAK,MAAM;KACJ;IAAM;IAGd,SACC,oBAAC,YAAD;KAAY,SAAS,WAAW;eAAY;IAAkB;IAGhE,oBAAC,cAAD,EAAc,OAAO,WAAW,MAAM;GACjC;;CACP;AAGR;;;;ACpEA,SAAgB,UAA0D,EACxE,eAAe,MACf,OAAO,QACP,GAAG,SAC+C;CAClD,OACE,oBAAC,YAAD;EACgB;EACR;EACN,GAAI;CAAM;AAGhB;;;;ACTA,SAAgB,cAA8D,EAC5E,mBACA,SACA,SACA,WACA,OACA,SACA,SACA,gBACA,aACA,SAAS,QACT,GAAG,SAYF;CACD,OACE,oBAAC,YAAD;EACW;EACT,MAAM;EACN,SAAS,EAAE,OAAO,iBAChB,qBAAC,OAAD;GACE,gBAAc,WAAW;GACzB,GAAI;aAFN;IAIG,SACC,oBAAC,YAAD;KAAY,SAAS,WAAW;eAAY;IAAkB;IAGhE,oBAAC,kBAAD;KACE,gBAAc,WAAW;KACzB,cAAa;KACM;KACnB,WAAW,GAAG;MACZ,QAAQ,WAAW;MACnB,eAAe,WAAW;MAC1B,YAAY,WAAW;MACvB,YAAY,WAAW;KACzB,CAAC;KACD,IAAI,YAAY,QAAQ,YAAY;KAC3B;KACA;KACO;KACH;KACb,GAAI;IAAM;IAGZ,oBAAC,cAAD,EAAc,OAAO,WAAW,MAAM;GACjC;;CACP;AAGR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gmcode/forms",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Fully functional inertia react forms with client side validations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18next",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@gmcode/react-ui": "0.
|
|
35
|
+
"@gmcode/react-ui": "0.4.1",
|
|
36
36
|
"@gmcode/tsv-hookform": "0.1.8",
|
|
37
37
|
"@gmcode/tsv-input": "0.3.3",
|
|
38
38
|
"i18next": "^26.3.4",
|
|
@@ -51,10 +51,11 @@
|
|
|
51
51
|
"@types/react": "^19.2.17",
|
|
52
52
|
"@types/react-dom": "^19.2.3",
|
|
53
53
|
"msw": "^2.15.0",
|
|
54
|
+
"sonner": "^2.0.8",
|
|
54
55
|
"typescript": "^6.0.3",
|
|
55
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.
|
|
56
|
-
"vite-plus": "0.3.
|
|
57
|
-
"vitest": "4.1.
|
|
56
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.3",
|
|
57
|
+
"vite-plus": "0.3.3",
|
|
58
|
+
"vitest": "4.1.11",
|
|
58
59
|
"vitest-browser-react": "^2.2.0"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|