react-native-better-html 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +95 -52
- package/dist/index.d.ts +95 -52
- package/dist/index.js +254 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +263 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
|
|
1
|
+
import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, PartialRecord, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
|
|
2
2
|
export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme, Colors, Country, DeepPartialRecord, ExcludeOptions, IconName, IconsConfig, LoaderConfig, LoaderName, OmitProps, PartialRecord, PickAllRequired, PickValue, Styles, Theme, ThemeConfig, colorThemeControls, countries, darkenColor, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateRandomString, getPluralWord, lightenColor, loaderControls, saturateColor, useBooleanState, useDebounceState, useLoader, useLoaderControls, useTheme } from 'react-better-core';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react_native from 'react-native';
|
|
6
|
-
import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1,
|
|
6
|
+
import { ViewStyle, TextInput, TextStyle, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, StatusBar as StatusBar$1 } from 'react-native';
|
|
7
7
|
import { EaseFunction, PropsTransforms } from '@legendapp/motion';
|
|
8
8
|
|
|
9
9
|
type AppConfig = {};
|
|
@@ -46,6 +46,65 @@ type ComponentPropWithRef<ComponentRef, ComponentProps> = ComponentProps & {
|
|
|
46
46
|
|
|
47
47
|
declare const pressStrength: () => Record<"z05" | "z1" | "z2" | "z3", number>;
|
|
48
48
|
|
|
49
|
+
type InputFieldProps = {
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
prefix?: string | React.ReactNode;
|
|
52
|
+
suffix?: string | React.ReactNode;
|
|
53
|
+
defaultValue?: string;
|
|
54
|
+
value?: string | number;
|
|
55
|
+
/** @default true */
|
|
56
|
+
editable?: boolean;
|
|
57
|
+
label?: string;
|
|
58
|
+
isError?: boolean;
|
|
59
|
+
infoMessage?: string;
|
|
60
|
+
errorMessage?: string;
|
|
61
|
+
/** @default false */
|
|
62
|
+
autoFocus?: boolean;
|
|
63
|
+
autoCapitalize?: React.ComponentProps<typeof TextInput>["autoCapitalize"];
|
|
64
|
+
autoComplete?: React.ComponentProps<typeof TextInput>["autoComplete"];
|
|
65
|
+
autoCorrect?: React.ComponentProps<typeof TextInput>["autoCorrect"];
|
|
66
|
+
/** @default "default" */
|
|
67
|
+
keyboardAppearance?: React.ComponentProps<typeof TextInput>["keyboardAppearance"];
|
|
68
|
+
keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
|
|
69
|
+
/** @default false */
|
|
70
|
+
secureTextEntry?: boolean;
|
|
71
|
+
returnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
|
|
72
|
+
returnKeyType?: React.ComponentProps<typeof TextInput>["returnKeyType"];
|
|
73
|
+
height?: number;
|
|
74
|
+
/** @default 16 */
|
|
75
|
+
fontSize?: number;
|
|
76
|
+
/** @default 400 */
|
|
77
|
+
fontWeight?: TextStyle["fontWeight"];
|
|
78
|
+
/** @default 20 */
|
|
79
|
+
lineHeight?: number;
|
|
80
|
+
textAlign?: React.ComponentProps<typeof TextInput>["textAlign"];
|
|
81
|
+
/** @default false */
|
|
82
|
+
required?: boolean;
|
|
83
|
+
/** @default false */
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
onFocus?: (event: FocusEvent) => void;
|
|
86
|
+
onBlur?: (event: FocusEvent) => void;
|
|
87
|
+
onChange?: (text: string) => void;
|
|
88
|
+
onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
|
|
89
|
+
onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
|
|
90
|
+
} & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
|
|
91
|
+
type InputFieldRef = TextInput;
|
|
92
|
+
type InputFieldComponentType = {
|
|
93
|
+
(props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
|
|
94
|
+
email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
95
|
+
password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
96
|
+
code: (props: ComponentPropWithRef<TextInput, InputFieldProps & {
|
|
97
|
+
/** @default false */
|
|
98
|
+
isSmall?: boolean;
|
|
99
|
+
}>) => React.ReactElement;
|
|
100
|
+
};
|
|
101
|
+
declare const InputFieldComponent: InputFieldComponentType;
|
|
102
|
+
declare const InputField: typeof InputFieldComponent & {
|
|
103
|
+
email: typeof InputFieldComponent.email;
|
|
104
|
+
password: typeof InputFieldComponent.password;
|
|
105
|
+
code: typeof InputFieldComponent.code;
|
|
106
|
+
};
|
|
107
|
+
|
|
49
108
|
declare function useDevice(): {
|
|
50
109
|
safeArea: {
|
|
51
110
|
/** @description The safe area insets after calculations. Recommended to use this instead of the raw insets. */
|
|
@@ -72,6 +131,35 @@ declare function useKeyboard(): {
|
|
|
72
131
|
willOpen: boolean;
|
|
73
132
|
height: number;
|
|
74
133
|
};
|
|
134
|
+
type FormFieldValue = string | number | boolean;
|
|
135
|
+
declare function useForm<FormFields extends Record<string | number, FormFieldValue | FormFieldValue[] | undefined>>(options: {
|
|
136
|
+
defaultValues: FormFields;
|
|
137
|
+
requiredFields?: (keyof FormFields)[];
|
|
138
|
+
additional?: {
|
|
139
|
+
/** @default "done" */
|
|
140
|
+
lastInputFieldReturnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
|
|
141
|
+
};
|
|
142
|
+
onSubmit?: (values: FormFields) => void | Promise<void>;
|
|
143
|
+
validate?: (values: FormFields) => PartialRecord<keyof FormFields, string>;
|
|
144
|
+
}): {
|
|
145
|
+
values: FormFields;
|
|
146
|
+
errors: Partial<Record<keyof FormFields, string>>;
|
|
147
|
+
isSubmitting: boolean;
|
|
148
|
+
setFieldValue: <FieldName extends keyof FormFields>(field: FieldName, value: FormFields[FieldName] | undefined) => void;
|
|
149
|
+
setFieldsValue: (values: Partial<FormFields>) => void;
|
|
150
|
+
getInputFieldProps: <FieldName extends keyof FormFields>(field: FieldName) => ComponentPropWithRef<InputFieldRef, InputFieldProps>;
|
|
151
|
+
focusField: (field: keyof FormFields) => void;
|
|
152
|
+
inputFieldRefs: Record<keyof FormFields, TextInput | undefined>;
|
|
153
|
+
validate: () => {};
|
|
154
|
+
onSubmit: (event?: React.FormEvent<HTMLFormElement>) => Promise<void>;
|
|
155
|
+
reset: () => void;
|
|
156
|
+
requiredFields: (keyof FormFields)[] | undefined;
|
|
157
|
+
isDirty: boolean;
|
|
158
|
+
isValid: boolean;
|
|
159
|
+
canSubmit: boolean;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
declare const getFormErrorObject: <FormFields extends ReturnType<typeof useForm>["values"]>(formValues: FormFields) => PartialRecord<keyof FormFields, string>;
|
|
75
163
|
|
|
76
164
|
declare function generateAsyncStorage<AsyncStorage extends object>(): {
|
|
77
165
|
setItem: <StorageName extends keyof AsyncStorage>(name: StorageName, value: AsyncStorage[StorageName]) => void;
|
|
@@ -314,64 +402,19 @@ declare const Image: typeof ImageComponent & {
|
|
|
314
402
|
profileImage: typeof ImageComponent.profileImage;
|
|
315
403
|
};
|
|
316
404
|
|
|
317
|
-
type InputFieldProps = {
|
|
318
|
-
placeholder?: string;
|
|
319
|
-
prefix?: string;
|
|
320
|
-
suffix?: string;
|
|
321
|
-
defaultValue?: string;
|
|
322
|
-
value?: string | number;
|
|
323
|
-
/** @default true */
|
|
324
|
-
editable?: boolean;
|
|
325
|
-
/** @default false */
|
|
326
|
-
autoFocus?: boolean;
|
|
327
|
-
autoCapitalize?: React.ComponentProps<typeof TextInput>["autoCapitalize"];
|
|
328
|
-
autoComplete?: React.ComponentProps<typeof TextInput>["autoComplete"];
|
|
329
|
-
autoCorrect?: React.ComponentProps<typeof TextInput>["autoCorrect"];
|
|
330
|
-
/** @default "default" */
|
|
331
|
-
keyboardAppearance?: React.ComponentProps<typeof TextInput>["keyboardAppearance"];
|
|
332
|
-
keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
|
|
333
|
-
/** @default false */
|
|
334
|
-
secureTextEntry?: boolean;
|
|
335
|
-
returnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
|
|
336
|
-
returnKeyType?: React.ComponentProps<typeof TextInput>["returnKeyType"];
|
|
337
|
-
height?: number;
|
|
338
|
-
/** @default 16 */
|
|
339
|
-
fontSize?: number;
|
|
340
|
-
/** @default 400 */
|
|
341
|
-
fontWeight?: TextStyle["fontWeight"];
|
|
342
|
-
/** @default 20 */
|
|
343
|
-
lineHeight?: number;
|
|
344
|
-
textAlign?: React.ComponentProps<typeof TextInput>["textAlign"];
|
|
345
|
-
onFocus?: (event: FocusEvent) => void;
|
|
346
|
-
onBlur?: (event: FocusEvent) => void;
|
|
347
|
-
onChange?: (text: string) => void;
|
|
348
|
-
onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
|
|
349
|
-
onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
|
|
350
|
-
} & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
|
|
351
|
-
type InputFieldRef = TextInput;
|
|
352
|
-
type InputFieldComponentType = {
|
|
353
|
-
(props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
|
|
354
|
-
email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
355
|
-
password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
356
|
-
code: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
357
|
-
};
|
|
358
|
-
declare const InputFieldComponent: InputFieldComponentType;
|
|
359
|
-
declare const InputField: typeof InputFieldComponent & {
|
|
360
|
-
email: typeof InputFieldComponent.email;
|
|
361
|
-
password: typeof InputFieldComponent.password;
|
|
362
|
-
code: typeof InputFieldComponent.code;
|
|
363
|
-
};
|
|
364
|
-
|
|
365
405
|
type StatusBarProps = {
|
|
366
406
|
darkStatusBar?: boolean;
|
|
367
407
|
/** @default false */
|
|
368
408
|
hidden?: boolean;
|
|
409
|
+
barStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
|
|
410
|
+
androidBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
|
|
411
|
+
iOSBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
|
|
369
412
|
};
|
|
370
|
-
declare function StatusBar({ darkStatusBar, hidden }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
413
|
+
declare function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
371
414
|
declare const _default: react.MemoExoticComponent<typeof StatusBar>;
|
|
372
415
|
|
|
373
416
|
type AsyncStoragePluginOptions = {};
|
|
374
417
|
declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
|
|
375
418
|
declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
|
|
376
419
|
|
|
377
|
-
export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$1 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default as StatusBar, type StatusBarProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, pressStrength, useBetterComponentsContext, useDevice, useKeyboard };
|
|
420
|
+
export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$1 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default as StatusBar, type StatusBarProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, getFormErrorObject, pressStrength, useBetterComponentsContext, useDevice, useForm, useKeyboard };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
|
|
1
|
+
import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, PartialRecord, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
|
|
2
2
|
export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme, Colors, Country, DeepPartialRecord, ExcludeOptions, IconName, IconsConfig, LoaderConfig, LoaderName, OmitProps, PartialRecord, PickAllRequired, PickValue, Styles, Theme, ThemeConfig, colorThemeControls, countries, darkenColor, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateRandomString, getPluralWord, lightenColor, loaderControls, saturateColor, useBooleanState, useDebounceState, useLoader, useLoaderControls, useTheme } from 'react-better-core';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react_native from 'react-native';
|
|
6
|
-
import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1,
|
|
6
|
+
import { ViewStyle, TextInput, TextStyle, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, StatusBar as StatusBar$1 } from 'react-native';
|
|
7
7
|
import { EaseFunction, PropsTransforms } from '@legendapp/motion';
|
|
8
8
|
|
|
9
9
|
type AppConfig = {};
|
|
@@ -46,6 +46,65 @@ type ComponentPropWithRef<ComponentRef, ComponentProps> = ComponentProps & {
|
|
|
46
46
|
|
|
47
47
|
declare const pressStrength: () => Record<"z05" | "z1" | "z2" | "z3", number>;
|
|
48
48
|
|
|
49
|
+
type InputFieldProps = {
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
prefix?: string | React.ReactNode;
|
|
52
|
+
suffix?: string | React.ReactNode;
|
|
53
|
+
defaultValue?: string;
|
|
54
|
+
value?: string | number;
|
|
55
|
+
/** @default true */
|
|
56
|
+
editable?: boolean;
|
|
57
|
+
label?: string;
|
|
58
|
+
isError?: boolean;
|
|
59
|
+
infoMessage?: string;
|
|
60
|
+
errorMessage?: string;
|
|
61
|
+
/** @default false */
|
|
62
|
+
autoFocus?: boolean;
|
|
63
|
+
autoCapitalize?: React.ComponentProps<typeof TextInput>["autoCapitalize"];
|
|
64
|
+
autoComplete?: React.ComponentProps<typeof TextInput>["autoComplete"];
|
|
65
|
+
autoCorrect?: React.ComponentProps<typeof TextInput>["autoCorrect"];
|
|
66
|
+
/** @default "default" */
|
|
67
|
+
keyboardAppearance?: React.ComponentProps<typeof TextInput>["keyboardAppearance"];
|
|
68
|
+
keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
|
|
69
|
+
/** @default false */
|
|
70
|
+
secureTextEntry?: boolean;
|
|
71
|
+
returnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
|
|
72
|
+
returnKeyType?: React.ComponentProps<typeof TextInput>["returnKeyType"];
|
|
73
|
+
height?: number;
|
|
74
|
+
/** @default 16 */
|
|
75
|
+
fontSize?: number;
|
|
76
|
+
/** @default 400 */
|
|
77
|
+
fontWeight?: TextStyle["fontWeight"];
|
|
78
|
+
/** @default 20 */
|
|
79
|
+
lineHeight?: number;
|
|
80
|
+
textAlign?: React.ComponentProps<typeof TextInput>["textAlign"];
|
|
81
|
+
/** @default false */
|
|
82
|
+
required?: boolean;
|
|
83
|
+
/** @default false */
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
onFocus?: (event: FocusEvent) => void;
|
|
86
|
+
onBlur?: (event: FocusEvent) => void;
|
|
87
|
+
onChange?: (text: string) => void;
|
|
88
|
+
onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
|
|
89
|
+
onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
|
|
90
|
+
} & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
|
|
91
|
+
type InputFieldRef = TextInput;
|
|
92
|
+
type InputFieldComponentType = {
|
|
93
|
+
(props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
|
|
94
|
+
email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
95
|
+
password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
96
|
+
code: (props: ComponentPropWithRef<TextInput, InputFieldProps & {
|
|
97
|
+
/** @default false */
|
|
98
|
+
isSmall?: boolean;
|
|
99
|
+
}>) => React.ReactElement;
|
|
100
|
+
};
|
|
101
|
+
declare const InputFieldComponent: InputFieldComponentType;
|
|
102
|
+
declare const InputField: typeof InputFieldComponent & {
|
|
103
|
+
email: typeof InputFieldComponent.email;
|
|
104
|
+
password: typeof InputFieldComponent.password;
|
|
105
|
+
code: typeof InputFieldComponent.code;
|
|
106
|
+
};
|
|
107
|
+
|
|
49
108
|
declare function useDevice(): {
|
|
50
109
|
safeArea: {
|
|
51
110
|
/** @description The safe area insets after calculations. Recommended to use this instead of the raw insets. */
|
|
@@ -72,6 +131,35 @@ declare function useKeyboard(): {
|
|
|
72
131
|
willOpen: boolean;
|
|
73
132
|
height: number;
|
|
74
133
|
};
|
|
134
|
+
type FormFieldValue = string | number | boolean;
|
|
135
|
+
declare function useForm<FormFields extends Record<string | number, FormFieldValue | FormFieldValue[] | undefined>>(options: {
|
|
136
|
+
defaultValues: FormFields;
|
|
137
|
+
requiredFields?: (keyof FormFields)[];
|
|
138
|
+
additional?: {
|
|
139
|
+
/** @default "done" */
|
|
140
|
+
lastInputFieldReturnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
|
|
141
|
+
};
|
|
142
|
+
onSubmit?: (values: FormFields) => void | Promise<void>;
|
|
143
|
+
validate?: (values: FormFields) => PartialRecord<keyof FormFields, string>;
|
|
144
|
+
}): {
|
|
145
|
+
values: FormFields;
|
|
146
|
+
errors: Partial<Record<keyof FormFields, string>>;
|
|
147
|
+
isSubmitting: boolean;
|
|
148
|
+
setFieldValue: <FieldName extends keyof FormFields>(field: FieldName, value: FormFields[FieldName] | undefined) => void;
|
|
149
|
+
setFieldsValue: (values: Partial<FormFields>) => void;
|
|
150
|
+
getInputFieldProps: <FieldName extends keyof FormFields>(field: FieldName) => ComponentPropWithRef<InputFieldRef, InputFieldProps>;
|
|
151
|
+
focusField: (field: keyof FormFields) => void;
|
|
152
|
+
inputFieldRefs: Record<keyof FormFields, TextInput | undefined>;
|
|
153
|
+
validate: () => {};
|
|
154
|
+
onSubmit: (event?: React.FormEvent<HTMLFormElement>) => Promise<void>;
|
|
155
|
+
reset: () => void;
|
|
156
|
+
requiredFields: (keyof FormFields)[] | undefined;
|
|
157
|
+
isDirty: boolean;
|
|
158
|
+
isValid: boolean;
|
|
159
|
+
canSubmit: boolean;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
declare const getFormErrorObject: <FormFields extends ReturnType<typeof useForm>["values"]>(formValues: FormFields) => PartialRecord<keyof FormFields, string>;
|
|
75
163
|
|
|
76
164
|
declare function generateAsyncStorage<AsyncStorage extends object>(): {
|
|
77
165
|
setItem: <StorageName extends keyof AsyncStorage>(name: StorageName, value: AsyncStorage[StorageName]) => void;
|
|
@@ -314,64 +402,19 @@ declare const Image: typeof ImageComponent & {
|
|
|
314
402
|
profileImage: typeof ImageComponent.profileImage;
|
|
315
403
|
};
|
|
316
404
|
|
|
317
|
-
type InputFieldProps = {
|
|
318
|
-
placeholder?: string;
|
|
319
|
-
prefix?: string;
|
|
320
|
-
suffix?: string;
|
|
321
|
-
defaultValue?: string;
|
|
322
|
-
value?: string | number;
|
|
323
|
-
/** @default true */
|
|
324
|
-
editable?: boolean;
|
|
325
|
-
/** @default false */
|
|
326
|
-
autoFocus?: boolean;
|
|
327
|
-
autoCapitalize?: React.ComponentProps<typeof TextInput>["autoCapitalize"];
|
|
328
|
-
autoComplete?: React.ComponentProps<typeof TextInput>["autoComplete"];
|
|
329
|
-
autoCorrect?: React.ComponentProps<typeof TextInput>["autoCorrect"];
|
|
330
|
-
/** @default "default" */
|
|
331
|
-
keyboardAppearance?: React.ComponentProps<typeof TextInput>["keyboardAppearance"];
|
|
332
|
-
keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
|
|
333
|
-
/** @default false */
|
|
334
|
-
secureTextEntry?: boolean;
|
|
335
|
-
returnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
|
|
336
|
-
returnKeyType?: React.ComponentProps<typeof TextInput>["returnKeyType"];
|
|
337
|
-
height?: number;
|
|
338
|
-
/** @default 16 */
|
|
339
|
-
fontSize?: number;
|
|
340
|
-
/** @default 400 */
|
|
341
|
-
fontWeight?: TextStyle["fontWeight"];
|
|
342
|
-
/** @default 20 */
|
|
343
|
-
lineHeight?: number;
|
|
344
|
-
textAlign?: React.ComponentProps<typeof TextInput>["textAlign"];
|
|
345
|
-
onFocus?: (event: FocusEvent) => void;
|
|
346
|
-
onBlur?: (event: FocusEvent) => void;
|
|
347
|
-
onChange?: (text: string) => void;
|
|
348
|
-
onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
|
|
349
|
-
onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
|
|
350
|
-
} & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
|
|
351
|
-
type InputFieldRef = TextInput;
|
|
352
|
-
type InputFieldComponentType = {
|
|
353
|
-
(props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
|
|
354
|
-
email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
355
|
-
password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
356
|
-
code: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
|
|
357
|
-
};
|
|
358
|
-
declare const InputFieldComponent: InputFieldComponentType;
|
|
359
|
-
declare const InputField: typeof InputFieldComponent & {
|
|
360
|
-
email: typeof InputFieldComponent.email;
|
|
361
|
-
password: typeof InputFieldComponent.password;
|
|
362
|
-
code: typeof InputFieldComponent.code;
|
|
363
|
-
};
|
|
364
|
-
|
|
365
405
|
type StatusBarProps = {
|
|
366
406
|
darkStatusBar?: boolean;
|
|
367
407
|
/** @default false */
|
|
368
408
|
hidden?: boolean;
|
|
409
|
+
barStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
|
|
410
|
+
androidBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
|
|
411
|
+
iOSBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
|
|
369
412
|
};
|
|
370
|
-
declare function StatusBar({ darkStatusBar, hidden }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
413
|
+
declare function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
371
414
|
declare const _default: react.MemoExoticComponent<typeof StatusBar>;
|
|
372
415
|
|
|
373
416
|
type AsyncStoragePluginOptions = {};
|
|
374
417
|
declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
|
|
375
418
|
declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
|
|
376
419
|
|
|
377
|
-
export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$1 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default as StatusBar, type StatusBarProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, pressStrength, useBetterComponentsContext, useDevice, useKeyboard };
|
|
420
|
+
export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$1 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default as StatusBar, type StatusBarProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, getFormErrorObject, pressStrength, useBetterComponentsContext, useDevice, useForm, useKeyboard };
|