react-native-better-html 1.0.16 → 1.0.17

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, TextInput, TextStyle, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent, 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, NativeSyntheticEvent, NativeTouchEvent, FocusEvent, TextInputSubmitEditingEvent, TextProps as TextProps$1, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, StatusBar as StatusBar$1 } from 'react-native';
7
7
  import { SymbolView } from 'expo-symbols';
8
8
  import { EaseFunction, PropsTransforms } from '@legendapp/motion';
9
9
 
@@ -31,7 +31,7 @@ type BetterComponentsProviderProps = BetterProviderCommonProps & {
31
31
  config?: BetterComponentsProviderConfig;
32
32
  };
33
33
  declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
34
- declare const _default$1: react.MemoExoticComponent<typeof BetterComponentsProvider>;
34
+ declare const _default$2: react.MemoExoticComponent<typeof BetterComponentsProvider>;
35
35
 
36
36
  type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
37
37
  shadowOffsetWidth?: number;
@@ -83,6 +83,7 @@ type IconProps = {
83
83
  color?: string;
84
84
  } & OmitProps<ViewProps, "width" | "height" | "pressType">;
85
85
  declare function Icon({ name, nameIOS, size, color, ...props }: IconProps): react_jsx_runtime.JSX.Element;
86
+ declare const _default$1: react.MemoExoticComponent<typeof Icon>;
86
87
 
87
88
  type InputFieldProps = {
88
89
  flex?: ViewStyle["flex"];
@@ -132,8 +133,10 @@ type InputFieldProps = {
132
133
  numberOfLines?: number;
133
134
  leftIcon?: IconProps["name"];
134
135
  leftIconIOS?: IconProps["nameIOS"];
136
+ onPressLeftIcon?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
135
137
  rightIcon?: IconProps["name"];
136
138
  rightIconIOS?: IconProps["nameIOS"];
139
+ onPressRightIcon?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
137
140
  onFocus?: (event: FocusEvent) => void;
138
141
  onBlur?: (event: FocusEvent) => void;
139
142
  onChange?: (text: string) => void;
@@ -214,6 +217,10 @@ declare function useForm<FormFields extends Record<string | number, FormFieldVal
214
217
  isValid: boolean;
215
218
  canSubmit: boolean;
216
219
  };
220
+ declare function useEventEmitter(): {
221
+ emit: <Params>(eventName: string, params?: Params) => void;
222
+ listen: <Params>(eventName: string, callback?: (params?: Params) => void) => react_native.EmitterSubscription;
223
+ };
217
224
 
218
225
  declare const getFormErrorObject: <FormFields extends ReturnType<typeof useForm>["values"]>(formValues: FormFields) => PartialRecord<keyof FormFields, string>;
219
226
 
@@ -421,7 +428,8 @@ type ImageComponentType = {
421
428
  /** @default 50 */
422
429
  size?: number;
423
430
  letters?: string;
424
- backgroundColor?: string;
431
+ color?: ColorValue;
432
+ backgroundColor?: ColorValue;
425
433
  }) => React.ReactElement;
426
434
  };
427
435
  declare const ImageComponent: ImageComponentType;
@@ -445,4 +453,4 @@ type AsyncStoragePluginOptions = {};
445
453
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
446
454
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
447
455
 
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 };
456
+ export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$2 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, _default$1 as 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, useEventEmitter, useForm, 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, TextInput, TextStyle, FocusEvent, NativeSyntheticEvent, NativeTouchEvent, TextInputSubmitEditingEvent, 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, NativeSyntheticEvent, NativeTouchEvent, FocusEvent, TextInputSubmitEditingEvent, TextProps as TextProps$1, ColorValue, ImageSourcePropType, ImageProps as ImageProps$1, ImageStyle, StatusBar as StatusBar$1 } from 'react-native';
7
7
  import { SymbolView } from 'expo-symbols';
8
8
  import { EaseFunction, PropsTransforms } from '@legendapp/motion';
9
9
 
@@ -31,7 +31,7 @@ type BetterComponentsProviderProps = BetterProviderCommonProps & {
31
31
  config?: BetterComponentsProviderConfig;
32
32
  };
33
33
  declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
34
- declare const _default$1: react.MemoExoticComponent<typeof BetterComponentsProvider>;
34
+ declare const _default$2: react.MemoExoticComponent<typeof BetterComponentsProvider>;
35
35
 
36
36
  type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
37
37
  shadowOffsetWidth?: number;
@@ -83,6 +83,7 @@ type IconProps = {
83
83
  color?: string;
84
84
  } & OmitProps<ViewProps, "width" | "height" | "pressType">;
85
85
  declare function Icon({ name, nameIOS, size, color, ...props }: IconProps): react_jsx_runtime.JSX.Element;
86
+ declare const _default$1: react.MemoExoticComponent<typeof Icon>;
86
87
 
87
88
  type InputFieldProps = {
88
89
  flex?: ViewStyle["flex"];
@@ -132,8 +133,10 @@ type InputFieldProps = {
132
133
  numberOfLines?: number;
133
134
  leftIcon?: IconProps["name"];
134
135
  leftIconIOS?: IconProps["nameIOS"];
136
+ onPressLeftIcon?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
135
137
  rightIcon?: IconProps["name"];
136
138
  rightIconIOS?: IconProps["nameIOS"];
139
+ onPressRightIcon?: (event: NativeSyntheticEvent<NativeTouchEvent>) => void;
137
140
  onFocus?: (event: FocusEvent) => void;
138
141
  onBlur?: (event: FocusEvent) => void;
139
142
  onChange?: (text: string) => void;
@@ -214,6 +217,10 @@ declare function useForm<FormFields extends Record<string | number, FormFieldVal
214
217
  isValid: boolean;
215
218
  canSubmit: boolean;
216
219
  };
220
+ declare function useEventEmitter(): {
221
+ emit: <Params>(eventName: string, params?: Params) => void;
222
+ listen: <Params>(eventName: string, callback?: (params?: Params) => void) => react_native.EmitterSubscription;
223
+ };
217
224
 
218
225
  declare const getFormErrorObject: <FormFields extends ReturnType<typeof useForm>["values"]>(formValues: FormFields) => PartialRecord<keyof FormFields, string>;
219
226
 
@@ -421,7 +428,8 @@ type ImageComponentType = {
421
428
  /** @default 50 */
422
429
  size?: number;
423
430
  letters?: string;
424
- backgroundColor?: string;
431
+ color?: ColorValue;
432
+ backgroundColor?: ColorValue;
425
433
  }) => React.ReactElement;
426
434
  };
427
435
  declare const ImageComponent: ImageComponentType;
@@ -445,4 +453,4 @@ type AsyncStoragePluginOptions = {};
445
453
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
446
454
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
447
455
 
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 };
456
+ export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$2 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, _default$1 as 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, useEventEmitter, useForm, useKeyboard };
package/dist/index.js CHANGED
@@ -63,6 +63,7 @@ __export(index_exports, {
63
63
  useBooleanState: () => import_react_better_core12.useBooleanState,
64
64
  useDebounceState: () => import_react_better_core12.useDebounceState,
65
65
  useDevice: () => useDevice,
66
+ useEventEmitter: () => useEventEmitter,
66
67
  useForm: () => useForm,
67
68
  useKeyboard: () => useKeyboard,
68
69
  useLoader: () => import_react_better_core12.useLoader,
@@ -84,6 +85,26 @@ var theme = {};
84
85
 
85
86
  // src/constants/icons.ts
86
87
  var icons = {
88
+ eye: {
89
+ width: 576,
90
+ height: 512,
91
+ paths: [
92
+ {
93
+ d: "M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z",
94
+ type: "fill"
95
+ }
96
+ ]
97
+ },
98
+ eyeDashed: {
99
+ width: 640,
100
+ height: 512,
101
+ paths: [
102
+ {
103
+ d: "M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z",
104
+ type: "fill"
105
+ }
106
+ ]
107
+ },
87
108
  magnifyingGlass: {
88
109
  width: 512,
89
110
  height: 512,
@@ -597,6 +618,17 @@ function useForm(options) {
597
618
  canSubmit
598
619
  };
599
620
  }
621
+ function useEventEmitter() {
622
+ return {
623
+ emit: (eventName, params) => {
624
+ import_react_native.DeviceEventEmitter.emit(eventName, params);
625
+ },
626
+ listen: (eventName, callback = () => {
627
+ }) => {
628
+ return import_react_native.DeviceEventEmitter.addListener(eventName, callback);
629
+ }
630
+ };
631
+ }
600
632
 
601
633
  // src/utils/functions.ts
602
634
  var getFormErrorObject = (formValues) => {
@@ -1281,7 +1313,13 @@ var ImageComponent = function Image({ name, source, withDevFittingMode, ...props
1281
1313
  }, [assets2, name]);
1282
1314
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Image, { source: name ? assets2[name.toString()] : source, style, ...props });
1283
1315
  };
1284
- ImageComponent.profileImage = function ProfileImage({ size = 50, letters, backgroundColor, ...props }) {
1316
+ ImageComponent.profileImage = function ProfileImage({
1317
+ size = 50,
1318
+ letters,
1319
+ color,
1320
+ backgroundColor,
1321
+ ...props
1322
+ }) {
1285
1323
  const theme2 = (0, import_react_better_core8.useTheme)();
1286
1324
  return letters ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1287
1325
  View_default,
@@ -1295,7 +1333,7 @@ ImageComponent.profileImage = function ProfileImage({ size = 50, letters, backgr
1295
1333
  alignItems: "center",
1296
1334
  justifyContent: "center",
1297
1335
  ...props,
1298
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { fontSize: size / 2.5, fontWeight: 700, marginTop: 1, children: letters.toUpperCase().slice(0, 2) })
1336
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { fontSize: size / 2.5, fontWeight: 700, color: color ?? theme2.colors.textPrimary, marginTop: 1, children: letters.toUpperCase().slice(0, 2) })
1299
1337
  }
1300
1338
  ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1301
1339
  ImageComponent,
@@ -1332,26 +1370,38 @@ function Icon({ name, nameIOS, size = 16, color, ...props }) {
1332
1370
  `The icon \`${name}\` you are trying to use does not exist. Make sure to add it to the \`icons\` object in \`<BetterComponentsProvider>\` config value prop.`
1333
1371
  );
1334
1372
  }, [icons2, name]);
1335
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(View_default, { width: size, height: size, pressType: "opacity", pressStrength: pressStrength().p2, ...props, children: import_react_native8.Platform.OS === "ios" && nameIOS ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_expo_symbols.SymbolView, { name: nameIOS, tintColor: svgColor, size }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1336
- import_react_native_svg.Svg,
1373
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1374
+ View_default,
1337
1375
  {
1338
- width: size,
1339
- height: size,
1340
- viewBox: `0 0 ${icons2[name.toString()]?.width ?? 0} ${icons2[name.toString()]?.height ?? 0}`,
1341
- fill: "none",
1342
- children: icons2[name.toString()]?.paths.map(({ type, ...path }) => /* @__PURE__ */ (0, import_react11.createElement)(
1343
- import_react_native_svg.Path,
1376
+ width: size + (parseFloat(props.padding?.toString() ?? "0") ?? 0) + (parseFloat(props.paddingHorizontal?.toString() ?? "0") ?? 0),
1377
+ height: size + (parseFloat(props.padding?.toString() ?? "0") ?? 0) + (parseFloat(props.paddingVertical?.toString() ?? "0") ?? 0),
1378
+ alignItems: "center",
1379
+ justifyContent: "center",
1380
+ pressType: "opacity",
1381
+ pressStrength: pressStrength().p2,
1382
+ ...props,
1383
+ children: import_react_native8.Platform.OS === "ios" && nameIOS ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_expo_symbols.SymbolView, { name: nameIOS, tintColor: svgColor, size }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1384
+ import_react_native_svg.Svg,
1344
1385
  {
1345
- ...path,
1346
- fill: type === "fill" ? svgColor : void 0,
1347
- stroke: type === "stroke" ? svgColor : void 0,
1348
- key: path.d
1386
+ width: size,
1387
+ height: size,
1388
+ viewBox: `0 0 ${icons2[name.toString()]?.width ?? 0} ${icons2[name.toString()]?.height ?? 0}`,
1389
+ fill: "none",
1390
+ children: icons2[name.toString()]?.paths.map(({ type, ...path }) => /* @__PURE__ */ (0, import_react11.createElement)(
1391
+ import_react_native_svg.Path,
1392
+ {
1393
+ ...path,
1394
+ fill: type === "fill" ? svgColor : void 0,
1395
+ stroke: type === "stroke" ? svgColor : void 0,
1396
+ key: path.d
1397
+ }
1398
+ ))
1349
1399
  }
1350
- ))
1400
+ )
1351
1401
  }
1352
- ) });
1402
+ );
1353
1403
  }
1354
- var Icon_default = Icon;
1404
+ var Icon_default = (0, import_react10.memo)(Icon);
1355
1405
 
1356
1406
  // src/components/InputField.tsx
1357
1407
  var import_react12 = require("react");
@@ -1395,8 +1445,10 @@ var InputFieldComponent = (0, import_react12.forwardRef)(
1395
1445
  numberOfLines = 2,
1396
1446
  leftIcon,
1397
1447
  leftIconIOS,
1448
+ onPressLeftIcon,
1398
1449
  rightIcon,
1399
1450
  rightIconIOS,
1451
+ onPressRightIcon,
1400
1452
  paddingHorizontal,
1401
1453
  paddingVertical,
1402
1454
  onFocus,
@@ -1416,6 +1468,7 @@ var InputFieldComponent = (0, import_react12.forwardRef)(
1416
1468
  const [isFocused, setIsFocused] = (0, import_react_better_core10.useBooleanState)();
1417
1469
  const isIOSDateTime = import_react_native9.Platform.OS === "ios" && (type === "date" || type === "time");
1418
1470
  const iconSize = 16;
1471
+ const iconPadding = onPressRightIcon ? theme2.styles.gap : 0;
1419
1472
  const iconSideSpace = theme2.styles.space;
1420
1473
  const borderWidth = 1;
1421
1474
  const readyPaddingHorizontal = paddingHorizontal ?? theme2.styles.space;
@@ -1614,11 +1667,13 @@ var InputFieldComponent = (0, import_react12.forwardRef)(
1614
1667
  Icon_default,
1615
1668
  {
1616
1669
  position: "absolute",
1617
- left: iconSideSpace,
1670
+ left: iconSideSpace - iconPadding,
1618
1671
  name: leftIcon,
1619
1672
  nameIOS: leftIconIOS,
1620
1673
  size: iconSize,
1621
- pointerEvents: "box-none"
1674
+ pointerEvents: !onPressLeftIcon ? "box-none" : void 0,
1675
+ padding: iconPadding,
1676
+ onPress: onPressLeftIcon
1622
1677
  }
1623
1678
  ),
1624
1679
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -1658,11 +1713,13 @@ var InputFieldComponent = (0, import_react12.forwardRef)(
1658
1713
  Icon_default,
1659
1714
  {
1660
1715
  position: "absolute",
1661
- right: iconSideSpace,
1716
+ right: iconSideSpace - iconPadding,
1662
1717
  name: rightIcon,
1663
1718
  nameIOS: rightIconIOS,
1664
1719
  size: iconSize,
1665
- pointerEvents: "box-none"
1720
+ pointerEvents: !onPressRightIcon ? "box-none" : void 0,
1721
+ padding: iconPadding,
1722
+ onPress: onPressRightIcon
1666
1723
  }
1667
1724
  )
1668
1725
  ]
@@ -1740,16 +1797,31 @@ InputFieldComponent.email = (0, import_react12.forwardRef)(function Email(props,
1740
1797
  );
1741
1798
  });
1742
1799
  InputFieldComponent.password = (0, import_react12.forwardRef)(function Password(props, ref) {
1800
+ const inputFieldRef = (0, import_react12.useRef)(null);
1801
+ const [showPassword, setShowPassword] = (0, import_react_better_core10.useBooleanState)();
1802
+ const onPressEye = (0, import_react12.useCallback)(() => {
1803
+ setShowPassword.toggle();
1804
+ inputFieldRef.current?.focus();
1805
+ }, []);
1806
+ (0, import_react12.useImperativeHandle)(
1807
+ ref,
1808
+ () => {
1809
+ return inputFieldRef.current;
1810
+ },
1811
+ []
1812
+ );
1743
1813
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1744
1814
  InputFieldComponent,
1745
1815
  {
1746
- secureTextEntry: true,
1816
+ secureTextEntry: !showPassword,
1747
1817
  placeholder: "******",
1748
1818
  autoCapitalize: "none",
1749
1819
  autoComplete: "password",
1750
1820
  autoCorrect: false,
1821
+ rightIcon: showPassword ? "eyeDashed" : "eye",
1822
+ onPressRightIcon: onPressEye,
1751
1823
  ...props,
1752
- ref
1824
+ ref: inputFieldRef
1753
1825
  }
1754
1826
  );
1755
1827
  });
@@ -1845,6 +1917,7 @@ var asyncStoragePlugin = (options) => ({
1845
1917
  useBooleanState,
1846
1918
  useDebounceState,
1847
1919
  useDevice,
1920
+ useEventEmitter,
1848
1921
  useForm,
1849
1922
  useKeyboard,
1850
1923
  useLoader,