react-native-better-html 1.0.15 → 1.0.16

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 CHANGED
@@ -1,9 +1,10 @@
1
- import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, PartialRecord, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
1
+ import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, PartialRecord, 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, 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';
6
+ import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextInput, TextStyle, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent, TextProps as TextProps$1, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, StatusBar as StatusBar$1 } from 'react-native';
7
+ import { SymbolView } from 'expo-symbols';
7
8
  import { EaseFunction, PropsTransforms } from '@legendapp/motion';
8
9
 
9
10
  type AppConfig = {};
@@ -44,7 +45,44 @@ type ComponentPropWithRef<ComponentRef, ComponentProps> = ComponentProps & {
44
45
  ref?: React.Ref<ComponentRef>;
45
46
  };
46
47
 
47
- declare const pressStrength: () => Record<"z05" | "z1" | "z2" | "z3", number>;
48
+ declare const pressStrength: () => Record<"p05" | "p1" | "p2" | "p3", number>;
49
+
50
+ type ViewProps<Value = unknown> = {
51
+ /** @default false */
52
+ isRow?: boolean;
53
+ value?: Value;
54
+ /** @default false */
55
+ disabled?: boolean;
56
+ /** @default "highlight" */
57
+ pressType?: "opacity" | "highlight";
58
+ /** @default 0.8 */
59
+ pressStrength?: number;
60
+ onPress?: (event: GestureResponderEvent) => void;
61
+ onPressIn?: (event: GestureResponderEvent) => void;
62
+ onPressOut?: (event: GestureResponderEvent) => void;
63
+ onLongPress?: (event: GestureResponderEvent) => void;
64
+ onPressWithValue?: (value: Value) => void;
65
+ } & OmitProps<ViewProps$1, "style" | "onBlur" | "onFocus"> & ComponentStyle;
66
+ type ViewComponentType = {
67
+ <Value>(props: ViewProps<Value>): React.ReactElement;
68
+ box: <Value>(props: ViewProps<Value> & {
69
+ /** @default false */
70
+ withShadow?: boolean;
71
+ }) => React.ReactElement;
72
+ };
73
+ declare const ViewComponent: ViewComponentType;
74
+ declare const View: typeof ViewComponent & {
75
+ box: typeof ViewComponent.box;
76
+ };
77
+
78
+ type IconProps = {
79
+ name: IconName | AnyOtherString;
80
+ nameIOS?: React.ComponentProps<typeof SymbolView>["name"];
81
+ /** @default 16 */
82
+ size?: number;
83
+ color?: string;
84
+ } & OmitProps<ViewProps, "width" | "height" | "pressType">;
85
+ declare function Icon({ name, nameIOS, size, color, ...props }: IconProps): react_jsx_runtime.JSX.Element;
48
86
 
49
87
  type InputFieldProps = {
50
88
  flex?: ViewStyle["flex"];
@@ -92,6 +130,10 @@ type InputFieldProps = {
92
130
  multiline?: boolean;
93
131
  /** @default 2 */
94
132
  numberOfLines?: number;
133
+ leftIcon?: IconProps["name"];
134
+ leftIconIOS?: IconProps["nameIOS"];
135
+ rightIcon?: IconProps["name"];
136
+ rightIconIOS?: IconProps["nameIOS"];
95
137
  onFocus?: (event: FocusEvent) => void;
96
138
  onBlur?: (event: FocusEvent) => void;
97
139
  onChange?: (text: string) => void;
@@ -105,6 +147,7 @@ type InputFieldComponentType = {
105
147
  (props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
106
148
  email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
107
149
  password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
150
+ search: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
108
151
  code: (props: ComponentPropWithRef<TextInput, InputFieldProps & {
109
152
  /** @default false */
110
153
  isSmall?: boolean;
@@ -114,6 +157,7 @@ declare const InputFieldComponent: InputFieldComponentType;
114
157
  declare const InputField: typeof InputFieldComponent & {
115
158
  email: typeof InputFieldComponent.email;
116
159
  password: typeof InputFieldComponent.password;
160
+ search: typeof InputFieldComponent.search;
117
161
  code: typeof InputFieldComponent.code;
118
162
  };
119
163
 
@@ -180,34 +224,6 @@ declare function generateAsyncStorage<AsyncStorage extends object>(): {
180
224
  removeAllItems: () => void;
181
225
  };
182
226
 
183
- type ViewProps<Value = unknown> = {
184
- /** @default false */
185
- isRow?: boolean;
186
- value?: Value;
187
- /** @default false */
188
- disabled?: boolean;
189
- /** @default "highlight" */
190
- pressType?: "opacity" | "highlight";
191
- /** @default 0.8 */
192
- pressStrength?: number;
193
- onPress?: (event: GestureResponderEvent) => void;
194
- onPressIn?: (event: GestureResponderEvent) => void;
195
- onPressOut?: (event: GestureResponderEvent) => void;
196
- onLongPress?: (event: GestureResponderEvent) => void;
197
- onPressWithValue?: (value: Value) => void;
198
- } & OmitProps<ViewProps$1, "style" | "onBlur" | "onFocus"> & ComponentStyle;
199
- type ViewComponentType = {
200
- <Value>(props: ViewProps<Value>): React.ReactElement;
201
- box: <Value>(props: ViewProps<Value> & {
202
- /** @default false */
203
- withShadow?: boolean;
204
- }) => React.ReactElement;
205
- };
206
- declare const ViewComponent: ViewComponentType;
207
- declare const View: typeof ViewComponent & {
208
- box: typeof ViewComponent.box;
209
- };
210
-
211
227
  type TextProps = {} & OmitProps<TextProps$1, "style"> & ComponentStyle<TextStyle>;
212
228
  type TextComponentType = {
213
229
  (props: TextProps): React.ReactElement;
@@ -429,4 +445,4 @@ type AsyncStoragePluginOptions = {};
429
445
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
430
446
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
431
447
 
432
- 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 };
448
+ 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, Icon, type IconProps, 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,10 @@
1
- import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, PartialRecord, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
1
+ import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, PartialRecord, 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, 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';
6
+ import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextInput, TextStyle, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent, TextProps as TextProps$1, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, StatusBar as StatusBar$1 } from 'react-native';
7
+ import { SymbolView } from 'expo-symbols';
7
8
  import { EaseFunction, PropsTransforms } from '@legendapp/motion';
8
9
 
9
10
  type AppConfig = {};
@@ -44,7 +45,44 @@ type ComponentPropWithRef<ComponentRef, ComponentProps> = ComponentProps & {
44
45
  ref?: React.Ref<ComponentRef>;
45
46
  };
46
47
 
47
- declare const pressStrength: () => Record<"z05" | "z1" | "z2" | "z3", number>;
48
+ declare const pressStrength: () => Record<"p05" | "p1" | "p2" | "p3", number>;
49
+
50
+ type ViewProps<Value = unknown> = {
51
+ /** @default false */
52
+ isRow?: boolean;
53
+ value?: Value;
54
+ /** @default false */
55
+ disabled?: boolean;
56
+ /** @default "highlight" */
57
+ pressType?: "opacity" | "highlight";
58
+ /** @default 0.8 */
59
+ pressStrength?: number;
60
+ onPress?: (event: GestureResponderEvent) => void;
61
+ onPressIn?: (event: GestureResponderEvent) => void;
62
+ onPressOut?: (event: GestureResponderEvent) => void;
63
+ onLongPress?: (event: GestureResponderEvent) => void;
64
+ onPressWithValue?: (value: Value) => void;
65
+ } & OmitProps<ViewProps$1, "style" | "onBlur" | "onFocus"> & ComponentStyle;
66
+ type ViewComponentType = {
67
+ <Value>(props: ViewProps<Value>): React.ReactElement;
68
+ box: <Value>(props: ViewProps<Value> & {
69
+ /** @default false */
70
+ withShadow?: boolean;
71
+ }) => React.ReactElement;
72
+ };
73
+ declare const ViewComponent: ViewComponentType;
74
+ declare const View: typeof ViewComponent & {
75
+ box: typeof ViewComponent.box;
76
+ };
77
+
78
+ type IconProps = {
79
+ name: IconName | AnyOtherString;
80
+ nameIOS?: React.ComponentProps<typeof SymbolView>["name"];
81
+ /** @default 16 */
82
+ size?: number;
83
+ color?: string;
84
+ } & OmitProps<ViewProps, "width" | "height" | "pressType">;
85
+ declare function Icon({ name, nameIOS, size, color, ...props }: IconProps): react_jsx_runtime.JSX.Element;
48
86
 
49
87
  type InputFieldProps = {
50
88
  flex?: ViewStyle["flex"];
@@ -92,6 +130,10 @@ type InputFieldProps = {
92
130
  multiline?: boolean;
93
131
  /** @default 2 */
94
132
  numberOfLines?: number;
133
+ leftIcon?: IconProps["name"];
134
+ leftIconIOS?: IconProps["nameIOS"];
135
+ rightIcon?: IconProps["name"];
136
+ rightIconIOS?: IconProps["nameIOS"];
95
137
  onFocus?: (event: FocusEvent) => void;
96
138
  onBlur?: (event: FocusEvent) => void;
97
139
  onChange?: (text: string) => void;
@@ -105,6 +147,7 @@ type InputFieldComponentType = {
105
147
  (props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
106
148
  email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
107
149
  password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
150
+ search: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
108
151
  code: (props: ComponentPropWithRef<TextInput, InputFieldProps & {
109
152
  /** @default false */
110
153
  isSmall?: boolean;
@@ -114,6 +157,7 @@ declare const InputFieldComponent: InputFieldComponentType;
114
157
  declare const InputField: typeof InputFieldComponent & {
115
158
  email: typeof InputFieldComponent.email;
116
159
  password: typeof InputFieldComponent.password;
160
+ search: typeof InputFieldComponent.search;
117
161
  code: typeof InputFieldComponent.code;
118
162
  };
119
163
 
@@ -180,34 +224,6 @@ declare function generateAsyncStorage<AsyncStorage extends object>(): {
180
224
  removeAllItems: () => void;
181
225
  };
182
226
 
183
- type ViewProps<Value = unknown> = {
184
- /** @default false */
185
- isRow?: boolean;
186
- value?: Value;
187
- /** @default false */
188
- disabled?: boolean;
189
- /** @default "highlight" */
190
- pressType?: "opacity" | "highlight";
191
- /** @default 0.8 */
192
- pressStrength?: number;
193
- onPress?: (event: GestureResponderEvent) => void;
194
- onPressIn?: (event: GestureResponderEvent) => void;
195
- onPressOut?: (event: GestureResponderEvent) => void;
196
- onLongPress?: (event: GestureResponderEvent) => void;
197
- onPressWithValue?: (value: Value) => void;
198
- } & OmitProps<ViewProps$1, "style" | "onBlur" | "onFocus"> & ComponentStyle;
199
- type ViewComponentType = {
200
- <Value>(props: ViewProps<Value>): React.ReactElement;
201
- box: <Value>(props: ViewProps<Value> & {
202
- /** @default false */
203
- withShadow?: boolean;
204
- }) => React.ReactElement;
205
- };
206
- declare const ViewComponent: ViewComponentType;
207
- declare const View: typeof ViewComponent & {
208
- box: typeof ViewComponent.box;
209
- };
210
-
211
227
  type TextProps = {} & OmitProps<TextProps$1, "style"> & ComponentStyle<TextStyle>;
212
228
  type TextComponentType = {
213
229
  (props: TextProps): React.ReactElement;
@@ -429,4 +445,4 @@ type AsyncStoragePluginOptions = {};
429
445
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
430
446
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
431
447
 
432
- 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 };
448
+ 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, Icon, type IconProps, 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 };