react-native-better-html 1.0.8 → 1.0.10
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 +30 -8
- package/dist/index.d.ts +30 -8
- package/dist/index.js +86 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme,
|
|
|
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, TextStyle, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, TextInput, FocusEvent } from 'react-native';
|
|
6
|
+
import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1, TextStyle, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, TextInput, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent } from 'react-native';
|
|
7
7
|
import { EaseFunction, PropsTransforms } from '@legendapp/motion';
|
|
8
8
|
|
|
9
9
|
type AppConfig = {};
|
|
@@ -30,7 +30,7 @@ type BetterComponentsProviderProps = BetterProviderCommonProps & {
|
|
|
30
30
|
config?: BetterComponentsProviderConfig;
|
|
31
31
|
};
|
|
32
32
|
declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
|
|
33
|
-
declare const _default: react.MemoExoticComponent<typeof BetterComponentsProvider>;
|
|
33
|
+
declare const _default$1: react.MemoExoticComponent<typeof BetterComponentsProvider>;
|
|
34
34
|
|
|
35
35
|
type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
|
|
36
36
|
shadowOffsetWidth?: number;
|
|
@@ -332,24 +332,46 @@ type InputFieldProps = {
|
|
|
332
332
|
keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
|
|
333
333
|
/** @default false */
|
|
334
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"];
|
|
335
345
|
onFocus?: (event: FocusEvent) => void;
|
|
336
346
|
onBlur?: (event: FocusEvent) => void;
|
|
337
347
|
onChange?: (text: string) => void;
|
|
338
|
-
|
|
339
|
-
|
|
348
|
+
onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
|
|
349
|
+
onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
|
|
350
|
+
} & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
|
|
351
|
+
type InputFieldRef = TextInput;
|
|
340
352
|
type InputFieldComponentType = {
|
|
341
|
-
(props: ComponentPropWithRef<
|
|
342
|
-
email: (props: ComponentPropWithRef<
|
|
343
|
-
password: (props: ComponentPropWithRef<
|
|
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;
|
|
344
357
|
};
|
|
345
358
|
declare const InputFieldComponent: InputFieldComponentType;
|
|
346
359
|
declare const InputField: typeof InputFieldComponent & {
|
|
347
360
|
email: typeof InputFieldComponent.email;
|
|
348
361
|
password: typeof InputFieldComponent.password;
|
|
362
|
+
code: typeof InputFieldComponent.code;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
type StatusBarProps = {
|
|
366
|
+
darkStatusBar?: boolean;
|
|
367
|
+
/** @default false */
|
|
368
|
+
hidden?: boolean;
|
|
349
369
|
};
|
|
370
|
+
declare function StatusBar({ darkStatusBar, hidden }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
371
|
+
declare const _default: react.MemoExoticComponent<typeof StatusBar>;
|
|
350
372
|
|
|
351
373
|
type AsyncStoragePluginOptions = {};
|
|
352
374
|
declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
|
|
353
375
|
declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
|
|
354
376
|
|
|
355
|
-
export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Image, type ImageProps, InputField, type InputFieldProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, pressStrength, useBetterComponentsContext, useDevice, useKeyboard };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme,
|
|
|
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, TextStyle, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, TextInput, FocusEvent } from 'react-native';
|
|
6
|
+
import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1, TextStyle, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, TextInput, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent } from 'react-native';
|
|
7
7
|
import { EaseFunction, PropsTransforms } from '@legendapp/motion';
|
|
8
8
|
|
|
9
9
|
type AppConfig = {};
|
|
@@ -30,7 +30,7 @@ type BetterComponentsProviderProps = BetterProviderCommonProps & {
|
|
|
30
30
|
config?: BetterComponentsProviderConfig;
|
|
31
31
|
};
|
|
32
32
|
declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
|
|
33
|
-
declare const _default: react.MemoExoticComponent<typeof BetterComponentsProvider>;
|
|
33
|
+
declare const _default$1: react.MemoExoticComponent<typeof BetterComponentsProvider>;
|
|
34
34
|
|
|
35
35
|
type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
|
|
36
36
|
shadowOffsetWidth?: number;
|
|
@@ -332,24 +332,46 @@ type InputFieldProps = {
|
|
|
332
332
|
keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
|
|
333
333
|
/** @default false */
|
|
334
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"];
|
|
335
345
|
onFocus?: (event: FocusEvent) => void;
|
|
336
346
|
onBlur?: (event: FocusEvent) => void;
|
|
337
347
|
onChange?: (text: string) => void;
|
|
338
|
-
|
|
339
|
-
|
|
348
|
+
onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
|
|
349
|
+
onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
|
|
350
|
+
} & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
|
|
351
|
+
type InputFieldRef = TextInput;
|
|
340
352
|
type InputFieldComponentType = {
|
|
341
|
-
(props: ComponentPropWithRef<
|
|
342
|
-
email: (props: ComponentPropWithRef<
|
|
343
|
-
password: (props: ComponentPropWithRef<
|
|
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;
|
|
344
357
|
};
|
|
345
358
|
declare const InputFieldComponent: InputFieldComponentType;
|
|
346
359
|
declare const InputField: typeof InputFieldComponent & {
|
|
347
360
|
email: typeof InputFieldComponent.email;
|
|
348
361
|
password: typeof InputFieldComponent.password;
|
|
362
|
+
code: typeof InputFieldComponent.code;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
type StatusBarProps = {
|
|
366
|
+
darkStatusBar?: boolean;
|
|
367
|
+
/** @default false */
|
|
368
|
+
hidden?: boolean;
|
|
349
369
|
};
|
|
370
|
+
declare function StatusBar({ darkStatusBar, hidden }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
371
|
+
declare const _default: react.MemoExoticComponent<typeof StatusBar>;
|
|
350
372
|
|
|
351
373
|
type AsyncStoragePluginOptions = {};
|
|
352
374
|
declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
|
|
353
375
|
declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
|
|
354
376
|
|
|
355
|
-
export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Image, type ImageProps, InputField, type InputFieldProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, pressStrength, useBetterComponentsContext, useDevice, useKeyboard };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -37,36 +37,37 @@ __export(index_exports, {
|
|
|
37
37
|
InputField: () => InputField_default,
|
|
38
38
|
Loader: () => Loader_default,
|
|
39
39
|
ScreenHolder: () => ScreenHolder_default,
|
|
40
|
+
StatusBar: () => StatusBar_default,
|
|
40
41
|
Text: () => Text_default,
|
|
41
42
|
View: () => View_default,
|
|
42
43
|
asyncStoragePlugin: () => asyncStoragePlugin,
|
|
43
|
-
colorThemeControls: () =>
|
|
44
|
-
countries: () =>
|
|
45
|
-
darkenColor: () =>
|
|
44
|
+
colorThemeControls: () => import_react_better_core11.colorThemeControls,
|
|
45
|
+
countries: () => import_react_better_core11.countries,
|
|
46
|
+
darkenColor: () => import_react_better_core11.darkenColor,
|
|
46
47
|
defaultAsyncStoragePluginOptions: () => defaultAsyncStoragePluginOptions,
|
|
47
|
-
desaturateColor: () =>
|
|
48
|
-
eventPreventDefault: () =>
|
|
49
|
-
eventPreventStop: () =>
|
|
50
|
-
eventStopPropagation: () =>
|
|
51
|
-
formatPhoneNumber: () =>
|
|
48
|
+
desaturateColor: () => import_react_better_core11.desaturateColor,
|
|
49
|
+
eventPreventDefault: () => import_react_better_core11.eventPreventDefault,
|
|
50
|
+
eventPreventStop: () => import_react_better_core11.eventPreventStop,
|
|
51
|
+
eventStopPropagation: () => import_react_better_core11.eventStopPropagation,
|
|
52
|
+
formatPhoneNumber: () => import_react_better_core11.formatPhoneNumber,
|
|
52
53
|
generateAsyncStorage: () => generateAsyncStorage,
|
|
53
|
-
generateRandomString: () =>
|
|
54
|
-
getPluralWord: () =>
|
|
55
|
-
lightenColor: () =>
|
|
56
|
-
loaderControls: () =>
|
|
54
|
+
generateRandomString: () => import_react_better_core11.generateRandomString,
|
|
55
|
+
getPluralWord: () => import_react_better_core11.getPluralWord,
|
|
56
|
+
lightenColor: () => import_react_better_core11.lightenColor,
|
|
57
|
+
loaderControls: () => import_react_better_core11.loaderControls,
|
|
57
58
|
pressStrength: () => pressStrength,
|
|
58
|
-
saturateColor: () =>
|
|
59
|
+
saturateColor: () => import_react_better_core11.saturateColor,
|
|
59
60
|
useBetterComponentsContext: () => useBetterComponentsContext,
|
|
60
|
-
useBooleanState: () =>
|
|
61
|
-
useDebounceState: () =>
|
|
61
|
+
useBooleanState: () => import_react_better_core11.useBooleanState,
|
|
62
|
+
useDebounceState: () => import_react_better_core11.useDebounceState,
|
|
62
63
|
useDevice: () => useDevice,
|
|
63
64
|
useKeyboard: () => useKeyboard,
|
|
64
|
-
useLoader: () =>
|
|
65
|
-
useLoaderControls: () =>
|
|
66
|
-
useTheme: () =>
|
|
65
|
+
useLoader: () => import_react_better_core11.useLoader,
|
|
66
|
+
useLoaderControls: () => import_react_better_core11.useLoaderControls,
|
|
67
|
+
useTheme: () => import_react_better_core11.useTheme
|
|
67
68
|
});
|
|
68
69
|
module.exports = __toCommonJS(index_exports);
|
|
69
|
-
var
|
|
70
|
+
var import_react_better_core11 = require("react-better-core");
|
|
70
71
|
|
|
71
72
|
// src/components/BetterComponentsProvider.tsx
|
|
72
73
|
var import_react = require("react");
|
|
@@ -1193,19 +1194,30 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1193
1194
|
keyboardAppearance = "default",
|
|
1194
1195
|
keyboardType,
|
|
1195
1196
|
secureTextEntry,
|
|
1197
|
+
returnKeyLabel,
|
|
1198
|
+
returnKeyType,
|
|
1199
|
+
height,
|
|
1200
|
+
fontSize = 16,
|
|
1201
|
+
fontWeight = 400,
|
|
1202
|
+
lineHeight = 20,
|
|
1203
|
+
textAlign,
|
|
1204
|
+
paddingHorizontal,
|
|
1205
|
+
paddingVertical,
|
|
1196
1206
|
onFocus,
|
|
1197
1207
|
onBlur,
|
|
1198
|
-
onChange
|
|
1208
|
+
onChange,
|
|
1209
|
+
onPress,
|
|
1210
|
+
onPressEnter
|
|
1199
1211
|
}, ref) => {
|
|
1200
1212
|
const theme2 = (0, import_react_better_core9.useTheme)();
|
|
1201
1213
|
const { colorTheme } = (0, import_react_better_core9.useBetterCoreContext)();
|
|
1214
|
+
const textInputRef = (0, import_react10.useRef)(null);
|
|
1202
1215
|
const [internalValue, setInternalValue] = (0, import_react10.useState)(value?.toString() || defaultValue || "");
|
|
1203
1216
|
const [isFocused, setIsFocused] = (0, import_react_better_core9.useBooleanState)();
|
|
1204
1217
|
const borderWidth = 1;
|
|
1205
|
-
const
|
|
1206
|
-
const
|
|
1207
|
-
const
|
|
1208
|
-
const height = borderWidth + paddingVertical + lineHeight + paddingVertical + borderWidth;
|
|
1218
|
+
const readyPaddingHorizontal = paddingHorizontal ?? theme2.styles.space;
|
|
1219
|
+
const readyPaddingVertical = paddingVertical ? parseFloat(paddingVertical.toString()) : (theme2.styles.space + theme2.styles.gap) / 2;
|
|
1220
|
+
const readyHeight = height ?? borderWidth + readyPaddingVertical + lineHeight + readyPaddingVertical + borderWidth;
|
|
1209
1221
|
const onFocusElement = (0, import_react10.useCallback)((event) => {
|
|
1210
1222
|
setIsFocused.setTrue();
|
|
1211
1223
|
onFocus?.(event);
|
|
@@ -1224,13 +1236,14 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1224
1236
|
const textInputStyle = (0, import_react10.useMemo)(
|
|
1225
1237
|
() => ({
|
|
1226
1238
|
flex: 1,
|
|
1227
|
-
fontSize
|
|
1239
|
+
fontSize,
|
|
1240
|
+
fontWeight,
|
|
1228
1241
|
lineHeight,
|
|
1229
1242
|
color: theme2.colors.textPrimary,
|
|
1230
|
-
paddingHorizontal,
|
|
1231
|
-
paddingVertical
|
|
1243
|
+
paddingHorizontal: readyPaddingHorizontal,
|
|
1244
|
+
paddingVertical: readyPaddingVertical
|
|
1232
1245
|
}),
|
|
1233
|
-
[theme2.colors, lineHeight,
|
|
1246
|
+
[theme2.colors, fontSize, fontWeight, lineHeight, readyPaddingHorizontal, readyPaddingVertical]
|
|
1234
1247
|
);
|
|
1235
1248
|
(0, import_react10.useEffect)(() => {
|
|
1236
1249
|
if (value === void 0) return;
|
|
@@ -1239,12 +1252,12 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1239
1252
|
(0, import_react10.useImperativeHandle)(
|
|
1240
1253
|
ref,
|
|
1241
1254
|
() => {
|
|
1242
|
-
return
|
|
1255
|
+
return textInputRef.current;
|
|
1243
1256
|
},
|
|
1244
1257
|
[]
|
|
1245
1258
|
);
|
|
1246
1259
|
const prefixSuffixBackgroundColor = colorTheme === "light" ? (0, import_react_better_core9.darkenColor)(theme2.colors.backgroundContent, 0.03) : (0, import_react_better_core9.lightenColor)(theme2.colors.backgroundContent, 0.1);
|
|
1247
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", height, children: [
|
|
1260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", flex: 1, height: readyHeight, children: [
|
|
1248
1261
|
prefix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1249
1262
|
View_default,
|
|
1250
1263
|
{
|
|
@@ -1257,7 +1270,7 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1257
1270
|
borderTopLeftRadius: theme2.styles.borderRadius,
|
|
1258
1271
|
borderBottomLeftRadius: theme2.styles.borderRadius,
|
|
1259
1272
|
borderColor: theme2.colors.border,
|
|
1260
|
-
paddingHorizontal,
|
|
1273
|
+
paddingHorizontal: readyPaddingHorizontal,
|
|
1261
1274
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontWeight: 700, children: prefix })
|
|
1262
1275
|
}
|
|
1263
1276
|
),
|
|
@@ -1286,7 +1299,11 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1286
1299
|
autoFocus,
|
|
1287
1300
|
placeholder,
|
|
1288
1301
|
placeholderTextColor: theme2.colors.textSecondary + "80",
|
|
1302
|
+
enterKeyHint: returnKeyLabel,
|
|
1303
|
+
returnKeyType,
|
|
1304
|
+
onSubmitEditing: onPressEnter,
|
|
1289
1305
|
readOnly: !editable,
|
|
1306
|
+
textAlign,
|
|
1290
1307
|
keyboardAppearance,
|
|
1291
1308
|
keyboardType,
|
|
1292
1309
|
cursorColor: theme2.colors.primary,
|
|
@@ -1294,7 +1311,9 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1294
1311
|
secureTextEntry,
|
|
1295
1312
|
onFocus: onFocusElement,
|
|
1296
1313
|
onBlur: onBlurElement,
|
|
1297
|
-
onChangeText
|
|
1314
|
+
onChangeText,
|
|
1315
|
+
onPress,
|
|
1316
|
+
ref: textInputRef
|
|
1298
1317
|
}
|
|
1299
1318
|
)
|
|
1300
1319
|
}
|
|
@@ -1311,7 +1330,7 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
|
|
|
1311
1330
|
borderTopRightRadius: theme2.styles.borderRadius,
|
|
1312
1331
|
borderBottomRightRadius: theme2.styles.borderRadius,
|
|
1313
1332
|
borderColor: theme2.colors.border,
|
|
1314
|
-
paddingHorizontal,
|
|
1333
|
+
paddingHorizontal: readyPaddingHorizontal,
|
|
1315
1334
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontWeight: 700, children: suffix })
|
|
1316
1335
|
}
|
|
1317
1336
|
)
|
|
@@ -1346,11 +1365,44 @@ InputFieldComponent.password = (0, import_react10.forwardRef)(function Password(
|
|
|
1346
1365
|
}
|
|
1347
1366
|
);
|
|
1348
1367
|
});
|
|
1368
|
+
InputFieldComponent.code = (0, import_react10.forwardRef)(function Password2(props, ref) {
|
|
1369
|
+
const theme2 = (0, import_react_better_core9.useTheme)();
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1371
|
+
InputFieldComponent,
|
|
1372
|
+
{
|
|
1373
|
+
fontSize: 42,
|
|
1374
|
+
fontWeight: 900,
|
|
1375
|
+
lineHeight: 50,
|
|
1376
|
+
paddingVertical: theme2.styles.space * 2,
|
|
1377
|
+
textAlign: "center",
|
|
1378
|
+
...props,
|
|
1379
|
+
ref
|
|
1380
|
+
}
|
|
1381
|
+
);
|
|
1382
|
+
});
|
|
1349
1383
|
var InputField = (0, import_react10.memo)(InputFieldComponent);
|
|
1350
1384
|
InputField.email = InputFieldComponent.email;
|
|
1351
1385
|
InputField.password = InputFieldComponent.password;
|
|
1386
|
+
InputField.code = InputFieldComponent.code;
|
|
1352
1387
|
var InputField_default = InputField;
|
|
1353
1388
|
|
|
1389
|
+
// src/components/StatusBar.tsx
|
|
1390
|
+
var import_react11 = require("react");
|
|
1391
|
+
var import_react_better_core10 = require("react-better-core");
|
|
1392
|
+
var import_react_native9 = require("react-native");
|
|
1393
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1394
|
+
function StatusBar({ darkStatusBar, hidden }) {
|
|
1395
|
+
const theme2 = (0, import_react_better_core10.useTheme)();
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1397
|
+
import_react_native9.StatusBar,
|
|
1398
|
+
{
|
|
1399
|
+
backgroundColor: darkStatusBar ? theme2.colors.backgroundSecondary : void 0,
|
|
1400
|
+
hidden
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
}
|
|
1404
|
+
var StatusBar_default = (0, import_react11.memo)(StatusBar);
|
|
1405
|
+
|
|
1354
1406
|
// src/plugins/asyncStorage.ts
|
|
1355
1407
|
var defaultAsyncStoragePluginOptions = {};
|
|
1356
1408
|
var asyncStoragePlugin = (options) => ({
|
|
@@ -1372,6 +1424,7 @@ var asyncStoragePlugin = (options) => ({
|
|
|
1372
1424
|
InputField,
|
|
1373
1425
|
Loader,
|
|
1374
1426
|
ScreenHolder,
|
|
1427
|
+
StatusBar,
|
|
1375
1428
|
Text,
|
|
1376
1429
|
View,
|
|
1377
1430
|
asyncStoragePlugin,
|