react-native-better-html 1.0.9 → 1.0.11

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
@@ -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, StatusBar as StatusBar$1 } from 'react-native';
7
7
  import { EaseFunction, PropsTransforms } from '@legendapp/motion';
8
8
 
9
9
  type AppConfig = {};
@@ -316,12 +316,16 @@ declare const Image: typeof ImageComponent & {
316
316
 
317
317
  type InputFieldProps = {
318
318
  placeholder?: string;
319
- prefix?: string;
320
- suffix?: string;
319
+ prefix?: string | React.ReactNode;
320
+ suffix?: string | React.ReactNode;
321
321
  defaultValue?: string;
322
322
  value?: string | number;
323
323
  /** @default true */
324
324
  editable?: boolean;
325
+ label?: string;
326
+ isError?: boolean;
327
+ infoMessage?: string;
328
+ errorMessage?: string;
325
329
  /** @default false */
326
330
  autoFocus?: boolean;
327
331
  autoCapitalize?: React.ComponentProps<typeof TextInput>["autoCapitalize"];
@@ -332,32 +336,52 @@ type InputFieldProps = {
332
336
  keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
333
337
  /** @default false */
334
338
  secureTextEntry?: boolean;
339
+ returnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
340
+ returnKeyType?: React.ComponentProps<typeof TextInput>["returnKeyType"];
341
+ height?: number;
342
+ /** @default 16 */
343
+ fontSize?: number;
344
+ /** @default 400 */
345
+ fontWeight?: TextStyle["fontWeight"];
346
+ /** @default 20 */
347
+ lineHeight?: number;
348
+ textAlign?: React.ComponentProps<typeof TextInput>["textAlign"];
335
349
  onFocus?: (event: FocusEvent) => void;
336
350
  onBlur?: (event: FocusEvent) => void;
337
351
  onChange?: (text: string) => void;
338
- };
339
- type InputFieldRef = {};
352
+ onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
353
+ onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
354
+ } & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
355
+ type InputFieldRef = TextInput;
340
356
  type InputFieldComponentType = {
341
- (props: ComponentPropWithRef<InputFieldRef, InputFieldProps>): React.ReactElement;
342
- email: (props: ComponentPropWithRef<InputFieldRef, InputFieldProps>) => React.ReactElement;
343
- password: (props: ComponentPropWithRef<InputFieldRef, InputFieldProps>) => React.ReactElement;
357
+ (props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
358
+ email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
359
+ password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
360
+ code: (props: ComponentPropWithRef<TextInput, InputFieldProps & {
361
+ /** @default false */
362
+ isSmall?: boolean;
363
+ }>) => React.ReactElement;
344
364
  };
345
365
  declare const InputFieldComponent: InputFieldComponentType;
346
366
  declare const InputField: typeof InputFieldComponent & {
347
367
  email: typeof InputFieldComponent.email;
348
368
  password: typeof InputFieldComponent.password;
369
+ code: typeof InputFieldComponent.code;
349
370
  };
350
371
 
351
372
  type StatusBarProps = {
352
373
  darkStatusBar?: boolean;
353
374
  /** @default false */
354
375
  hidden?: boolean;
376
+ barStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
377
+ androidBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
378
+ iOSBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
355
379
  };
356
- declare function StatusBar({ darkStatusBar, hidden }: StatusBarProps): react_jsx_runtime.JSX.Element;
380
+ declare function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }: StatusBarProps): react_jsx_runtime.JSX.Element;
357
381
  declare const _default: react.MemoExoticComponent<typeof StatusBar>;
358
382
 
359
383
  type AsyncStoragePluginOptions = {};
360
384
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
361
385
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
362
386
 
363
- 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, 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 };
387
+ 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, StatusBar as StatusBar$1 } from 'react-native';
7
7
  import { EaseFunction, PropsTransforms } from '@legendapp/motion';
8
8
 
9
9
  type AppConfig = {};
@@ -316,12 +316,16 @@ declare const Image: typeof ImageComponent & {
316
316
 
317
317
  type InputFieldProps = {
318
318
  placeholder?: string;
319
- prefix?: string;
320
- suffix?: string;
319
+ prefix?: string | React.ReactNode;
320
+ suffix?: string | React.ReactNode;
321
321
  defaultValue?: string;
322
322
  value?: string | number;
323
323
  /** @default true */
324
324
  editable?: boolean;
325
+ label?: string;
326
+ isError?: boolean;
327
+ infoMessage?: string;
328
+ errorMessage?: string;
325
329
  /** @default false */
326
330
  autoFocus?: boolean;
327
331
  autoCapitalize?: React.ComponentProps<typeof TextInput>["autoCapitalize"];
@@ -332,32 +336,52 @@ type InputFieldProps = {
332
336
  keyboardType?: React.ComponentProps<typeof TextInput>["keyboardType"];
333
337
  /** @default false */
334
338
  secureTextEntry?: boolean;
339
+ returnKeyLabel?: React.ComponentProps<typeof TextInput>["enterKeyHint"];
340
+ returnKeyType?: React.ComponentProps<typeof TextInput>["returnKeyType"];
341
+ height?: number;
342
+ /** @default 16 */
343
+ fontSize?: number;
344
+ /** @default 400 */
345
+ fontWeight?: TextStyle["fontWeight"];
346
+ /** @default 20 */
347
+ lineHeight?: number;
348
+ textAlign?: React.ComponentProps<typeof TextInput>["textAlign"];
335
349
  onFocus?: (event: FocusEvent) => void;
336
350
  onBlur?: (event: FocusEvent) => void;
337
351
  onChange?: (text: string) => void;
338
- };
339
- type InputFieldRef = {};
352
+ onPress?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
353
+ onPressEnter?: (event: TextInputSubmitEditingEvent) => void;
354
+ } & Pick<ComponentPaddingProps, "paddingHorizontal" | "paddingVertical">;
355
+ type InputFieldRef = TextInput;
340
356
  type InputFieldComponentType = {
341
- (props: ComponentPropWithRef<InputFieldRef, InputFieldProps>): React.ReactElement;
342
- email: (props: ComponentPropWithRef<InputFieldRef, InputFieldProps>) => React.ReactElement;
343
- password: (props: ComponentPropWithRef<InputFieldRef, InputFieldProps>) => React.ReactElement;
357
+ (props: ComponentPropWithRef<TextInput, InputFieldProps>): React.ReactElement;
358
+ email: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
359
+ password: (props: ComponentPropWithRef<TextInput, InputFieldProps>) => React.ReactElement;
360
+ code: (props: ComponentPropWithRef<TextInput, InputFieldProps & {
361
+ /** @default false */
362
+ isSmall?: boolean;
363
+ }>) => React.ReactElement;
344
364
  };
345
365
  declare const InputFieldComponent: InputFieldComponentType;
346
366
  declare const InputField: typeof InputFieldComponent & {
347
367
  email: typeof InputFieldComponent.email;
348
368
  password: typeof InputFieldComponent.password;
369
+ code: typeof InputFieldComponent.code;
349
370
  };
350
371
 
351
372
  type StatusBarProps = {
352
373
  darkStatusBar?: boolean;
353
374
  /** @default false */
354
375
  hidden?: boolean;
376
+ barStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
377
+ androidBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
378
+ iOSBarStyle?: React.ComponentProps<typeof StatusBar$1>["barStyle"];
355
379
  };
356
- declare function StatusBar({ darkStatusBar, hidden }: StatusBarProps): react_jsx_runtime.JSX.Element;
380
+ declare function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }: StatusBarProps): react_jsx_runtime.JSX.Element;
357
381
  declare const _default: react.MemoExoticComponent<typeof StatusBar>;
358
382
 
359
383
  type AsyncStoragePluginOptions = {};
360
384
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
361
385
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
362
386
 
363
- 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, 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 };
387
+ 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
@@ -1187,6 +1187,10 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1187
1187
  defaultValue,
1188
1188
  value,
1189
1189
  editable = true,
1190
+ label,
1191
+ isError,
1192
+ infoMessage,
1193
+ errorMessage,
1190
1194
  autoFocus,
1191
1195
  autoCapitalize,
1192
1196
  autoComplete,
@@ -1194,19 +1198,30 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1194
1198
  keyboardAppearance = "default",
1195
1199
  keyboardType,
1196
1200
  secureTextEntry,
1201
+ returnKeyLabel,
1202
+ returnKeyType,
1203
+ height,
1204
+ fontSize = 16,
1205
+ fontWeight = 400,
1206
+ lineHeight = 20,
1207
+ textAlign,
1208
+ paddingHorizontal,
1209
+ paddingVertical,
1197
1210
  onFocus,
1198
1211
  onBlur,
1199
- onChange
1212
+ onChange,
1213
+ onPress,
1214
+ onPressEnter
1200
1215
  }, ref) => {
1201
1216
  const theme2 = (0, import_react_better_core9.useTheme)();
1202
1217
  const { colorTheme } = (0, import_react_better_core9.useBetterCoreContext)();
1218
+ const textInputRef = (0, import_react10.useRef)(null);
1203
1219
  const [internalValue, setInternalValue] = (0, import_react10.useState)(value?.toString() || defaultValue || "");
1204
1220
  const [isFocused, setIsFocused] = (0, import_react_better_core9.useBooleanState)();
1205
1221
  const borderWidth = 1;
1206
- const lineHeight = 20;
1207
- const paddingHorizontal = theme2.styles.space;
1208
- const paddingVertical = (theme2.styles.space + theme2.styles.gap) / 2;
1209
- const height = borderWidth + paddingVertical + lineHeight + paddingVertical + borderWidth;
1222
+ const readyPaddingHorizontal = paddingHorizontal ?? theme2.styles.space;
1223
+ const readyPaddingVertical = paddingVertical ? parseFloat(paddingVertical.toString()) : (theme2.styles.space + theme2.styles.gap) / 2;
1224
+ const readyHeight = height ?? borderWidth + readyPaddingVertical + lineHeight + readyPaddingVertical + borderWidth;
1210
1225
  const onFocusElement = (0, import_react10.useCallback)((event) => {
1211
1226
  setIsFocused.setTrue();
1212
1227
  onFocus?.(event);
@@ -1225,13 +1240,14 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1225
1240
  const textInputStyle = (0, import_react10.useMemo)(
1226
1241
  () => ({
1227
1242
  flex: 1,
1228
- fontSize: 16,
1243
+ fontSize,
1244
+ fontWeight,
1229
1245
  lineHeight,
1230
1246
  color: theme2.colors.textPrimary,
1231
- paddingHorizontal,
1232
- paddingVertical
1247
+ paddingHorizontal: readyPaddingHorizontal,
1248
+ paddingVertical: readyPaddingVertical
1233
1249
  }),
1234
- [theme2.colors, lineHeight, paddingHorizontal, paddingVertical]
1250
+ [theme2.colors, fontSize, fontWeight, lineHeight, readyPaddingHorizontal, readyPaddingVertical]
1235
1251
  );
1236
1252
  (0, import_react10.useEffect)(() => {
1237
1253
  if (value === void 0) return;
@@ -1240,80 +1256,113 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1240
1256
  (0, import_react10.useImperativeHandle)(
1241
1257
  ref,
1242
1258
  () => {
1243
- return {};
1259
+ return textInputRef.current;
1244
1260
  },
1245
1261
  []
1246
1262
  );
1247
1263
  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);
1248
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", height, children: [
1249
- prefix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1250
- View_default,
1251
- {
1252
- isRow: true,
1253
- height: "100%",
1254
- backgroundColor: prefixSuffixBackgroundColor,
1255
- alignItems: "center",
1256
- borderWidth,
1257
- borderRightWidth: 0,
1258
- borderTopLeftRadius: theme2.styles.borderRadius,
1259
- borderBottomLeftRadius: theme2.styles.borderRadius,
1260
- borderColor: theme2.colors.border,
1261
- paddingHorizontal,
1262
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontWeight: 700, children: prefix })
1263
- }
1264
- ),
1265
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1266
- Animate_default.View,
1264
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { flex: 1, gap: theme2.styles.gap / 3, children: [
1265
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: label }),
1266
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", flex: 1, height: readyHeight, children: [
1267
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1268
+ View_default,
1269
+ {
1270
+ isRow: true,
1271
+ height: "100%",
1272
+ backgroundColor: prefixSuffixBackgroundColor,
1273
+ alignItems: "center",
1274
+ borderWidth,
1275
+ borderRightWidth: 0,
1276
+ borderTopLeftRadius: theme2.styles.borderRadius,
1277
+ borderBottomLeftRadius: theme2.styles.borderRadius,
1278
+ borderColor: theme2.colors.border,
1279
+ paddingHorizontal: readyPaddingHorizontal,
1280
+ children: typeof prefix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontWeight: 700, children: prefix }) : prefix
1281
+ }
1282
+ ),
1283
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1284
+ Animate_default.View,
1285
+ {
1286
+ flex: 1,
1287
+ backgroundColor: theme2.colors.backgroundContent,
1288
+ borderTopLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1289
+ borderBottomLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1290
+ borderTopRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1291
+ borderBottomRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1292
+ borderWidth,
1293
+ initialBorderColor: theme2.colors.border,
1294
+ animateBorderColor: isFocused ? theme2.colors.primary : isError ? theme2.colors.error : theme2.colors.border,
1295
+ overflow: "hidden",
1296
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1297
+ import_react_native8.TextInput,
1298
+ {
1299
+ style: textInputStyle,
1300
+ value: internalValue,
1301
+ defaultValue,
1302
+ autoCapitalize,
1303
+ autoComplete,
1304
+ autoCorrect,
1305
+ autoFocus,
1306
+ placeholder,
1307
+ placeholderTextColor: theme2.colors.textSecondary + "80",
1308
+ enterKeyHint: returnKeyLabel,
1309
+ returnKeyType,
1310
+ onSubmitEditing: onPressEnter,
1311
+ readOnly: !editable,
1312
+ textAlign,
1313
+ keyboardAppearance,
1314
+ keyboardType,
1315
+ cursorColor: theme2.colors.primary,
1316
+ selectionColor: theme2.colors.primary,
1317
+ secureTextEntry,
1318
+ onFocus: onFocusElement,
1319
+ onBlur: onBlurElement,
1320
+ onChangeText,
1321
+ onPress,
1322
+ ref: textInputRef
1323
+ }
1324
+ )
1325
+ }
1326
+ ),
1327
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1328
+ View_default,
1329
+ {
1330
+ isRow: true,
1331
+ height: "100%",
1332
+ backgroundColor: prefixSuffixBackgroundColor,
1333
+ alignItems: "center",
1334
+ borderWidth,
1335
+ borderLeftWidth: 0,
1336
+ borderTopRightRadius: theme2.styles.borderRadius,
1337
+ borderBottomRightRadius: theme2.styles.borderRadius,
1338
+ borderColor: theme2.colors.border,
1339
+ paddingHorizontal: readyPaddingHorizontal,
1340
+ children: typeof suffix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontWeight: 700, children: suffix }) : suffix
1341
+ }
1342
+ )
1343
+ ] }),
1344
+ infoMessage && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1345
+ Animate_default.Text,
1267
1346
  {
1268
- flex: 1,
1269
- backgroundColor: theme2.colors.backgroundContent,
1270
- borderTopLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1271
- borderBottomLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1272
- borderTopRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1273
- borderBottomRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1274
- borderWidth,
1275
- initialBorderColor: theme2.colors.border,
1276
- animateBorderColor: isFocused ? theme2.colors.primary : theme2.colors.border,
1277
- overflow: "hidden",
1278
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1279
- import_react_native8.TextInput,
1280
- {
1281
- style: textInputStyle,
1282
- value: internalValue,
1283
- defaultValue,
1284
- autoCapitalize,
1285
- autoComplete,
1286
- autoCorrect,
1287
- autoFocus,
1288
- placeholder,
1289
- placeholderTextColor: theme2.colors.textSecondary + "80",
1290
- readOnly: !editable,
1291
- keyboardAppearance,
1292
- keyboardType,
1293
- cursorColor: theme2.colors.primary,
1294
- selectionColor: theme2.colors.primary,
1295
- secureTextEntry,
1296
- onFocus: onFocusElement,
1297
- onBlur: onBlurElement,
1298
- onChangeText
1299
- }
1300
- )
1347
+ fontSize: 14,
1348
+ color: theme2.colors.textSecondary,
1349
+ initialHeight: 0,
1350
+ initialOpacity: 0,
1351
+ animateHeight: 17,
1352
+ animateOpacity: 1,
1353
+ children: infoMessage
1301
1354
  }
1302
1355
  ),
1303
- suffix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1304
- View_default,
1356
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1357
+ Animate_default.Text,
1305
1358
  {
1306
- isRow: true,
1307
- height: "100%",
1308
- backgroundColor: prefixSuffixBackgroundColor,
1309
- alignItems: "center",
1310
- borderWidth,
1311
- borderLeftWidth: 0,
1312
- borderTopRightRadius: theme2.styles.borderRadius,
1313
- borderBottomRightRadius: theme2.styles.borderRadius,
1314
- borderColor: theme2.colors.border,
1315
- paddingHorizontal,
1316
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontWeight: 700, children: suffix })
1359
+ fontSize: 14,
1360
+ color: theme2.colors.error,
1361
+ initialHeight: 0,
1362
+ initialOpacity: 0,
1363
+ animateHeight: 17,
1364
+ animateOpacity: 1,
1365
+ children: errorMessage
1317
1366
  }
1318
1367
  )
1319
1368
  ] });
@@ -1347,9 +1396,26 @@ InputFieldComponent.password = (0, import_react10.forwardRef)(function Password(
1347
1396
  }
1348
1397
  );
1349
1398
  });
1399
+ InputFieldComponent.code = (0, import_react10.forwardRef)(function Password2({ isSmall, ...props }, ref) {
1400
+ const theme2 = (0, import_react_better_core9.useTheme)();
1401
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1402
+ InputFieldComponent,
1403
+ {
1404
+ fontSize: isSmall ? 36 : 42,
1405
+ fontWeight: 900,
1406
+ lineHeight: isSmall ? 42 : 50,
1407
+ paddingVertical: isSmall ? theme2.styles.space : theme2.styles.space * 2,
1408
+ paddingHorizontal: isSmall ? theme2.styles.gap : void 0,
1409
+ textAlign: "center",
1410
+ ...props,
1411
+ ref
1412
+ }
1413
+ );
1414
+ });
1350
1415
  var InputField = (0, import_react10.memo)(InputFieldComponent);
1351
1416
  InputField.email = InputFieldComponent.email;
1352
1417
  InputField.password = InputFieldComponent.password;
1418
+ InputField.code = InputFieldComponent.code;
1353
1419
  var InputField_default = InputField;
1354
1420
 
1355
1421
  // src/components/StatusBar.tsx
@@ -1357,12 +1423,13 @@ var import_react11 = require("react");
1357
1423
  var import_react_better_core10 = require("react-better-core");
1358
1424
  var import_react_native9 = require("react-native");
1359
1425
  var import_jsx_runtime10 = require("react/jsx-runtime");
1360
- function StatusBar({ darkStatusBar, hidden }) {
1426
+ function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }) {
1361
1427
  const theme2 = (0, import_react_better_core10.useTheme)();
1362
1428
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1363
1429
  import_react_native9.StatusBar,
1364
1430
  {
1365
1431
  backgroundColor: darkStatusBar ? theme2.colors.backgroundSecondary : void 0,
1432
+ barStyle: barStyle ?? (import_react_native9.Platform.OS === "android" ? androidBarStyle : iOSBarStyle),
1366
1433
  hidden
1367
1434
  }
1368
1435
  );