@fuf-stack/uniform 1.10.3 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Checkboxes/index.cjs +4 -18
- package/dist/Checkboxes/index.d.cts +2 -11
- package/dist/Checkboxes/index.d.ts +2 -11
- package/dist/Checkboxes/index.js +3 -19
- package/dist/Checkboxes-CGWhnpBp.js +115 -0
- package/dist/Checkboxes-CGWhnpBp.js.map +1 -0
- package/dist/Checkboxes-Ds6bzl6p.cjs +127 -0
- package/dist/Checkboxes-Ds6bzl6p.cjs.map +1 -0
- package/dist/FieldArray/index.cjs +4 -21
- package/dist/FieldArray/index.d.cts +2 -10
- package/dist/FieldArray/index.d.ts +2 -10
- package/dist/FieldArray/index.js +3 -22
- package/dist/FieldArray-BexXN9bO.cjs +515 -0
- package/dist/FieldArray-BexXN9bO.cjs.map +1 -0
- package/dist/FieldArray-D3iUaRLo.js +503 -0
- package/dist/FieldArray-D3iUaRLo.js.map +1 -0
- package/dist/FieldCard/index.cjs +3 -18
- package/dist/FieldCard/index.d.cts +2 -97
- package/dist/FieldCard/index.d.ts +2 -97
- package/dist/FieldCard/index.js +3 -19
- package/dist/FieldCard-mpmErfDK.js +121 -0
- package/dist/FieldCard-mpmErfDK.js.map +1 -0
- package/dist/FieldCard-pP7aniZU.cjs +133 -0
- package/dist/FieldCard-pP7aniZU.cjs.map +1 -0
- package/dist/FieldCopyTestIdButton-AaLwu_8y.cjs +41 -0
- package/dist/FieldCopyTestIdButton-AaLwu_8y.cjs.map +1 -0
- package/dist/FieldCopyTestIdButton-Cx8AXJhO.js +29 -0
- package/dist/FieldCopyTestIdButton-Cx8AXJhO.js.map +1 -0
- package/dist/FieldValidationError-Cq6aI0tE.cjs +65 -0
- package/dist/FieldValidationError-Cq6aI0tE.cjs.map +1 -0
- package/dist/FieldValidationError-D86DPSOH.js +53 -0
- package/dist/FieldValidationError-D86DPSOH.js.map +1 -0
- package/dist/Form/index.cjs +4 -13
- package/dist/Form/index.d.cts +2 -11
- package/dist/Form/index.d.ts +3 -11
- package/dist/Form/index.js +3 -14
- package/dist/Form-CFmCTl60.js +119 -0
- package/dist/Form-CFmCTl60.js.map +1 -0
- package/dist/Form-FvN3SXfF.cjs +130 -0
- package/dist/Form-FvN3SXfF.cjs.map +1 -0
- package/dist/FormContext-C2_WMi_v.d.ts +18 -0
- package/dist/FormContext-C2_WMi_v.d.ts.map +1 -0
- package/dist/FormContext-C3GymQOA.cjs +275 -0
- package/dist/FormContext-C3GymQOA.cjs.map +1 -0
- package/dist/FormContext-CN9n_KdE.js +229 -0
- package/dist/FormContext-CN9n_KdE.js.map +1 -0
- package/dist/FormContext-Dl7KL_wl.d.cts +18 -0
- package/dist/FormContext-Dl7KL_wl.d.cts.map +1 -0
- package/dist/Grid/index.cjs +4 -9
- package/dist/Grid/index.d.cts +2 -8
- package/dist/Grid/index.d.ts +2 -8
- package/dist/Grid/index.js +3 -10
- package/dist/Grid-DEH7Sezi.js +23 -0
- package/dist/Grid-DEH7Sezi.js.map +1 -0
- package/dist/Grid-DG60vYYG.cjs +35 -0
- package/dist/Grid-DG60vYYG.cjs.map +1 -0
- package/dist/Input/index.cjs +4 -19
- package/dist/Input/index.d.cts +2 -11
- package/dist/Input/index.d.ts +2 -11
- package/dist/Input/index.js +3 -20
- package/dist/Input--h5t7Sbl.js +94 -0
- package/dist/Input--h5t7Sbl.js.map +1 -0
- package/dist/Input-DKfFFOpo.cjs +106 -0
- package/dist/Input-DKfFFOpo.cjs.map +1 -0
- package/dist/RadioBoxes/index.cjs +5 -20
- package/dist/RadioBoxes/index.d.cts +2 -10
- package/dist/RadioBoxes/index.d.ts +2 -10
- package/dist/RadioBoxes/index.js +3 -21
- package/dist/RadioBoxes-7qdHj3ti.js +138 -0
- package/dist/RadioBoxes-7qdHj3ti.js.map +1 -0
- package/dist/RadioBoxes-Bd9ahl4i.cjs +156 -0
- package/dist/RadioBoxes-Bd9ahl4i.cjs.map +1 -0
- package/dist/RadioTabs/index.cjs +4 -18
- package/dist/RadioTabs/index.d.cts +2 -10
- package/dist/RadioTabs/index.d.ts +2 -10
- package/dist/RadioTabs/index.js +3 -19
- package/dist/RadioTabs-DXs98jng.js +119 -0
- package/dist/RadioTabs-DXs98jng.js.map +1 -0
- package/dist/RadioTabs-DcEUdW7r.cjs +132 -0
- package/dist/RadioTabs-DcEUdW7r.cjs.map +1 -0
- package/dist/Radios/index.cjs +4 -18
- package/dist/Radios/index.d.cts +2 -9
- package/dist/Radios/index.d.ts +2 -9
- package/dist/Radios/index.js +3 -19
- package/dist/Radios-BIx06mzU.js +75 -0
- package/dist/Radios-BIx06mzU.js.map +1 -0
- package/dist/Radios-CIPNqPzi.cjs +87 -0
- package/dist/Radios-CIPNqPzi.cjs.map +1 -0
- package/dist/Select/index.cjs +4 -19
- package/dist/Select/index.d.cts +2 -11
- package/dist/Select/index.d.ts +2 -11
- package/dist/Select/index.js +3 -20
- package/dist/Select-BsL7qn2v.cjs +246 -0
- package/dist/Select-BsL7qn2v.cjs.map +1 -0
- package/dist/Select-CBjqYDcs.js +233 -0
- package/dist/Select-CBjqYDcs.js.map +1 -0
- package/dist/Slider/index.cjs +4 -18
- package/dist/Slider/index.d.cts +2 -10
- package/dist/Slider/index.d.ts +2 -10
- package/dist/Slider/index.js +3 -19
- package/dist/Slider-BDLbD7d5.cjs +123 -0
- package/dist/Slider-BDLbD7d5.cjs.map +1 -0
- package/dist/Slider-BHjHSoIk.js +111 -0
- package/dist/Slider-BHjHSoIk.js.map +1 -0
- package/dist/SubmitButton/index.cjs +4 -13
- package/dist/SubmitButton/index.d.cts +2 -9
- package/dist/SubmitButton/index.d.ts +2 -9
- package/dist/SubmitButton/index.js +3 -14
- package/dist/SubmitButton-7iOaKzhB.js +34 -0
- package/dist/SubmitButton-7iOaKzhB.js.map +1 -0
- package/dist/SubmitButton-DhtPJuro.cjs +46 -0
- package/dist/SubmitButton-DhtPJuro.cjs.map +1 -0
- package/dist/Switch/index.cjs +4 -18
- package/dist/Switch/index.d.cts +2 -11
- package/dist/Switch/index.d.ts +2 -11
- package/dist/Switch/index.js +3 -19
- package/dist/Switch-DCxAgt_L.js +84 -0
- package/dist/Switch-DCxAgt_L.js.map +1 -0
- package/dist/Switch-Dczzog3v.cjs +96 -0
- package/dist/Switch-Dczzog3v.cjs.map +1 -0
- package/dist/SwitchBox/index.cjs +5 -20
- package/dist/SwitchBox/index.d.cts +2 -11
- package/dist/SwitchBox/index.d.ts +2 -11
- package/dist/SwitchBox/index.js +3 -21
- package/dist/SwitchBox-DPHryDOM.js +156 -0
- package/dist/SwitchBox-DPHryDOM.js.map +1 -0
- package/dist/SwitchBox-DqVmZYId.cjs +174 -0
- package/dist/SwitchBox-DqVmZYId.cjs.map +1 -0
- package/dist/TextArea/index.cjs +4 -19
- package/dist/TextArea/index.d.cts +2 -10
- package/dist/TextArea/index.d.ts +2 -10
- package/dist/TextArea/index.js +3 -20
- package/dist/TextArea-BR6e-Fio.js +64 -0
- package/dist/TextArea-BR6e-Fio.js.map +1 -0
- package/dist/TextArea-CH-F6_ax.cjs +76 -0
- package/dist/TextArea-CH-F6_ax.cjs.map +1 -0
- package/dist/helpers/index.cjs +8 -18
- package/dist/helpers/index.d.cts +2 -132
- package/dist/helpers/index.d.ts +2 -132
- package/dist/helpers/index.js +3 -18
- package/dist/helpers-B-CJOBt3.js +236 -0
- package/dist/helpers-B-CJOBt3.js.map +1 -0
- package/dist/helpers-KTgXi0lA.cjs +272 -0
- package/dist/helpers-KTgXi0lA.cjs.map +1 -0
- package/dist/hooks/useClientValidation/index.cjs +6 -10
- package/dist/hooks/useClientValidation/index.cjs.map +1 -1
- package/dist/hooks/useClientValidation/index.d.cts +2 -147
- package/dist/hooks/useClientValidation/index.d.ts +2 -147
- package/dist/hooks/useClientValidation/index.js +7 -12
- package/dist/hooks/useClientValidation/index.js.map +1 -1
- package/dist/hooks/useController/index.cjs +5 -7
- package/dist/hooks/useController/index.cjs.map +1 -1
- package/dist/hooks/useController/index.d.cts +2 -29
- package/dist/hooks/useController/index.d.ts +3 -29
- package/dist/hooks/useController/index.js +7 -9
- package/dist/hooks/useController/index.js.map +1 -1
- package/dist/hooks/useFormContext/index.cjs +3 -12
- package/dist/hooks/useFormContext/index.d.cts +2 -62
- package/dist/hooks/useFormContext/index.d.ts +4 -62
- package/dist/hooks/useFormContext/index.js +3 -13
- package/dist/hooks/useInput/index.cjs +11 -5
- package/dist/hooks/useInput/index.cjs.map +1 -1
- package/dist/hooks/useInput/index.d.cts +2 -1
- package/dist/hooks/useInput/index.d.ts +2 -1
- package/dist/hooks/useInput/index.js +7 -7
- package/dist/hooks/useInput/index.js.map +1 -1
- package/dist/hooks/useInputValueDebounce/index.cjs +2 -7
- package/dist/hooks/useInputValueDebounce/index.d.cts +2 -55
- package/dist/hooks/useInputValueDebounce/index.d.ts +2 -55
- package/dist/hooks/useInputValueDebounce/index.js +3 -8
- package/dist/hooks/useInputValueTransform/index.cjs +5 -5
- package/dist/hooks/useInputValueTransform/index.cjs.map +1 -1
- package/dist/hooks/useInputValueTransform/index.d.cts +2 -102
- package/dist/hooks/useInputValueTransform/index.d.ts +2 -102
- package/dist/hooks/useInputValueTransform/index.js +7 -7
- package/dist/hooks/useInputValueTransform/index.js.map +1 -1
- package/dist/hooks/useUniformField/index.cjs +2 -15
- package/dist/hooks/useUniformField/index.d.cts +2 -98
- package/dist/hooks/useUniformField/index.d.ts +6 -98
- package/dist/hooks/useUniformField/index.js +3 -16
- package/dist/hooks/useUniformFieldArray/index.cjs +2 -17
- package/dist/hooks/useUniformFieldArray/index.d.cts +2 -71
- package/dist/hooks/useUniformFieldArray/index.d.ts +7 -71
- package/dist/hooks/useUniformFieldArray/index.js +3 -18
- package/dist/hooks/useWatchUserChange/index.cjs +5 -8
- package/dist/hooks/useWatchUserChange/index.cjs.map +1 -1
- package/dist/hooks/useWatchUserChange/index.d.cts +2 -73
- package/dist/hooks/useWatchUserChange/index.d.ts +2 -73
- package/dist/hooks/useWatchUserChange/index.js +7 -10
- package/dist/hooks/useWatchUserChange/index.js.map +1 -1
- package/dist/index-1gPh6Uoh.d.cts +16 -0
- package/dist/index-1gPh6Uoh.d.cts.map +1 -0
- package/dist/index-B3Z8gdjC.d.ts +1 -0
- package/dist/index-B4Wkijem.d.ts +169 -0
- package/dist/index-B4Wkijem.d.ts.map +1 -0
- package/dist/index-B74QlCAy.d.cts +169 -0
- package/dist/index-B74QlCAy.d.cts.map +1 -0
- package/dist/index-BLREDRDJ.d.cts +1 -0
- package/dist/index-BM4XWo1K.d.ts +118 -0
- package/dist/index-BM4XWo1K.d.ts.map +1 -0
- package/dist/index-BMN2XNyT.d.cts +23 -0
- package/dist/index-BMN2XNyT.d.cts.map +1 -0
- package/dist/index-BOI0cy-n.d.cts +118 -0
- package/dist/index-BOI0cy-n.d.cts.map +1 -0
- package/dist/index-BTEsKen4.d.ts +264 -0
- package/dist/index-BTEsKen4.d.ts.map +1 -0
- package/dist/index-BW9EUWZE.d.cts +23 -0
- package/dist/index-BW9EUWZE.d.cts.map +1 -0
- package/dist/index-BXpMZvwA.d.cts +1 -0
- package/dist/index-BYrmFhKl.d.ts +1 -0
- package/dist/index-BaBZGCqS.d.cts +177 -0
- package/dist/index-BaBZGCqS.d.cts.map +1 -0
- package/dist/index-C1fYmoY0.d.ts +123 -0
- package/dist/index-C1fYmoY0.d.ts.map +1 -0
- package/dist/index-C56I3SOi.d.cts +148 -0
- package/dist/index-C56I3SOi.d.cts.map +1 -0
- package/dist/index-CHmS3ri3.d.ts +16 -0
- package/dist/index-CHmS3ri3.d.ts.map +1 -0
- package/dist/index-CI9QBUoM.d.cts +97 -0
- package/dist/index-CI9QBUoM.d.cts.map +1 -0
- package/dist/index-CJNLQVjx.d.ts +1 -0
- package/dist/index-CO-l7RmT.d.cts +181 -0
- package/dist/index-CO-l7RmT.d.cts.map +1 -0
- package/dist/index-CQWoxgWk.d.ts +23 -0
- package/dist/index-CQWoxgWk.d.ts.map +1 -0
- package/dist/index-CVY05bZf.d.ts +39 -0
- package/dist/index-CVY05bZf.d.ts.map +1 -0
- package/dist/index-C_ATGeaX.d.ts +104 -0
- package/dist/index-C_ATGeaX.d.ts.map +1 -0
- package/dist/index-CbAh0Kfo.d.cts +39 -0
- package/dist/index-CbAh0Kfo.d.cts.map +1 -0
- package/dist/index-CqV2Q3da.d.cts +264 -0
- package/dist/index-CqV2Q3da.d.cts.map +1 -0
- package/dist/index-CraZe1qS.d.ts +97 -0
- package/dist/index-CraZe1qS.d.ts.map +1 -0
- package/dist/index-CvA5yKx9.d.ts +177 -0
- package/dist/index-CvA5yKx9.d.ts.map +1 -0
- package/dist/index-CwSIy_W-.d.cts +1 -0
- package/dist/index-CzypMcVS.d.cts +104 -0
- package/dist/index-CzypMcVS.d.cts.map +1 -0
- package/dist/index-D6RB3b5L.d.ts +148 -0
- package/dist/index-D6RB3b5L.d.ts.map +1 -0
- package/dist/index-DA5um0u6.d.cts +123 -0
- package/dist/index-DA5um0u6.d.cts.map +1 -0
- package/dist/index-DHHBSmJb.d.ts +23 -0
- package/dist/index-DHHBSmJb.d.ts.map +1 -0
- package/dist/index-DhMSgdwM.d.ts +156 -0
- package/dist/index-DhMSgdwM.d.ts.map +1 -0
- package/dist/index-Dklb-p_1.d.cts +156 -0
- package/dist/index-Dklb-p_1.d.cts.map +1 -0
- package/dist/index-DpD4MxGD.d.cts +177 -0
- package/dist/index-DpD4MxGD.d.cts.map +1 -0
- package/dist/index-Drl7euco.d.ts +115 -0
- package/dist/index-Drl7euco.d.ts.map +1 -0
- package/dist/index-DzuP5q-2.d.ts +181 -0
- package/dist/index-DzuP5q-2.d.ts.map +1 -0
- package/dist/index-G0IgQWoU.d.cts +134 -0
- package/dist/index-G0IgQWoU.d.cts.map +1 -0
- package/dist/index-RvYO46Vg.d.ts +178 -0
- package/dist/index-RvYO46Vg.d.ts.map +1 -0
- package/dist/index-UjKqRe-8.d.ts +134 -0
- package/dist/index-UjKqRe-8.d.ts.map +1 -0
- package/dist/index-aHcGnXHf.d.ts +44 -0
- package/dist/index-aHcGnXHf.d.ts.map +1 -0
- package/dist/index-iuLEYAix.d.cts +115 -0
- package/dist/index-iuLEYAix.d.cts.map +1 -0
- package/dist/index-jmQP58tO.d.cts +44 -0
- package/dist/index-jmQP58tO.d.cts.map +1 -0
- package/dist/index.cjs +75 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -38
- package/dist/index.d.ts +31 -38
- package/dist/index.js +33 -133
- package/dist/index.js.map +1 -1
- package/dist/partials/FieldCopyTestIdButton/index.cjs +4 -9
- package/dist/partials/FieldCopyTestIdButton/index.d.cts +2 -7
- package/dist/partials/FieldCopyTestIdButton/index.d.ts +2 -7
- package/dist/partials/FieldCopyTestIdButton/index.js +3 -10
- package/dist/partials/FieldValidationError/index.cjs +4 -9
- package/dist/partials/FieldValidationError/index.d.cts +2 -8
- package/dist/partials/FieldValidationError/index.d.ts +2 -8
- package/dist/partials/FieldValidationError/index.js +3 -10
- package/dist/useClientValidation-BnnscAEe.js +179 -0
- package/dist/useClientValidation-BnnscAEe.js.map +1 -0
- package/dist/useClientValidation-C3Q5UCy9.d.cts +150 -0
- package/dist/useClientValidation-C3Q5UCy9.d.cts.map +1 -0
- package/dist/useClientValidation-CkBtUSco.d.ts +150 -0
- package/dist/useClientValidation-CkBtUSco.d.ts.map +1 -0
- package/dist/useClientValidation-oZd4_ocQ.cjs +191 -0
- package/dist/useClientValidation-oZd4_ocQ.cjs.map +1 -0
- package/dist/useController-BzkCcbSo.cjs +48 -0
- package/dist/useController-BzkCcbSo.cjs.map +1 -0
- package/dist/useController-C_MZLZIp.d.cts +31 -0
- package/dist/useController-C_MZLZIp.d.cts.map +1 -0
- package/dist/useController-CumIERks.js +43 -0
- package/dist/useController-CumIERks.js.map +1 -0
- package/dist/useController-hjpJQf0w.d.ts +31 -0
- package/dist/useController-hjpJQf0w.d.ts.map +1 -0
- package/dist/useFormContext-356X5XAY.js +6 -0
- package/dist/useFormContext-356X5XAY.js.map +1 -0
- package/dist/useFormContext-3AAPT6eZ.d.ts +64 -0
- package/dist/useFormContext-3AAPT6eZ.d.ts.map +1 -0
- package/dist/useFormContext-CWuN-_7P.cjs +134 -0
- package/dist/useFormContext-CWuN-_7P.cjs.map +1 -0
- package/dist/useFormContext-CZh7pv8f.d.cts +64 -0
- package/dist/useFormContext-CZh7pv8f.d.cts.map +1 -0
- package/dist/useFormContext-CkeSOfWD.cjs +6 -0
- package/dist/useFormContext-CkeSOfWD.cjs.map +1 -0
- package/dist/useFormContext-JCm1UR_e.js +123 -0
- package/dist/useFormContext-JCm1UR_e.js.map +1 -0
- package/dist/useInput-DZ6KGBxw.js +3 -0
- package/dist/useInput-IGJqJ2tR.d.ts +2 -0
- package/dist/useInput-NMHJNZ5A.d.cts +2 -0
- package/dist/useInputValueDebounce-B2RzCWty.d.cts +62 -0
- package/dist/useInputValueDebounce-B2RzCWty.d.cts.map +1 -0
- package/dist/useInputValueDebounce-C7_bvNGH.d.ts +62 -0
- package/dist/useInputValueDebounce-C7_bvNGH.d.ts.map +1 -0
- package/dist/useInputValueDebounce-DaH5ONlQ.js +84 -0
- package/dist/useInputValueDebounce-DaH5ONlQ.js.map +1 -0
- package/dist/useInputValueDebounce-tL8maIp8.cjs +90 -0
- package/dist/useInputValueDebounce-tL8maIp8.cjs.map +1 -0
- package/dist/useInputValueTransform-BID-CQ-y.d.cts +107 -0
- package/dist/useInputValueTransform-BID-CQ-y.d.cts.map +1 -0
- package/dist/useInputValueTransform-C-uSW8Y3.cjs +116 -0
- package/dist/useInputValueTransform-C-uSW8Y3.cjs.map +1 -0
- package/dist/useInputValueTransform-D7LfyYRe.d.ts +107 -0
- package/dist/useInputValueTransform-D7LfyYRe.d.ts.map +1 -0
- package/dist/useInputValueTransform-aiIf8lq5.js +110 -0
- package/dist/useInputValueTransform-aiIf8lq5.js.map +1 -0
- package/dist/useUniformField-BMvnRC_r.cjs +136 -0
- package/dist/useUniformField-BMvnRC_r.cjs.map +1 -0
- package/dist/useUniformField-Be3kdnhK.d.cts +98 -0
- package/dist/useUniformField-Be3kdnhK.d.cts.map +1 -0
- package/dist/useUniformField-ClprfrES.js +129 -0
- package/dist/useUniformField-ClprfrES.js.map +1 -0
- package/dist/useUniformField-DDHQ5B11.d.ts +98 -0
- package/dist/useUniformField-DDHQ5B11.d.ts.map +1 -0
- package/dist/useUniformFieldArray-BBFw08qL.d.cts +79 -0
- package/dist/useUniformFieldArray-BBFw08qL.d.cts.map +1 -0
- package/dist/useUniformFieldArray-BhPi3gPv.d.ts +79 -0
- package/dist/useUniformFieldArray-BhPi3gPv.d.ts.map +1 -0
- package/dist/useUniformFieldArray-C-0OXG3N.js +84 -0
- package/dist/useUniformFieldArray-C-0OXG3N.js.map +1 -0
- package/dist/useUniformFieldArray-btjvJdZ6.cjs +90 -0
- package/dist/useUniformFieldArray-btjvJdZ6.cjs.map +1 -0
- package/dist/useWatchUserChange-BAdiqg2q.d.ts +78 -0
- package/dist/useWatchUserChange-BAdiqg2q.d.ts.map +1 -0
- package/dist/useWatchUserChange-C1ezpj0t.js +83 -0
- package/dist/useWatchUserChange-C1ezpj0t.js.map +1 -0
- package/dist/useWatchUserChange-C5dr12By.cjs +89 -0
- package/dist/useWatchUserChange-C5dr12By.cjs.map +1 -0
- package/dist/useWatchUserChange-COVdHmki.d.cts +78 -0
- package/dist/useWatchUserChange-COVdHmki.d.cts.map +1 -0
- package/package.json +73 -100
- package/dist/Checkboxes/index.cjs.map +0 -1
- package/dist/Checkboxes/index.js.map +0 -1
- package/dist/Checkboxes-CBgO9itq.d.cts +0 -171
- package/dist/Checkboxes-CFbsc6zg.d.ts +0 -171
- package/dist/FieldArray/index.cjs.map +0 -1
- package/dist/FieldArray/index.js.map +0 -1
- package/dist/FieldArray-72vn2MG9.d.cts +0 -160
- package/dist/FieldArray-72vn2MG9.d.ts +0 -160
- package/dist/FieldCard/index.cjs.map +0 -1
- package/dist/FieldCard/index.js.map +0 -1
- package/dist/FieldCopyTestIdButton-_TDlmw0L.d.cts +0 -11
- package/dist/FieldCopyTestIdButton-_TDlmw0L.d.ts +0 -11
- package/dist/FieldValidationError-DwtLkGMo.d.cts +0 -17
- package/dist/FieldValidationError-DwtLkGMo.d.ts +0 -17
- package/dist/Form/index.cjs.map +0 -1
- package/dist/Form/index.js.map +0 -1
- package/dist/Form-BZZJPLsi.d.cts +0 -32
- package/dist/Form-zsUjI2yq.d.ts +0 -32
- package/dist/FormContext-9Firwt4k.d.cts +0 -14
- package/dist/FormContext-9Firwt4k.d.ts +0 -14
- package/dist/Grid/index.cjs.map +0 -1
- package/dist/Grid/index.js.map +0 -1
- package/dist/Grid-DF3L9NF3.d.cts +0 -17
- package/dist/Grid-DF3L9NF3.d.ts +0 -17
- package/dist/Input/index.cjs.map +0 -1
- package/dist/Input/index.js.map +0 -1
- package/dist/Input-BGYDOpbo.d.cts +0 -101
- package/dist/Input-__SqMh2n.d.ts +0 -101
- package/dist/RadioBox-DnqCiTR1.d.cts +0 -168
- package/dist/RadioBox-DnqCiTR1.d.ts +0 -168
- package/dist/RadioBoxes/index.cjs.map +0 -1
- package/dist/RadioBoxes/index.js.map +0 -1
- package/dist/RadioTabs/index.cjs.map +0 -1
- package/dist/RadioTabs/index.js.map +0 -1
- package/dist/RadioTabs-DkR5fvl4.d.cts +0 -138
- package/dist/RadioTabs-DkR5fvl4.d.ts +0 -138
- package/dist/Radios/index.cjs.map +0 -1
- package/dist/Radios/index.js.map +0 -1
- package/dist/Radios-lLVlvY_B.d.cts +0 -115
- package/dist/Radios-lLVlvY_B.d.ts +0 -115
- package/dist/Select/index.cjs.map +0 -1
- package/dist/Select/index.js.map +0 -1
- package/dist/Select-DWlnKj5c.d.cts +0 -249
- package/dist/Select-DWlnKj5c.d.ts +0 -249
- package/dist/Slider/index.cjs.map +0 -1
- package/dist/Slider/index.js.map +0 -1
- package/dist/Slider-CxHvafJA.d.cts +0 -155
- package/dist/Slider-CxHvafJA.d.ts +0 -155
- package/dist/SubmitButton/index.cjs.map +0 -1
- package/dist/SubmitButton/index.js.map +0 -1
- package/dist/SubmitButton-DqaxyVpp.d.cts +0 -28
- package/dist/SubmitButton-DqaxyVpp.d.ts +0 -28
- package/dist/Switch/index.cjs.map +0 -1
- package/dist/Switch/index.js.map +0 -1
- package/dist/Switch-B4AuHAMX.d.cts +0 -108
- package/dist/Switch-B4AuHAMX.d.ts +0 -108
- package/dist/SwitchBox/index.cjs.map +0 -1
- package/dist/SwitchBox/index.js.map +0 -1
- package/dist/SwitchBox-q1I7a0NX.d.cts +0 -146
- package/dist/SwitchBox-q1I7a0NX.d.ts +0 -146
- package/dist/TextArea/index.cjs.map +0 -1
- package/dist/TextArea/index.js.map +0 -1
- package/dist/TextArea-CYcFOcun.d.cts +0 -88
- package/dist/TextArea-CYcFOcun.d.ts +0 -88
- package/dist/chunk-264VRHMT.js +0 -105
- package/dist/chunk-264VRHMT.js.map +0 -1
- package/dist/chunk-26VE4IGU.js +0 -68
- package/dist/chunk-26VE4IGU.js.map +0 -1
- package/dist/chunk-2HDXHQOC.js +0 -215
- package/dist/chunk-2HDXHQOC.js.map +0 -1
- package/dist/chunk-2UQCRQEJ.cjs +0 -68
- package/dist/chunk-2UQCRQEJ.cjs.map +0 -1
- package/dist/chunk-36LBVB45.js +0 -1
- package/dist/chunk-36LBVB45.js.map +0 -1
- package/dist/chunk-3JAVQAL5.cjs +0 -1
- package/dist/chunk-3JAVQAL5.cjs.map +0 -1
- package/dist/chunk-3ZQXSGR2.cjs +0 -67
- package/dist/chunk-3ZQXSGR2.cjs.map +0 -1
- package/dist/chunk-4CQWTUQR.js +0 -292
- package/dist/chunk-4CQWTUQR.js.map +0 -1
- package/dist/chunk-4HFPBJ3O.cjs +0 -171
- package/dist/chunk-4HFPBJ3O.cjs.map +0 -1
- package/dist/chunk-4RQJCFM7.js +0 -154
- package/dist/chunk-4RQJCFM7.js.map +0 -1
- package/dist/chunk-555JRYCS.cjs +0 -61
- package/dist/chunk-555JRYCS.cjs.map +0 -1
- package/dist/chunk-55VJM3KD.cjs +0 -118
- package/dist/chunk-55VJM3KD.cjs.map +0 -1
- package/dist/chunk-56TQOKG7.cjs +0 -48
- package/dist/chunk-56TQOKG7.cjs.map +0 -1
- package/dist/chunk-5MTIQ6WD.js +0 -41
- package/dist/chunk-5MTIQ6WD.js.map +0 -1
- package/dist/chunk-6AWHOBNL.cjs +0 -41
- package/dist/chunk-6AWHOBNL.cjs.map +0 -1
- package/dist/chunk-6GN62PBG.cjs +0 -182
- package/dist/chunk-6GN62PBG.cjs.map +0 -1
- package/dist/chunk-7MOAXLQZ.js +0 -103
- package/dist/chunk-7MOAXLQZ.js.map +0 -1
- package/dist/chunk-7OMJ26AT.js +0 -165
- package/dist/chunk-7OMJ26AT.js.map +0 -1
- package/dist/chunk-7ZE7IZ5R.cjs +0 -103
- package/dist/chunk-7ZE7IZ5R.cjs.map +0 -1
- package/dist/chunk-AHJJIANM.js +0 -7
- package/dist/chunk-AHJJIANM.js.map +0 -1
- package/dist/chunk-AQJLKHAE.cjs +0 -277
- package/dist/chunk-AQJLKHAE.cjs.map +0 -1
- package/dist/chunk-B62HKKMS.js +0 -20
- package/dist/chunk-B62HKKMS.js.map +0 -1
- package/dist/chunk-C6WYP35Z.js +0 -219
- package/dist/chunk-C6WYP35Z.js.map +0 -1
- package/dist/chunk-CNTOODUQ.js +0 -48
- package/dist/chunk-CNTOODUQ.js.map +0 -1
- package/dist/chunk-ECUVOZGQ.cjs +0 -148
- package/dist/chunk-ECUVOZGQ.cjs.map +0 -1
- package/dist/chunk-ELYGQTXB.js +0 -47
- package/dist/chunk-ELYGQTXB.js.map +0 -1
- package/dist/chunk-EVASKP6Q.js +0 -148
- package/dist/chunk-EVASKP6Q.js.map +0 -1
- package/dist/chunk-FYN7ZWLW.cjs +0 -115
- package/dist/chunk-FYN7ZWLW.cjs.map +0 -1
- package/dist/chunk-GEC75GNL.js +0 -137
- package/dist/chunk-GEC75GNL.js.map +0 -1
- package/dist/chunk-HEPNEBRF.cjs +0 -26
- package/dist/chunk-HEPNEBRF.cjs.map +0 -1
- package/dist/chunk-IR75YRIZ.js +0 -171
- package/dist/chunk-IR75YRIZ.js.map +0 -1
- package/dist/chunk-IV45K4WU.js +0 -277
- package/dist/chunk-IV45K4WU.js.map +0 -1
- package/dist/chunk-K2V4ULA2.js +0 -61
- package/dist/chunk-K2V4ULA2.js.map +0 -1
- package/dist/chunk-KBKMMDLM.js +0 -118
- package/dist/chunk-KBKMMDLM.js.map +0 -1
- package/dist/chunk-KDNO5YO5.cjs +0 -105
- package/dist/chunk-KDNO5YO5.cjs.map +0 -1
- package/dist/chunk-LEMQGDFE.js +0 -67
- package/dist/chunk-LEMQGDFE.js.map +0 -1
- package/dist/chunk-LO7UKHOS.js +0 -26
- package/dist/chunk-LO7UKHOS.js.map +0 -1
- package/dist/chunk-LWPZZ2AW.cjs +0 -172
- package/dist/chunk-LWPZZ2AW.cjs.map +0 -1
- package/dist/chunk-NG3CJ3UE.js +0 -699
- package/dist/chunk-NG3CJ3UE.js.map +0 -1
- package/dist/chunk-NHEZXA4H.cjs +0 -47
- package/dist/chunk-NHEZXA4H.cjs.map +0 -1
- package/dist/chunk-NTDKZW4E.js +0 -35
- package/dist/chunk-NTDKZW4E.js.map +0 -1
- package/dist/chunk-O2XJNQQK.js +0 -154
- package/dist/chunk-O2XJNQQK.js.map +0 -1
- package/dist/chunk-OE5BOGGX.cjs +0 -35
- package/dist/chunk-OE5BOGGX.cjs.map +0 -1
- package/dist/chunk-OKJWLH7T.cjs +0 -154
- package/dist/chunk-OKJWLH7T.cjs.map +0 -1
- package/dist/chunk-OORASWXL.js +0 -49
- package/dist/chunk-OORASWXL.js.map +0 -1
- package/dist/chunk-OT3A4LEE.cjs +0 -154
- package/dist/chunk-OT3A4LEE.cjs.map +0 -1
- package/dist/chunk-PCTYJUY7.cjs +0 -7
- package/dist/chunk-PCTYJUY7.cjs.map +0 -1
- package/dist/chunk-PRUIH5LI.js +0 -131
- package/dist/chunk-PRUIH5LI.js.map +0 -1
- package/dist/chunk-QLNJZDVF.js +0 -182
- package/dist/chunk-QLNJZDVF.js.map +0 -1
- package/dist/chunk-RVBTLB5G.cjs +0 -131
- package/dist/chunk-RVBTLB5G.cjs.map +0 -1
- package/dist/chunk-SJWL6EMI.js +0 -115
- package/dist/chunk-SJWL6EMI.js.map +0 -1
- package/dist/chunk-SW3NGBCE.cjs +0 -215
- package/dist/chunk-SW3NGBCE.cjs.map +0 -1
- package/dist/chunk-THDHNYP7.cjs +0 -219
- package/dist/chunk-THDHNYP7.cjs.map +0 -1
- package/dist/chunk-TTD3KL6E.cjs +0 -20
- package/dist/chunk-TTD3KL6E.cjs.map +0 -1
- package/dist/chunk-UB7CSOZU.js +0 -172
- package/dist/chunk-UB7CSOZU.js.map +0 -1
- package/dist/chunk-V3M7HL26.cjs +0 -137
- package/dist/chunk-V3M7HL26.cjs.map +0 -1
- package/dist/chunk-WXSISX5Y.cjs +0 -49
- package/dist/chunk-WXSISX5Y.cjs.map +0 -1
- package/dist/chunk-WYM6IAIJ.cjs +0 -292
- package/dist/chunk-WYM6IAIJ.cjs.map +0 -1
- package/dist/chunk-YYR23V5P.cjs +0 -165
- package/dist/chunk-YYR23V5P.cjs.map +0 -1
- package/dist/chunk-Z6QACVK7.cjs +0 -699
- package/dist/chunk-Z6QACVK7.cjs.map +0 -1
- package/dist/helpers/index.cjs.map +0 -1
- package/dist/helpers/index.js.map +0 -1
- package/dist/hooks/useFormContext/index.cjs.map +0 -1
- package/dist/hooks/useFormContext/index.js.map +0 -1
- package/dist/hooks/useInputValueDebounce/index.cjs.map +0 -1
- package/dist/hooks/useInputValueDebounce/index.js.map +0 -1
- package/dist/hooks/useUniformField/index.cjs.map +0 -1
- package/dist/hooks/useUniformField/index.js.map +0 -1
- package/dist/hooks/useUniformFieldArray/index.cjs.map +0 -1
- package/dist/hooks/useUniformFieldArray/index.js.map +0 -1
- package/dist/partials/FieldCopyTestIdButton/index.cjs.map +0 -1
- package/dist/partials/FieldCopyTestIdButton/index.js.map +0 -1
- package/dist/partials/FieldValidationError/index.cjs.map +0 -1
- package/dist/partials/FieldValidationError/index.js.map +0 -1
|
@@ -1,97 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { TVClassName } from '@fuf-stack/pixel-utils';
|
|
4
|
-
import { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const fieldCardVariants: tailwind_variants.TVReturnType<{
|
|
7
|
-
invalid: {
|
|
8
|
-
true: {
|
|
9
|
-
base: string;
|
|
10
|
-
label: string;
|
|
11
|
-
errorFooter: string;
|
|
12
|
-
};
|
|
13
|
-
false: {
|
|
14
|
-
base: string;
|
|
15
|
-
label: string;
|
|
16
|
-
errorFooter: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}, {
|
|
20
|
-
/** base class for the field card wrapper */
|
|
21
|
-
base: string[];
|
|
22
|
-
/** class for the label/header */
|
|
23
|
-
label: string[];
|
|
24
|
-
/** class for the content */
|
|
25
|
-
content: string[];
|
|
26
|
-
/** class for the error footer wrapper */
|
|
27
|
-
errorFooter: string[];
|
|
28
|
-
}, undefined, {
|
|
29
|
-
invalid: {
|
|
30
|
-
true: {
|
|
31
|
-
base: string;
|
|
32
|
-
label: string;
|
|
33
|
-
errorFooter: string;
|
|
34
|
-
};
|
|
35
|
-
false: {
|
|
36
|
-
base: string;
|
|
37
|
-
label: string;
|
|
38
|
-
errorFooter: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}, {
|
|
42
|
-
/** base class for the field card wrapper */
|
|
43
|
-
base: string[];
|
|
44
|
-
/** class for the label/header */
|
|
45
|
-
label: string[];
|
|
46
|
-
/** class for the content */
|
|
47
|
-
content: string[];
|
|
48
|
-
/** class for the error footer wrapper */
|
|
49
|
-
errorFooter: string[];
|
|
50
|
-
}, tailwind_variants.TVReturnType<{
|
|
51
|
-
invalid: {
|
|
52
|
-
true: {
|
|
53
|
-
base: string;
|
|
54
|
-
label: string;
|
|
55
|
-
errorFooter: string;
|
|
56
|
-
};
|
|
57
|
-
false: {
|
|
58
|
-
base: string;
|
|
59
|
-
label: string;
|
|
60
|
-
errorFooter: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
}, {
|
|
64
|
-
/** base class for the field card wrapper */
|
|
65
|
-
base: string[];
|
|
66
|
-
/** class for the label/header */
|
|
67
|
-
label: string[];
|
|
68
|
-
/** class for the content */
|
|
69
|
-
content: string[];
|
|
70
|
-
/** class for the error footer wrapper */
|
|
71
|
-
errorFooter: string[];
|
|
72
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
73
|
-
type ClassName = TVClassName<typeof fieldCardVariants>;
|
|
74
|
-
interface FieldCardProps {
|
|
75
|
-
/** Content to render inside the card */
|
|
76
|
-
children: ReactNode;
|
|
77
|
-
/** CSS class name */
|
|
78
|
-
className?: ClassName;
|
|
79
|
-
/** Label content for the card header */
|
|
80
|
-
label: ReactNode;
|
|
81
|
-
/** Field name for validation */
|
|
82
|
-
name: string;
|
|
83
|
-
/** HTML data-testid attribute used in e2e tests */
|
|
84
|
-
testId?: string;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* FieldCard component - A card-styled container with label header and error footer
|
|
88
|
-
*
|
|
89
|
-
* Displays form field content in a card layout with:
|
|
90
|
-
* - Label/title in the header
|
|
91
|
-
* - Content in the body
|
|
92
|
-
* - Validation errors in the footer
|
|
93
|
-
* - Danger outline when validation errors exist
|
|
94
|
-
*/
|
|
95
|
-
declare const FieldCard: ({ children, className: _className, name, ...uniformFieldProps }: FieldCardProps) => react_jsx_runtime.JSX.Element;
|
|
96
|
-
|
|
97
|
-
export { FieldCard, type FieldCardProps, fieldCardVariants };
|
|
1
|
+
import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "../index-CzypMcVS.cjs";
|
|
2
|
+
export { FieldCard, FieldCardProps, fieldCardVariants };
|
|
@@ -1,97 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { TVClassName } from '@fuf-stack/pixel-utils';
|
|
4
|
-
import { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const fieldCardVariants: tailwind_variants.TVReturnType<{
|
|
7
|
-
invalid: {
|
|
8
|
-
true: {
|
|
9
|
-
base: string;
|
|
10
|
-
label: string;
|
|
11
|
-
errorFooter: string;
|
|
12
|
-
};
|
|
13
|
-
false: {
|
|
14
|
-
base: string;
|
|
15
|
-
label: string;
|
|
16
|
-
errorFooter: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}, {
|
|
20
|
-
/** base class for the field card wrapper */
|
|
21
|
-
base: string[];
|
|
22
|
-
/** class for the label/header */
|
|
23
|
-
label: string[];
|
|
24
|
-
/** class for the content */
|
|
25
|
-
content: string[];
|
|
26
|
-
/** class for the error footer wrapper */
|
|
27
|
-
errorFooter: string[];
|
|
28
|
-
}, undefined, {
|
|
29
|
-
invalid: {
|
|
30
|
-
true: {
|
|
31
|
-
base: string;
|
|
32
|
-
label: string;
|
|
33
|
-
errorFooter: string;
|
|
34
|
-
};
|
|
35
|
-
false: {
|
|
36
|
-
base: string;
|
|
37
|
-
label: string;
|
|
38
|
-
errorFooter: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}, {
|
|
42
|
-
/** base class for the field card wrapper */
|
|
43
|
-
base: string[];
|
|
44
|
-
/** class for the label/header */
|
|
45
|
-
label: string[];
|
|
46
|
-
/** class for the content */
|
|
47
|
-
content: string[];
|
|
48
|
-
/** class for the error footer wrapper */
|
|
49
|
-
errorFooter: string[];
|
|
50
|
-
}, tailwind_variants.TVReturnType<{
|
|
51
|
-
invalid: {
|
|
52
|
-
true: {
|
|
53
|
-
base: string;
|
|
54
|
-
label: string;
|
|
55
|
-
errorFooter: string;
|
|
56
|
-
};
|
|
57
|
-
false: {
|
|
58
|
-
base: string;
|
|
59
|
-
label: string;
|
|
60
|
-
errorFooter: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
}, {
|
|
64
|
-
/** base class for the field card wrapper */
|
|
65
|
-
base: string[];
|
|
66
|
-
/** class for the label/header */
|
|
67
|
-
label: string[];
|
|
68
|
-
/** class for the content */
|
|
69
|
-
content: string[];
|
|
70
|
-
/** class for the error footer wrapper */
|
|
71
|
-
errorFooter: string[];
|
|
72
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
73
|
-
type ClassName = TVClassName<typeof fieldCardVariants>;
|
|
74
|
-
interface FieldCardProps {
|
|
75
|
-
/** Content to render inside the card */
|
|
76
|
-
children: ReactNode;
|
|
77
|
-
/** CSS class name */
|
|
78
|
-
className?: ClassName;
|
|
79
|
-
/** Label content for the card header */
|
|
80
|
-
label: ReactNode;
|
|
81
|
-
/** Field name for validation */
|
|
82
|
-
name: string;
|
|
83
|
-
/** HTML data-testid attribute used in e2e tests */
|
|
84
|
-
testId?: string;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* FieldCard component - A card-styled container with label header and error footer
|
|
88
|
-
*
|
|
89
|
-
* Displays form field content in a card layout with:
|
|
90
|
-
* - Label/title in the header
|
|
91
|
-
* - Content in the body
|
|
92
|
-
* - Validation errors in the footer
|
|
93
|
-
* - Danger outline when validation errors exist
|
|
94
|
-
*/
|
|
95
|
-
declare const FieldCard: ({ children, className: _className, name, ...uniformFieldProps }: FieldCardProps) => react_jsx_runtime.JSX.Element;
|
|
96
|
-
|
|
97
|
-
export { FieldCard, type FieldCardProps, fieldCardVariants };
|
|
1
|
+
import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "../index-C_ATGeaX.js";
|
|
2
|
+
export { FieldCard, FieldCardProps, fieldCardVariants };
|
package/dist/FieldCard/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../chunk-4RQJCFM7.js";
|
|
5
|
-
import "../chunk-GEC75GNL.js";
|
|
6
|
-
import "../chunk-NTDKZW4E.js";
|
|
7
|
-
import "../chunk-ELYGQTXB.js";
|
|
8
|
-
import "../chunk-5MTIQ6WD.js";
|
|
9
|
-
import "../chunk-AHJJIANM.js";
|
|
10
|
-
import "../chunk-CNTOODUQ.js";
|
|
11
|
-
import "../chunk-SJWL6EMI.js";
|
|
12
|
-
import "../chunk-IV45K4WU.js";
|
|
13
|
-
import "../chunk-O2XJNQQK.js";
|
|
14
|
-
import "../chunk-K2V4ULA2.js";
|
|
15
|
-
export {
|
|
16
|
-
FieldCard_default as FieldCard,
|
|
17
|
-
fieldCardVariants
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { n as fieldCardVariants, t as FieldCard_default } from "../FieldCard-mpmErfDK.js";
|
|
2
|
+
|
|
3
|
+
export { FieldCard_default as FieldCard, fieldCardVariants };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { n as FieldValidationError_default } from "./FieldValidationError-D86DPSOH.js";
|
|
2
|
+
import { t as useUniformField } from "./useUniformField-ClprfrES.js";
|
|
3
|
+
import { cn, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { AnimatePresence, motion, useReducedMotion } from "@fuf-stack/pixel-motion";
|
|
6
|
+
|
|
7
|
+
//#region src/FieldCard/subcomponents/FieldCardValidationError.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Renders validation errors in the footer of a FieldCard component.
|
|
10
|
+
*
|
|
11
|
+
* This component handles displaying field-level validation errors with proper
|
|
12
|
+
* accessibility attributes and animates them in/out using Framer Motion.
|
|
13
|
+
*/
|
|
14
|
+
const FieldCardValidationError = ({ className = void 0, name }) => {
|
|
15
|
+
const { error, getErrorMessageProps, getHelperWrapperProps, invalid, testId } = useUniformField({ name });
|
|
16
|
+
const disableAnimation = useReducedMotion();
|
|
17
|
+
const hasErrors = invalid && error?._errors;
|
|
18
|
+
return /* @__PURE__ */ jsx(AnimatePresence, {
|
|
19
|
+
initial: !disableAnimation,
|
|
20
|
+
children: hasErrors ? /* @__PURE__ */ jsx(motion.div, {
|
|
21
|
+
exit: disableAnimation ? void 0 : {
|
|
22
|
+
opacity: 0,
|
|
23
|
+
height: 0
|
|
24
|
+
},
|
|
25
|
+
initial: disableAnimation ? false : {
|
|
26
|
+
height: 0,
|
|
27
|
+
opacity: 0
|
|
28
|
+
},
|
|
29
|
+
style: { overflow: "hidden" },
|
|
30
|
+
transition: {
|
|
31
|
+
duration: .2,
|
|
32
|
+
ease: "circOut"
|
|
33
|
+
},
|
|
34
|
+
animate: disableAnimation ? void 0 : {
|
|
35
|
+
opacity: 1,
|
|
36
|
+
height: "auto"
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
39
|
+
...getHelperWrapperProps(),
|
|
40
|
+
className: cn(getHelperWrapperProps()?.className, className),
|
|
41
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
42
|
+
...getErrorMessageProps(),
|
|
43
|
+
children: /* @__PURE__ */ jsx(FieldValidationError_default, {
|
|
44
|
+
error: error._errors,
|
|
45
|
+
testId
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
}, "field-card-errors") : null
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var FieldCardValidationError_default = FieldCardValidationError;
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/FieldCard/FieldCard.tsx
|
|
56
|
+
const fieldCardVariants = tv({
|
|
57
|
+
slots: {
|
|
58
|
+
base: ["overflow-hidden rounded-small border bg-content1"],
|
|
59
|
+
label: [
|
|
60
|
+
"pointer-events-auto! static! z-auto! block! w-full!",
|
|
61
|
+
"translate-x-0! translate-y-0! transform-none!",
|
|
62
|
+
"rounded-t-small border-b p-3 font-semibold text-medium"
|
|
63
|
+
],
|
|
64
|
+
content: ["p-3", "grid gap-4"],
|
|
65
|
+
errorFooter: ["border-t", "block px-3 py-2"]
|
|
66
|
+
},
|
|
67
|
+
variants: { invalid: {
|
|
68
|
+
true: {
|
|
69
|
+
base: "border-danger",
|
|
70
|
+
label: "border-danger text-danger",
|
|
71
|
+
errorFooter: "border-danger"
|
|
72
|
+
},
|
|
73
|
+
false: {
|
|
74
|
+
base: "border-divider",
|
|
75
|
+
label: "border-divider text-foreground",
|
|
76
|
+
errorFooter: "border-divider"
|
|
77
|
+
}
|
|
78
|
+
} },
|
|
79
|
+
defaultVariants: { invalid: false }
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* FieldCard component - A card-styled container with label header and error footer
|
|
83
|
+
*
|
|
84
|
+
* Displays form field content in a card layout with:
|
|
85
|
+
* - Label/title in the header
|
|
86
|
+
* - Content in the body
|
|
87
|
+
* - Validation errors in the footer
|
|
88
|
+
* - Danger outline when validation errors exist
|
|
89
|
+
*/
|
|
90
|
+
const FieldCard = ({ children, className: _className = void 0, name, ...uniformFieldProps }) => {
|
|
91
|
+
const { error, getLabelProps, invalid, label } = useUniformField({
|
|
92
|
+
name,
|
|
93
|
+
...uniformFieldProps
|
|
94
|
+
});
|
|
95
|
+
const className = variantsToClassNames(fieldCardVariants({ invalid: invalid && error?._errors }), _className, "base");
|
|
96
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
97
|
+
className: className.base,
|
|
98
|
+
children: [
|
|
99
|
+
label ? /* @__PURE__ */ jsx("div", {
|
|
100
|
+
...getLabelProps(),
|
|
101
|
+
"aria-level": 3,
|
|
102
|
+
className: cn(getLabelProps()?.className, className.label),
|
|
103
|
+
role: "heading",
|
|
104
|
+
children: label
|
|
105
|
+
}) : null,
|
|
106
|
+
/* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: className.content,
|
|
108
|
+
children
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ jsx(FieldCardValidationError_default, {
|
|
111
|
+
className: className.errorFooter,
|
|
112
|
+
name
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
var FieldCard_default = FieldCard;
|
|
118
|
+
|
|
119
|
+
//#endregion
|
|
120
|
+
export { fieldCardVariants as n, FieldCard_default as t };
|
|
121
|
+
//# sourceMappingURL=FieldCard-mpmErfDK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCard-mpmErfDK.js","names":["FieldValidationError","FieldCardValidationError"],"sources":["../src/FieldCard/subcomponents/FieldCardValidationError.tsx","../src/FieldCard/FieldCard.tsx"],"sourcesContent":["import {\n AnimatePresence,\n motion,\n useReducedMotion,\n} from '@fuf-stack/pixel-motion';\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../../hooks/useUniformField';\nimport FieldValidationError from '../../partials/FieldValidationError/FieldValidationError';\n\nexport interface FieldCardValidationErrorProps {\n /** CSS class name for the error footer wrapper */\n className?: string;\n /** Field name */\n name: string;\n}\n\n/**\n * Renders validation errors in the footer of a FieldCard component.\n *\n * This component handles displaying field-level validation errors with proper\n * accessibility attributes and animates them in/out using Framer Motion.\n */\nconst FieldCardValidationError = ({\n className = undefined,\n name,\n}: FieldCardValidationErrorProps) => {\n const {\n error,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n testId,\n } = useUniformField({\n name,\n });\n\n // disable all animation if user prefers reduced motion\n const disableAnimation = useReducedMotion();\n\n // @ts-expect-error - error._errors exists but not typed\n const hasErrors = invalid && error?._errors;\n\n return (\n <AnimatePresence initial={!disableAnimation}>\n {hasErrors ? (\n <motion.div\n key=\"field-card-errors\"\n exit={disableAnimation ? undefined : { opacity: 0, height: 0 }}\n initial={disableAnimation ? false : { height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{ duration: 0.2, ease: 'circOut' }}\n animate={\n disableAnimation ? undefined : { opacity: 1, height: 'auto' }\n }\n >\n <div\n {...getHelperWrapperProps()}\n className={cn(getHelperWrapperProps()?.className, className)}\n >\n <div {...getErrorMessageProps()}>\n <FieldValidationError\n // @ts-expect-error - error._errors exists but not typed\n error={error._errors}\n testId={testId}\n />\n </div>\n </div>\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n};\n\nexport default FieldCardValidationError;\n","import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\nimport FieldCardValidationError from './subcomponents/FieldCardValidationError';\n\nexport const fieldCardVariants = tv({\n slots: {\n /** base class for the field card wrapper */\n base: [\n // base styles\n 'overflow-hidden rounded-small border bg-content1',\n ],\n /** class for the label/header */\n label: [\n // override HeroUI label positioning and display\n 'pointer-events-auto! static! z-auto! block! w-full!',\n // reset any transforms or translations\n 'translate-x-0! translate-y-0! transform-none!',\n // card header styling - use text-medium (16px) for proper header size\n 'rounded-t-small border-b p-3 font-semibold text-medium',\n ],\n /** class for the content */\n content: [\n // same as p-3 of Card component\n 'p-3',\n // default grid for form components (see Grid component)\n 'grid gap-4',\n ],\n /** class for the error footer wrapper */\n errorFooter: [\n 'border-t',\n // force helper to be visible and add padding\n 'block px-3 py-2',\n ],\n },\n variants: {\n invalid: {\n true: {\n base: 'border-danger',\n label: 'border-danger text-danger',\n errorFooter: 'border-danger',\n },\n false: {\n base: 'border-divider',\n label: 'border-divider text-foreground',\n errorFooter: 'border-divider',\n },\n },\n },\n defaultVariants: {\n invalid: false,\n },\n});\n\ntype ClassName = TVClassName<typeof fieldCardVariants>;\n\nexport interface FieldCardProps {\n /** Content to render inside the card */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Label content for the card header */\n label: ReactNode;\n /** Field name for validation */\n name: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * FieldCard component - A card-styled container with label header and error footer\n *\n * Displays form field content in a card layout with:\n * - Label/title in the header\n * - Content in the body\n * - Validation errors in the footer\n * - Danger outline when validation errors exist\n */\nconst FieldCard = ({\n children,\n className: _className = undefined,\n name,\n ...uniformFieldProps\n}: FieldCardProps) => {\n const { error, getLabelProps, invalid, label } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // @ts-expect-error - error._errors exists but not typed\n const hasErrors = invalid && error?._errors;\n\n // className from slots\n const variants = fieldCardVariants({ invalid: hasErrors });\n const className = variantsToClassNames(variants, _className, 'base');\n\n return (\n <div className={className.base}>\n {/* card header with label */}\n {label ? (\n <div\n {...getLabelProps()}\n aria-level={3}\n className={cn(getLabelProps()?.className, className.label)}\n role=\"heading\"\n >\n {label}\n </div>\n ) : null}\n\n {/* card content */}\n <div className={className.content}>{children}</div>\n\n {/* card footer with validation errors */}\n <FieldCardValidationError className={className.errorFooter} name={name} />\n </div>\n );\n};\n\nexport default FieldCard;\n"],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,4BAA4B,EAChC,YAAY,QACZ,WACmC;CACnC,MAAM,EACJ,OACA,sBACA,uBACA,SACA,WACE,gBAAgB,EAClB,MACD,CAAC;CAGF,MAAM,mBAAmB,kBAAkB;CAG3C,MAAM,YAAY,WAAW,OAAO;AAEpC,QACE,oBAAC;EAAgB,SAAS,CAAC;YACxB,YACC,oBAAC,OAAO;GAEN,MAAM,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAG;GAC9D,SAAS,mBAAmB,QAAQ;IAAE,QAAQ;IAAG,SAAS;IAAG;GAC7D,OAAO,EAAE,UAAU,UAAU;GAC7B,YAAY;IAAE,UAAU;IAAK,MAAM;IAAW;GAC9C,SACE,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAQ;aAG/D,oBAAC;IACC,GAAI,uBAAuB;IAC3B,WAAW,GAAG,uBAAuB,EAAE,WAAW,UAAU;cAE5D,oBAAC;KAAI,GAAI,sBAAsB;eAC7B,oBAACA;MAEC,OAAO,MAAM;MACL;OACR;MACE;KACF;KApBF,oBAqBO,GACX;GACY;;AAItB,uCAAe;;;;AClEf,MAAa,oBAAoB,GAAG;CAClC,OAAO;EAEL,MAAM,CAEJ,mDACD;EAED,OAAO;GAEL;GAEA;GAEA;GACD;EAED,SAAS,CAEP,OAEA,aACD;EAED,aAAa,CACX,YAEA,kBACD;EACF;CACD,UAAU,EACR,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACd;EACD,OAAO;GACL,MAAM;GACN,OAAO;GACP,aAAa;GACd;EACF,EACF;CACD,iBAAiB,EACf,SAAS,OACV;CACF,CAAC;;;;;;;;;;AA0BF,MAAM,aAAa,EACjB,UACA,WAAW,aAAa,QACxB,MACA,GAAG,wBACiB;CACpB,MAAM,EAAE,OAAO,eAAe,SAAS,UAAU,gBAAgB;EAC/D;EACA,GAAG;EACJ,CAAC;CAOF,MAAM,YAAY,qBADD,kBAAkB,EAAE,SAHnB,WAAW,OAAO,SAGqB,CAAC,EACT,YAAY,OAAO;AAEpE,QACE,qBAAC;EAAI,WAAW,UAAU;;GAEvB,QACC,oBAAC;IACC,GAAI,eAAe;IACnB,cAAY;IACZ,WAAW,GAAG,eAAe,EAAE,WAAW,UAAU,MAAM;IAC1D,MAAK;cAEJ;KACG,GACJ;GAGJ,oBAAC;IAAI,WAAW,UAAU;IAAU;KAAe;GAGnD,oBAACC;IAAyB,WAAW,UAAU;IAAmB;KAAQ;;GACtE;;AAIV,wBAAe"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const require_FormContext = require('./FormContext-C3GymQOA.cjs');
|
|
2
|
+
const require_FieldValidationError = require('./FieldValidationError-Cq6aI0tE.cjs');
|
|
3
|
+
const require_useUniformField = require('./useUniformField-BMvnRC_r.cjs');
|
|
4
|
+
let __fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let __fuf_stack_pixel_motion = require("@fuf-stack/pixel-motion");
|
|
7
|
+
|
|
8
|
+
//#region src/FieldCard/subcomponents/FieldCardValidationError.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Renders validation errors in the footer of a FieldCard component.
|
|
11
|
+
*
|
|
12
|
+
* This component handles displaying field-level validation errors with proper
|
|
13
|
+
* accessibility attributes and animates them in/out using Framer Motion.
|
|
14
|
+
*/
|
|
15
|
+
const FieldCardValidationError = ({ className = void 0, name }) => {
|
|
16
|
+
const { error, getErrorMessageProps, getHelperWrapperProps, invalid, testId } = require_useUniformField.useUniformField({ name });
|
|
17
|
+
const disableAnimation = (0, __fuf_stack_pixel_motion.useReducedMotion)();
|
|
18
|
+
const hasErrors = invalid && error?._errors;
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__fuf_stack_pixel_motion.AnimatePresence, {
|
|
20
|
+
initial: !disableAnimation,
|
|
21
|
+
children: hasErrors ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__fuf_stack_pixel_motion.motion.div, {
|
|
22
|
+
exit: disableAnimation ? void 0 : {
|
|
23
|
+
opacity: 0,
|
|
24
|
+
height: 0
|
|
25
|
+
},
|
|
26
|
+
initial: disableAnimation ? false : {
|
|
27
|
+
height: 0,
|
|
28
|
+
opacity: 0
|
|
29
|
+
},
|
|
30
|
+
style: { overflow: "hidden" },
|
|
31
|
+
transition: {
|
|
32
|
+
duration: .2,
|
|
33
|
+
ease: "circOut"
|
|
34
|
+
},
|
|
35
|
+
animate: disableAnimation ? void 0 : {
|
|
36
|
+
opacity: 1,
|
|
37
|
+
height: "auto"
|
|
38
|
+
},
|
|
39
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
40
|
+
...getHelperWrapperProps(),
|
|
41
|
+
className: (0, __fuf_stack_pixel_utils.cn)(getHelperWrapperProps()?.className, className),
|
|
42
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
43
|
+
...getErrorMessageProps(),
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FieldValidationError.FieldValidationError_default$1, {
|
|
45
|
+
error: error._errors,
|
|
46
|
+
testId
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
}, "field-card-errors") : null
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
var FieldCardValidationError_default = FieldCardValidationError;
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/FieldCard/FieldCard.tsx
|
|
57
|
+
const fieldCardVariants = (0, __fuf_stack_pixel_utils.tv)({
|
|
58
|
+
slots: {
|
|
59
|
+
base: ["overflow-hidden rounded-small border bg-content1"],
|
|
60
|
+
label: [
|
|
61
|
+
"pointer-events-auto! static! z-auto! block! w-full!",
|
|
62
|
+
"translate-x-0! translate-y-0! transform-none!",
|
|
63
|
+
"rounded-t-small border-b p-3 font-semibold text-medium"
|
|
64
|
+
],
|
|
65
|
+
content: ["p-3", "grid gap-4"],
|
|
66
|
+
errorFooter: ["border-t", "block px-3 py-2"]
|
|
67
|
+
},
|
|
68
|
+
variants: { invalid: {
|
|
69
|
+
true: {
|
|
70
|
+
base: "border-danger",
|
|
71
|
+
label: "border-danger text-danger",
|
|
72
|
+
errorFooter: "border-danger"
|
|
73
|
+
},
|
|
74
|
+
false: {
|
|
75
|
+
base: "border-divider",
|
|
76
|
+
label: "border-divider text-foreground",
|
|
77
|
+
errorFooter: "border-divider"
|
|
78
|
+
}
|
|
79
|
+
} },
|
|
80
|
+
defaultVariants: { invalid: false }
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* FieldCard component - A card-styled container with label header and error footer
|
|
84
|
+
*
|
|
85
|
+
* Displays form field content in a card layout with:
|
|
86
|
+
* - Label/title in the header
|
|
87
|
+
* - Content in the body
|
|
88
|
+
* - Validation errors in the footer
|
|
89
|
+
* - Danger outline when validation errors exist
|
|
90
|
+
*/
|
|
91
|
+
const FieldCard = ({ children, className: _className = void 0, name, ...uniformFieldProps }) => {
|
|
92
|
+
const { error, getLabelProps, invalid, label } = require_useUniformField.useUniformField({
|
|
93
|
+
name,
|
|
94
|
+
...uniformFieldProps
|
|
95
|
+
});
|
|
96
|
+
const className = (0, __fuf_stack_pixel_utils.variantsToClassNames)(fieldCardVariants({ invalid: invalid && error?._errors }), _className, "base");
|
|
97
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
98
|
+
className: className.base,
|
|
99
|
+
children: [
|
|
100
|
+
label ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
101
|
+
...getLabelProps(),
|
|
102
|
+
"aria-level": 3,
|
|
103
|
+
className: (0, __fuf_stack_pixel_utils.cn)(getLabelProps()?.className, className.label),
|
|
104
|
+
role: "heading",
|
|
105
|
+
children: label
|
|
106
|
+
}) : null,
|
|
107
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
108
|
+
className: className.content,
|
|
109
|
+
children
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldCardValidationError_default, {
|
|
112
|
+
className: className.errorFooter,
|
|
113
|
+
name
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
var FieldCard_default = FieldCard;
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
Object.defineProperty(exports, 'FieldCard_default', {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () {
|
|
124
|
+
return FieldCard_default;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, 'fieldCardVariants', {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () {
|
|
130
|
+
return fieldCardVariants;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
//# sourceMappingURL=FieldCard-pP7aniZU.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCard-pP7aniZU.cjs","names":["useUniformField","AnimatePresence","motion","FieldValidationError","useUniformField","FieldCardValidationError"],"sources":["../src/FieldCard/subcomponents/FieldCardValidationError.tsx","../src/FieldCard/FieldCard.tsx"],"sourcesContent":["import {\n AnimatePresence,\n motion,\n useReducedMotion,\n} from '@fuf-stack/pixel-motion';\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../../hooks/useUniformField';\nimport FieldValidationError from '../../partials/FieldValidationError/FieldValidationError';\n\nexport interface FieldCardValidationErrorProps {\n /** CSS class name for the error footer wrapper */\n className?: string;\n /** Field name */\n name: string;\n}\n\n/**\n * Renders validation errors in the footer of a FieldCard component.\n *\n * This component handles displaying field-level validation errors with proper\n * accessibility attributes and animates them in/out using Framer Motion.\n */\nconst FieldCardValidationError = ({\n className = undefined,\n name,\n}: FieldCardValidationErrorProps) => {\n const {\n error,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n testId,\n } = useUniformField({\n name,\n });\n\n // disable all animation if user prefers reduced motion\n const disableAnimation = useReducedMotion();\n\n // @ts-expect-error - error._errors exists but not typed\n const hasErrors = invalid && error?._errors;\n\n return (\n <AnimatePresence initial={!disableAnimation}>\n {hasErrors ? (\n <motion.div\n key=\"field-card-errors\"\n exit={disableAnimation ? undefined : { opacity: 0, height: 0 }}\n initial={disableAnimation ? false : { height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{ duration: 0.2, ease: 'circOut' }}\n animate={\n disableAnimation ? undefined : { opacity: 1, height: 'auto' }\n }\n >\n <div\n {...getHelperWrapperProps()}\n className={cn(getHelperWrapperProps()?.className, className)}\n >\n <div {...getErrorMessageProps()}>\n <FieldValidationError\n // @ts-expect-error - error._errors exists but not typed\n error={error._errors}\n testId={testId}\n />\n </div>\n </div>\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n};\n\nexport default FieldCardValidationError;\n","import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\nimport FieldCardValidationError from './subcomponents/FieldCardValidationError';\n\nexport const fieldCardVariants = tv({\n slots: {\n /** base class for the field card wrapper */\n base: [\n // base styles\n 'overflow-hidden rounded-small border bg-content1',\n ],\n /** class for the label/header */\n label: [\n // override HeroUI label positioning and display\n 'pointer-events-auto! static! z-auto! block! w-full!',\n // reset any transforms or translations\n 'translate-x-0! translate-y-0! transform-none!',\n // card header styling - use text-medium (16px) for proper header size\n 'rounded-t-small border-b p-3 font-semibold text-medium',\n ],\n /** class for the content */\n content: [\n // same as p-3 of Card component\n 'p-3',\n // default grid for form components (see Grid component)\n 'grid gap-4',\n ],\n /** class for the error footer wrapper */\n errorFooter: [\n 'border-t',\n // force helper to be visible and add padding\n 'block px-3 py-2',\n ],\n },\n variants: {\n invalid: {\n true: {\n base: 'border-danger',\n label: 'border-danger text-danger',\n errorFooter: 'border-danger',\n },\n false: {\n base: 'border-divider',\n label: 'border-divider text-foreground',\n errorFooter: 'border-divider',\n },\n },\n },\n defaultVariants: {\n invalid: false,\n },\n});\n\ntype ClassName = TVClassName<typeof fieldCardVariants>;\n\nexport interface FieldCardProps {\n /** Content to render inside the card */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Label content for the card header */\n label: ReactNode;\n /** Field name for validation */\n name: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * FieldCard component - A card-styled container with label header and error footer\n *\n * Displays form field content in a card layout with:\n * - Label/title in the header\n * - Content in the body\n * - Validation errors in the footer\n * - Danger outline when validation errors exist\n */\nconst FieldCard = ({\n children,\n className: _className = undefined,\n name,\n ...uniformFieldProps\n}: FieldCardProps) => {\n const { error, getLabelProps, invalid, label } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // @ts-expect-error - error._errors exists but not typed\n const hasErrors = invalid && error?._errors;\n\n // className from slots\n const variants = fieldCardVariants({ invalid: hasErrors });\n const className = variantsToClassNames(variants, _className, 'base');\n\n return (\n <div className={className.base}>\n {/* card header with label */}\n {label ? (\n <div\n {...getLabelProps()}\n aria-level={3}\n className={cn(getLabelProps()?.className, className.label)}\n role=\"heading\"\n >\n {label}\n </div>\n ) : null}\n\n {/* card content */}\n <div className={className.content}>{children}</div>\n\n {/* card footer with validation errors */}\n <FieldCardValidationError className={className.errorFooter} name={name} />\n </div>\n );\n};\n\nexport default FieldCard;\n"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAM,4BAA4B,EAChC,YAAY,QACZ,WACmC;CACnC,MAAM,EACJ,OACA,sBACA,uBACA,SACA,WACEA,wCAAgB,EAClB,MACD,CAAC;CAGF,MAAM,mEAAqC;CAG3C,MAAM,YAAY,WAAW,OAAO;AAEpC,QACE,2CAACC;EAAgB,SAAS,CAAC;YACxB,YACC,2CAACC,gCAAO;GAEN,MAAM,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAG;GAC9D,SAAS,mBAAmB,QAAQ;IAAE,QAAQ;IAAG,SAAS;IAAG;GAC7D,OAAO,EAAE,UAAU,UAAU;GAC7B,YAAY;IAAE,UAAU;IAAK,MAAM;IAAW;GAC9C,SACE,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAQ;aAG/D,2CAAC;IACC,GAAI,uBAAuB;IAC3B,2CAAc,uBAAuB,EAAE,WAAW,UAAU;cAE5D,2CAAC;KAAI,GAAI,sBAAsB;eAC7B,2CAACC;MAEC,OAAO,MAAM;MACL;OACR;MACE;KACF;KApBF,oBAqBO,GACX;GACY;;AAItB,uCAAe;;;;AClEf,MAAa,oDAAuB;CAClC,OAAO;EAEL,MAAM,CAEJ,mDACD;EAED,OAAO;GAEL;GAEA;GAEA;GACD;EAED,SAAS,CAEP,OAEA,aACD;EAED,aAAa,CACX,YAEA,kBACD;EACF;CACD,UAAU,EACR,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACd;EACD,OAAO;GACL,MAAM;GACN,OAAO;GACP,aAAa;GACd;EACF,EACF;CACD,iBAAiB,EACf,SAAS,OACV;CACF,CAAC;;;;;;;;;;AA0BF,MAAM,aAAa,EACjB,UACA,WAAW,aAAa,QACxB,MACA,GAAG,wBACiB;CACpB,MAAM,EAAE,OAAO,eAAe,SAAS,UAAUC,wCAAgB;EAC/D;EACA,GAAG;EACJ,CAAC;CAOF,MAAM,8DADW,kBAAkB,EAAE,SAHnB,WAAW,OAAO,SAGqB,CAAC,EACT,YAAY,OAAO;AAEpE,QACE,4CAAC;EAAI,WAAW,UAAU;;GAEvB,QACC,2CAAC;IACC,GAAI,eAAe;IACnB,cAAY;IACZ,2CAAc,eAAe,EAAE,WAAW,UAAU,MAAM;IAC1D,MAAK;cAEJ;KACG,GACJ;GAGJ,2CAAC;IAAI,WAAW,UAAU;IAAU;KAAe;GAGnD,2CAACC;IAAyB,WAAW,UAAU;IAAmB;KAAQ;;GACtE;;AAIV,wBAAe"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_FormContext = require('./FormContext-C3GymQOA.cjs');
|
|
2
|
+
let __fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
|
|
3
|
+
let __fuf_stack_pixels = require("@fuf-stack/pixels");
|
|
4
|
+
let react_icons_fa6 = require("react-icons/fa6");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
|
|
7
|
+
//#region src/partials/FieldCopyTestIdButton/FieldCopyTestIdButton.tsx
|
|
8
|
+
const FieldCopyTestIdButton = ({ className = void 0, testId }) => {
|
|
9
|
+
const copyToClipboard = () => {
|
|
10
|
+
navigator.clipboard.writeText(testId).catch((err) => {
|
|
11
|
+
console.error("Error copying TestId to clipboard", err);
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__fuf_stack_pixels.Button, {
|
|
15
|
+
className: (0, __fuf_stack_pixel_utils.cn)(className, "pointer-events-auto"),
|
|
16
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_fa6.FaBullseye, {}),
|
|
17
|
+
onClick: copyToClipboard,
|
|
18
|
+
size: "sm",
|
|
19
|
+
variant: "light"
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var FieldCopyTestIdButton_default = FieldCopyTestIdButton;
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/partials/FieldCopyTestIdButton/index.ts
|
|
26
|
+
var FieldCopyTestIdButton_default$1 = FieldCopyTestIdButton_default;
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
Object.defineProperty(exports, 'FieldCopyTestIdButton_default', {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return FieldCopyTestIdButton_default$1;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, 'FieldCopyTestIdButton_default$1', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return FieldCopyTestIdButton_default;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=FieldCopyTestIdButton-AaLwu_8y.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCopyTestIdButton-AaLwu_8y.cjs","names":["Button","FaBullseye","FieldCopyTestIdButton"],"sources":["../src/partials/FieldCopyTestIdButton/FieldCopyTestIdButton.tsx","../src/partials/FieldCopyTestIdButton/index.ts"],"sourcesContent":["import { FaBullseye } from 'react-icons/fa6';\n\nimport { cn } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels';\n\nexport interface FieldCopyTestIdButtonProps {\n /** CSS class name */\n className?: string;\n /** HTML data-testid attribute used in e2e tests */\n testId: string;\n}\n\nconst FieldCopyTestIdButton = ({\n className = undefined,\n testId,\n}: FieldCopyTestIdButtonProps) => {\n const copyToClipboard = () => {\n navigator.clipboard.writeText(testId).catch((err) => {\n console.error('Error copying TestId to clipboard', err);\n });\n };\n\n return (\n <Button\n className={cn(className, 'pointer-events-auto')}\n icon={<FaBullseye />}\n onClick={copyToClipboard}\n size=\"sm\"\n variant=\"light\"\n />\n );\n};\nexport default FieldCopyTestIdButton;\n","import FieldCopyTestIdButton from './FieldCopyTestIdButton';\n\nexport type { FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton';\n\nexport { FieldCopyTestIdButton };\n\nexport default FieldCopyTestIdButton;\n"],"mappings":";;;;;;;AAYA,MAAM,yBAAyB,EAC7B,YAAY,QACZ,aACgC;CAChC,MAAM,wBAAwB;AAC5B,YAAU,UAAU,UAAU,OAAO,CAAC,OAAO,QAAQ;AACnD,WAAQ,MAAM,qCAAqC,IAAI;IACvD;;AAGJ,QACE,2CAACA;EACC,2CAAc,WAAW,sBAAsB;EAC/C,MAAM,2CAACC,+BAAa;EACpB,SAAS;EACT,MAAK;EACL,SAAQ;GACR;;AAGN,oCAAe;;;;AC1Bf,sCAAeC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from "@fuf-stack/pixel-utils";
|
|
2
|
+
import { Button } from "@fuf-stack/pixels";
|
|
3
|
+
import { FaBullseye } from "react-icons/fa6";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/partials/FieldCopyTestIdButton/FieldCopyTestIdButton.tsx
|
|
7
|
+
const FieldCopyTestIdButton = ({ className = void 0, testId }) => {
|
|
8
|
+
const copyToClipboard = () => {
|
|
9
|
+
navigator.clipboard.writeText(testId).catch((err) => {
|
|
10
|
+
console.error("Error copying TestId to clipboard", err);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
14
|
+
className: cn(className, "pointer-events-auto"),
|
|
15
|
+
icon: /* @__PURE__ */ jsx(FaBullseye, {}),
|
|
16
|
+
onClick: copyToClipboard,
|
|
17
|
+
size: "sm",
|
|
18
|
+
variant: "light"
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var FieldCopyTestIdButton_default = FieldCopyTestIdButton;
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/partials/FieldCopyTestIdButton/index.ts
|
|
25
|
+
var FieldCopyTestIdButton_default$1 = FieldCopyTestIdButton_default;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { FieldCopyTestIdButton_default as n, FieldCopyTestIdButton_default$1 as t };
|
|
29
|
+
//# sourceMappingURL=FieldCopyTestIdButton-Cx8AXJhO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCopyTestIdButton-Cx8AXJhO.js","names":["FieldCopyTestIdButton"],"sources":["../src/partials/FieldCopyTestIdButton/FieldCopyTestIdButton.tsx","../src/partials/FieldCopyTestIdButton/index.ts"],"sourcesContent":["import { FaBullseye } from 'react-icons/fa6';\n\nimport { cn } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels';\n\nexport interface FieldCopyTestIdButtonProps {\n /** CSS class name */\n className?: string;\n /** HTML data-testid attribute used in e2e tests */\n testId: string;\n}\n\nconst FieldCopyTestIdButton = ({\n className = undefined,\n testId,\n}: FieldCopyTestIdButtonProps) => {\n const copyToClipboard = () => {\n navigator.clipboard.writeText(testId).catch((err) => {\n console.error('Error copying TestId to clipboard', err);\n });\n };\n\n return (\n <Button\n className={cn(className, 'pointer-events-auto')}\n icon={<FaBullseye />}\n onClick={copyToClipboard}\n size=\"sm\"\n variant=\"light\"\n />\n );\n};\nexport default FieldCopyTestIdButton;\n","import FieldCopyTestIdButton from './FieldCopyTestIdButton';\n\nexport type { FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton';\n\nexport { FieldCopyTestIdButton };\n\nexport default FieldCopyTestIdButton;\n"],"mappings":";;;;;;AAYA,MAAM,yBAAyB,EAC7B,YAAY,QACZ,aACgC;CAChC,MAAM,wBAAwB;AAC5B,YAAU,UAAU,UAAU,OAAO,CAAC,OAAO,QAAQ;AACnD,WAAQ,MAAM,qCAAqC,IAAI;IACvD;;AAGJ,QACE,oBAAC;EACC,WAAW,GAAG,WAAW,sBAAsB;EAC/C,MAAM,oBAAC,eAAa;EACpB,SAAS;EACT,MAAK;EACL,SAAQ;GACR;;AAGN,oCAAe;;;;AC1Bf,sCAAeA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const require_FormContext = require('./FormContext-C3GymQOA.cjs');
|
|
2
|
+
let __fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let __fuf_stack_pixel_motion = require("@fuf-stack/pixel-motion");
|
|
5
|
+
|
|
6
|
+
//#region src/partials/FieldValidationError/FieldValidationError.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Renders a validation error of a field
|
|
9
|
+
*/
|
|
10
|
+
const FieldValidationError = ({ className = void 0, error = void 0, testId }) => {
|
|
11
|
+
const disableAnimation = (0, __fuf_stack_pixel_motion.useReducedMotion)();
|
|
12
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
13
|
+
"aria-label": `Validation errors of field ${testId}`,
|
|
14
|
+
className,
|
|
15
|
+
"data-testid": (0, __fuf_stack_pixel_utils.slugify)(`${testId}_error`),
|
|
16
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__fuf_stack_pixel_motion.AnimatePresence, {
|
|
17
|
+
initial: !disableAnimation,
|
|
18
|
+
children: error?.map(({ message }, i) => {
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__fuf_stack_pixel_motion.motion.li, {
|
|
20
|
+
exit: disableAnimation ? void 0 : {
|
|
21
|
+
opacity: 0,
|
|
22
|
+
height: 0
|
|
23
|
+
},
|
|
24
|
+
initial: disableAnimation ? false : {
|
|
25
|
+
height: 0,
|
|
26
|
+
opacity: 0
|
|
27
|
+
},
|
|
28
|
+
style: { overflow: "hidden" },
|
|
29
|
+
transition: {
|
|
30
|
+
duration: .2,
|
|
31
|
+
ease: "circOut"
|
|
32
|
+
},
|
|
33
|
+
animate: disableAnimation ? void 0 : {
|
|
34
|
+
opacity: 1,
|
|
35
|
+
height: "auto"
|
|
36
|
+
},
|
|
37
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
38
|
+
className: "px-1 pt-1",
|
|
39
|
+
children: message
|
|
40
|
+
})
|
|
41
|
+
}, (0, __fuf_stack_pixel_utils.slugify)(`${testId}_error_${i}`));
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var FieldValidationError_default = FieldValidationError;
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/partials/FieldValidationError/index.ts
|
|
50
|
+
var FieldValidationError_default$1 = FieldValidationError_default;
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
Object.defineProperty(exports, 'FieldValidationError_default', {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () {
|
|
56
|
+
return FieldValidationError_default$1;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, 'FieldValidationError_default$1', {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () {
|
|
62
|
+
return FieldValidationError_default;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=FieldValidationError-Cq6aI0tE.cjs.map
|