@fuf-stack/uniform 1.26.1 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/Checkboxes/index.d.mts +8 -8
- package/dist/Checkboxes/index.d.mts.map +1 -1
- package/dist/Checkboxes/index.mjs +2 -1
- package/dist/Checkboxes/index.mjs.map +1 -1
- package/dist/DatePicker/index.d.mts +12 -12
- package/dist/DatePicker/index.d.mts.map +1 -1
- package/dist/DatePicker/index.mjs +2 -1
- package/dist/DatePicker/index.mjs.map +1 -1
- package/dist/FieldArray/index.d.mts +10 -10
- package/dist/FieldArray/index.d.mts.map +1 -1
- package/dist/FieldArray/index.mjs +3 -5
- package/dist/FieldArray/index.mjs.map +1 -1
- package/dist/FieldCard/index.d.mts +8 -8
- package/dist/FieldCard/index.d.mts.map +1 -1
- package/dist/FieldCard/index.mjs +5 -3
- package/dist/FieldCard/index.mjs.map +1 -1
- package/dist/{FieldCopyTestIdButton-CRJBix9D.mjs → FieldCopyTestIdButton-9xTF-DBW.mjs} +2 -2
- package/dist/FieldCopyTestIdButton-9xTF-DBW.mjs.map +1 -0
- package/dist/Form/index.d.mts +12 -12
- package/dist/Form/index.d.mts.map +1 -1
- package/dist/Form/index.mjs +11 -8
- package/dist/Form/index.mjs.map +1 -1
- package/dist/{FormContext-gHSwOlcy.mjs → FormContext-CB7Glm02.mjs} +213 -14
- package/dist/FormContext-CB7Glm02.mjs.map +1 -0
- package/dist/FormContext-CsFiNvuJ.d.mts.map +1 -1
- package/dist/Input/index.d.mts +20 -16
- package/dist/Input/index.d.mts.map +1 -1
- package/dist/Input/index.mjs +107 -10
- package/dist/Input/index.mjs.map +1 -1
- package/dist/RadioBoxes/index.d.mts +22 -22
- package/dist/RadioBoxes/index.d.mts.map +1 -1
- package/dist/RadioBoxes/index.mjs +5 -3
- package/dist/RadioBoxes/index.mjs.map +1 -1
- package/dist/RadioTabs/index.d.mts +8 -8
- package/dist/RadioTabs/index.d.mts.map +1 -1
- package/dist/RadioTabs/index.mjs +3 -2
- package/dist/RadioTabs/index.mjs.map +1 -1
- package/dist/Radios/index.d.mts +12 -12
- package/dist/Radios/index.d.mts.map +1 -1
- package/dist/Radios/index.mjs +2 -1
- package/dist/Radios/index.mjs.map +1 -1
- package/dist/Select/index.d.mts +24 -24
- package/dist/Select/index.d.mts.map +1 -1
- package/dist/Select/index.mjs +5 -3
- package/dist/Select/index.mjs.map +1 -1
- package/dist/Slider/index.d.mts +34 -31
- package/dist/Slider/index.d.mts.map +1 -1
- package/dist/Slider/index.mjs +16 -6
- package/dist/Slider/index.mjs.map +1 -1
- package/dist/Switch/index.d.mts +12 -12
- package/dist/Switch/index.d.mts.map +1 -1
- package/dist/Switch/index.mjs +2 -1
- package/dist/Switch/index.mjs.map +1 -1
- package/dist/SwitchBox/index.d.mts +12 -12
- package/dist/SwitchBox/index.d.mts.map +1 -1
- package/dist/SwitchBox/index.mjs +3 -2
- package/dist/SwitchBox/index.mjs.map +1 -1
- package/dist/TextArea/index.mjs +2 -1
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Time/index.d.mts +12 -12
- package/dist/Time/index.d.mts.map +1 -1
- package/dist/Time/index.mjs +8 -3
- package/dist/Time/index.mjs.map +1 -1
- package/dist/helpers/index.d.mts +10 -11
- package/dist/helpers/index.d.mts.map +1 -1
- package/dist/hooks/useClientValidation/index.d.mts +2 -3
- package/dist/hooks/useClientValidation/index.d.mts.map +1 -1
- package/dist/hooks/useClientValidation/index.mjs +3 -2
- package/dist/hooks/useClientValidation/index.mjs.map +1 -1
- package/dist/hooks/useController/index.mjs +1 -1
- package/dist/hooks/useFormContext/index.d.mts +2 -2
- package/dist/hooks/useFormContext/index.mjs +1 -1
- package/dist/hooks/useInputValueDebounce/index.d.mts +3 -4
- package/dist/hooks/useInputValueDebounce/index.d.mts.map +1 -1
- package/dist/hooks/useInputValueDebounce/index.mjs +6 -4
- package/dist/hooks/useInputValueDebounce/index.mjs.map +1 -1
- package/dist/hooks/useUniformField/index.d.mts +6 -5
- package/dist/hooks/useUniformField/index.d.mts.map +1 -1
- package/dist/hooks/useUniformField/index.mjs +8 -5
- package/dist/hooks/useUniformField/index.mjs.map +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.mts +4 -5
- package/dist/hooks/useUniformFieldArray/index.d.mts.map +1 -1
- package/dist/hooks/useUniformFieldArray/index.mjs +1 -1
- package/dist/hooks/useWatchFormReset/index.d.mts +2 -3
- package/dist/hooks/useWatchFormReset/index.d.mts.map +1 -1
- package/dist/hooks/useWatchFormReset/index.mjs +1 -1
- package/dist/hooks/useWatchUserChange/index.d.mts +2 -3
- package/dist/hooks/useWatchUserChange/index.d.mts.map +1 -1
- package/dist/hooks/useWatchUserChange/index.mjs +25 -13
- package/dist/hooks/useWatchUserChange/index.mjs.map +1 -1
- package/dist/index-CwJo1b4Z.d.mts +1 -0
- package/dist/partials/FieldCopyTestIdButton/index.mjs +1 -1
- package/dist/{useController-CK39i6HI.mjs → useController-BBSbeKbn.mjs} +2 -2
- package/dist/{useController-CK39i6HI.mjs.map → useController-BBSbeKbn.mjs.map} +1 -1
- package/dist/{useFormContext-B3QGVVaO.d.mts → useFormContext-BegmYvGA.d.mts} +3 -3
- package/dist/{useFormContext-B3QGVVaO.d.mts.map → useFormContext-BegmYvGA.d.mts.map} +1 -1
- package/dist/{useFormContext-Bw4LokAf.mjs → useFormContext-DNb_B8LQ.mjs} +6 -4
- package/dist/{useFormContext-Bw4LokAf.mjs.map → useFormContext-DNb_B8LQ.mjs.map} +1 -1
- package/package.json +8 -8
- package/dist/FieldCopyTestIdButton-CRJBix9D.mjs.map +0 -1
- package/dist/FormContext-gHSwOlcy.mjs.map +0 -1
- package/dist/index-D5HVU2jP.d.mts +0 -1
package/dist/Form/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { ReactNode } from "react";
|
|
|
4
4
|
import { FieldValues, SubmitHandler } from "react-hook-form";
|
|
5
5
|
import { VetoInstance } from "@fuf-stack/veto";
|
|
6
6
|
//#region src/Form/Form.d.ts
|
|
7
|
-
declare const formVariants: ((props?: ({
|
|
7
|
+
export declare const formVariants: ((props?: ({
|
|
8
8
|
[x: string]: string | number | undefined;
|
|
9
9
|
[x: number]: string | number | undefined;
|
|
10
10
|
} & ({
|
|
@@ -865,8 +865,8 @@ declare const formVariants: ((props?: ({
|
|
|
865
865
|
defaultVariants: {};
|
|
866
866
|
compoundVariants: ({} & ({
|
|
867
867
|
class?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
868
|
-
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
869
868
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
869
|
+
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
870
870
|
debugViewer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
871
871
|
debugViewerCopyButtonToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
872
872
|
debugViewerHeader?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -877,8 +877,8 @@ declare const formVariants: ((props?: ({
|
|
|
877
877
|
} | {
|
|
878
878
|
class?: never;
|
|
879
879
|
className?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
880
|
-
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
881
880
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
881
|
+
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
882
882
|
debugViewer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
883
883
|
debugViewerCopyButtonToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
884
884
|
debugViewerHeader?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -887,7 +887,7 @@ declare const formVariants: ((props?: ({
|
|
|
887
887
|
};
|
|
888
888
|
}))[];
|
|
889
889
|
compoundSlots: ({
|
|
890
|
-
slots: ("
|
|
890
|
+
slots: ("base" | "form" | "debugViewer" | "debugViewerCopyButtonToggle" | "debugViewerHeader" | "debugViewerJson" | "debugViewerTriggerButton")[];
|
|
891
891
|
} & ({} & ({
|
|
892
892
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
893
893
|
className?: never;
|
|
@@ -917,8 +917,8 @@ declare const formVariants: ((props?: ({
|
|
|
917
917
|
variants: {
|
|
918
918
|
[key: string]: {
|
|
919
919
|
[key: string]: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
920
|
-
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
921
920
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
921
|
+
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
922
922
|
debugViewer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
923
923
|
debugViewerCopyButtonToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
924
924
|
debugViewerHeader?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -929,8 +929,8 @@ declare const formVariants: ((props?: ({
|
|
|
929
929
|
} | {
|
|
930
930
|
[x: string]: {
|
|
931
931
|
[x: string]: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
932
|
-
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
933
932
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
933
|
+
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
934
934
|
debugViewer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
935
935
|
debugViewerCopyButtonToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
936
936
|
debugViewerHeader?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -942,8 +942,8 @@ declare const formVariants: ((props?: ({
|
|
|
942
942
|
defaultVariants: {};
|
|
943
943
|
compoundVariants: ({} & ({
|
|
944
944
|
class?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
945
|
-
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
946
945
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
946
|
+
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
947
947
|
debugViewer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
948
948
|
debugViewerCopyButtonToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
949
949
|
debugViewerHeader?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -954,8 +954,8 @@ declare const formVariants: ((props?: ({
|
|
|
954
954
|
} | {
|
|
955
955
|
class?: never;
|
|
956
956
|
className?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
957
|
-
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
958
957
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
958
|
+
form?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
959
959
|
debugViewer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
960
960
|
debugViewerCopyButtonToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
961
961
|
debugViewerHeader?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -964,7 +964,7 @@ declare const formVariants: ((props?: ({
|
|
|
964
964
|
};
|
|
965
965
|
}))[];
|
|
966
966
|
compoundSlots: (({
|
|
967
|
-
slots: ("
|
|
967
|
+
slots: ("base" | "form" | "debugViewer" | "debugViewerCopyButtonToggle" | "debugViewerHeader" | "debugViewerJson" | "debugViewerTriggerButton")[];
|
|
968
968
|
} & ({
|
|
969
969
|
[x: string]: string | number | (string | number)[] | undefined;
|
|
970
970
|
} & ({
|
|
@@ -974,7 +974,7 @@ declare const formVariants: ((props?: ({
|
|
|
974
974
|
class?: never;
|
|
975
975
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
976
976
|
}))) | ({
|
|
977
|
-
slots: ("
|
|
977
|
+
slots: ("base" | "form" | "debugViewer" | "debugViewerCopyButtonToggle" | "debugViewerHeader" | "debugViewerJson" | "debugViewerTriggerButton")[];
|
|
978
978
|
} & ({
|
|
979
979
|
[x: string]: string | number | (string | number)[] | undefined;
|
|
980
980
|
} & ({
|
|
@@ -984,7 +984,7 @@ declare const formVariants: ((props?: ({
|
|
|
984
984
|
class?: never;
|
|
985
985
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
986
986
|
}))) | ({
|
|
987
|
-
slots: ("
|
|
987
|
+
slots: ("base" | "form" | "debugViewer" | "debugViewerCopyButtonToggle" | "debugViewerHeader" | "debugViewerJson" | "debugViewerTriggerButton")[];
|
|
988
988
|
} & ({} & ({
|
|
989
989
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
990
990
|
className?: never;
|
|
@@ -1025,5 +1025,5 @@ interface FormProps extends VariantProps {
|
|
|
1025
1025
|
*/
|
|
1026
1026
|
declare const Form: ({ children, className, debug, initialValues, name, onSubmit, remoteFormId, testId, validation, validationTrigger }: FormProps) => import("react").JSX.Element;
|
|
1027
1027
|
//#endregion
|
|
1028
|
-
export { type FormProps, Form as default
|
|
1028
|
+
export { type FormProps, Form as default };
|
|
1029
1029
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/Form/Form.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/Form/Form.tsx"],"mappings":";;;;;;qBAea,gBAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmBpB,eAAe,eAAe;KAC9B,YAAY,mBAAmB;UAEnB,kBAAkB;;EAEjC,UAAU,YAAY;;EAEtB,YAAY;;EAEZ,QAAQ;;EAER,gBAAgB;;EAEhB;;EAEA,UAAU,cAAc;;;;EAIxB;;EAEA;;EAEA,aAAa;;EAEb;;;;;cAMI,SAAQ,UAAA,WAAA,OAAA,eAAA,MAAA,UAAA,cAAA,QAAA,YAAA,qBAWX,8BAAS,IAAA"}
|
package/dist/Form/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as FormProvider } from "../FormContext-
|
|
2
|
-
import { n as useFormContext } from "../useFormContext-
|
|
1
|
+
import { i as useSensitiveDebug, r as redactDebugData, t as FormProvider } from "../FormContext-CB7Glm02.mjs";
|
|
2
|
+
import { n as useFormContext } from "../useFormContext-DNb_B8LQ.mjs";
|
|
3
3
|
import { slugify, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
import { FaBug, FaBullseye } from "react-icons/fa6";
|
|
6
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { FaBug, FaBullseye } from "react-icons/fa6";
|
|
7
7
|
import { FaTimes } from "react-icons/fa";
|
|
8
8
|
import { Button } from "@fuf-stack/pixels/Button";
|
|
9
9
|
import { Card } from "@fuf-stack/pixels/Card";
|
|
@@ -24,10 +24,12 @@ const formDebugViewerVariants = tv({ slots: {
|
|
|
24
24
|
/** Renders a form debug panel with information about the current form state */
|
|
25
25
|
const FormDebugViewer = ({ className = void 0 }) => {
|
|
26
26
|
const { debugMode, formState: { isValid, isSubmitting, submitCount, isSubmitSuccessful }, getValues, setDebugMode, validation: { errors }, subscribe } = useFormContext();
|
|
27
|
+
const { paths: sensitivePaths, ready: sensitiveFieldsReady } = useSensitiveDebug();
|
|
27
28
|
const showDebugButton = debugMode === "off";
|
|
28
29
|
const showDebugCard = debugMode === "debug" || debugMode === "debug-testids";
|
|
29
30
|
const showDebugTestIds = debugMode === "debug-testids";
|
|
30
|
-
const
|
|
31
|
+
const variants = formDebugViewerVariants();
|
|
32
|
+
const classNames = variantsToClassNames(variants, className, "base");
|
|
31
33
|
const cardClassNames = {
|
|
32
34
|
base: classNames.base,
|
|
33
35
|
header: classNames.header
|
|
@@ -58,7 +60,7 @@ const FormDebugViewer = ({ className = void 0 }) => {
|
|
|
58
60
|
onClick: handleShowDebugMode,
|
|
59
61
|
variant: "light"
|
|
60
62
|
});
|
|
61
|
-
if (!showDebugCard) return null;
|
|
63
|
+
if (!showDebugCard || !sensitiveFieldsReady) return null;
|
|
62
64
|
return /* @__PURE__ */ jsxs(Card, {
|
|
63
65
|
className: cardClassNames,
|
|
64
66
|
header: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -84,8 +86,8 @@ const FormDebugViewer = ({ className = void 0 }) => {
|
|
|
84
86
|
}), /* @__PURE__ */ jsx(Json, {
|
|
85
87
|
className: classNames.json,
|
|
86
88
|
value: {
|
|
87
|
-
values,
|
|
88
|
-
errors: errors ?? null,
|
|
89
|
+
values: redactDebugData(values, sensitivePaths),
|
|
90
|
+
errors: redactDebugData(errors ?? null, sensitivePaths),
|
|
89
91
|
submit: {
|
|
90
92
|
isValid,
|
|
91
93
|
isSubmitting,
|
|
@@ -119,7 +121,8 @@ const formVariants = tv({ slots: {
|
|
|
119
121
|
* Form component that has to wrap every uniform
|
|
120
122
|
*/
|
|
121
123
|
const Form = ({ children, className = void 0, debug = void 0, initialValues = void 0, name = void 0, onSubmit, remoteFormId = void 0, testId = void 0, validation = void 0, validationTrigger = "all" }) => {
|
|
122
|
-
const
|
|
124
|
+
const variants = formVariants();
|
|
125
|
+
const classNames = variantsToClassNames(variants, className, "base");
|
|
123
126
|
const debugViewerClassNames = {
|
|
124
127
|
base: classNames.debugViewer,
|
|
125
128
|
copyButtonToggle: classNames.debugViewerCopyButtonToggle,
|
package/dist/Form/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/Form/subcomponents/FormDebugViewer.tsx","../../src/Form/Form.tsx","../../src/Form/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { CardProps } from '@fuf-stack/pixels/Card';\n\nimport { useEffect, useState } from 'react';\nimport { FaTimes } from 'react-icons/fa';\nimport { FaBug, FaBullseye } from 'react-icons/fa6';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels/Button';\nimport { Card } from '@fuf-stack/pixels/Card';\nimport { Json } from '@fuf-stack/pixels/Json';\n\nimport { useFormContext } from '../../hooks/useFormContext';\n\n// form debug viewer styling variants\nexport const formDebugViewerVariants = tv({\n slots: {\n /** class of the debug card */\n base: '',\n /** class of the button that toggles the field copy testid buttons */\n copyButtonToggle: 'mb-4 ml-auto mr-auto',\n /** class of the debug card header */\n header: 'justify-between',\n /** class of the json viewer */\n json: '',\n /** class of the button that enables debug mode */\n triggerButton: 'fixed bottom-2.5 right-2.5 w-5 text-default-400',\n },\n});\n\ntype VariantProps = TVProps<typeof formDebugViewerVariants>;\ntype ClassName = TVClassName<typeof formDebugViewerVariants>;\n\nexport interface FormDebugViewerProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n}\n\n/** Renders a form debug panel with information about the current form state */\nconst FormDebugViewer = ({ className = undefined }: FormDebugViewerProps) => {\n const {\n debugMode,\n formState: { isValid, isSubmitting, submitCount, isSubmitSuccessful },\n getValues,\n setDebugMode,\n validation: { errors },\n subscribe,\n } = useFormContext();\n\n const showDebugButton = debugMode === 'off';\n const showDebugCard = debugMode === 'debug' || debugMode === 'debug-testids';\n const showDebugTestIds = debugMode === 'debug-testids';\n\n // classNames from slots\n const variants = formDebugViewerVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n const cardClassNames: CardProps['className'] = {\n base: classNames.base,\n header: classNames.header,\n };\n\n // We intentionally keep the local state + subscription approach here.\n // A previous useSyncExternalStore refactor caused unstable runtime behavior\n // in consuming wizard apps (max update depth loops inside react-json-view).\n // Keeping this explicit state bridge is the currently stable baseline.\n // Use subscribe instead of watch() to avoid triggering re-renders on parent components.\n // This component manages its own state and only updates itself when form values change.\n const [values, setValues] = useState<Record<string, unknown>>(() => {\n return getValues() ?? {};\n });\n\n useEffect(() => {\n // Only subscribe when debug card is visible\n if (!showDebugCard) {\n return undefined;\n }\n\n const subscription = subscribe({\n formState: { values: true },\n callback: (state) => {\n setValues(state.values ?? {});\n },\n });\n\n return () => {\n subscription();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showDebugCard]);\n\n // handle show debug mode\n const handleShowDebugMode = () => {\n // Seed current values on open from an event handler (not effect body)\n // to avoid cascading-render lint warnings for sync setState in effects.\n setValues(getValues() ?? {});\n // set debug mode to debug\n setDebugMode('debug');\n };\n\n if (showDebugButton) {\n return (\n <Button\n ariaLabel=\"Enable form debug mode\"\n className={classNames.triggerButton}\n icon={<FaBug />}\n onClick={handleShowDebugMode}\n variant=\"light\"\n />\n );\n }\n\n // do not show card\n if (!showDebugCard) {\n return null;\n }\n\n return (\n <Card\n className={cardClassNames}\n header={\n <>\n <span className=\"text-lg\">Debug Mode</span>\n <Button\n color=\"danger\"\n icon={<FaTimes />}\n onClick={() => {\n setDebugMode('off');\n }}\n size=\"sm\"\n variant=\"light\"\n />\n </>\n }\n >\n <Button\n className={classNames.copyButtonToggle}\n icon={<FaBullseye />}\n onClick={() => {\n setDebugMode(debugMode === 'debug' ? 'debug-testids' : 'debug');\n }}\n variant={showDebugTestIds ? 'solid' : 'light'}\n >\n {showDebugTestIds ? 'Hide CopyButton' : 'Show CopyButton'}\n </Button>\n <Json\n className={classNames.json}\n value={{\n values,\n errors: errors ?? null,\n submit: {\n isValid,\n isSubmitting,\n isSubmitSuccessful,\n submitCount,\n },\n }}\n />\n </Card>\n );\n};\n\nexport default FormDebugViewer;\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { VetoInstance } from '@fuf-stack/veto';\nimport type { ReactNode } from 'react';\nimport type { FieldValues, SubmitHandler } from 'react-hook-form';\nimport type { DebugModeSettings } from './subcomponents/FormContext';\nimport type { FormDebugViewerProps } from './subcomponents/FormDebugViewer';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport FormProvider from './subcomponents/FormContext';\nimport FormDebugViewer from './subcomponents/FormDebugViewer';\n\nconst IS_TEST = process.env.NODE_ENV === 'test';\n\n// form styling variants\nexport const formVariants = tv({\n slots: {\n /** class of the wrapper around form and debug viewer */\n base: 'flex w-full flex-row justify-between gap-6',\n /** class of the debug viewer card */\n debugViewer: 'w-96 shrink',\n /** class of the debug viewer button that toggles the field copy testid buttons */\n debugViewerCopyButtonToggle: '',\n /** class of the debug viewer card header */\n debugViewerHeader: '',\n /** class of the debug viewer json viewer */\n debugViewerJson: '',\n /** class of the debug viewer trigger button */\n debugViewerTriggerButton: '',\n /** class of the HTML form element */\n form: 'grow',\n },\n});\n\ntype VariantProps = TVProps<typeof formVariants>;\ntype ClassName = TVClassName<typeof formVariants>;\n\nexport interface FormProps extends VariantProps {\n /** form children */\n children: ReactNode | ReactNode[];\n /** CSS class name */\n className?: ClassName;\n /** settings for from debug mode */\n debug?: DebugModeSettings;\n /** initial form values */\n initialValues?: FieldValues;\n /** name of the form */\n name?: string;\n /** form submit handler */\n onSubmit: SubmitHandler<FieldValues>;\n /** id set as the form's HTML `id`, so a SubmitButton rendered OUTSIDE this\n * form (e.g. a modal footer) can be associated with it via its own\n * `remoteFormId` prop (native HTML `form` attribute) */\n remoteFormId?: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** veto validation schema */\n validation?: VetoInstance;\n /** when the validation should be triggered */\n validationTrigger?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n}\n\n/**\n * Form component that has to wrap every uniform\n */\nconst Form = ({\n children,\n className = undefined,\n debug = undefined,\n initialValues = undefined,\n name = undefined,\n onSubmit,\n remoteFormId = undefined,\n testId = undefined,\n validation = undefined,\n validationTrigger = 'all',\n}: FormProps) => {\n // classNames from slots\n const variants = formVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n const debugViewerClassNames: FormDebugViewerProps['className'] = {\n base: classNames.debugViewer,\n copyButtonToggle: classNames.debugViewerCopyButtonToggle,\n header: classNames.debugViewerHeader,\n json: classNames.debugViewerJson,\n triggerButton: classNames.debugViewerTriggerButton,\n };\n\n return (\n <FormProvider\n debugModeSettings={debug}\n initialValues={initialValues}\n onSubmit={onSubmit}\n validation={validation}\n validationTrigger={validationTrigger}\n >\n {({ handleSubmit, isValid }) => {\n return (\n <div className={classNames.base}>\n <form\n className={classNames.form}\n data-form-is-valid={isValid}\n data-testid={slugify(testId ?? name ?? '')}\n id={remoteFormId}\n name={name}\n // disable native HTML constraint validation so an invalid submit\n // (e.g. pressing Enter with empty required fields) still fires the\n // submit event and lets react-hook-form/veto validate and show\n // field errors, instead of the browser blocking the submit.\n noValidate\n onSubmit={handleSubmit}\n >\n {children}\n </form>\n {/* render debug viewer when not in test environment and debug not disabled */}\n {!IS_TEST && !debug?.disable && (\n <FormDebugViewer className={debugViewerClassNames} />\n )}\n </div>\n );\n }}\n </FormProvider>\n );\n};\n\nexport default Form;\n","import Form from './Form';\n\nexport type { FormProps } from './Form';\n\nexport { formVariants } from './Form';\n\nexport default Form;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/Form/subcomponents/FormDebugViewer.tsx","../../src/Form/Form.tsx","../../src/Form/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { CardProps } from '@fuf-stack/pixels/Card';\n\nimport { useEffect, useState } from 'react';\nimport { FaTimes } from 'react-icons/fa';\nimport { FaBug, FaBullseye } from 'react-icons/fa6';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels/Button';\nimport { Card } from '@fuf-stack/pixels/Card';\nimport { Json } from '@fuf-stack/pixels/Json';\n\nimport { useFormContext } from '../../hooks/useFormContext';\nimport { redactDebugData, useSensitiveDebug } from './SensitiveFields';\n\n// form debug viewer styling variants\nexport const formDebugViewerVariants = tv({\n slots: {\n /** class of the debug card */\n base: '',\n /** class of the button that toggles the field copy testid buttons */\n copyButtonToggle: 'mb-4 ml-auto mr-auto',\n /** class of the debug card header */\n header: 'justify-between',\n /** class of the json viewer */\n json: '',\n /** class of the button that enables debug mode */\n triggerButton: 'fixed bottom-2.5 right-2.5 w-5 text-default-400',\n },\n});\n\ntype VariantProps = TVProps<typeof formDebugViewerVariants>;\ntype ClassName = TVClassName<typeof formDebugViewerVariants>;\n\nexport interface FormDebugViewerProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n}\n\n/** Renders a form debug panel with information about the current form state */\nconst FormDebugViewer = ({ className = undefined }: FormDebugViewerProps) => {\n const {\n debugMode,\n formState: { isValid, isSubmitting, submitCount, isSubmitSuccessful },\n getValues,\n setDebugMode,\n validation: { errors },\n subscribe,\n } = useFormContext();\n\n const { paths: sensitivePaths, ready: sensitiveFieldsReady } =\n useSensitiveDebug();\n\n const showDebugButton = debugMode === 'off';\n const showDebugCard = debugMode === 'debug' || debugMode === 'debug-testids';\n const showDebugTestIds = debugMode === 'debug-testids';\n\n // classNames from slots\n const variants = formDebugViewerVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n const cardClassNames: CardProps['className'] = {\n base: classNames.base,\n header: classNames.header,\n };\n\n // We intentionally keep the local state + subscription approach here.\n // A previous useSyncExternalStore refactor caused unstable runtime behavior\n // in consuming wizard apps (max update depth loops inside react-json-view).\n // Keeping this explicit state bridge is the currently stable baseline.\n // Use subscribe instead of watch() to avoid triggering re-renders on parent components.\n // This component manages its own state and only updates itself when form values change.\n const [values, setValues] = useState<Record<string, unknown>>(() => {\n return getValues() ?? {};\n });\n\n useEffect(() => {\n // Only subscribe when debug card is visible\n if (!showDebugCard) {\n return undefined;\n }\n\n const subscription = subscribe({\n formState: { values: true },\n callback: (state) => {\n setValues(state.values ?? {});\n },\n });\n\n return () => {\n subscription();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showDebugCard]);\n\n // handle show debug mode\n const handleShowDebugMode = () => {\n // Seed current values on open from an event handler (not effect body)\n // to avoid cascading-render lint warnings for sync setState in effects.\n setValues(getValues() ?? {});\n // set debug mode to debug\n setDebugMode('debug');\n };\n\n if (showDebugButton) {\n return (\n <Button\n ariaLabel=\"Enable form debug mode\"\n className={classNames.triggerButton}\n icon={<FaBug />}\n onClick={handleShowDebugMode}\n variant=\"light\"\n />\n );\n }\n\n // do not show card\n if (!showDebugCard || !sensitiveFieldsReady) {\n return null;\n }\n\n return (\n <Card\n className={cardClassNames}\n header={\n <>\n <span className=\"text-lg\">Debug Mode</span>\n <Button\n color=\"danger\"\n icon={<FaTimes />}\n onClick={() => {\n setDebugMode('off');\n }}\n size=\"sm\"\n variant=\"light\"\n />\n </>\n }\n >\n <Button\n className={classNames.copyButtonToggle}\n icon={<FaBullseye />}\n onClick={() => {\n setDebugMode(debugMode === 'debug' ? 'debug-testids' : 'debug');\n }}\n variant={showDebugTestIds ? 'solid' : 'light'}\n >\n {showDebugTestIds ? 'Hide CopyButton' : 'Show CopyButton'}\n </Button>\n <Json\n className={classNames.json}\n value={{\n values: redactDebugData(values, sensitivePaths),\n errors: redactDebugData(errors ?? null, sensitivePaths),\n submit: {\n isValid,\n isSubmitting,\n isSubmitSuccessful,\n submitCount,\n },\n }}\n />\n </Card>\n );\n};\n\nexport default FormDebugViewer;\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { VetoInstance } from '@fuf-stack/veto';\nimport type { ReactNode } from 'react';\nimport type { FieldValues, SubmitHandler } from 'react-hook-form';\nimport type { DebugModeSettings } from './subcomponents/FormContext';\nimport type { FormDebugViewerProps } from './subcomponents/FormDebugViewer';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport FormProvider from './subcomponents/FormContext';\nimport FormDebugViewer from './subcomponents/FormDebugViewer';\n\nconst IS_TEST = process.env.NODE_ENV === 'test';\n\n// form styling variants\nexport const formVariants = tv({\n slots: {\n /** class of the wrapper around form and debug viewer */\n base: 'flex w-full flex-row justify-between gap-6',\n /** class of the debug viewer card */\n debugViewer: 'w-96 shrink',\n /** class of the debug viewer button that toggles the field copy testid buttons */\n debugViewerCopyButtonToggle: '',\n /** class of the debug viewer card header */\n debugViewerHeader: '',\n /** class of the debug viewer json viewer */\n debugViewerJson: '',\n /** class of the debug viewer trigger button */\n debugViewerTriggerButton: '',\n /** class of the HTML form element */\n form: 'grow',\n },\n});\n\ntype VariantProps = TVProps<typeof formVariants>;\ntype ClassName = TVClassName<typeof formVariants>;\n\nexport interface FormProps extends VariantProps {\n /** form children */\n children: ReactNode | ReactNode[];\n /** CSS class name */\n className?: ClassName;\n /** settings for from debug mode */\n debug?: DebugModeSettings;\n /** initial form values */\n initialValues?: FieldValues;\n /** name of the form */\n name?: string;\n /** form submit handler */\n onSubmit: SubmitHandler<FieldValues>;\n /** id set as the form's HTML `id`, so a SubmitButton rendered OUTSIDE this\n * form (e.g. a modal footer) can be associated with it via its own\n * `remoteFormId` prop (native HTML `form` attribute) */\n remoteFormId?: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** veto validation schema */\n validation?: VetoInstance;\n /** when the validation should be triggered */\n validationTrigger?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n}\n\n/**\n * Form component that has to wrap every uniform\n */\nconst Form = ({\n children,\n className = undefined,\n debug = undefined,\n initialValues = undefined,\n name = undefined,\n onSubmit,\n remoteFormId = undefined,\n testId = undefined,\n validation = undefined,\n validationTrigger = 'all',\n}: FormProps) => {\n // classNames from slots\n const variants = formVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n const debugViewerClassNames: FormDebugViewerProps['className'] = {\n base: classNames.debugViewer,\n copyButtonToggle: classNames.debugViewerCopyButtonToggle,\n header: classNames.debugViewerHeader,\n json: classNames.debugViewerJson,\n triggerButton: classNames.debugViewerTriggerButton,\n };\n\n return (\n <FormProvider\n debugModeSettings={debug}\n initialValues={initialValues}\n onSubmit={onSubmit}\n validation={validation}\n validationTrigger={validationTrigger}\n >\n {({ handleSubmit, isValid }) => {\n return (\n <div className={classNames.base}>\n <form\n className={classNames.form}\n data-form-is-valid={isValid}\n data-testid={slugify(testId ?? name ?? '')}\n id={remoteFormId}\n name={name}\n // disable native HTML constraint validation so an invalid submit\n // (e.g. pressing Enter with empty required fields) still fires the\n // submit event and lets react-hook-form/veto validate and show\n // field errors, instead of the browser blocking the submit.\n noValidate\n onSubmit={handleSubmit}\n >\n {children}\n </form>\n {/* render debug viewer when not in test environment and debug not disabled */}\n {!IS_TEST && !debug?.disable && (\n <FormDebugViewer className={debugViewerClassNames} />\n )}\n </div>\n );\n }}\n </FormProvider>\n );\n};\n\nexport default Form;\n","import Form from './Form';\n\nexport type { FormProps } from './Form';\n\nexport { formVariants } from './Form';\n\nexport default Form;\n"],"mappings":"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"}
|
|
@@ -1,10 +1,203 @@
|
|
|
1
1
|
import { toFormFormat, toSubmitFormat, toValidationFormat } from "./helpers/index.mjs";
|
|
2
|
-
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
2
|
+
import React, { createContext, useCallback, useContext, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { useLocalStorage } from "@fuf-stack/pixels";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { FormProvider, useForm } from "react-hook-form";
|
|
6
6
|
import createDebug from "debug";
|
|
7
7
|
import { and, veto } from "@fuf-stack/veto";
|
|
8
|
+
//#region src/Form/subcomponents/SensitiveFields.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Diagnostic redaction for explicitly registered form paths.
|
|
11
|
+
*
|
|
12
|
+
* Flow:
|
|
13
|
+
* 1. FormProvider creates one registry for its form and supplies it through context.
|
|
14
|
+
* 2. useUniformField calls useSensitiveField for declared password inputs and
|
|
15
|
+
* fields marked sensitive. This module does not infer secrets from names,
|
|
16
|
+
* inspect the DOM, or search strings for password-like content.
|
|
17
|
+
* 3. Field layout effects register their paths before the provider marks the
|
|
18
|
+
* initial registry ready. The debug viewer waits for that ready signal.
|
|
19
|
+
* 4. The viewer and Uniform's debug logger redact diagnostic copies using the
|
|
20
|
+
* same registry. JSON copy actions receive the viewer's redacted data too.
|
|
21
|
+
*
|
|
22
|
+
* This is protection against accidental disclosure in Uniform diagnostics,
|
|
23
|
+
* not encryption or a boundary against browser inspection. Real values remain
|
|
24
|
+
* available to inputs, validation, submission, and application callbacks.
|
|
25
|
+
* Application logging and secrets embedded in unrelated paths/custom messages
|
|
26
|
+
* are outside this path-based redaction mechanism.
|
|
27
|
+
*/
|
|
28
|
+
const REDACTED = "[REDACTED]";
|
|
29
|
+
/**
|
|
30
|
+
* Build a diagnostic copy with each registered field replaced by [REDACTED].
|
|
31
|
+
*
|
|
32
|
+
* Matching a field masks its entire subtree. For validation errors, that also
|
|
33
|
+
* removes error metadata/messages beneath that field, which may contain input.
|
|
34
|
+
* The source object is never changed: redacting form state itself would corrupt
|
|
35
|
+
* validation and the values ultimately delivered to onSubmit.
|
|
36
|
+
*
|
|
37
|
+
* Paths use React Hook Form dot notation, with numeric bracket indices accepted
|
|
38
|
+
* as well. Normalization removes Uniform's __FLAT__ transport wrapper so the
|
|
39
|
+
* same registration covers raw form data and normalized/submitted array values.
|
|
40
|
+
*
|
|
41
|
+
* Traversal covers arrays and plain objects. Non-data instances such as dates
|
|
42
|
+
* and DOM refs are preserved unless their path or an ancestor is sensitive.
|
|
43
|
+
* This is deliberately not a general-purpose serializer or secret detector.
|
|
44
|
+
*
|
|
45
|
+
* @param data - Form values or errors destined for Uniform diagnostics
|
|
46
|
+
* @param paths - Sensitive field paths registered for this form
|
|
47
|
+
* @returns A diagnostic copy with registered fields replaced, or the unchanged
|
|
48
|
+
* primitive/non-data instance when no traversal is necessary
|
|
49
|
+
*/
|
|
50
|
+
const redactDebugData = (data, paths) => {
|
|
51
|
+
const sensitivePaths = new Set(paths.map((path) => {
|
|
52
|
+
return path.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => {
|
|
53
|
+
return part !== "__FLAT__";
|
|
54
|
+
}).join(".");
|
|
55
|
+
}));
|
|
56
|
+
const copies = /* @__PURE__ */ new WeakMap();
|
|
57
|
+
const visit = (value, path) => {
|
|
58
|
+
if (sensitivePaths.has(path)) return REDACTED;
|
|
59
|
+
if (!value || typeof value !== "object") return value;
|
|
60
|
+
const existing = copies.get(value);
|
|
61
|
+
if (existing) return existing;
|
|
62
|
+
if (Array.isArray(value)) {
|
|
63
|
+
const copy = [];
|
|
64
|
+
copies.set(value, copy);
|
|
65
|
+
value.forEach((item, index) => {
|
|
66
|
+
copy[index] = visit(item, path ? `${path}.${index}` : String(index));
|
|
67
|
+
});
|
|
68
|
+
copies.delete(value);
|
|
69
|
+
return copy;
|
|
70
|
+
}
|
|
71
|
+
const prototype = Object.getPrototypeOf(value);
|
|
72
|
+
if (prototype !== Object.prototype && prototype !== null) return value;
|
|
73
|
+
const copy = {};
|
|
74
|
+
copies.set(value, copy);
|
|
75
|
+
Object.entries(value).forEach(([key, entry]) => {
|
|
76
|
+
Object.defineProperty(copy, key, {
|
|
77
|
+
value: visit(entry, path ? `${path}.${key}` : key),
|
|
78
|
+
enumerable: true,
|
|
79
|
+
writable: true,
|
|
80
|
+
configurable: true
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
copies.delete(value);
|
|
84
|
+
return copy;
|
|
85
|
+
};
|
|
86
|
+
return visit(data, "");
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Create an isolated, append-only sensitivity registry for one form instance.
|
|
90
|
+
*
|
|
91
|
+
* Only field paths and readiness are stored here; the registry does not retain
|
|
92
|
+
* password values. Paths intentionally survive input unmounts, resets, and a
|
|
93
|
+
* later sensitive=false declaration because RHF can retain the original value.
|
|
94
|
+
* A new form instance gets a fresh registry; there is no cross-form path sharing.
|
|
95
|
+
*
|
|
96
|
+
* Snapshot objects stay referentially stable until metadata actually changes.
|
|
97
|
+
* useSyncExternalStore depends on that stability to avoid repeated renders.
|
|
98
|
+
*/
|
|
99
|
+
const createSensitiveFields = () => {
|
|
100
|
+
let snapshot = {
|
|
101
|
+
paths: [],
|
|
102
|
+
ready: false
|
|
103
|
+
};
|
|
104
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
105
|
+
const notify = () => {
|
|
106
|
+
listeners.forEach((listener) => {
|
|
107
|
+
listener();
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
/** Return the current stable metadata snapshot, without reading form values. */
|
|
112
|
+
getSnapshot: () => {
|
|
113
|
+
return snapshot;
|
|
114
|
+
},
|
|
115
|
+
/** Subscribe to metadata changes; cleanup removes the listener, not paths. */
|
|
116
|
+
subscribe: (listener) => {
|
|
117
|
+
listeners.add(listener);
|
|
118
|
+
return () => {
|
|
119
|
+
listeners.delete(listener);
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
/** Mark a path once; duplicate registrations and Strict Mode repeats are safe. */
|
|
123
|
+
register: (name) => {
|
|
124
|
+
if (snapshot.paths.includes(name)) return;
|
|
125
|
+
snapshot = {
|
|
126
|
+
...snapshot,
|
|
127
|
+
paths: [...snapshot.paths, name]
|
|
128
|
+
};
|
|
129
|
+
notify();
|
|
130
|
+
},
|
|
131
|
+
/** Allow the debug viewer to render after initial field registration finishes. */
|
|
132
|
+
ready: () => {
|
|
133
|
+
if (snapshot.ready) return;
|
|
134
|
+
snapshot = {
|
|
135
|
+
...snapshot,
|
|
136
|
+
ready: true
|
|
137
|
+
};
|
|
138
|
+
notify();
|
|
139
|
+
},
|
|
140
|
+
/** Use the latest paths for logs, even while the debug viewer is closed. */
|
|
141
|
+
redact: (data) => {
|
|
142
|
+
return redactDebugData(data, snapshot.paths);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
const defaultSensitiveFields = createSensitiveFields();
|
|
147
|
+
defaultSensitiveFields.ready();
|
|
148
|
+
const SensitiveFieldsContext = createContext(void 0);
|
|
149
|
+
/**
|
|
150
|
+
* Supply the form-owned registry and release the initial debug-render gate.
|
|
151
|
+
*
|
|
152
|
+
* React runs descendant layout effects before this provider's layout effect,
|
|
153
|
+
* so initially mounted fields register before ready becomes true. The viewer
|
|
154
|
+
* must not render raw values while ready is false, even if debug mode was
|
|
155
|
+
* restored from localStorage before the form's first render.
|
|
156
|
+
*/
|
|
157
|
+
const SensitiveFieldsProvider = ({ children, registry }) => {
|
|
158
|
+
useLayoutEffect(() => {
|
|
159
|
+
registry.ready();
|
|
160
|
+
}, [registry]);
|
|
161
|
+
return /* @__PURE__ */ jsx(SensitiveFieldsContext.Provider, {
|
|
162
|
+
value: registry,
|
|
163
|
+
children
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Register a field's sensitivity as declared by its renderer/shared field hook.
|
|
168
|
+
*
|
|
169
|
+
* Registration happens during commit, not render, so abandoned React renders
|
|
170
|
+
* cannot mutate the registry. Layout timing makes new registrations available
|
|
171
|
+
* before paint. Password detection uses the declared input type in
|
|
172
|
+
* useUniformField, so toggling the rendered type to text does not reveal debug
|
|
173
|
+
* values. Once registered, a path is never downgraded within this form instance.
|
|
174
|
+
*
|
|
175
|
+
* @param name - The field path used for form registration
|
|
176
|
+
* @param sensitive - Whether the renderer declares this field sensitive
|
|
177
|
+
*/
|
|
178
|
+
const useSensitiveField = (name, sensitive) => {
|
|
179
|
+
const registry = useContext(SensitiveFieldsContext);
|
|
180
|
+
useLayoutEffect(() => {
|
|
181
|
+
if (sensitive) registry?.register(name);
|
|
182
|
+
}, [
|
|
183
|
+
registry,
|
|
184
|
+
name,
|
|
185
|
+
sensitive
|
|
186
|
+
]);
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Observe sensitivity metadata for rendering diagnostic copies.
|
|
190
|
+
*
|
|
191
|
+
* This subscription contains neither passwords nor RHF's mutable value objects.
|
|
192
|
+
* The debug viewer keeps its existing value subscription and applies these paths
|
|
193
|
+
* when handing values/errors to Json; getValues and onSubmit stay untouched.
|
|
194
|
+
* Callers must honor ready before exposing an initial diagnostic payload.
|
|
195
|
+
*/
|
|
196
|
+
const useSensitiveDebug = () => {
|
|
197
|
+
const registry = useContext(SensitiveFieldsContext) ?? defaultSensitiveFields;
|
|
198
|
+
return useSyncExternalStore(registry.subscribe, registry.getSnapshot, registry.getSnapshot);
|
|
199
|
+
};
|
|
200
|
+
//#endregion
|
|
8
201
|
//#region src/Form/subcomponents/FormResolver.ts
|
|
9
202
|
/**
|
|
10
203
|
* Hook that manages client validation schemas state.
|
|
@@ -162,6 +355,9 @@ debug("UniformContext exported", {
|
|
|
162
355
|
* - React Hook Form context
|
|
163
356
|
*/
|
|
164
357
|
const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues = void 0, onSubmit, validation: baseValidation = void 0, validationTrigger }) => {
|
|
358
|
+
const sensitiveFields = useMemo(() => {
|
|
359
|
+
return createSensitiveFields();
|
|
360
|
+
}, []);
|
|
165
361
|
const [debugMode, setDebugMode] = useLocalStorage(debugModeSettings?.localStorageKey ?? DEBUG_MODE_LOCAL_STORAGE_KEY_DEFAULT, "off");
|
|
166
362
|
const { extendedValidation, setClientValidationSchema } = useExtendedValidation(baseValidation);
|
|
167
363
|
const { resolver, validationErrors, validationErrorsHash } = useFormResolver(extendedValidation);
|
|
@@ -200,9 +396,9 @@ const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues =
|
|
|
200
396
|
debug("handleSubmit called", {
|
|
201
397
|
preventSubmit,
|
|
202
398
|
formStateIsValid: methods.formState.isValid,
|
|
203
|
-
validationErrors: methods.formState.errors,
|
|
399
|
+
validationErrors: sensitiveFields.redact(methods.formState.errors),
|
|
204
400
|
validationTrigger,
|
|
205
|
-
formValues: methods.getValues()
|
|
401
|
+
formValues: sensitiveFields.redact(methods.getValues())
|
|
206
402
|
});
|
|
207
403
|
if (methods.formState.isValid && preventSubmit) {
|
|
208
404
|
debug("⛔ Form submit PREVENTED", {
|
|
@@ -220,7 +416,7 @@ const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues =
|
|
|
220
416
|
});
|
|
221
417
|
const wrappedOnSubmit = (data, event) => {
|
|
222
418
|
const submitData = toSubmitFormat(data) ?? {};
|
|
223
|
-
debug("onSubmit callback called", { submitData });
|
|
419
|
+
debug("onSubmit callback called", { submitData: sensitiveFields.redact(submitData) });
|
|
224
420
|
return onSubmit(submitData, event);
|
|
225
421
|
};
|
|
226
422
|
await methods.handleSubmit(wrappedOnSubmit)(e);
|
|
@@ -234,7 +430,7 @@ const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues =
|
|
|
234
430
|
previousValue: preventSubmit,
|
|
235
431
|
newValue: prevent,
|
|
236
432
|
formStateIsValid: methods.formState.isValid,
|
|
237
|
-
validationErrors: methods.formState.errors
|
|
433
|
+
validationErrors: sensitiveFields.redact(methods.formState.errors)
|
|
238
434
|
});
|
|
239
435
|
setPreventSubmit(prevent);
|
|
240
436
|
},
|
|
@@ -261,18 +457,21 @@ const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues =
|
|
|
261
457
|
debugModeSettings?.disable,
|
|
262
458
|
validationErrorsHash
|
|
263
459
|
]);
|
|
264
|
-
return /* @__PURE__ */ jsx(
|
|
265
|
-
|
|
266
|
-
children: /* @__PURE__ */ jsx(
|
|
267
|
-
|
|
268
|
-
children:
|
|
269
|
-
|
|
270
|
-
|
|
460
|
+
return /* @__PURE__ */ jsx(SensitiveFieldsProvider, {
|
|
461
|
+
registry: sensitiveFields,
|
|
462
|
+
children: /* @__PURE__ */ jsx(UniformContext.Provider, {
|
|
463
|
+
value: contextValue,
|
|
464
|
+
children: /* @__PURE__ */ jsx(FormProvider, {
|
|
465
|
+
...methods,
|
|
466
|
+
children: children({
|
|
467
|
+
handleSubmit,
|
|
468
|
+
isValid
|
|
469
|
+
})
|
|
271
470
|
})
|
|
272
471
|
})
|
|
273
472
|
});
|
|
274
473
|
};
|
|
275
474
|
//#endregion
|
|
276
|
-
export { UniformContext as n, FormProvider$1 as t };
|
|
475
|
+
export { useSensitiveField as a, useSensitiveDebug as i, UniformContext as n, redactDebugData as r, FormProvider$1 as t };
|
|
277
476
|
|
|
278
|
-
//# sourceMappingURL=FormContext-
|
|
477
|
+
//# sourceMappingURL=FormContext-CB7Glm02.mjs.map
|