rn-inputforge 0.5.0 → 0.5.1
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 +236 -0
- package/lib/commonjs/a11y/audit.js +72 -0
- package/lib/commonjs/a11y/audit.js.map +1 -0
- package/lib/commonjs/a11y/index.js +13 -0
- package/lib/commonjs/a11y/index.js.map +1 -0
- package/lib/commonjs/autofill/index.js +25 -0
- package/lib/commonjs/autofill/index.js.map +1 -0
- package/lib/commonjs/autofill/profiles.js +199 -0
- package/lib/commonjs/autofill/profiles.js.map +1 -0
- package/lib/commonjs/components/FieldFlowA11yAudit/FieldFlowA11yAudit.js +99 -0
- package/lib/commonjs/components/FieldFlowA11yAudit/FieldFlowA11yAudit.js.map +1 -0
- package/lib/commonjs/components/FieldFlowA11yAudit/index.js +13 -0
- package/lib/commonjs/components/FieldFlowA11yAudit/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowAuthActions/FieldFlowAuthActions.js +130 -0
- package/lib/commonjs/components/FieldFlowAuthActions/FieldFlowAuthActions.js.map +1 -0
- package/lib/commonjs/components/FieldFlowAuthActions/index.js +13 -0
- package/lib/commonjs/components/FieldFlowAuthActions/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowCompleteness/FieldFlowCompleteness.js +100 -0
- package/lib/commonjs/components/FieldFlowCompleteness/FieldFlowCompleteness.js.map +1 -0
- package/lib/commonjs/components/FieldFlowCompleteness/index.js +13 -0
- package/lib/commonjs/components/FieldFlowCompleteness/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowFormHeader/FieldFlowFormHeader.js +102 -0
- package/lib/commonjs/components/FieldFlowFormHeader/FieldFlowFormHeader.js.map +1 -0
- package/lib/commonjs/components/FieldFlowFormHeader/index.js +13 -0
- package/lib/commonjs/components/FieldFlowFormHeader/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowInfoTip/FieldFlowInfoTip.js +121 -0
- package/lib/commonjs/components/FieldFlowInfoTip/FieldFlowInfoTip.js.map +1 -0
- package/lib/commonjs/components/FieldFlowInfoTip/index.js +13 -0
- package/lib/commonjs/components/FieldFlowInfoTip/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowInlineAlert/FieldFlowInlineAlert.js +142 -0
- package/lib/commonjs/components/FieldFlowInlineAlert/FieldFlowInlineAlert.js.map +1 -0
- package/lib/commonjs/components/FieldFlowInlineAlert/index.js +13 -0
- package/lib/commonjs/components/FieldFlowInlineAlert/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowInput/FieldFlowInput.js +44 -18
- package/lib/commonjs/components/FieldFlowInput/FieldFlowInput.js.map +1 -1
- package/lib/commonjs/components/FieldFlowInput/styles.js +49 -13
- package/lib/commonjs/components/FieldFlowInput/styles.js.map +1 -1
- package/lib/commonjs/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.js +137 -0
- package/lib/commonjs/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.js.map +1 -0
- package/lib/commonjs/components/FieldFlowKeyboardToolbar/index.js +19 -0
- package/lib/commonjs/components/FieldFlowKeyboardToolbar/index.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSkeleton/FieldFlowSkeleton.js +101 -0
- package/lib/commonjs/components/FieldFlowSkeleton/FieldFlowSkeleton.js.map +1 -0
- package/lib/commonjs/components/FieldFlowSkeleton/index.js +13 -0
- package/lib/commonjs/components/FieldFlowSkeleton/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.js +6 -4
- package/lib/commonjs/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.js.map +1 -1
- package/lib/commonjs/hooks/index.js +21 -0
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useFieldFlowCompleteness.js +46 -0
- package/lib/commonjs/hooks/useFieldFlowCompleteness.js.map +1 -0
- package/lib/commonjs/hooks/useFieldFlowSubmitQueue.js +145 -0
- package/lib/commonjs/hooks/useFieldFlowSubmitQueue.js.map +1 -0
- package/lib/commonjs/hooks/useKeyboardManager.js +15 -0
- package/lib/commonjs/hooks/useKeyboardManager.js.map +1 -1
- package/lib/commonjs/hooks/useSmartPaste.js +27 -0
- package/lib/commonjs/hooks/useSmartPaste.js.map +1 -0
- package/lib/commonjs/index.js +144 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/paste/index.js +19 -0
- package/lib/commonjs/paste/index.js.map +1 -0
- package/lib/commonjs/paste/smartPaste.js +113 -0
- package/lib/commonjs/paste/smartPaste.js.map +1 -0
- package/lib/commonjs/schema/FieldFlowSchemaForm.js +219 -0
- package/lib/commonjs/schema/FieldFlowSchemaForm.js.map +1 -0
- package/lib/commonjs/schema/index.js +13 -0
- package/lib/commonjs/schema/index.js.map +1 -0
- package/lib/commonjs/schema/types.js +6 -0
- package/lib/commonjs/schema/types.js.map +1 -0
- package/lib/commonjs/theme/ThemeProvider.js +65 -4
- package/lib/commonjs/theme/ThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/appearance.js +93 -0
- package/lib/commonjs/theme/appearance.js.map +1 -0
- package/lib/commonjs/theme/defaultTheme.js +17 -2
- package/lib/commonjs/theme/defaultTheme.js.map +1 -1
- package/lib/commonjs/theme/index.js +19 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/types/globals.d.js +2 -0
- package/lib/commonjs/types/globals.d.js.map +1 -0
- package/lib/module/a11y/audit.js +68 -0
- package/lib/module/a11y/audit.js.map +1 -0
- package/lib/module/a11y/index.js +4 -0
- package/lib/module/a11y/index.js.map +1 -0
- package/lib/module/autofill/index.js +4 -0
- package/lib/module/autofill/index.js.map +1 -0
- package/lib/module/autofill/profiles.js +193 -0
- package/lib/module/autofill/profiles.js.map +1 -0
- package/lib/module/components/FieldFlowA11yAudit/FieldFlowA11yAudit.js +94 -0
- package/lib/module/components/FieldFlowA11yAudit/FieldFlowA11yAudit.js.map +1 -0
- package/lib/module/components/FieldFlowA11yAudit/index.js +4 -0
- package/lib/module/components/FieldFlowA11yAudit/index.js.map +1 -0
- package/lib/module/components/FieldFlowAuthActions/FieldFlowAuthActions.js +125 -0
- package/lib/module/components/FieldFlowAuthActions/FieldFlowAuthActions.js.map +1 -0
- package/lib/module/components/FieldFlowAuthActions/index.js +4 -0
- package/lib/module/components/FieldFlowAuthActions/index.js.map +1 -0
- package/lib/module/components/FieldFlowCompleteness/FieldFlowCompleteness.js +95 -0
- package/lib/module/components/FieldFlowCompleteness/FieldFlowCompleteness.js.map +1 -0
- package/lib/module/components/FieldFlowCompleteness/index.js +4 -0
- package/lib/module/components/FieldFlowCompleteness/index.js.map +1 -0
- package/lib/module/components/FieldFlowFormHeader/FieldFlowFormHeader.js +97 -0
- package/lib/module/components/FieldFlowFormHeader/FieldFlowFormHeader.js.map +1 -0
- package/lib/module/components/FieldFlowFormHeader/index.js +4 -0
- package/lib/module/components/FieldFlowFormHeader/index.js.map +1 -0
- package/lib/module/components/FieldFlowInfoTip/FieldFlowInfoTip.js +116 -0
- package/lib/module/components/FieldFlowInfoTip/FieldFlowInfoTip.js.map +1 -0
- package/lib/module/components/FieldFlowInfoTip/index.js +4 -0
- package/lib/module/components/FieldFlowInfoTip/index.js.map +1 -0
- package/lib/module/components/FieldFlowInlineAlert/FieldFlowInlineAlert.js +137 -0
- package/lib/module/components/FieldFlowInlineAlert/FieldFlowInlineAlert.js.map +1 -0
- package/lib/module/components/FieldFlowInlineAlert/index.js +4 -0
- package/lib/module/components/FieldFlowInlineAlert/index.js.map +1 -0
- package/lib/module/components/FieldFlowInput/FieldFlowInput.js +44 -18
- package/lib/module/components/FieldFlowInput/FieldFlowInput.js.map +1 -1
- package/lib/module/components/FieldFlowInput/styles.js +49 -13
- package/lib/module/components/FieldFlowInput/styles.js.map +1 -1
- package/lib/module/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.js +131 -0
- package/lib/module/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.js.map +1 -0
- package/lib/module/components/FieldFlowKeyboardToolbar/index.js +4 -0
- package/lib/module/components/FieldFlowKeyboardToolbar/index.js.map +1 -0
- package/lib/module/components/FieldFlowSkeleton/FieldFlowSkeleton.js +96 -0
- package/lib/module/components/FieldFlowSkeleton/FieldFlowSkeleton.js.map +1 -0
- package/lib/module/components/FieldFlowSkeleton/index.js +4 -0
- package/lib/module/components/FieldFlowSkeleton/index.js.map +1 -0
- package/lib/module/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.js +5 -3
- package/lib/module/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.js.map +1 -1
- package/lib/module/hooks/index.js +3 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useFieldFlowCompleteness.js +42 -0
- package/lib/module/hooks/useFieldFlowCompleteness.js.map +1 -0
- package/lib/module/hooks/useFieldFlowSubmitQueue.js +141 -0
- package/lib/module/hooks/useFieldFlowSubmitQueue.js.map +1 -0
- package/lib/module/hooks/useKeyboardManager.js +15 -0
- package/lib/module/hooks/useKeyboardManager.js.map +1 -1
- package/lib/module/hooks/useSmartPaste.js +23 -0
- package/lib/module/hooks/useSmartPaste.js.map +1 -0
- package/lib/module/index.js +17 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/paste/index.js +4 -0
- package/lib/module/paste/index.js.map +1 -0
- package/lib/module/paste/smartPaste.js +108 -0
- package/lib/module/paste/smartPaste.js.map +1 -0
- package/lib/module/schema/FieldFlowSchemaForm.js +214 -0
- package/lib/module/schema/FieldFlowSchemaForm.js.map +1 -0
- package/lib/module/schema/index.js +4 -0
- package/lib/module/schema/index.js.map +1 -0
- package/lib/module/schema/types.js +4 -0
- package/lib/module/schema/types.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +66 -5
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/appearance.js +87 -0
- package/lib/module/theme/appearance.js.map +1 -0
- package/lib/module/theme/defaultTheme.js +17 -2
- package/lib/module/theme/defaultTheme.js.map +1 -1
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/types/globals.d.js +2 -0
- package/lib/module/types/globals.d.js.map +1 -0
- package/lib/typescript/a11y/audit.d.ts +32 -0
- package/lib/typescript/a11y/audit.d.ts.map +1 -0
- package/lib/typescript/a11y/index.d.ts +3 -0
- package/lib/typescript/a11y/index.d.ts.map +1 -0
- package/lib/typescript/autofill/index.d.ts +3 -0
- package/lib/typescript/autofill/index.d.ts.map +1 -0
- package/lib/typescript/autofill/profiles.d.ts +48 -0
- package/lib/typescript/autofill/profiles.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowA11yAudit/FieldFlowA11yAudit.d.ts +21 -0
- package/lib/typescript/components/FieldFlowA11yAudit/FieldFlowA11yAudit.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowA11yAudit/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowA11yAudit/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowAuthActions/FieldFlowAuthActions.d.ts +29 -0
- package/lib/typescript/components/FieldFlowAuthActions/FieldFlowAuthActions.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowAuthActions/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowAuthActions/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowCompleteness/FieldFlowCompleteness.d.ts +25 -0
- package/lib/typescript/components/FieldFlowCompleteness/FieldFlowCompleteness.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowCompleteness/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowCompleteness/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowFormHeader/FieldFlowFormHeader.d.ts +23 -0
- package/lib/typescript/components/FieldFlowFormHeader/FieldFlowFormHeader.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowFormHeader/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowFormHeader/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowInfoTip/FieldFlowInfoTip.d.ts +19 -0
- package/lib/typescript/components/FieldFlowInfoTip/FieldFlowInfoTip.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowInfoTip/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowInfoTip/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowInlineAlert/FieldFlowInlineAlert.d.ts +22 -0
- package/lib/typescript/components/FieldFlowInlineAlert/FieldFlowInlineAlert.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowInlineAlert/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowInlineAlert/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 +36 -1
- package/lib/typescript/components/FieldFlowInput/styles.d.ts.map +1 -1
- package/lib/typescript/components/FieldFlowInput/types.d.ts +18 -0
- package/lib/typescript/components/FieldFlowInput/types.d.ts.map +1 -1
- package/lib/typescript/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.d.ts +30 -0
- package/lib/typescript/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowKeyboardToolbar/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowKeyboardToolbar/index.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSkeleton/FieldFlowSkeleton.d.ts +21 -0
- package/lib/typescript/components/FieldFlowSkeleton/FieldFlowSkeleton.d.ts.map +1 -0
- package/lib/typescript/components/FieldFlowSkeleton/index.d.ts +3 -0
- package/lib/typescript/components/FieldFlowSkeleton/index.d.ts.map +1 -0
- package/lib/typescript/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.d.ts +3 -2
- package/lib/typescript/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.d.ts.map +1 -1
- package/lib/typescript/hooks/index.d.ts +6 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -1
- package/lib/typescript/hooks/useFieldFlowCompleteness.d.ts +28 -0
- package/lib/typescript/hooks/useFieldFlowCompleteness.d.ts.map +1 -0
- package/lib/typescript/hooks/useFieldFlowSubmitQueue.d.ts +45 -0
- package/lib/typescript/hooks/useFieldFlowSubmitQueue.d.ts.map +1 -0
- package/lib/typescript/hooks/useKeyboardManager.d.ts +6 -0
- package/lib/typescript/hooks/useKeyboardManager.d.ts.map +1 -1
- package/lib/typescript/hooks/useSmartPaste.d.ts +14 -0
- package/lib/typescript/hooks/useSmartPaste.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +28 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/paste/index.d.ts +3 -0
- package/lib/typescript/paste/index.d.ts.map +1 -0
- package/lib/typescript/paste/smartPaste.d.ts +32 -0
- package/lib/typescript/paste/smartPaste.d.ts.map +1 -0
- package/lib/typescript/schema/FieldFlowSchemaForm.d.ts +28 -0
- package/lib/typescript/schema/FieldFlowSchemaForm.d.ts.map +1 -0
- package/lib/typescript/schema/index.d.ts +4 -0
- package/lib/typescript/schema/index.d.ts.map +1 -0
- package/lib/typescript/schema/types.d.ts +43 -0
- package/lib/typescript/schema/types.d.ts.map +1 -0
- package/lib/typescript/theme/ThemeProvider.d.ts +18 -4
- package/lib/typescript/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/theme/appearance.d.ts +19 -0
- package/lib/typescript/theme/appearance.d.ts.map +1 -0
- package/lib/typescript/theme/defaultTheme.d.ts.map +1 -1
- package/lib/typescript/theme/index.d.ts +1 -0
- package/lib/typescript/theme/index.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +26 -0
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/a11y/audit.ts +99 -0
- package/src/a11y/index.ts +7 -0
- package/src/autofill/index.ts +10 -0
- package/src/autofill/profiles.ts +224 -0
- package/src/components/FieldFlowA11yAudit/FieldFlowA11yAudit.tsx +112 -0
- package/src/components/FieldFlowA11yAudit/index.ts +2 -0
- package/src/components/FieldFlowAuthActions/FieldFlowAuthActions.tsx +146 -0
- package/src/components/FieldFlowAuthActions/index.ts +6 -0
- package/src/components/FieldFlowCompleteness/FieldFlowCompleteness.tsx +109 -0
- package/src/components/FieldFlowCompleteness/index.ts +2 -0
- package/src/components/FieldFlowFormHeader/FieldFlowFormHeader.tsx +106 -0
- package/src/components/FieldFlowFormHeader/index.ts +2 -0
- package/src/components/FieldFlowInfoTip/FieldFlowInfoTip.tsx +120 -0
- package/src/components/FieldFlowInfoTip/index.ts +2 -0
- package/src/components/FieldFlowInlineAlert/FieldFlowInlineAlert.tsx +134 -0
- package/src/components/FieldFlowInlineAlert/index.ts +2 -0
- package/src/components/FieldFlowInput/FieldFlowInput.tsx +71 -13
- package/src/components/FieldFlowInput/styles.ts +58 -16
- package/src/components/FieldFlowInput/types.ts +21 -0
- package/src/components/FieldFlowKeyboardToolbar/FieldFlowKeyboardToolbar.tsx +150 -0
- package/src/components/FieldFlowKeyboardToolbar/index.ts +5 -0
- package/src/components/FieldFlowSkeleton/FieldFlowSkeleton.tsx +105 -0
- package/src/components/FieldFlowSkeleton/index.ts +2 -0
- package/src/components/KeyboardAwareFormWrapper/KeyboardAwareFormWrapper.tsx +8 -4
- package/src/hooks/index.ts +17 -0
- package/src/hooks/useFieldFlowCompleteness.ts +69 -0
- package/src/hooks/useFieldFlowSubmitQueue.ts +206 -0
- package/src/hooks/useKeyboardManager.ts +26 -0
- package/src/hooks/useSmartPaste.ts +33 -0
- package/src/index.ts +90 -0
- package/src/paste/index.ts +7 -0
- package/src/paste/smartPaste.ts +132 -0
- package/src/schema/FieldFlowSchemaForm.tsx +274 -0
- package/src/schema/index.ts +8 -0
- package/src/schema/types.ts +63 -0
- package/src/theme/ThemeProvider.tsx +96 -7
- package/src/theme/appearance.ts +105 -0
- package/src/theme/defaultTheme.ts +11 -0
- package/src/theme/index.ts +1 -0
- package/src/types/globals.d.ts +2 -0
- package/src/types/index.ts +28 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FieldFlowSchemaForm"],"sourceRoot":"../../../src","sources":["schema/index.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,uBAAuB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["schema/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { createContext, useContext, useMemo } from 'react';
|
|
3
|
+
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';
|
|
4
|
+
import { Animated, Easing } from 'react-native';
|
|
4
5
|
import { defaultTheme } from './defaultTheme';
|
|
6
|
+
import { applyAppearance, defaultAppearance } from './appearance';
|
|
7
|
+
import { useReducedMotion } from '../motion/useReducedMotion';
|
|
5
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
9
|
const FieldFlowThemeContext = /*#__PURE__*/createContext(defaultTheme);
|
|
7
10
|
function mergeDeep(base, override) {
|
|
@@ -22,17 +25,75 @@ function mergeDeep(base, override) {
|
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* Wrap your app (or a screen/form) in this provider to apply a custom theme.
|
|
25
|
-
*
|
|
26
|
-
* so you only need to specify what you want to change.
|
|
28
|
+
* Density / size / shape / surface / focusRing are one-liner visual knobs.
|
|
27
29
|
*/
|
|
28
30
|
export function FieldFlowThemeProvider({
|
|
29
31
|
theme,
|
|
32
|
+
density,
|
|
33
|
+
size,
|
|
34
|
+
surface,
|
|
35
|
+
shape,
|
|
36
|
+
focusRing,
|
|
37
|
+
animateTheme = true,
|
|
30
38
|
children
|
|
31
39
|
}) {
|
|
32
|
-
const
|
|
40
|
+
const reducedMotion = useReducedMotion();
|
|
41
|
+
const appearanceOverride = useMemo(() => {
|
|
42
|
+
const partial = {};
|
|
43
|
+
if (density) partial.density = density;
|
|
44
|
+
if (size) partial.size = size;
|
|
45
|
+
if (surface) partial.surface = surface;
|
|
46
|
+
if (shape) partial.shape = shape;
|
|
47
|
+
if (focusRing) partial.focusRing = focusRing;
|
|
48
|
+
return partial;
|
|
49
|
+
}, [density, size, surface, shape, focusRing]);
|
|
50
|
+
const merged = useMemo(() => {
|
|
51
|
+
const base = mergeDeep(defaultTheme, theme);
|
|
52
|
+
const withAppearanceDefaults = {
|
|
53
|
+
...base,
|
|
54
|
+
appearance: {
|
|
55
|
+
...defaultAppearance,
|
|
56
|
+
...(base.appearance ?? {}),
|
|
57
|
+
...appearanceOverride
|
|
58
|
+
},
|
|
59
|
+
colors: {
|
|
60
|
+
...defaultTheme.colors,
|
|
61
|
+
...base.colors
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return applyAppearance(withAppearanceDefaults, appearanceOverride);
|
|
65
|
+
}, [theme, appearanceOverride]);
|
|
66
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
67
|
+
const themeKey = useMemo(() => JSON.stringify({
|
|
68
|
+
colors: merged.colors,
|
|
69
|
+
appearance: merged.appearance,
|
|
70
|
+
spacing: merged.spacing
|
|
71
|
+
}), [merged]);
|
|
72
|
+
const prevKey = useRef(themeKey);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!animateTheme || reducedMotion) {
|
|
75
|
+
opacity.setValue(1);
|
|
76
|
+
prevKey.current = themeKey;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (prevKey.current === themeKey) return;
|
|
80
|
+
prevKey.current = themeKey;
|
|
81
|
+
opacity.setValue(0.35);
|
|
82
|
+
Animated.timing(opacity, {
|
|
83
|
+
toValue: 1,
|
|
84
|
+
duration: Math.max(180, merged.animation.duration + 40),
|
|
85
|
+
easing: Easing.out(Easing.cubic),
|
|
86
|
+
useNativeDriver: true
|
|
87
|
+
}).start();
|
|
88
|
+
}, [themeKey, animateTheme, reducedMotion, opacity, merged.animation.duration]);
|
|
33
89
|
return /*#__PURE__*/_jsx(FieldFlowThemeContext.Provider, {
|
|
34
90
|
value: merged,
|
|
35
|
-
children:
|
|
91
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
92
|
+
style: {
|
|
93
|
+
opacity
|
|
94
|
+
},
|
|
95
|
+
children: children
|
|
96
|
+
})
|
|
36
97
|
});
|
|
37
98
|
}
|
|
38
99
|
export function useFieldFlowTheme() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","useContext","useMemo","defaultTheme","jsx","_jsx","FieldFlowThemeContext","mergeDeep","base","override","result","key","Object","keys","overrideValue","baseValue","Array","isArray","undefined","FieldFlowThemeProvider","theme","children","merged","Provider","value","useFieldFlowTheme"],"sourceRoot":"../../../src","sources":["theme/ThemeProvider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useEffect","useMemo","useRef","Animated","Easing","defaultTheme","applyAppearance","defaultAppearance","useReducedMotion","jsx","_jsx","FieldFlowThemeContext","mergeDeep","base","override","result","key","Object","keys","overrideValue","baseValue","Array","isArray","undefined","FieldFlowThemeProvider","theme","density","size","surface","shape","focusRing","animateTheme","children","reducedMotion","appearanceOverride","partial","merged","withAppearanceDefaults","appearance","colors","opacity","Value","current","themeKey","JSON","stringify","spacing","prevKey","setValue","timing","toValue","duration","Math","max","animation","easing","out","cubic","useNativeDriver","start","Provider","value","View","style","useFieldFlowTheme"],"sourceRoot":"../../../src","sources":["theme/ThemeProvider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACpF,SAASC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAW/C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,cAAc;AACjE,SAASC,gBAAg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+
focusRing: 'softGlow'
|
|
9
|
+
};
|
|
10
|
+
const DENSITY_SCALE = {
|
|
11
|
+
compact: 0.85,
|
|
12
|
+
comfortable: 1,
|
|
13
|
+
spacious: 1.18
|
|
14
|
+
};
|
|
15
|
+
const SIZE_SCALE = {
|
|
16
|
+
sm: 0.88,
|
|
17
|
+
md: 1,
|
|
18
|
+
lg: 1.14
|
|
19
|
+
};
|
|
20
|
+
const SHAPE_RADIUS = {
|
|
21
|
+
square: () => 4,
|
|
22
|
+
rounded: base => base,
|
|
23
|
+
pill: () => 999
|
|
24
|
+
};
|
|
25
|
+
function scale(n, factor) {
|
|
26
|
+
return Math.round(n * factor * 10) / 10;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Apply density / size / shape onto spacing + typography.
|
|
31
|
+
* Surface and focusRing stay as appearance flags for components to read.
|
|
32
|
+
*/
|
|
33
|
+
export function applyAppearance(theme, appearance = {}) {
|
|
34
|
+
const next = {
|
|
35
|
+
...defaultAppearance,
|
|
36
|
+
...(theme.appearance ?? defaultAppearance),
|
|
37
|
+
...appearance
|
|
38
|
+
};
|
|
39
|
+
const factor = DENSITY_SCALE[next.density] * SIZE_SCALE[next.size];
|
|
40
|
+
const radius = SHAPE_RADIUS[next.shape](theme.spacing.borderRadius);
|
|
41
|
+
return {
|
|
42
|
+
...theme,
|
|
43
|
+
appearance: next,
|
|
44
|
+
spacing: {
|
|
45
|
+
...theme.spacing,
|
|
46
|
+
paddingHorizontal: scale(theme.spacing.paddingHorizontal, factor),
|
|
47
|
+
paddingVertical: scale(theme.spacing.paddingVertical, factor),
|
|
48
|
+
gap: scale(theme.spacing.gap, factor),
|
|
49
|
+
borderRadius: radius
|
|
50
|
+
},
|
|
51
|
+
typography: {
|
|
52
|
+
...theme.typography,
|
|
53
|
+
fontSize: scale(theme.typography.fontSize, factor),
|
|
54
|
+
labelFontSize: scale(theme.typography.labelFontSize, factor),
|
|
55
|
+
helperFontSize: scale(theme.typography.helperFontSize, Math.min(factor, 1.1))
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export function surfaceShadow(surface) {
|
|
60
|
+
switch (surface) {
|
|
61
|
+
case 'elevated':
|
|
62
|
+
return {
|
|
63
|
+
shadowColor: '#000',
|
|
64
|
+
shadowOpacity: 0.08,
|
|
65
|
+
shadowRadius: 10,
|
|
66
|
+
shadowOffset: {
|
|
67
|
+
width: 0,
|
|
68
|
+
height: 4
|
|
69
|
+
},
|
|
70
|
+
elevation: 3
|
|
71
|
+
};
|
|
72
|
+
case 'soft':
|
|
73
|
+
return {
|
|
74
|
+
shadowColor: '#000',
|
|
75
|
+
shadowOpacity: 0.04,
|
|
76
|
+
shadowRadius: 6,
|
|
77
|
+
shadowOffset: {
|
|
78
|
+
width: 0,
|
|
79
|
+
height: 2
|
|
80
|
+
},
|
|
81
|
+
elevation: 1
|
|
82
|
+
};
|
|
83
|
+
default:
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=appearance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["defaultAppearance","density","size","surface","shape","focusRing","DENSITY_SCALE","compact","comfortable","spacious","SIZE_SCALE","sm","md","lg","SHAPE_RADIUS","square","rounded","base","pill","scale","n","factor","Math","round","applyAppearance","theme","appearance","next","radius","spacing","borderRadius","paddingHorizontal","paddingVertical","gap","typography","fontSize","labelFontSize","helperFontSize","min","surfaceShadow","shadowColor","shadowOpacity","shadowRadius","shadowOffset","width","height","elevation"],"sourceRoot":"../../../src","sources":["theme/appearance.ts"],"mappings":";;AAUA,OAAO,MAAMA,iBAAsC,GAAG;EACpDC,OAAO,EAAE,aAAa;EACtBC,IAAI,EAAE,IAAI;EACVC,OAAO,EAAE,MAAM;EACfC,KAAK,EAAE,SAAS;EAChBC,SAAS,EAAE;AACb,CAAC;AAED,MAAMC,aAA+C,GAAG;EACtDC,OAAO,EAAE,IAAI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GAAG,EAAEZ,MAAM,CAAC;MACrCS,YAAY,EAAEF;IAChB,CAAC;IACDM,UAAU,EAAE;MACV,GAAGT,KAAK,CAACS,UAAU;MACnBC,QAAQ,EAAEhB,KAAK,CAACM,KAAK,CAACS,UAAU,CAACC,QAAQ,EAAEd,MAAM,CAAC;MAClDe,aAAa,EAAEjB,KAAK,CAACM,KAAK,CAACS,UAAU,CAACE,aAAa,EAAEf,MAAM,CAAC;MAC5DgB,cAAc,EAAElB,KAAK,CAACM,KAAK,CAACS,UAAU,CAACG,cAAc,EAAEf,IAAI,CAACgB,GAAG,CAACjB,MAAM,EAAE,GAAG,CAAC;IAC9E;EACF,CAAC;AACH;AAEA,OAAO,SAASkB,aAAaA,CAACpC,OAAyB,EAM9C;EACP,QAAQA,OAAO;IACb,KAAK,UAAU;MACb,OAAO;QACLqC,WAAW,EAAE,MAAM;QACnBC,aAAa,EAAE,IAAI;QACnBC,YAAY,EAAE,EAAE;QAChBC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAC;UAAEC,MAAM,EAAE;QAAE,CAAC;QACrCC,SAAS,EAAE;MACb,CAAC;IACH,KAAK,MAAM;MACT,OAAO;QACLN,WAAW,EAAE,MAAM;QACnBC,aAAa,EAAE,IAAI;QACnBC,YAAY,EAAE,CAAC;QACfC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAC;UAAEC,MAAM,EAAE;QAAE,CAAC;QACrCC,SAAS,EAAE;MACb,CAAC;IACH;MACE,OAAO,IAAI;EACf;AACF","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { defaultAppearance } from './appearance';
|
|
3
4
|
export const defaultTheme = {
|
|
4
5
|
colors: {
|
|
5
6
|
background: '#FFFFFF',
|
|
@@ -15,7 +16,11 @@ export const defaultTheme = {
|
|
|
15
16
|
error: '#EF4444',
|
|
16
17
|
success: '#22C55E',
|
|
17
18
|
icon: '#6B7280',
|
|
18
|
-
iconFocused: '#3B82F6'
|
|
19
|
+
iconFocused: '#3B82F6',
|
|
20
|
+
warning: '#D97706',
|
|
21
|
+
info: '#0284C7',
|
|
22
|
+
surfaceMuted: '#F8FAFC',
|
|
23
|
+
surfaceElevated: '#FFFFFF'
|
|
19
24
|
},
|
|
20
25
|
spacing: {
|
|
21
26
|
paddingHorizontal: 14,
|
|
@@ -34,6 +39,9 @@ export const defaultTheme = {
|
|
|
34
39
|
animation: {
|
|
35
40
|
duration: 160,
|
|
36
41
|
useNativeDriver: false
|
|
42
|
+
},
|
|
43
|
+
appearance: {
|
|
44
|
+
...defaultAppearance
|
|
37
45
|
}
|
|
38
46
|
};
|
|
39
47
|
export const darkTheme = {
|
|
@@ -52,7 +60,14 @@ export const darkTheme = {
|
|
|
52
60
|
error: '#F87171',
|
|
53
61
|
success: '#4ADE80',
|
|
54
62
|
icon: '#9CA3AF',
|
|
55
|
-
iconFocused: '#60A5FA'
|
|
63
|
+
iconFocused: '#60A5FA',
|
|
64
|
+
warning: '#FBBF24',
|
|
65
|
+
info: '#38BDF8',
|
|
66
|
+
surfaceMuted: '#15171B',
|
|
67
|
+
surfaceElevated: '#262B33'
|
|
68
|
+
},
|
|
69
|
+
appearance: {
|
|
70
|
+
...defaultAppearance
|
|
56
71
|
}
|
|
57
72
|
};
|
|
58
73
|
//# sourceMappingURL=defaultTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultTheme","colors","background","backgroundDisabled","border","borderFocused","borderError","borderSuccess","text","placeholder","label","labelFocused","error","success","icon","iconFocused","spacing","paddingHorizontal","paddingVertical","gap","borderRadius","borderWidth","borderWidthFocused","typography","fontSize","labelFontSize","helperFontSize","fontWeight","animation","duration","useNativeDriver","darkTheme"],"sourceRoot":"../../../src","sources":["theme/defaultTheme.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["defaultAppearance","defaultTheme","colors","background","backgroundDisabled","border","borderFocused","borderError","borderSuccess","text","placeholder","label","labelFocused","error","success","icon","iconFocused","warning","info","surfaceMuted","surfaceElevated","spacing","paddingHorizontal","paddingVertical","gap","borderRadius","borderWidth","borderWidthFocused","typography","fontSize","labelFontSize","helperFontSize","fontWeight","animation","duration","useNativeDriver","appearance","darkTheme"],"sourceRoot":"../../../src","sources":["theme/defaultTheme.ts"],"mappings":";;AACA,SAASA,iBAAiB,QAAQ,cAAc;AAEhD,OAAO,MAAMC,YAA4B,GAAG;EAC1CC,MAAM,EAAE;IACNC,UAAU,EAAE,SAAS;IACrBC,kBAAkB,EAAE,SAAS;IAC7BC,MAAM,EAAE,SAAS;IACjBC,aAAa,EAAE,SAAS;IACxBC,WAAW,EAAE,SAAS;IACtBC,aAAa,EAAE,SAAS;IACxBC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE,SAAS;IACtBC,KAAK,EAAE,SAAS;IAChBC,YAAY,EAAE,SAAS;IACvBC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE,SAAS;IAClBC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE,SAAS;IACtBC,OAAO,EAAE,SAAS;IAClBC,IAAI,EAAE,SAAS;IACfC,YAAY,EAAE,SAAS;IACvBC,eAAe,EAAE;EACnB,CAAC;EACDC,OAAO,EAAE;IACPC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBC,GAAG,EAAE,CAAC;IACNC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,kBAAkB,EAAE;EACtB,CAAC;EACDC,UAAU,EAAE;IACVC,QAAQ,EAAE,EAAE;IACZC,aAAa,EAAE,EAAE;IACjBC,cAAc,EAAE,EAAE;IAClBC,UAAU,EAAE;EACd,CAAC;EACDC,SAAS,EAAE;IACTC,QAAQ,EAAE,GAAG;IACbC,eAAe,EAAE;EACnB,CAAC;EACDC,UAAU,EAAE;IAAE,GAAGpC;EAAkB;AACrC,CAAC;AAED,OAAO,MAAMqC,SAAyB,GAAG;EACvC,GAAGpC,YAAY;EACfC,MAAM,EAAE;IACNC,UAAU,EAAE,SAAS;IACrBC,kBAAkB,EAAE,SAAS;IAC7BC,MAAM,EAAE,SAAS;IACjBC,aAAa,EAAE,SAAS;IACxBC,WAAW,EAAE,SAAS;IACtBC,aAAa,EAAE,SAAS;IACxBC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE,SAAS;IACtBC,KAAK,EAAE,SAAS;IAChBC,YAAY,EAAE,SAAS;IACvBC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE,SAAS;IAClBC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE,SAAS;IACtBC,OAAO,EAAE,SAAS;IAClBC,IAAI,EAAE,SAAS;IACfC,YAAY,EAAE,SAAS;IACvBC,eAAe,EAAE;EACnB,CAAC;EACDgB,UAAU,EAAE;IAAE,GAAGpC;EAAkB;AACrC,CAAC","ignoreList":[]}
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
export { defaultTheme, darkTheme } from './defaultTheme';
|
|
4
4
|
export { FieldFlowThemeProvider, useFieldFlowTheme, mergeDeep } from './ThemeProvider';
|
|
5
5
|
export { themePresets, getThemePreset } from './presets';
|
|
6
|
+
export { applyAppearance, defaultAppearance, surfaceShadow } from './appearance';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultTheme","darkTheme","FieldFlowThemeProvider","useFieldFlowTheme","mergeDeep","themePresets","getThemePreset"],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,SAAS,QAAQ,gBAAgB;AACxD,SAASC,sBAAsB,EAAEC,iBAAiB,EAAEC,SAAS,QAAQ,iBAAiB;AAEtF,SAASC,YAAY,EAAEC,cAAc,QAAQ,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["defaultTheme","darkTheme","FieldFlowThemeProvider","useFieldFlowTheme","mergeDeep","themePresets","getThemePreset","applyAppearance","defaultAppearance","surfaceShadow"],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,SAAS,QAAQ,gBAAgB;AACxD,SAASC,sBAAsB,EAAEC,iBAAiB,EAAEC,SAAS,QAAQ,iBAAiB;AAEtF,SAASC,YAAY,EAAEC,cAAc,QAAQ,WAAW;AAExD,SAASC,eAAe,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/globals.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type FieldFlowA11ySeverity = 'error' | 'warn' | 'info';
|
|
2
|
+
export interface FieldFlowA11yIssue {
|
|
3
|
+
id: string;
|
|
4
|
+
severity: FieldFlowA11ySeverity;
|
|
5
|
+
message: string;
|
|
6
|
+
field?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldFlowA11yFieldSnapshot {
|
|
9
|
+
name: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
hasError?: boolean;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
/** Approximate hit target height in px (optional). */
|
|
15
|
+
hitHeight?: number;
|
|
16
|
+
/** True if accessibilityLabel / labelledBy is set. */
|
|
17
|
+
hasAccessibilityLabel?: boolean;
|
|
18
|
+
placeholderOnly?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface FieldFlowA11yAuditInput {
|
|
21
|
+
fields: FieldFlowA11yFieldSnapshot[];
|
|
22
|
+
/** Form uses Reduce Motion–aware animations. */
|
|
23
|
+
respectsReducedMotion?: boolean;
|
|
24
|
+
/** Min touch target. Default: 44. */
|
|
25
|
+
minHitTarget?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Dev-time accessibility audit for FieldFlow forms.
|
|
29
|
+
* Call in `__DEV__` and log / render via `FieldFlowA11yAudit`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function runA11yAudit(input: FieldFlowA11yAuditInput): FieldFlowA11yIssue[];
|
|
32
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/a11y/audit.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,qBAAqB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,0BAA0B,EAAE,CAAC;IACrC,gDAAgD;IAChD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,uBAAuB,GAAG,kBAAkB,EAAE,CAgEjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/a11y/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autofill/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TextInputProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Semantic autofill roles — map to platform `autoComplete` + iOS `textContentType`.
|
|
4
|
+
* Pass as `autofill="email"` on `FieldFlowInput`, or use a profile bundle.
|
|
5
|
+
*/
|
|
6
|
+
export type FieldFlowAutofillRole = 'off' | 'name' | 'givenName' | 'familyName' | 'email' | 'username' | 'password' | 'newPassword' | 'oneTimeCode' | 'tel' | 'streetAddress' | 'postalCode' | 'addressCity' | 'addressState' | 'country' | 'ccNumber' | 'ccExp' | 'ccCsc' | 'ccName' | 'organization' | 'url' | 'birthdate';
|
|
7
|
+
export type FieldFlowAutofillProps = Pick<TextInputProps, 'autoComplete' | 'textContentType' | 'importantForAutofill' | 'autoCorrect' | 'autoCapitalize'>;
|
|
8
|
+
/** Resolve platform autofill props for a semantic role. */
|
|
9
|
+
export declare function getAutofillProps(role: FieldFlowAutofillRole): FieldFlowAutofillProps;
|
|
10
|
+
/** Infer a sensible autofill role from FieldFlow `type` when no explicit role is set. */
|
|
11
|
+
export declare function autofillRoleFromFieldType(type?: string): FieldFlowAutofillRole | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Named screen profiles — spread onto multiple fields.
|
|
14
|
+
* Example: `autofillProfiles.signup.email` → role `'email'`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const autofillProfiles: {
|
|
17
|
+
readonly login: {
|
|
18
|
+
readonly email: "email";
|
|
19
|
+
readonly username: "username";
|
|
20
|
+
readonly password: "password";
|
|
21
|
+
};
|
|
22
|
+
readonly signup: {
|
|
23
|
+
readonly name: "name";
|
|
24
|
+
readonly email: "email";
|
|
25
|
+
readonly password: "newPassword";
|
|
26
|
+
readonly phone: "tel";
|
|
27
|
+
};
|
|
28
|
+
readonly shipping: {
|
|
29
|
+
readonly name: "name";
|
|
30
|
+
readonly street: "streetAddress";
|
|
31
|
+
readonly city: "addressCity";
|
|
32
|
+
readonly state: "addressState";
|
|
33
|
+
readonly postalCode: "postalCode";
|
|
34
|
+
readonly country: "country";
|
|
35
|
+
readonly phone: "tel";
|
|
36
|
+
};
|
|
37
|
+
readonly payment: {
|
|
38
|
+
readonly name: "ccName";
|
|
39
|
+
readonly number: "ccNumber";
|
|
40
|
+
readonly expiry: "ccExp";
|
|
41
|
+
readonly cvc: "ccCsc";
|
|
42
|
+
};
|
|
43
|
+
readonly otp: {
|
|
44
|
+
readonly code: "oneTimeCode";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type FieldFlowAutofillProfileName = keyof typeof autofillProfiles;
|
|
48
|
+
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/autofill/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,KAAK,GACL,MAAM,GACN,WAAW,GACX,YAAY,GACZ,OAAO,GACP,UAAU,GACV,UAAU,GACV,aAAa,GACb,aAAa,GACb,KAAK,GACL,eAAe,GACf,YAAY,GACZ,aAAa,GACb,cAAc,GACd,SAAS,GACT,UAAU,GACV,OAAO,GACP,OAAO,GACP,QAAQ,GACR,cAAc,GACd,KAAK,GACL,WAAW,CAAC;AAEhB,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,cAAc,EACd,cAAc,GAAG,iBAAiB,GAAG,sBAAsB,GAAG,aAAa,GAAG,gBAAgB,CAC/F,CAAC;AAqIF,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,qBAAqB,GAAG,sBAAsB,CAEpF;AAED,yFAAyF;AACzF,wBAAgB,yBAAyB,CACvC,IAAI,CAAC,EAAE,MAAM,GACZ,qBAAqB,GAAG,SAAS,CAWnC;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BnB,CAAC;AAEX,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ViewStyle } from 'react-native';
|
|
3
|
+
import { type FieldFlowA11yAuditInput, type FieldFlowA11yIssue } from '../../a11y';
|
|
4
|
+
import type { DeepPartial, FieldFlowTheme } from '../../types';
|
|
5
|
+
export interface FieldFlowA11yAuditProps {
|
|
6
|
+
/** Audit input — or pass precomputed `issues`. */
|
|
7
|
+
audit?: FieldFlowA11yAuditInput;
|
|
8
|
+
issues?: FieldFlowA11yIssue[];
|
|
9
|
+
/** Only render in __DEV__ when true (default). */
|
|
10
|
+
devOnly?: boolean;
|
|
11
|
+
title?: string;
|
|
12
|
+
containerStyle?: ViewStyle;
|
|
13
|
+
theme?: DeepPartial<FieldFlowTheme>;
|
|
14
|
+
testID?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Dev overlay listing accessibility issues for the current form.
|
|
18
|
+
* No-ops in production when `devOnly` is true.
|
|
19
|
+
*/
|
|
20
|
+
export declare function FieldFlowA11yAudit({ audit, issues: issuesProp, devOnly, title, containerStyle, theme: themeOverride, testID, }: FieldFlowA11yAuditProps): React.JSX.Element | null;
|
|
21
|
+
//# sourceMappingURL=FieldFlowA11yAudit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldFlowA11yAudit.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowA11yAudit/FieldFlowA11yAudit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAgB,KAAK,uBAAuB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGjG,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,KAAK,CAAC,EAAE,uBAAuB,CAAC;IAChC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,MAAM,EAAE,UAAU,EAClB,OAAc,EACd,KAA8B,EAC9B,cAAc,EACd,KAAK,EAAE,aAAa,EACpB,MAAM,GACP,EAAE,uBAAuB,4BAoDzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowA11yAudit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type FieldFlowIconSource } from '../../icons';
|
|
4
|
+
import type { DeepPartial, FieldFlowTheme } from '../../types';
|
|
5
|
+
export type FieldFlowAuthProvider = 'passkey' | 'apple' | 'google' | 'biometric' | string;
|
|
6
|
+
export interface FieldFlowAuthAction {
|
|
7
|
+
id: FieldFlowAuthProvider;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: FieldFlowIconSource;
|
|
10
|
+
onPress: () => void | Promise<void>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface FieldFlowAuthActionsProps {
|
|
14
|
+
actions: FieldFlowAuthAction[];
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Divider text between auth strip and password form. Default: "or continue with email". */
|
|
17
|
+
dividerLabel?: string;
|
|
18
|
+
loadingId?: string | null;
|
|
19
|
+
containerStyle?: ViewStyle;
|
|
20
|
+
titleStyle?: TextStyle;
|
|
21
|
+
theme?: DeepPartial<FieldFlowTheme>;
|
|
22
|
+
testID?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Auth action strip for passkey / SSO / biometric — place above password fields.
|
|
26
|
+
* All providers are injected; FieldFlow only themes the chrome.
|
|
27
|
+
*/
|
|
28
|
+
export declare function FieldFlowAuthActions({ actions, title, dividerLabel, loadingId, containerStyle, titleStyle, theme: themeOverride, testID, }: FieldFlowAuthActionsProps): React.JSX.Element | null;
|
|
29
|
+
//# sourceMappingURL=FieldFlowAuthActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldFlowAuthActions.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowAuthActions/FieldFlowAuthActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1F,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,qBAAqB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,KAAwB,EACxB,YAAuC,EACvC,SAAS,EACT,cAAc,EACd,UAAU,EACV,KAAK,EAAE,aAAa,EACpB,MAAM,GACP,EAAE,yBAAyB,4BAkD3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowAuthActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EACV,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { DeepPartial, FieldFlowTheme } from '../../types';
|
|
4
|
+
export interface FieldFlowCompletenessViewModel {
|
|
5
|
+
remaining: number;
|
|
6
|
+
percent: number;
|
|
7
|
+
progress: number;
|
|
8
|
+
isComplete: boolean;
|
|
9
|
+
estimatedSecondsLeft: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FieldFlowCompletenessProps {
|
|
12
|
+
/** Pass result from `useFieldFlowCompleteness` (any form value shape). */
|
|
13
|
+
completeness: FieldFlowCompletenessViewModel;
|
|
14
|
+
title?: string;
|
|
15
|
+
/** Show “~Ns left” estimate. Default: true. */
|
|
16
|
+
showEstimate?: boolean;
|
|
17
|
+
/** Custom remaining copy. */
|
|
18
|
+
formatRemaining?: (remaining: number) => string;
|
|
19
|
+
containerStyle?: ViewStyle;
|
|
20
|
+
titleStyle?: TextStyle;
|
|
21
|
+
theme?: DeepPartial<FieldFlowTheme>;
|
|
22
|
+
testID?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function FieldFlowCompleteness({ completeness, title, showEstimate, formatRemaining, containerStyle, titleStyle, theme: themeOverride, testID, }: FieldFlowCompletenessProps): React.JSX.Element;
|
|
25
|
+
//# sourceMappingURL=FieldFlowCompleteness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldFlowCompleteness.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowCompleteness/FieldFlowCompleteness.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAA0B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGtF,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC/D,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,YAAY,EAAE,8BAA8B,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6BAA6B;IAC7B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,YAAY,EACZ,KAAuB,EACvB,YAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,EACV,KAAK,EAAE,aAAa,EACpB,MAAM,GACP,EAAE,0BAA0B,qBAgC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowCompleteness/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { DeepPartial, FieldFlowTheme } from '../../types';
|
|
4
|
+
export interface FieldFlowFormHeaderProps {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Optional illustration / logo node. */
|
|
8
|
+
illustration?: React.ReactNode;
|
|
9
|
+
/** 0–1 progress under the header. */
|
|
10
|
+
progress?: number;
|
|
11
|
+
/** Soft elevated card chrome. Default: true. */
|
|
12
|
+
elevated?: boolean;
|
|
13
|
+
containerStyle?: ViewStyle;
|
|
14
|
+
titleStyle?: TextStyle;
|
|
15
|
+
subtitleStyle?: TextStyle;
|
|
16
|
+
theme?: DeepPartial<FieldFlowTheme>;
|
|
17
|
+
testID?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Calm visual intro for a form screen — title, subtitle, illustration, optional progress.
|
|
21
|
+
*/
|
|
22
|
+
export declare function FieldFlowFormHeader({ title, subtitle, illustration, progress, elevated, containerStyle, titleStyle, subtitleStyle, theme: themeOverride, testID, }: FieldFlowFormHeaderProps): React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=FieldFlowFormHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldFlowFormHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowFormHeader/FieldFlowFormHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAA0B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAItF,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,QAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,EACb,KAAK,EAAE,aAAa,EACpB,MAAM,GACP,EAAE,wBAAwB,qBAsB1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowFormHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { DeepPartial, FieldFlowTheme } from '../../types';
|
|
4
|
+
export interface FieldFlowInfoTipProps {
|
|
5
|
+
/** Tip body shown in the popover. */
|
|
6
|
+
tip: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Accessible name for the ? button. */
|
|
9
|
+
accessibilityLabel?: string;
|
|
10
|
+
containerStyle?: ViewStyle;
|
|
11
|
+
tipStyle?: TextStyle;
|
|
12
|
+
theme?: DeepPartial<FieldFlowTheme>;
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Soft “?” tip beside a label — keeps forms calm without permanent helper clutter.
|
|
17
|
+
*/
|
|
18
|
+
export declare function FieldFlowInfoTip({ tip, title, accessibilityLabel, containerStyle, tipStyle, theme: themeOverride, testID, }: FieldFlowInfoTipProps): React.JSX.Element;
|
|
19
|
+
//# sourceMappingURL=FieldFlowInfoTip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldFlowInfoTip.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowInfoTip/FieldFlowInfoTip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,qBAAqB;IACpC,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,KAA0B,EAC1B,kBAAuC,EACvC,cAAc,EACd,QAAQ,EACR,KAAK,EAAE,aAAa,EACpB,MAAM,GACP,EAAE,qBAAqB,qBAiCvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldFlowInfoTip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { DeepPartial, FieldFlowTheme } from '../../types';
|
|
4
|
+
export type FieldFlowAlertTone = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
5
|
+
export interface FieldFlowInlineAlertProps {
|
|
6
|
+
tone?: FieldFlowAlertTone;
|
|
7
|
+
title?: string;
|
|
8
|
+
message: string;
|
|
9
|
+
/** Soft enter animation. Default: true. */
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
containerStyle?: ViewStyle;
|
|
12
|
+
titleStyle?: TextStyle;
|
|
13
|
+
messageStyle?: TextStyle;
|
|
14
|
+
theme?: DeepPartial<FieldFlowTheme>;
|
|
15
|
+
testID?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Calm inline banner — tips, soft warnings, success notes.
|
|
19
|
+
* Easy on the eyes; themeable tones.
|
|
20
|
+
*/
|
|
21
|
+
export declare function FieldFlowInlineAlert({ tone, title, message, animated, containerStyle, titleStyle, messageStyle, theme: themeOverride, testID, }: FieldFlowInlineAlertProps): React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=FieldFlowInlineAlert.d.ts.map
|