rn-inputforge 0.4.0 → 0.5.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 +723 -39
- package/lib/commonjs/adapters/index.js +25 -0
- package/lib/commonjs/adapters/index.js.map +1 -0
- package/lib/commonjs/adapters/reactHookForm.js +107 -0
- package/lib/commonjs/adapters/reactHookForm.js.map +1 -0
- package/lib/commonjs/components/FieldFlowAffordance/FieldFlowAffordance.js +104 -0
- package/lib/commonjs/components/FieldFlowAffordance/FieldFlowAffordance.js.map +1 -0
- package/lib/commonjs/components/FieldFlowAffordance/index.js +13 -0
- package/lib/commonjs/components/FieldFlowAffordance/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowCreditCard/FieldFlowCreditCard.js +146 -0
- package/lib/commonjs/components/FieldFlowCreditCard/FieldFlowCreditCard.js.map +1 -0
- package/lib/commonjs/components/FieldFlowCreditCard/index.js +13 -0
- package/lib/commonjs/components/FieldFlowCreditCard/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowDraftBanner/FieldFlowDraftBanner.js +156 -0
- package/lib/commonjs/components/FieldFlowDraftBanner/FieldFlowDraftBanner.js.map +1 -0
- package/lib/commonjs/components/FieldFlowDraftBanner/index.js +13 -0
- package/lib/commonjs/components/FieldFlowDraftBanner/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowInput/FieldFlowInput.js +143 -43
- package/lib/commonjs/components/FieldFlowInput/FieldFlowInput.js.map +1 -1
- package/lib/commonjs/components/FieldFlowInput/styles.js +16 -0
- package/lib/commonjs/components/FieldFlowInput/styles.js.map +1 -1
- package/lib/commonjs/components/FieldFlowNumberStepper/FieldFlowNumberStepper.js +136 -0
- package/lib/commonjs/components/FieldFlowNumberStepper/FieldFlowNumberStepper.js.map +1 -0
- package/lib/commonjs/components/FieldFlowNumberStepper/index.js +13 -0
- package/lib/commonjs/components/FieldFlowNumberStepper/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.js +122 -0
- package/lib/commonjs/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.js.map +1 -0
- package/lib/commonjs/components/FieldFlowPasswordStrength/index.js +13 -0
- package/lib/commonjs/components/FieldFlowPasswordStrength/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowPhone/FieldFlowPhone.js +263 -0
- package/lib/commonjs/components/FieldFlowPhone/FieldFlowPhone.js.map +1 -0
- package/lib/commonjs/components/FieldFlowPhone/index.js +13 -0
- package/lib/commonjs/components/FieldFlowPhone/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowRating/FieldFlowRating.js +106 -0
- package/lib/commonjs/components/FieldFlowRating/FieldFlowRating.js.map +1 -0
- package/lib/commonjs/components/FieldFlowRating/index.js +13 -0
- package/lib/commonjs/components/FieldFlowRating/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSection/FieldFlowSection.js +141 -0
- package/lib/commonjs/components/FieldFlowSection/FieldFlowSection.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSection/index.js +13 -0
- package/lib/commonjs/components/FieldFlowSection/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSegmented/FieldFlowSegmented.js +195 -0
- package/lib/commonjs/components/FieldFlowSegmented/FieldFlowSegmented.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSegmented/index.js +13 -0
- package/lib/commonjs/components/FieldFlowSegmented/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSignature/FieldFlowSignature.js +200 -0
- package/lib/commonjs/components/FieldFlowSignature/FieldFlowSignature.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSignature/index.js +13 -0
- package/lib/commonjs/components/FieldFlowSignature/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSlider/FieldFlowSlider.js +178 -0
- package/lib/commonjs/components/FieldFlowSlider/FieldFlowSlider.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSlider/index.js +13 -0
- package/lib/commonjs/components/FieldFlowSlider/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowStepper/FieldFlowStepper.js +166 -0
- package/lib/commonjs/components/FieldFlowStepper/FieldFlowStepper.js.map +1 -0
- package/lib/commonjs/components/FieldFlowStepper/index.js +13 -0
- package/lib/commonjs/components/FieldFlowStepper/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowTags/FieldFlowTags.js +240 -0
- package/lib/commonjs/components/FieldFlowTags/FieldFlowTags.js.map +1 -0
- package/lib/commonjs/components/FieldFlowTags/index.js +13 -0
- package/lib/commonjs/components/FieldFlowTags/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowTypeahead/FieldFlowTypeahead.js +227 -0
- package/lib/commonjs/components/FieldFlowTypeahead/FieldFlowTypeahead.js.map +1 -0
- package/lib/commonjs/components/FieldFlowTypeahead/index.js +13 -0
- package/lib/commonjs/components/FieldFlowTypeahead/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowUpload/FieldFlowUpload.js +191 -0
- package/lib/commonjs/components/FieldFlowUpload/FieldFlowUpload.js.map +1 -0
- package/lib/commonjs/components/FieldFlowUpload/index.js +13 -0
- package/lib/commonjs/components/FieldFlowUpload/index.js.map +1 -0
- package/lib/commonjs/hooks/index.js +35 -0
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useFieldFlowArray.js +110 -0
- package/lib/commonjs/hooks/useFieldFlowArray.js.map +1 -0
- package/lib/commonjs/hooks/useFieldFlowDirtyGuard.js +53 -0
- package/lib/commonjs/hooks/useFieldFlowDirtyGuard.js.map +1 -0
- package/lib/commonjs/hooks/useFieldFlowDraft.js +168 -0
- package/lib/commonjs/hooks/useFieldFlowDraft.js.map +1 -0
- package/lib/commonjs/hooks/useFieldFlowForm.js +224 -30
- package/lib/commonjs/hooks/useFieldFlowForm.js.map +1 -1
- package/lib/commonjs/hooks/useFieldFlowSteps.js +77 -0
- package/lib/commonjs/hooks/useFieldFlowSteps.js.map +1 -0
- package/lib/commonjs/hooks/useFormIntelligence.js +130 -0
- package/lib/commonjs/hooks/useFormIntelligence.js.map +1 -0
- package/lib/commonjs/i18n/index.js +25 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/messages.js +88 -0
- package/lib/commonjs/i18n/messages.js.map +1 -0
- package/lib/commonjs/index.js +322 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/intelligence/formAccessibility.js +79 -0
- package/lib/commonjs/intelligence/formAccessibility.js.map +1 -0
- package/lib/commonjs/intelligence/index.js +31 -0
- package/lib/commonjs/intelligence/index.js.map +1 -0
- package/lib/commonjs/intelligence/types.js +2 -0
- package/lib/commonjs/intelligence/types.js.map +1 -0
- package/lib/commonjs/motion/index.js +20 -0
- package/lib/commonjs/motion/index.js.map +1 -0
- package/lib/commonjs/motion/useFieldMotion.js +111 -0
- package/lib/commonjs/motion/useFieldMotion.js.map +1 -0
- package/lib/commonjs/motion/useReducedMotion.js +32 -0
- package/lib/commonjs/motion/useReducedMotion.js.map +1 -0
- package/lib/commonjs/theme/index.js +13 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/theme/presets.js +142 -0
- package/lib/commonjs/theme/presets.js.map +1 -0
- package/lib/commonjs/utils/affordance.js +151 -0
- package/lib/commonjs/utils/affordance.js.map +1 -0
- package/lib/commonjs/utils/passwordStrength.js +79 -0
- package/lib/commonjs/utils/passwordStrength.js.map +1 -0
- package/lib/commonjs/utils/phoneCountries.js +119 -0
- package/lib/commonjs/utils/phoneCountries.js.map +1 -0
- package/lib/commonjs/validation/validators.js +10 -7
- package/lib/commonjs/validation/validators.js.map +1 -1
- package/lib/module/adapters/index.js +4 -0
- package/lib/module/adapters/index.js.map +1 -0
- package/lib/module/adapters/reactHookForm.js +100 -0
- package/lib/module/adapters/reactHookForm.js.map +1 -0
- package/lib/module/components/FieldFlowAffordance/FieldFlowAffordance.js +99 -0
- package/lib/module/components/FieldFlowAffordance/FieldFlowAffordance.js.map +1 -0
- package/lib/module/components/FieldFlowAffordance/index.js +4 -0
- package/lib/module/components/FieldFlowAffordance/index.js.map +1 -0
- package/lib/module/components/FieldFlowCreditCard/FieldFlowCreditCard.js +141 -0
- package/lib/module/components/FieldFlowCreditCard/FieldFlowCreditCard.js.map +1 -0
- package/lib/module/components/FieldFlowCreditCard/index.js +4 -0
- package/lib/module/components/FieldFlowCreditCard/index.js.map +1 -0
- package/lib/module/components/FieldFlowDraftBanner/FieldFlowDraftBanner.js +151 -0
- package/lib/module/components/FieldFlowDraftBanner/FieldFlowDraftBanner.js.map +1 -0
- package/lib/module/components/FieldFlowDraftBanner/index.js +4 -0
- package/lib/module/components/FieldFlowDraftBanner/index.js.map +1 -0
- package/lib/module/components/FieldFlowInput/FieldFlowInput.js +144 -44
- package/lib/module/components/FieldFlowInput/FieldFlowInput.js.map +1 -1
- package/lib/module/components/FieldFlowInput/styles.js +16 -0
- package/lib/module/components/FieldFlowInput/styles.js.map +1 -1
- package/lib/module/components/FieldFlowNumberStepper/FieldFlowNumberStepper.js +131 -0
- package/lib/module/components/FieldFlowNumberStepper/FieldFlowNumberStepper.js.map +1 -0
- package/lib/module/components/FieldFlowNumberStepper/index.js +4 -0
- package/lib/module/components/FieldFlowNumberStepper/index.js.map +1 -0
- package/lib/module/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.js +117 -0
- package/lib/module/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.js.map +1 -0
- package/lib/module/components/FieldFlowPasswordStrength/index.js +4 -0
- package/lib/module/components/FieldFlowPasswordStrength/index.js.map +1 -0
- package/lib/module/components/FieldFlowPhone/FieldFlowPhone.js +258 -0
- package/lib/module/components/FieldFlowPhone/FieldFlowPhone.js.map +1 -0
- package/lib/module/components/FieldFlowPhone/index.js +4 -0
- package/lib/module/components/FieldFlowPhone/index.js.map +1 -0
- package/lib/module/components/FieldFlowRating/FieldFlowRating.js +101 -0
- package/lib/module/components/FieldFlowRating/FieldFlowRating.js.map +1 -0
- package/lib/module/components/FieldFlowRating/index.js +4 -0
- package/lib/module/components/FieldFlowRating/index.js.map +1 -0
- package/lib/module/components/FieldFlowSection/FieldFlowSection.js +136 -0
- package/lib/module/components/FieldFlowSection/FieldFlowSection.js.map +1 -0
- package/lib/module/components/FieldFlowSection/index.js +4 -0
- package/lib/module/components/FieldFlowSection/index.js.map +1 -0
- package/lib/module/components/FieldFlowSegmented/FieldFlowSegmented.js +190 -0
- package/lib/module/components/FieldFlowSegmented/FieldFlowSegmented.js.map +1 -0
- package/lib/module/components/FieldFlowSegmented/index.js +4 -0
- package/lib/module/components/FieldFlowSegmented/index.js.map +1 -0
- package/lib/module/components/FieldFlowSignature/FieldFlowSignature.js +195 -0
- package/lib/module/components/FieldFlowSignature/FieldFlowSignature.js.map +1 -0
- package/lib/module/components/FieldFlowSignature/index.js +4 -0
- package/lib/module/components/FieldFlowSignature/index.js.map +1 -0
- package/lib/module/components/FieldFlowSlider/FieldFlowSlider.js +173 -0
- package/lib/module/components/FieldFlowSlider/FieldFlowSlider.js.map +1 -0
- package/lib/module/components/FieldFlowSlider/index.js +4 -0
- package/lib/module/components/FieldFlowSlider/index.js.map +1 -0
- package/lib/module/components/FieldFlowStepper/FieldFlowStepper.js +161 -0
- package/lib/module/components/FieldFlowStepper/FieldFlowStepper.js.map +1 -0
- package/lib/module/components/FieldFlowStepper/index.js +4 -0
- package/lib/module/components/FieldFlowStepper/index.js.map +1 -0
- package/lib/module/components/FieldFlowTags/FieldFlowTags.js +235 -0
- package/lib/module/components/FieldFlowTags/FieldFlowTags.js.map +1 -0
- package/lib/module/components/FieldFlowTags/index.js +4 -0
- package/lib/module/components/FieldFlowTags/index.js.map +1 -0
- package/lib/module/components/FieldFlowTypeahead/FieldFlowTypeahead.js +222 -0
- package/lib/module/components/FieldFlowTypeahead/FieldFlowTypeahead.js.map +1 -0
- package/lib/module/components/FieldFlowTypeahead/index.js +4 -0
- package/lib/module/components/FieldFlowTypeahead/index.js.map +1 -0
- package/lib/module/components/FieldFlowUpload/FieldFlowUpload.js +186 -0
- package/lib/module/components/FieldFlowUpload/FieldFlowUpload.js.map +1 -0
- package/lib/module/components/FieldFlowUpload/index.js +4 -0
- package/lib/module/components/FieldFlowUpload/index.js.map +1 -0
- package/lib/module/hooks/index.js +5 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useFieldFlowArray.js +106 -0
- package/lib/module/hooks/useFieldFlowArray.js.map +1 -0
- package/lib/module/hooks/useFieldFlowDirtyGuard.js +49 -0
- package/lib/module/hooks/useFieldFlowDirtyGuard.js.map +1 -0
- package/lib/module/hooks/useFieldFlowDraft.js +165 -0
- package/lib/module/hooks/useFieldFlowDraft.js.map +1 -0
- package/lib/module/hooks/useFieldFlowForm.js +224 -30
- package/lib/module/hooks/useFieldFlowForm.js.map +1 -1
- package/lib/module/hooks/useFieldFlowSteps.js +73 -0
- package/lib/module/hooks/useFieldFlowSteps.js.map +1 -0
- package/lib/module/hooks/useFormIntelligence.js +126 -0
- package/lib/module/hooks/useFormIntelligence.js.map +1 -0
- package/lib/module/i18n/index.js +4 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/messages.js +82 -0
- package/lib/module/i18n/messages.js.map +1 -0
- package/lib/module/index.js +31 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/intelligence/formAccessibility.js +72 -0
- package/lib/module/intelligence/formAccessibility.js.map +1 -0
- package/lib/module/intelligence/index.js +4 -0
- package/lib/module/intelligence/index.js.map +1 -0
- package/lib/module/intelligence/types.js +2 -0
- package/lib/module/intelligence/types.js.map +1 -0
- package/lib/module/motion/index.js +5 -0
- package/lib/module/motion/index.js.map +1 -0
- package/lib/module/motion/useFieldMotion.js +107 -0
- package/lib/module/motion/useFieldMotion.js.map +1 -0
- package/lib/module/motion/useReducedMotion.js +29 -0
- package/lib/module/motion/useReducedMotion.js.map +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/presets.js +138 -0
- package/lib/module/theme/presets.js.map +1 -0
- package/lib/module/utils/affordance.js +140 -0
- package/lib/module/utils/affordance.js.map +1 -0
- package/lib/module/utils/passwordStrength.js +74 -0
- package/lib/module/utils/passwordStrength.js.map +1 -0
- package/lib/module/utils/phoneCountries.js +113 -0
- package/lib/module/utils/phoneCountries.js.map +1 -0
- package/lib/module/validation/validators.js +10 -7
- package/lib/module/validation/validators.js.map +1 -1
- package/lib/typescript/adapters/index.d.ts +3 -0
- package/lib/typescript/adapters/index.d.ts.map +1 -0
- package/lib/typescript/adapters/reactHookForm.d.ts +56 -0
- package/lib/typescript/adapters/reactHookForm.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowAffordance/FieldFlowAffordance.d.ts +29 -0
- package/lib/typescript/components/FieldFlowAffordance/FieldFlowAffordance.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowAffordance/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowAffordance/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowCreditCard/FieldFlowCreditCard.d.ts +27 -0
- package/lib/typescript/components/FieldFlowCreditCard/FieldFlowCreditCard.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowCreditCard/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowCreditCard/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowDraftBanner/FieldFlowDraftBanner.d.ts +24 -0
- package/lib/typescript/components/FieldFlowDraftBanner/FieldFlowDraftBanner.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowDraftBanner/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowDraftBanner/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowInput/FieldFlowInput.d.ts.map +1 -1
- package/lib/typescript/components/FieldFlowInput/styles.d.ts +16 -0
- package/lib/typescript/components/FieldFlowInput/styles.d.ts.map +1 -1
- package/lib/typescript/components/FieldFlowInput/types.d.ts +32 -0
- package/lib/typescript/components/FieldFlowInput/types.d.ts.map +1 -1
- package/lib/typescript/components/FieldFlowNumberStepper/FieldFlowNumberStepper.d.ts +34 -0
- package/lib/typescript/components/FieldFlowNumberStepper/FieldFlowNumberStepper.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowNumberStepper/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowNumberStepper/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.d.ts +26 -0
- package/lib/typescript/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowPasswordStrength/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowPasswordStrength/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowPhone/FieldFlowPhone.d.ts +40 -0
- package/lib/typescript/components/FieldFlowPhone/FieldFlowPhone.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowPhone/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowPhone/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowRating/FieldFlowRating.d.ts +30 -0
- package/lib/typescript/components/FieldFlowRating/FieldFlowRating.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowRating/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowRating/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSection/FieldFlowSection.d.ts +35 -0
- package/lib/typescript/components/FieldFlowSection/FieldFlowSection.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSection/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowSection/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSegmented/FieldFlowSegmented.d.ts +28 -0
- package/lib/typescript/components/FieldFlowSegmented/FieldFlowSegmented.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSegmented/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowSegmented/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSignature/FieldFlowSignature.d.ts +41 -0
- package/lib/typescript/components/FieldFlowSignature/FieldFlowSignature.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSignature/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowSignature/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSlider/FieldFlowSlider.d.ts +30 -0
- package/lib/typescript/components/FieldFlowSlider/FieldFlowSlider.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSlider/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowSlider/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowStepper/FieldFlowStepper.d.ts +31 -0
- package/lib/typescript/components/FieldFlowStepper/FieldFlowStepper.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowStepper/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowStepper/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowTags/FieldFlowTags.d.ts +41 -0
- package/lib/typescript/components/FieldFlowTags/FieldFlowTags.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowTags/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowTags/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowTypeahead/FieldFlowTypeahead.d.ts +43 -0
- package/lib/typescript/components/FieldFlowTypeahead/FieldFlowTypeahead.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowTypeahead/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowTypeahead/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowUpload/FieldFlowUpload.d.ts +52 -0
- package/lib/typescript/components/FieldFlowUpload/FieldFlowUpload.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowUpload/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowUpload/index.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +11 -1
- package/lib/typescript/hooks/index.d.ts.map +1 -1
- package/lib/typescript/hooks/useFieldFlowArray.d.ts +54 -0
- package/lib/typescript/hooks/useFieldFlowArray.d.ts.map +1 -0
- package/lib/typescript/hooks/useFieldFlowDirtyGuard.d.ts +26 -0
- package/lib/typescript/hooks/useFieldFlowDirtyGuard.d.ts.map +1 -0
- package/lib/typescript/hooks/useFieldFlowDraft.d.ts +64 -0
- package/lib/typescript/hooks/useFieldFlowDraft.d.ts.map +1 -0
- package/lib/typescript/hooks/useFieldFlowForm.d.ts +80 -2
- package/lib/typescript/hooks/useFieldFlowForm.d.ts.map +1 -1
- package/lib/typescript/hooks/useFieldFlowSteps.d.ts +42 -0
- package/lib/typescript/hooks/useFieldFlowSteps.d.ts.map +1 -0
- package/lib/typescript/hooks/useFormIntelligence.d.ts +23 -0
- package/lib/typescript/hooks/useFormIntelligence.d.ts.map +1 -0
- package/lib/typescript/i18n/index.d.ts +3 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/i18n/messages.d.ts +16 -0
- package/lib/typescript/i18n/messages.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +48 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/intelligence/formAccessibility.d.ts +21 -0
- package/lib/typescript/intelligence/formAccessibility.d.ts.map +1 -0
- package/lib/typescript/intelligence/index.d.ts +4 -0
- package/lib/typescript/intelligence/index.d.ts.map +1 -0
- package/lib/typescript/intelligence/types.d.ts +36 -0
- package/lib/typescript/intelligence/types.d.ts.map +1 -0
- package/lib/typescript/motion/index.d.ts +4 -0
- package/lib/typescript/motion/index.d.ts.map +1 -0
- package/lib/typescript/motion/useFieldMotion.d.ts +31 -0
- package/lib/typescript/motion/useFieldMotion.d.ts.map +1 -0
- package/lib/typescript/motion/useReducedMotion.d.ts +5 -0
- package/lib/typescript/motion/useReducedMotion.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +2 -0
- package/lib/typescript/theme/index.d.ts.map +1 -1
- package/lib/typescript/theme/presets.d.ts +134 -0
- package/lib/typescript/theme/presets.d.ts.map +1 -0
- package/lib/typescript/utils/affordance.d.ts +36 -0
- package/lib/typescript/utils/affordance.d.ts.map +1 -0
- package/lib/typescript/utils/passwordStrength.d.ts +26 -0
- package/lib/typescript/utils/passwordStrength.d.ts.map +1 -0
- package/lib/typescript/utils/phoneCountries.d.ts +12 -0
- package/lib/typescript/utils/phoneCountries.d.ts.map +1 -0
- package/lib/typescript/validation/validators.d.ts +3 -1
- package/lib/typescript/validation/validators.d.ts.map +1 -1
- package/package.json +19 -2
- package/src/adapters/index.ts +9 -0
- package/src/adapters/reactHookForm.tsx +152 -0
- package/src/components/FieldFlowAffordance/FieldFlowAffordance.tsx +143 -0
- package/src/components/FieldFlowAffordance/index.ts +2 -0
- package/src/components/FieldFlowCreditCard/FieldFlowCreditCard.tsx +152 -0
- package/src/components/FieldFlowCreditCard/index.ts +2 -0
- package/src/components/FieldFlowDraftBanner/FieldFlowDraftBanner.tsx +169 -0
- package/src/components/FieldFlowDraftBanner/index.ts +2 -0
- package/src/components/FieldFlowInput/FieldFlowInput.tsx +174 -53
- package/src/components/FieldFlowInput/styles.ts +16 -0
- package/src/components/FieldFlowInput/types.ts +33 -0
- package/src/components/FieldFlowNumberStepper/FieldFlowNumberStepper.tsx +156 -0
- package/src/components/FieldFlowNumberStepper/index.ts +2 -0
- package/src/components/FieldFlowPasswordStrength/FieldFlowPasswordStrength.tsx +148 -0
- package/src/components/FieldFlowPasswordStrength/index.ts +2 -0
- package/src/components/FieldFlowPhone/FieldFlowPhone.tsx +298 -0
- package/src/components/FieldFlowPhone/index.ts +2 -0
- package/src/components/FieldFlowRating/FieldFlowRating.tsx +121 -0
- package/src/components/FieldFlowRating/index.ts +2 -0
- package/src/components/FieldFlowSection/FieldFlowSection.tsx +176 -0
- package/src/components/FieldFlowSection/index.ts +2 -0
- package/src/components/FieldFlowSegmented/FieldFlowSegmented.tsx +248 -0
- package/src/components/FieldFlowSegmented/index.ts +2 -0
- package/src/components/FieldFlowSignature/FieldFlowSignature.tsx +241 -0
- package/src/components/FieldFlowSignature/index.ts +7 -0
- package/src/components/FieldFlowSlider/FieldFlowSlider.tsx +190 -0
- package/src/components/FieldFlowSlider/index.ts +2 -0
- package/src/components/FieldFlowStepper/FieldFlowStepper.tsx +190 -0
- package/src/components/FieldFlowStepper/index.ts +2 -0
- package/src/components/FieldFlowTags/FieldFlowTags.tsx +319 -0
- package/src/components/FieldFlowTags/index.ts +2 -0
- package/src/components/FieldFlowTypeahead/FieldFlowTypeahead.tsx +261 -0
- package/src/components/FieldFlowTypeahead/index.ts +2 -0
- package/src/components/FieldFlowUpload/FieldFlowUpload.tsx +226 -0
- package/src/components/FieldFlowUpload/index.ts +6 -0
- package/src/hooks/index.ts +31 -0
- package/src/hooks/useFieldFlowArray.ts +153 -0
- package/src/hooks/useFieldFlowDirtyGuard.ts +70 -0
- package/src/hooks/useFieldFlowDraft.ts +221 -0
- package/src/hooks/useFieldFlowForm.ts +357 -28
- package/src/hooks/useFieldFlowSteps.ts +130 -0
- package/src/hooks/useFormIntelligence.ts +207 -0
- package/src/i18n/index.ts +6 -0
- package/src/i18n/messages.ts +101 -0
- package/src/index.ts +161 -3
- package/src/intelligence/formAccessibility.ts +87 -0
- package/src/intelligence/index.ts +12 -0
- package/src/intelligence/types.ts +34 -0
- package/src/motion/index.ts +3 -0
- package/src/motion/useFieldMotion.ts +120 -0
- package/src/motion/useReducedMotion.ts +31 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/presets.ts +120 -0
- package/src/utils/affordance.ts +138 -0
- package/src/utils/passwordStrength.ts +109 -0
- package/src/utils/phoneCountries.ts +44 -0
- package/src/validation/validators.ts +17 -7
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TextInput } from 'react-native';
|
|
2
|
+
import type { FormHealthReport, FormIntelligenceOptions } from '../intelligence/types';
|
|
3
|
+
export interface UseFormIntelligenceResult<T extends string = string> {
|
|
4
|
+
registerFieldRef: (field: T, ref: {
|
|
5
|
+
current: TextInput | null;
|
|
6
|
+
} | TextInput | null) => void;
|
|
7
|
+
trackFocus: (field: T) => void;
|
|
8
|
+
trackBlur: (field: T) => void;
|
|
9
|
+
trackChange: (field: T) => void;
|
|
10
|
+
trackError: (field: T) => void;
|
|
11
|
+
/** Call after validateAll — handles a11y focus/announce + friction accounting. */
|
|
12
|
+
onValidationResult: (valid: boolean, errors: Partial<Record<T, string | undefined>>, fieldOrder?: T[]) => void;
|
|
13
|
+
trackSubmitSuccess: () => void;
|
|
14
|
+
getReport: () => FormHealthReport;
|
|
15
|
+
flush: () => FormHealthReport;
|
|
16
|
+
reset: () => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Tracks per-field friction and runs accessibility autopilot on failed validation.
|
|
20
|
+
* Designed to plug into `useFieldFlowForm({ intelligence: true })` or be used standalone.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useFormIntelligence<T extends string = string>(options?: FormIntelligenceOptions): UseFormIntelligenceResult<T>;
|
|
23
|
+
//# sourceMappingURL=useFormIntelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormIntelligence.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFormIntelligence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO9C,OAAO,KAAK,EAEV,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAY/B,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAClE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE;QAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CAAA;KAAE,GAAG,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5F,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,kFAAkF;IAClF,kBAAkB,EAAE,CAClB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EAC9C,UAAU,CAAC,EAAE,CAAC,EAAE,KACb,IAAI,CAAC;IACV,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,gBAAgB,CAAC;IAClC,KAAK,EAAE,MAAM,gBAAgB,CAAC;IAC9B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC3D,OAAO,GAAE,uBAA4B,GACpC,yBAAyB,CAAC,CAAC,CAAC,CA8J9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type FieldFlowLocale = 'en' | 'es' | 'fr' | 'de' | 'pt' | 'ar';
|
|
2
|
+
export interface FieldFlowValidationMessages {
|
|
3
|
+
required: string;
|
|
4
|
+
email: string;
|
|
5
|
+
number: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
minLength: (min: number) => string;
|
|
8
|
+
maxLength: (max: number) => string;
|
|
9
|
+
pattern: string;
|
|
10
|
+
invalid: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const validationMessageCatalogs: Record<FieldFlowLocale, FieldFlowValidationMessages>;
|
|
13
|
+
export declare function getValidationMessages(locale?: FieldFlowLocale): FieldFlowValidationMessages;
|
|
14
|
+
/** Merge a partial catalog over a locale base (default English). */
|
|
15
|
+
export declare function createValidationMessages(overrides: Partial<FieldFlowValidationMessages>, locale?: FieldFlowLocale): FieldFlowValidationMessages;
|
|
16
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAoED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,eAAe,EAAE,2BAA2B,CAO1F,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,MAAM,GAAE,eAAsB,GAC7B,2BAA2B,CAE7B;AAED,oEAAoE;AACpE,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,OAAO,CAAC,2BAA2B,CAAC,EAC/C,MAAM,GAAE,eAAsB,GAC7B,2BAA2B,CAE7B"}
|
|
@@ -20,14 +20,58 @@ export { FieldFlowSwitch } from './components/FieldFlowSwitch';
|
|
|
20
20
|
export type { FieldFlowSwitchProps } from './components/FieldFlowSwitch';
|
|
21
21
|
export { FieldFlowDateTimePicker } from './components/FieldFlowDateTimePicker';
|
|
22
22
|
export type { FieldFlowDateTimePickerProps, FieldFlowDateTimeMode, } from './components/FieldFlowDateTimePicker';
|
|
23
|
-
export {
|
|
24
|
-
export type {
|
|
25
|
-
export {
|
|
26
|
-
export type {
|
|
23
|
+
export { FieldFlowAffordance } from './components/FieldFlowAffordance';
|
|
24
|
+
export type { FieldFlowAffordanceProps } from './components/FieldFlowAffordance';
|
|
25
|
+
export { FieldFlowDraftBanner } from './components/FieldFlowDraftBanner';
|
|
26
|
+
export type { FieldFlowDraftBannerProps } from './components/FieldFlowDraftBanner';
|
|
27
|
+
export { FieldFlowTags } from './components/FieldFlowTags';
|
|
28
|
+
export type { FieldFlowTagsProps } from './components/FieldFlowTags';
|
|
29
|
+
export { FieldFlowPasswordStrength } from './components/FieldFlowPasswordStrength';
|
|
30
|
+
export type { FieldFlowPasswordStrengthProps } from './components/FieldFlowPasswordStrength';
|
|
31
|
+
export { FieldFlowSection } from './components/FieldFlowSection';
|
|
32
|
+
export type { FieldFlowSectionProps } from './components/FieldFlowSection';
|
|
33
|
+
export { FieldFlowSegmented } from './components/FieldFlowSegmented';
|
|
34
|
+
export type { FieldFlowSegmentedProps } from './components/FieldFlowSegmented';
|
|
35
|
+
export { FieldFlowStepper } from './components/FieldFlowStepper';
|
|
36
|
+
export type { FieldFlowStepperProps, FieldFlowStepRenderContext } from './components/FieldFlowStepper';
|
|
37
|
+
export { FieldFlowPhone } from './components/FieldFlowPhone';
|
|
38
|
+
export type { FieldFlowPhoneProps, FieldFlowPhoneValue } from './components/FieldFlowPhone';
|
|
39
|
+
export { FieldFlowUpload } from './components/FieldFlowUpload';
|
|
40
|
+
export type { FieldFlowUploadProps, FieldFlowUploadFile, FieldFlowUploadPicker, } from './components/FieldFlowUpload';
|
|
41
|
+
export { FieldFlowTypeahead } from './components/FieldFlowTypeahead';
|
|
42
|
+
export type { FieldFlowTypeaheadProps, FieldFlowTypeaheadFetcher } from './components/FieldFlowTypeahead';
|
|
43
|
+
export { FieldFlowRating } from './components/FieldFlowRating';
|
|
44
|
+
export type { FieldFlowRatingProps } from './components/FieldFlowRating';
|
|
45
|
+
export { FieldFlowSlider } from './components/FieldFlowSlider';
|
|
46
|
+
export type { FieldFlowSliderProps } from './components/FieldFlowSlider';
|
|
47
|
+
export { FieldFlowNumberStepper } from './components/FieldFlowNumberStepper';
|
|
48
|
+
export type { FieldFlowNumberStepperProps } from './components/FieldFlowNumberStepper';
|
|
49
|
+
export { FieldFlowCreditCard } from './components/FieldFlowCreditCard';
|
|
50
|
+
export type { FieldFlowCreditCardProps, FieldFlowCreditCardValue } from './components/FieldFlowCreditCard';
|
|
51
|
+
export { FieldFlowSignature } from './components/FieldFlowSignature';
|
|
52
|
+
export type { FieldFlowSignatureProps, FieldFlowSignatureValue, FieldFlowStroke, FieldFlowPoint, } from './components/FieldFlowSignature';
|
|
53
|
+
export { FieldFlowController, FieldFlowTagsController, mapRhfToFieldFlowProps, } from './adapters';
|
|
54
|
+
export type { FieldFlowControllerProps, FieldFlowTagsControllerProps, } from './adapters';
|
|
55
|
+
export { FieldFlowThemeProvider, useFieldFlowTheme, defaultTheme, darkTheme, themePresets, getThemePreset, } from './theme';
|
|
56
|
+
export type { FieldFlowThemeProviderProps, FieldFlowThemePresetName } from './theme';
|
|
57
|
+
export { useFieldMotion, useReducedMotion } from './motion';
|
|
58
|
+
export type { UseFieldMotionOptions, UseFieldMotionResult } from './motion';
|
|
59
|
+
export { useFieldFlowForm, useKeyboardManager, useFieldState, useFormIntelligence, useFieldFlowArray, useFieldFlowDraft, useFieldFlowSteps, useFieldFlowDirtyGuard, } from './hooks';
|
|
60
|
+
export type { UseFieldFlowFormOptions, UseFieldFlowFormResult, FieldFlowFormRules, AsyncFieldValidator, AsyncFieldValidators, CrossFieldRule, FieldConditionFn, FieldConditionConfig, FieldConditions, FieldVisibilityState, UseKeyboardManagerOptions, UseKeyboardManagerResult, UseFieldStateOptions, UseFormIntelligenceResult, UseFieldFlowArrayOptions, UseFieldFlowArrayResult, FieldFlowDraftStorage, FieldFlowDraftPayload, UseFieldFlowDraftOptions, UseFieldFlowDraftResult, FieldFlowStepDefinition, UseFieldFlowStepsOptions, UseFieldFlowStepsResult, UseFieldFlowDirtyGuardOptions, UseFieldFlowDirtyGuardResult, } from './hooks';
|
|
61
|
+
export { validationMessageCatalogs, getValidationMessages, createValidationMessages, } from './i18n';
|
|
62
|
+
export type { FieldFlowLocale, FieldFlowValidationMessages } from './i18n';
|
|
63
|
+
export { DEFAULT_COUNTRY_DIALS, findCountryByCode, composeE164, } from './utils/phoneCountries';
|
|
64
|
+
export type { FieldFlowCountryDial } from './utils/phoneCountries';
|
|
27
65
|
export { useValidation, runRules, isValidEmail, isValidNumber, isValidPhone, requiredValidator, emailValidator, numberValidator, phoneValidator, minLengthValidator, maxLengthValidator, patternValidator, zodToFormErrors, zodFormValidate, createZodSubmitGuard, fieldRulesFromZodString, } from './validation';
|
|
28
66
|
export type { UseValidationResult, ZodSchemaLike, ZodIssueLike, ZodErrorLike } from './validation';
|
|
29
67
|
export { applyMask, applyPattern, formatMasked, unmask, digitsOnly, applyPhoneMask, applyCardMask, applyDateMask, applyCurrencyMask, } from './utils/masks';
|
|
30
68
|
export type { FieldFlowMaskType, MaskResult, ApplyMaskOptions } from './utils/masks';
|
|
69
|
+
export { applyEmailDomainSuggestion, applyPhoneDialSuggestion, applyCurrencySymbolSuggestion, applyAffordanceSuggestion, resolveAffordanceChips, emailDomainsToChips, affordanceKindFromFieldType, DEFAULT_EMAIL_DOMAINS, DEFAULT_PHONE_DIAL_CODES, DEFAULT_CURRENCY_SYMBOLS, } from './utils/affordance';
|
|
70
|
+
export type { FieldFlowAffordanceKind, FieldFlowAffordanceChip } from './utils/affordance';
|
|
71
|
+
export { evaluatePasswordStrength, DEFAULT_PASSWORD_RULES, PASSWORD_STRENGTH_COLORS, } from './utils/passwordStrength';
|
|
72
|
+
export type { PasswordStrengthLevel, PasswordStrengthRule, PasswordStrengthResult, } from './utils/passwordStrength';
|
|
73
|
+
export { focusFirstError, announceForAccessibility, buildValidationAnnouncement, setAccessibilityFocus, } from './intelligence';
|
|
74
|
+
export type { FieldRefMap, FieldFrictionStats, FormHealthReport, FormIntelligenceOptions, } from './intelligence';
|
|
31
75
|
export { FieldFlowIcon, renderFieldFlowIcon } from './icons';
|
|
32
76
|
export type { FieldFlowIconName, FieldFlowIconProps, FieldFlowIconSource } from './icons';
|
|
33
77
|
export type { FieldFlowFieldType, FieldFlowState, FieldFlowRules, FieldFlowOption, FieldFlowVariant, ValidationResult, Validator, FieldFlowColors, FieldFlowSpacing, FieldFlowTypography, FieldFlowAnimationConfig, FieldFlowTheme, DeepPartial, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAErG,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,YAAY,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAEnF,OAAO,EAAE,iBAAiB,EAAE,MAA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,cAAc,EACd,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type TextInput } from 'react-native';
|
|
2
|
+
export type FieldRefMap<T extends string = string> = Partial<Record<T, {
|
|
3
|
+
current: TextInput | null;
|
|
4
|
+
} | TextInput | null>>;
|
|
5
|
+
/**
|
|
6
|
+
* Focus the first field (in `order` or object key order) that has an error.
|
|
7
|
+
* Returns the field key that was focused, or `undefined` if none.
|
|
8
|
+
*/
|
|
9
|
+
export declare function focusFirstError<T extends string>(errors: Partial<Record<T, string | undefined>>, refs: FieldRefMap<T>, order?: T[]): T | undefined;
|
|
10
|
+
/** Announce a short message to VoiceOver / TalkBack when available. */
|
|
11
|
+
export declare function announceForAccessibility(message: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Build a concise announcement for failed validation, e.g.
|
|
14
|
+
* "Form has 2 errors. Email is required."
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildValidationAnnouncement(errors: Partial<Record<string, string | undefined>>): string;
|
|
17
|
+
/** Best-effort: mark a native view as accessibility-focused (Android). */
|
|
18
|
+
export declare function setAccessibilityFocus(ref: {
|
|
19
|
+
current: TextInput | null;
|
|
20
|
+
} | TextInput | null): void;
|
|
21
|
+
//# sourceMappingURL=formAccessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formAccessibility.d.ts","sourceRoot":"","sources":["../../../src/intelligence/formAccessibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,OAAO,CAC1D,MAAM,CAAC,CAAC,EAAE;IAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,GAAG,IAAI,CAAC,CAC5D,CAAC;AAQF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAC9C,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EAC9C,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,KAAK,CAAC,EAAE,CAAC,EAAE,GACV,CAAC,GAAG,SAAS,CAoBf;AAED,uEAAuE;AACvE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAO9D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAClD,MAAM,CAUR;AAUD,0EAA0E;AAC1E,wBAAgB,qBAAqB,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAOjG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { focusFirstError, announceForAccessibility, buildValidationAnnouncement, setAccessibilityFocus, } from './formAccessibility';
|
|
2
|
+
export type { FieldRefMap } from './formAccessibility';
|
|
3
|
+
export type { FieldFrictionStats, FormHealthReport, FormIntelligenceOptions, } from './types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/intelligence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface FieldFrictionStats {
|
|
2
|
+
focusCount: number;
|
|
3
|
+
/** Cumulative milliseconds the field was focused. */
|
|
4
|
+
totalFocusMs: number;
|
|
5
|
+
errorCount: number;
|
|
6
|
+
changeCount: number;
|
|
7
|
+
blurCount: number;
|
|
8
|
+
lastFocusedAt?: number;
|
|
9
|
+
/** Running focus session start (ms since epoch); cleared on blur. */
|
|
10
|
+
focusStartedAt?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface FormHealthReport {
|
|
13
|
+
/** Wall-clock ms from first interaction to this report. */
|
|
14
|
+
sessionMs: number;
|
|
15
|
+
submitAttempts: number;
|
|
16
|
+
successfulSubmits: number;
|
|
17
|
+
fields: Record<string, FieldFrictionStats>;
|
|
18
|
+
/**
|
|
19
|
+
* Fields sorted by estimated friction (errors × 3 + focusCount + changeCount / 10).
|
|
20
|
+
* Useful for product analytics / debugging onboarding drop-off.
|
|
21
|
+
*/
|
|
22
|
+
mostFriction: Array<{
|
|
23
|
+
field: string;
|
|
24
|
+
score: number;
|
|
25
|
+
}>;
|
|
26
|
+
generatedAt: number;
|
|
27
|
+
}
|
|
28
|
+
export interface FormIntelligenceOptions {
|
|
29
|
+
/** Called whenever a new report is produced (submit attempt, or `flush()`). */
|
|
30
|
+
onReport?: (report: FormHealthReport) => void;
|
|
31
|
+
/** When true (default), failed submit focuses & announces the first invalid field. */
|
|
32
|
+
focusFirstError?: boolean;
|
|
33
|
+
/** Announce errors via `AccessibilityInfo.announceForAccessibility`. Default: true. */
|
|
34
|
+
announceErrors?: boolean;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/intelligence/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC3C;;;OAGG;IACH,YAAY,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC9C,sFAAsF;IACtF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uFAAuF;IACvF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/motion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
export interface UseFieldMotionOptions {
|
|
3
|
+
/** Master switch. Default: true. */
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
isFocused: boolean;
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
isSuccess?: boolean;
|
|
8
|
+
/** Base duration from theme. */
|
|
9
|
+
duration?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface UseFieldMotionResult {
|
|
12
|
+
/** Apply to the field chrome (input container). */
|
|
13
|
+
containerStyle: {
|
|
14
|
+
transform: Array<{
|
|
15
|
+
translateX: Animated.AnimatedInterpolation<string | number>;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
/** Soft focus glow overlay opacity (0–1). */
|
|
19
|
+
glowOpacity: Animated.Value;
|
|
20
|
+
/** Footer message fade. */
|
|
21
|
+
messageOpacity: Animated.Value;
|
|
22
|
+
/** Success check scale pop. */
|
|
23
|
+
successScale: Animated.Value;
|
|
24
|
+
reducedMotion: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Field micro-interactions: error shake, focus glow, message cross-fade, success pop.
|
|
28
|
+
* Uses RN Animated only (no Reanimated) and respects Reduce Motion.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useFieldMotion({ enabled, isFocused, hasError, isSuccess, duration, }: UseFieldMotionOptions): UseFieldMotionResult;
|
|
31
|
+
//# sourceMappingURL=useFieldMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFieldMotion.d.ts","sourceRoot":"","sources":["../../../src/motion/useFieldMotion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,qBAAqB;IACpC,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,cAAc,EAAE;QACd,SAAS,EAAE,KAAK,CAAC;YAAE,UAAU,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;SAAE,CAAC,CAAC;KACnF,CAAC;IACF,6CAA6C;IAC7C,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC5B,2BAA2B;IAC3B,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC/B,+BAA+B;IAC/B,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAc,EACd,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAc,GACf,EAAE,qBAAqB,GAAG,oBAAoB,CAiF9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReducedMotion.d.ts","sourceRoot":"","sources":["../../../src/motion/useReducedMotion.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAwB1C"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { defaultTheme, darkTheme } from './defaultTheme';
|
|
2
2
|
export { FieldFlowThemeProvider, useFieldFlowTheme, mergeDeep } from './ThemeProvider';
|
|
3
3
|
export type { FieldFlowThemeProviderProps } from './ThemeProvider';
|
|
4
|
+
export { themePresets, getThemePreset } from './presets';
|
|
5
|
+
export type { FieldFlowThemePresetName } from './presets';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,YAAY,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,YAAY,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACzD,YAAY,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { DeepPartial, FieldFlowTheme } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Curated one-liner themes for demos and brand starts.
|
|
4
|
+
* Pass into `FieldFlowThemeProvider theme={themePresets.soft}`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const themePresets: {
|
|
7
|
+
/** Default FieldFlow blue. */
|
|
8
|
+
readonly default: DeepPartial<FieldFlowTheme>;
|
|
9
|
+
/** Bundled dark palette. */
|
|
10
|
+
readonly dark: DeepPartial<FieldFlowTheme>;
|
|
11
|
+
/** Soft rounded surfaces, indigo accent. */
|
|
12
|
+
readonly soft: {
|
|
13
|
+
colors: {
|
|
14
|
+
background: string;
|
|
15
|
+
backgroundDisabled: string;
|
|
16
|
+
border: string;
|
|
17
|
+
borderFocused: string;
|
|
18
|
+
borderError: string;
|
|
19
|
+
borderSuccess: string;
|
|
20
|
+
text: string;
|
|
21
|
+
placeholder: string;
|
|
22
|
+
label: string;
|
|
23
|
+
labelFocused: string;
|
|
24
|
+
error: string;
|
|
25
|
+
success: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
iconFocused: string;
|
|
28
|
+
};
|
|
29
|
+
spacing: {
|
|
30
|
+
borderRadius: number;
|
|
31
|
+
paddingHorizontal: number;
|
|
32
|
+
paddingVertical: number;
|
|
33
|
+
};
|
|
34
|
+
typography: {
|
|
35
|
+
fontSize: number;
|
|
36
|
+
labelFontSize: number;
|
|
37
|
+
helperFontSize: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/** High-contrast ink on white — docs / legal forms. */
|
|
41
|
+
readonly contrast: {
|
|
42
|
+
colors: {
|
|
43
|
+
background: string;
|
|
44
|
+
backgroundDisabled: string;
|
|
45
|
+
border: string;
|
|
46
|
+
borderFocused: string;
|
|
47
|
+
borderError: string;
|
|
48
|
+
borderSuccess: string;
|
|
49
|
+
text: string;
|
|
50
|
+
placeholder: string;
|
|
51
|
+
label: string;
|
|
52
|
+
labelFocused: string;
|
|
53
|
+
error: string;
|
|
54
|
+
success: string;
|
|
55
|
+
icon: string;
|
|
56
|
+
iconFocused: string;
|
|
57
|
+
};
|
|
58
|
+
spacing: {
|
|
59
|
+
borderRadius: number;
|
|
60
|
+
borderWidth: number;
|
|
61
|
+
borderWidthFocused: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/** Warm coral accent, cream surfaces. */
|
|
65
|
+
readonly warm: {
|
|
66
|
+
colors: {
|
|
67
|
+
background: string;
|
|
68
|
+
backgroundDisabled: string;
|
|
69
|
+
border: string;
|
|
70
|
+
borderFocused: string;
|
|
71
|
+
borderError: string;
|
|
72
|
+
borderSuccess: string;
|
|
73
|
+
text: string;
|
|
74
|
+
placeholder: string;
|
|
75
|
+
label: string;
|
|
76
|
+
labelFocused: string;
|
|
77
|
+
error: string;
|
|
78
|
+
success: string;
|
|
79
|
+
icon: string;
|
|
80
|
+
iconFocused: string;
|
|
81
|
+
};
|
|
82
|
+
spacing: {
|
|
83
|
+
borderRadius: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/** Cool teal — fintech / health. */
|
|
87
|
+
readonly teal: {
|
|
88
|
+
colors: {
|
|
89
|
+
background: string;
|
|
90
|
+
backgroundDisabled: string;
|
|
91
|
+
border: string;
|
|
92
|
+
borderFocused: string;
|
|
93
|
+
borderError: string;
|
|
94
|
+
borderSuccess: string;
|
|
95
|
+
text: string;
|
|
96
|
+
placeholder: string;
|
|
97
|
+
label: string;
|
|
98
|
+
labelFocused: string;
|
|
99
|
+
error: string;
|
|
100
|
+
success: string;
|
|
101
|
+
icon: string;
|
|
102
|
+
iconFocused: string;
|
|
103
|
+
};
|
|
104
|
+
spacing: {
|
|
105
|
+
borderRadius: number;
|
|
106
|
+
paddingHorizontal: number;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
/** Midnight elevated cards. */
|
|
110
|
+
readonly midnight: {
|
|
111
|
+
colors: {
|
|
112
|
+
background: string;
|
|
113
|
+
backgroundDisabled: string;
|
|
114
|
+
border: string;
|
|
115
|
+
borderFocused: string;
|
|
116
|
+
borderError: string;
|
|
117
|
+
borderSuccess: string;
|
|
118
|
+
text: string;
|
|
119
|
+
placeholder: string;
|
|
120
|
+
label: string;
|
|
121
|
+
labelFocused: string;
|
|
122
|
+
error: string;
|
|
123
|
+
success: string;
|
|
124
|
+
icon: string;
|
|
125
|
+
iconFocused: string;
|
|
126
|
+
};
|
|
127
|
+
spacing: {
|
|
128
|
+
borderRadius: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export type FieldFlowThemePresetName = keyof typeof themePresets;
|
|
133
|
+
export declare function getThemePreset(name: FieldFlowThemePresetName): DeepPartial<FieldFlowTheme>;
|
|
134
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/theme/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG5D;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,8BAA8B;sBACL,WAAW,CAAC,cAAc,CAAC;IACpD,4BAA4B;mBACT,WAAW,CAAC,cAAc,CAAC;IAC9C,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqB5C,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;IAoBvD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;IAoBzC,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;IAoBpC,+BAA+B;;;;;;;;;;;;;;;;;;;;;;CAoBvB,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,YAAY,CAAC;AAEjE,wBAAgB,cAAc,CAAC,IAAI,EAAE,wBAAwB,GAAG,WAAW,CAAC,cAAc,CAAC,CAE1F"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type FieldFlowAffordanceKind = 'email' | 'phone' | 'currency' | 'custom';
|
|
2
|
+
export interface FieldFlowAffordanceChip {
|
|
3
|
+
/** Visible chip label, e.g. "@gmail.com" or "+1". */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Value applied when the chip is pressed. Defaults to `label`. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Optional accessibility label. */
|
|
8
|
+
accessibilityLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Popular consumer email domains for quick completion. */
|
|
11
|
+
export declare const DEFAULT_EMAIL_DOMAINS: string[];
|
|
12
|
+
/** Common dial-code chips (label shown to the user). */
|
|
13
|
+
export declare const DEFAULT_PHONE_DIAL_CODES: FieldFlowAffordanceChip[];
|
|
14
|
+
/** Currency symbol chips. */
|
|
15
|
+
export declare const DEFAULT_CURRENCY_SYMBOLS: FieldFlowAffordanceChip[];
|
|
16
|
+
export declare function emailDomainsToChips(domains: string[]): FieldFlowAffordanceChip[];
|
|
17
|
+
/**
|
|
18
|
+
* Apply an email-domain suggestion to the current value.
|
|
19
|
+
* - `jane` + `gmail.com` → `jane@gmail.com`
|
|
20
|
+
* - `jane@hot` + `gmail.com` → `jane@gmail.com`
|
|
21
|
+
* - `jane@gmail.com` + `outlook.com` → `jane@outlook.com`
|
|
22
|
+
*/
|
|
23
|
+
export declare function applyEmailDomainSuggestion(current: string, domain: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Apply a dial-code chip. Replaces an existing leading `+digits` prefix when present.
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyPhoneDialSuggestion(current: string, dialCode: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Ensure the value starts with the currency symbol (does not duplicate if already present).
|
|
30
|
+
*/
|
|
31
|
+
export declare function applyCurrencySymbolSuggestion(current: string, symbol: string): string;
|
|
32
|
+
export declare function resolveAffordanceChips(kind: FieldFlowAffordanceKind, custom?: FieldFlowAffordanceChip[] | string[]): FieldFlowAffordanceChip[];
|
|
33
|
+
export declare function applyAffordanceSuggestion(kind: FieldFlowAffordanceKind, current: string, chip: FieldFlowAffordanceChip): string;
|
|
34
|
+
/** Infer affordance kind from FieldFlow input `type`. */
|
|
35
|
+
export declare function affordanceKindFromFieldType(type?: string): FieldFlowAffordanceKind | undefined;
|
|
36
|
+
//# sourceMappingURL=affordance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affordance.d.ts","sourceRoot":"","sources":["../../../src/utils/affordance.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,uBAAuB;IACtC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,MAAM,EASzC,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAS7D,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAO7D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,uBAAuB,EAAE,CAMhF;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQlF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIlF;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKrF;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,uBAAuB,EAC7B,MAAM,CAAC,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,GAC5C,uBAAuB,EAAE,CAkB3B;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,uBAAuB,EAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,uBAAuB,GAC5B,MAAM,CAYR;AAED,yDAAyD;AACzD,wBAAgB,2BAA2B,CACzC,IAAI,CAAC,EAAE,MAAM,GACZ,uBAAuB,GAAG,SAAS,CAKrC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type PasswordStrengthLevel = 'empty' | 'weak' | 'fair' | 'good' | 'strong';
|
|
2
|
+
export interface PasswordStrengthRule {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
test: (password: string) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface PasswordStrengthResult {
|
|
8
|
+
score: number;
|
|
9
|
+
/** 0–4 mapped level (empty when score is 0 and password is empty). */
|
|
10
|
+
level: PasswordStrengthLevel;
|
|
11
|
+
/** Fraction 0–1 for progress bars. */
|
|
12
|
+
progress: number;
|
|
13
|
+
passed: PasswordStrengthRule[];
|
|
14
|
+
failed: PasswordStrengthRule[];
|
|
15
|
+
/** Short human label, e.g. "Strong". */
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const DEFAULT_PASSWORD_RULES: PasswordStrengthRule[];
|
|
19
|
+
/**
|
|
20
|
+
* Score a password against declarative rules (default NIST-ish checklist).
|
|
21
|
+
* Pure function — safe to unit test and reuse outside React.
|
|
22
|
+
*/
|
|
23
|
+
export declare function evaluatePasswordStrength(password: string, rules?: PasswordStrengthRule[]): PasswordStrengthResult;
|
|
24
|
+
/** Suggested bar colors for each level (consumers can override). */
|
|
25
|
+
export declare const PASSWORD_STRENGTH_COLORS: Record<Exclude<PasswordStrengthLevel, 'empty'>, string>;
|
|
26
|
+
//# sourceMappingURL=passwordStrength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passwordStrength.d.ts","sourceRoot":"","sources":["../../../src/utils/passwordStrength.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAElF,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,qBAAqB,CAAC;IAC7B,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,sBAAsB,EAAE,oBAAoB,EA0BxD,CAAC;AAUF;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,oBAAoB,EAA2B,GACrD,sBAAsB,CAqCxB;AAED,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAE,MAAM,CAK5F,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FieldFlowCountryDial {
|
|
2
|
+
/** ISO 3166-1 alpha-2 */
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
dial: string;
|
|
6
|
+
flag?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Common dial codes for `FieldFlowPhone`. Extend via `countries` prop. */
|
|
9
|
+
export declare const DEFAULT_COUNTRY_DIALS: FieldFlowCountryDial[];
|
|
10
|
+
export declare function findCountryByCode(code: string, list?: FieldFlowCountryDial[]): FieldFlowCountryDial | undefined;
|
|
11
|
+
export declare function composeE164(dial: string, national: string): string;
|
|
12
|
+
//# sourceMappingURL=phoneCountries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phoneCountries.d.ts","sourceRoot":"","sources":["../../../src/utils/phoneCountries.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,EAAE,oBAAoB,EAqBvD,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,oBAAoB,EAA0B,GACnD,oBAAoB,GAAG,SAAS,CAElC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIlE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FieldFlowRules, ValidationResult, Validator } from '../types';
|
|
2
|
+
import { type FieldFlowValidationMessages } from '../i18n/messages';
|
|
2
3
|
export declare const isValidEmail: (value: string) => boolean;
|
|
3
4
|
export declare const isValidNumber: (value: string) => boolean;
|
|
4
5
|
export declare const isValidPhone: (value: string) => boolean;
|
|
@@ -12,6 +13,7 @@ export declare const patternValidator: (pattern: RegExp, message?: string) => Va
|
|
|
12
13
|
/**
|
|
13
14
|
* Turns a declarative `FieldFlowRules` object into an ordered list of validators
|
|
14
15
|
* and runs them against a value, stopping at (and returning) the first failure.
|
|
16
|
+
* Pass `messages` (or use `locale` via `useFieldFlowForm`) for localized defaults.
|
|
15
17
|
*/
|
|
16
|
-
export declare function runRules(value: string, rules?: FieldFlowRules): ValidationResult;
|
|
18
|
+
export declare function runRules(value: string, rules?: FieldFlowRules, messages?: FieldFlowValidationMessages): ValidationResult;
|
|
17
19
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/validation/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/validation/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,kBAAkB,CAAC;AAM1B,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAAyC,CAAC;AACvF,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,OAA0C,CAAC;AACzF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAAyC,CAAC;AAEvF,eAAO,MAAM,iBAAiB,GAC3B,gBAAkC,KAAG,SAIP,CAAC;AAElC,eAAO,MAAM,cAAc,GACxB,gBAAuC,KAAG,SAE8C,CAAC;AAE5F,eAAO,MAAM,eAAe,GACzB,gBAAgC,KAAG,SAEsD,CAAC;AAE7F,eAAO,MAAM,cAAc,GACxB,gBAAsC,KAAG,SAE+C,CAAC;AAE5F,eAAO,MAAM,kBAAkB,GAC5B,KAAK,MAAM,EAAE,UAAU,MAAM,KAAG,SAI+C,CAAC;AAEnF,eAAO,MAAM,kBAAkB,GAC5B,KAAK,MAAM,EAAE,UAAU,MAAM,KAAG,SAEkF,CAAC;AAEtH,eAAO,MAAM,gBAAgB,GAC1B,SAAS,MAAM,EAAE,gBAA0B,KAAG,SAE0C,CAAC;AAE5F;;;;GAIG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,cAAc,EACtB,QAAQ,CAAC,EAAE,2BAA2B,GACrC,gBAAgB,CAwClB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rn-inputforge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A production-ready
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "A production-ready React Native input/form system (bare CLI & Expo) — fields, OTP, masks, date/time, phone+country, upload, typeahead, rating, slider, stepper, credit card, signature, multi-step wizard, tags, password strength, drafts, motion UI, i18n validation, react-hook-form + Zod adapters. Pure JS/TS, no native modules.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"build": "bob build",
|
|
24
24
|
"prepare": "bob build",
|
|
25
25
|
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
26
|
+
"test": "jest",
|
|
26
27
|
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
27
28
|
"clean": "rimraf lib"
|
|
28
29
|
},
|
|
@@ -46,6 +47,14 @@
|
|
|
46
47
|
"keyboard-aware",
|
|
47
48
|
"validation",
|
|
48
49
|
"zod",
|
|
50
|
+
"form-draft",
|
|
51
|
+
"conditional-fields",
|
|
52
|
+
"field-array",
|
|
53
|
+
"accessibility",
|
|
54
|
+
"email-autocomplete",
|
|
55
|
+
"password-strength",
|
|
56
|
+
"tags-input",
|
|
57
|
+
"react-hook-form",
|
|
49
58
|
"typescript",
|
|
50
59
|
"expo",
|
|
51
60
|
"bare-react-native-cli"
|
|
@@ -63,22 +72,30 @@
|
|
|
63
72
|
"peerDependencies": {
|
|
64
73
|
"react": ">=18.0.0",
|
|
65
74
|
"react-native": ">=0.73.0",
|
|
75
|
+
"react-hook-form": ">=7.0.0",
|
|
66
76
|
"zod": ">=3.0.0"
|
|
67
77
|
},
|
|
68
78
|
"peerDependenciesMeta": {
|
|
79
|
+
"react-hook-form": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
69
82
|
"zod": {
|
|
70
83
|
"optional": true
|
|
71
84
|
}
|
|
72
85
|
},
|
|
73
86
|
"devDependencies": {
|
|
74
87
|
"@react-native/eslint-config": "^0.81.0",
|
|
88
|
+
"@types/jest": "^29.5.14",
|
|
75
89
|
"@types/react": "^19.2.0",
|
|
76
90
|
"eslint": "^9.19.0",
|
|
91
|
+
"jest": "^29.7.0",
|
|
77
92
|
"prettier": "^3.4.2",
|
|
78
93
|
"react": "19.2.8",
|
|
94
|
+
"react-hook-form": "^7.54.2",
|
|
79
95
|
"react-native": "0.86.2",
|
|
80
96
|
"react-native-builder-bob": "^0.43.0",
|
|
81
97
|
"rimraf": "^6.0.1",
|
|
98
|
+
"ts-jest": "^29.2.5",
|
|
82
99
|
"typescript": "^5.7.3"
|
|
83
100
|
},
|
|
84
101
|
"engines": {
|