react-native-better-html 1.0.14 → 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.js CHANGED
@@ -33,6 +33,7 @@ __export(index_exports, {
33
33
  Animate: () => Animate_default,
34
34
  BetterComponentsProvider: () => BetterComponentsProvider_default,
35
35
  Button: () => Button_default,
36
+ Icon: () => Icon_default,
36
37
  Image: () => Image_default,
37
38
  InputField: () => InputField_default,
38
39
  Loader: () => Loader_default,
@@ -41,35 +42,35 @@ __export(index_exports, {
41
42
  Text: () => Text_default,
42
43
  View: () => View_default,
43
44
  asyncStoragePlugin: () => asyncStoragePlugin,
44
- colorThemeControls: () => import_react_better_core11.colorThemeControls,
45
- countries: () => import_react_better_core11.countries,
46
- darkenColor: () => import_react_better_core11.darkenColor,
45
+ colorThemeControls: () => import_react_better_core12.colorThemeControls,
46
+ countries: () => import_react_better_core12.countries,
47
+ darkenColor: () => import_react_better_core12.darkenColor,
47
48
  defaultAsyncStoragePluginOptions: () => defaultAsyncStoragePluginOptions,
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,
49
+ desaturateColor: () => import_react_better_core12.desaturateColor,
50
+ eventPreventDefault: () => import_react_better_core12.eventPreventDefault,
51
+ eventPreventStop: () => import_react_better_core12.eventPreventStop,
52
+ eventStopPropagation: () => import_react_better_core12.eventStopPropagation,
53
+ formatPhoneNumber: () => import_react_better_core12.formatPhoneNumber,
53
54
  generateAsyncStorage: () => generateAsyncStorage,
54
- generateRandomString: () => import_react_better_core11.generateRandomString,
55
+ generateRandomString: () => import_react_better_core12.generateRandomString,
55
56
  getFormErrorObject: () => getFormErrorObject,
56
- getPluralWord: () => import_react_better_core11.getPluralWord,
57
- lightenColor: () => import_react_better_core11.lightenColor,
58
- loaderControls: () => import_react_better_core11.loaderControls,
57
+ getPluralWord: () => import_react_better_core12.getPluralWord,
58
+ lightenColor: () => import_react_better_core12.lightenColor,
59
+ loaderControls: () => import_react_better_core12.loaderControls,
59
60
  pressStrength: () => pressStrength,
60
- saturateColor: () => import_react_better_core11.saturateColor,
61
+ saturateColor: () => import_react_better_core12.saturateColor,
61
62
  useBetterComponentsContext: () => useBetterComponentsContext,
62
- useBooleanState: () => import_react_better_core11.useBooleanState,
63
- useDebounceState: () => import_react_better_core11.useDebounceState,
63
+ useBooleanState: () => import_react_better_core12.useBooleanState,
64
+ useDebounceState: () => import_react_better_core12.useDebounceState,
64
65
  useDevice: () => useDevice,
65
66
  useForm: () => useForm,
66
67
  useKeyboard: () => useKeyboard,
67
- useLoader: () => import_react_better_core11.useLoader,
68
- useLoaderControls: () => import_react_better_core11.useLoaderControls,
69
- useTheme: () => import_react_better_core11.useTheme
68
+ useLoader: () => import_react_better_core12.useLoader,
69
+ useLoaderControls: () => import_react_better_core12.useLoaderControls,
70
+ useTheme: () => import_react_better_core12.useTheme
70
71
  });
71
72
  module.exports = __toCommonJS(index_exports);
72
- var import_react_better_core11 = require("react-better-core");
73
+ var import_react_better_core12 = require("react-better-core");
73
74
 
74
75
  // src/components/BetterComponentsProvider.tsx
75
76
  var import_react = require("react");
@@ -82,7 +83,18 @@ var appConfig = {};
82
83
  var theme = {};
83
84
 
84
85
  // src/constants/icons.ts
85
- var icons = {};
86
+ var icons = {
87
+ magnifyingGlass: {
88
+ width: 512,
89
+ height: 512,
90
+ paths: [
91
+ {
92
+ d: "M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z",
93
+ type: "fill"
94
+ }
95
+ ]
96
+ }
97
+ };
86
98
 
87
99
  // src/constants/assets.ts
88
100
  var assets = {};
@@ -184,10 +196,10 @@ var checkBetterCoreContextValue = (value, functionsName) => {
184
196
  var pressStrength = () => {
185
197
  if (!checkBetterCoreContextValue(externalBetterCoreContextValue, "pressStrength")) return void 0;
186
198
  return {
187
- z05: externalBetterCoreContextValue.colorTheme === "dark" ? 0.85 : 0.95,
188
- z1: externalBetterCoreContextValue.colorTheme === "dark" ? 0.6 : 0.8,
189
- z2: externalBetterCoreContextValue.colorTheme === "dark" ? 0.5 : 0.7,
190
- z3: externalBetterCoreContextValue.colorTheme === "dark" ? 0.4 : 0.6
199
+ p05: externalBetterCoreContextValue.colorTheme === "dark" ? 0.85 : 0.95,
200
+ p1: externalBetterCoreContextValue.colorTheme === "dark" ? 0.6 : 0.8,
201
+ p2: externalBetterCoreContextValue.colorTheme === "dark" ? 0.5 : 0.7,
202
+ p3: externalBetterCoreContextValue.colorTheme === "dark" ? 0.4 : 0.6
191
203
  };
192
204
  };
193
205
 
@@ -695,7 +707,8 @@ var ViewComponent = function View({
695
707
  previousValue.shadowOffset = void 0;
696
708
  else previousValue[currentValue] = void 0;
697
709
  return previousValue;
698
- }, {})
710
+ }, {}),
711
+ width: props.width !== "100%" ? props.width : void 0
699
712
  }),
700
713
  [style]
701
714
  );
@@ -1107,7 +1120,7 @@ ButtonComponent.secondary = function Secondary(props) {
1107
1120
  borderWidth: 1,
1108
1121
  borderColor: theme2.colors.border,
1109
1122
  textColor: theme2.colors.textPrimary,
1110
- pressStrength: pressStrength().z05,
1123
+ pressStrength: pressStrength().p05,
1111
1124
  animateOpacity: props.disabled ? 0.4 : 1,
1112
1125
  ...props
1113
1126
  }
@@ -1301,14 +1314,54 @@ var Image2 = (0, import_react9.memo)(ImageComponent);
1301
1314
  Image2.profileImage = ImageComponent.profileImage;
1302
1315
  var Image_default = Image2;
1303
1316
 
1304
- // src/components/InputField.tsx
1317
+ // src/components/Icon.tsx
1305
1318
  var import_react10 = require("react");
1306
1319
  var import_react_native8 = require("react-native");
1307
- var import_datetimepicker = __toESM(require("@react-native-community/datetimepicker"));
1320
+ var import_react_native_svg = require("react-native-svg");
1308
1321
  var import_react_better_core9 = require("react-better-core");
1322
+ var import_expo_symbols = require("expo-symbols");
1309
1323
  var import_jsx_runtime9 = require("react/jsx-runtime");
1310
- var InputFieldComponent = (0, import_react10.forwardRef)(
1324
+ var import_react11 = require("react");
1325
+ function Icon({ name, nameIOS, size = 16, color, ...props }) {
1326
+ const theme2 = (0, import_react_better_core9.useTheme)();
1327
+ const { icons: icons2 } = (0, import_react_better_core9.useBetterCoreContext)();
1328
+ const svgColor = color ?? theme2.colors.textPrimary;
1329
+ (0, import_react10.useEffect)(() => {
1330
+ if (!icons2[name.toString()])
1331
+ console.warn(
1332
+ `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
+ );
1334
+ }, [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,
1337
+ {
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,
1344
+ {
1345
+ ...path,
1346
+ fill: type === "fill" ? svgColor : void 0,
1347
+ stroke: type === "stroke" ? svgColor : void 0,
1348
+ key: path.d
1349
+ }
1350
+ ))
1351
+ }
1352
+ ) });
1353
+ }
1354
+ var Icon_default = Icon;
1355
+
1356
+ // src/components/InputField.tsx
1357
+ var import_react12 = require("react");
1358
+ var import_react_native9 = require("react-native");
1359
+ var import_datetimepicker = __toESM(require("@react-native-community/datetimepicker"));
1360
+ var import_react_better_core10 = require("react-better-core");
1361
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1362
+ var InputFieldComponent = (0, import_react12.forwardRef)(
1311
1363
  ({
1364
+ flex,
1312
1365
  placeholder,
1313
1366
  type = "text",
1314
1367
  iOSDateTimeFullSize,
@@ -1340,6 +1393,10 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1340
1393
  maxLength,
1341
1394
  multiline,
1342
1395
  numberOfLines = 2,
1396
+ leftIcon,
1397
+ leftIconIOS,
1398
+ rightIcon,
1399
+ rightIconIOS,
1343
1400
  paddingHorizontal,
1344
1401
  paddingVertical,
1345
1402
  onFocus,
@@ -1348,31 +1405,34 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1348
1405
  onPress,
1349
1406
  onPressPrefix,
1350
1407
  onPressSuffix,
1351
- onPressEnter
1408
+ onPressEnter,
1409
+ ...props
1352
1410
  }, ref) => {
1353
- const theme2 = (0, import_react_better_core9.useTheme)();
1354
- const { colorTheme } = (0, import_react_better_core9.useBetterCoreContext)();
1355
- const textInputRef = (0, import_react10.useRef)(null);
1356
- const [internalValue, setInternalValue] = (0, import_react10.useState)(value?.toString() || defaultValue || "");
1357
- const [internalDateValue, setInternalDateValue] = (0, import_react10.useState)();
1358
- const [isFocused, setIsFocused] = (0, import_react_better_core9.useBooleanState)();
1359
- const isIOSDateTime = import_react_native8.Platform.OS === "ios" && (type === "date" || type === "time");
1411
+ const theme2 = (0, import_react_better_core10.useTheme)();
1412
+ const { colorTheme } = (0, import_react_better_core10.useBetterCoreContext)();
1413
+ const textInputRef = (0, import_react12.useRef)(null);
1414
+ const [internalValue, setInternalValue] = (0, import_react12.useState)(value?.toString() || defaultValue || "");
1415
+ const [internalDateValue, setInternalDateValue] = (0, import_react12.useState)();
1416
+ const [isFocused, setIsFocused] = (0, import_react_better_core10.useBooleanState)();
1417
+ const isIOSDateTime = import_react_native9.Platform.OS === "ios" && (type === "date" || type === "time");
1418
+ const iconSize = 16;
1419
+ const iconSideSpace = theme2.styles.space;
1360
1420
  const borderWidth = 1;
1361
1421
  const readyPaddingHorizontal = paddingHorizontal ?? theme2.styles.space;
1362
1422
  const readyPaddingVertical = paddingVertical ? parseFloat(paddingVertical.toString()) : (theme2.styles.space + theme2.styles.gap) / 2;
1363
- const readyHeight = height ?? isIOSDateTime ? void 0 : borderWidth + readyPaddingVertical + lineHeight + readyPaddingVertical + borderWidth + (import_react_native8.Platform.OS === "android" ? 2 : 0);
1364
- const onChangeRNDateTimePicker = (0, import_react10.useCallback)(
1423
+ const readyHeight = height ?? isIOSDateTime ? void 0 : borderWidth + readyPaddingVertical + lineHeight + readyPaddingVertical + borderWidth + (import_react_native9.Platform.OS === "android" ? 2 : 0);
1424
+ const onChangeRNDateTimePicker = (0, import_react12.useCallback)(
1365
1425
  (event, data) => {
1366
1426
  setInternalDateValue(data);
1367
1427
  onChange?.(data?.toISOString() ?? "");
1368
1428
  },
1369
1429
  [onChange]
1370
1430
  );
1371
- const onPressInputField = (0, import_react10.useCallback)(
1431
+ const onPressInputField = (0, import_react12.useCallback)(
1372
1432
  (event) => {
1373
1433
  onPress?.(event);
1374
1434
  if (type === "date" || type === "time") {
1375
- if (import_react_native8.Platform.OS === "android") {
1435
+ if (import_react_native9.Platform.OS === "android") {
1376
1436
  import_datetimepicker.DateTimePickerAndroid.open({
1377
1437
  value: internalDateValue ?? /* @__PURE__ */ new Date(),
1378
1438
  is24Hour: true,
@@ -1390,47 +1450,60 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1390
1450
  },
1391
1451
  onChange: onChangeRNDateTimePicker
1392
1452
  });
1393
- } else if (import_react_native8.Platform.OS === "ios") {
1453
+ } else if (import_react_native9.Platform.OS === "ios") {
1394
1454
  }
1395
1455
  }
1396
1456
  },
1397
1457
  [onPress, type, internalDateValue, onChangeRNDateTimePicker]
1398
1458
  );
1399
- const onFocusElement = (0, import_react10.useCallback)((event) => {
1459
+ const onFocusElement = (0, import_react12.useCallback)((event) => {
1400
1460
  setIsFocused.setTrue();
1401
1461
  onFocus?.(event);
1402
1462
  }, []);
1403
- const onBlurElement = (0, import_react10.useCallback)((event) => {
1463
+ const onBlurElement = (0, import_react12.useCallback)((event) => {
1404
1464
  setIsFocused.setFalse();
1405
1465
  onBlur?.(event);
1406
1466
  }, []);
1407
- const onChangeText = (0, import_react10.useCallback)(
1467
+ const onChangeText = (0, import_react12.useCallback)(
1408
1468
  (text) => {
1409
1469
  setInternalValue(text);
1410
1470
  onChange?.(text);
1411
1471
  },
1412
1472
  [onChange]
1413
1473
  );
1414
- const textInputStyle = (0, import_react10.useMemo)(
1474
+ const textInputStyle = (0, import_react12.useMemo)(
1415
1475
  () => ({
1416
1476
  flex: 1,
1417
1477
  fontSize,
1418
1478
  fontWeight,
1419
1479
  lineHeight,
1420
1480
  color: theme2.colors.textPrimary,
1481
+ paddingLeft: leftIcon ? iconSideSpace + iconSize + iconSideSpace : void 0,
1482
+ paddingRight: rightIcon ? iconSideSpace + iconSize + iconSideSpace : void 0,
1421
1483
  paddingHorizontal: readyPaddingHorizontal,
1422
1484
  paddingVertical: readyPaddingVertical
1423
1485
  }),
1424
- [theme2.colors, fontSize, fontWeight, lineHeight, readyPaddingHorizontal, readyPaddingVertical]
1486
+ [
1487
+ theme2.colors,
1488
+ fontSize,
1489
+ fontWeight,
1490
+ lineHeight,
1491
+ readyPaddingHorizontal,
1492
+ readyPaddingVertical,
1493
+ iconSideSpace,
1494
+ iconSize,
1495
+ leftIcon,
1496
+ rightIcon
1497
+ ]
1425
1498
  );
1426
- const rnDateTimePickerStyle = (0, import_react10.useMemo)(
1499
+ const rnDateTimePickerStyle = (0, import_react12.useMemo)(
1427
1500
  () => ({
1428
1501
  flex: iOSDateTimeFullSize ? 1 : void 0,
1429
1502
  marginLeft: -8 + (iOSDateTimeFullSize ? 0 : theme2.styles.space)
1430
1503
  }),
1431
1504
  [iOSDateTimeFullSize]
1432
1505
  );
1433
- (0, import_react10.useEffect)(() => {
1506
+ (0, import_react12.useEffect)(() => {
1434
1507
  if (value === void 0) return;
1435
1508
  setInternalValue(value.toString());
1436
1509
  try {
@@ -1438,7 +1511,7 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1438
1511
  } catch (error) {
1439
1512
  }
1440
1513
  }, [value]);
1441
- (0, import_react10.useEffect)(() => {
1514
+ (0, import_react12.useEffect)(() => {
1442
1515
  if (type !== "date" && type !== "time") return;
1443
1516
  const date = internalDateValue?.toISOString().split("T")[0] ?? "";
1444
1517
  const hours = internalDateValue ? internalDateValue.getHours().toString() : "00";
@@ -1447,7 +1520,7 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1447
1520
  type === "date" ? date : internalDateValue ? `${hours.length === 1 ? `0${hours}` : hours}:${minutes.length === 1 ? `0${minutes}` : minutes}` : ""
1448
1521
  );
1449
1522
  }, [internalDateValue]);
1450
- (0, import_react10.useImperativeHandle)(
1523
+ (0, import_react12.useImperativeHandle)(
1451
1524
  ref,
1452
1525
  () => {
1453
1526
  return textInputRef.current;
@@ -1455,22 +1528,23 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1455
1528
  []
1456
1529
  );
1457
1530
  const withPressInputField = !!onPress || type === "date" || type === "time";
1458
- 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);
1459
- const labelComponent = label && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { isRow: true, alignItems: "center", gap: 2, children: [
1460
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { fontSize: 14, color: isError ? theme2.colors.error : theme2.colors.textSecondary, children: label }),
1461
- required && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { color: theme2.colors.error, children: "*" })
1531
+ const prefixSuffixBackgroundColor = colorTheme === "light" ? (0, import_react_better_core10.darkenColor)(theme2.colors.backgroundContent, 0.03) : (0, import_react_better_core10.lightenColor)(theme2.colors.backgroundContent, 0.1);
1532
+ const labelComponent = label && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(View_default, { isRow: true, alignItems: "center", gap: 2, children: [
1533
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { fontSize: 14, color: isError ? theme2.colors.error : theme2.colors.textSecondary, children: label }),
1534
+ required && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { color: theme2.colors.error, children: "*" })
1462
1535
  ] });
1463
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1536
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1464
1537
  Animate_default.View,
1465
1538
  {
1466
- flex: 1,
1539
+ flex,
1467
1540
  gap: theme2.styles.gap / 3,
1468
1541
  initialOpacity: 1,
1469
1542
  animateOpacity: disabled ? 0.6 : 1,
1543
+ ...props,
1470
1544
  children: [
1471
1545
  isIOSDateTime && !iOSDateTimeFullSize ? void 0 : labelComponent,
1472
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", flex: 1, height: readyHeight, children: [
1473
- prefix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1546
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", height: readyHeight, children: [
1547
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1474
1548
  View_default,
1475
1549
  {
1476
1550
  isRow: true,
@@ -1485,20 +1559,20 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1485
1559
  borderColor: theme2.colors.border,
1486
1560
  paddingHorizontal: readyPaddingHorizontal,
1487
1561
  onPress: onPressPrefix,
1488
- children: typeof prefix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1562
+ children: typeof prefix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1489
1563
  Text_default,
1490
1564
  {
1491
1565
  fontWeight: 700,
1492
1566
  lineHeight,
1493
- marginTop: import_react_native8.Platform.OS === "ios" && onPressPrefix ? readyPaddingVertical : void 0,
1567
+ marginTop: import_react_native9.Platform.OS === "ios" && onPressPrefix ? readyPaddingVertical : void 0,
1494
1568
  children: prefix
1495
1569
  }
1496
1570
  ) : prefix
1497
1571
  }
1498
1572
  ),
1499
- isIOSDateTime ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1573
+ isIOSDateTime ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1500
1574
  !iOSDateTimeFullSize ? labelComponent : void 0,
1501
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1575
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1502
1576
  import_datetimepicker.default,
1503
1577
  {
1504
1578
  value: internalDateValue ?? /* @__PURE__ */ new Date(),
@@ -1509,7 +1583,7 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1509
1583
  onChange: onChangeRNDateTimePicker
1510
1584
  }
1511
1585
  )
1512
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1586
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1513
1587
  View_default,
1514
1588
  {
1515
1589
  flex: 1,
@@ -1519,11 +1593,13 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1519
1593
  borderTopRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1520
1594
  borderBottomRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1521
1595
  pressStrength: 1,
1522
- onPress: import_react_native8.Platform.OS === "android" ? editable === false || withPressInputField ? onPressInputField : void 0 : void 0,
1523
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1596
+ onPress: import_react_native9.Platform.OS === "android" ? editable === false || withPressInputField ? onPressInputField : void 0 : void 0,
1597
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1524
1598
  Animate_default.View,
1525
1599
  {
1600
+ position: "relative",
1526
1601
  flex: 1,
1602
+ justifyContent: "center",
1527
1603
  backgroundColor: theme2.colors.backgroundContent,
1528
1604
  borderTopLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1529
1605
  borderBottomLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
@@ -1533,44 +1609,68 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1533
1609
  initialBorderColor: theme2.colors.border,
1534
1610
  animateBorderColor: isFocused ? theme2.colors.primary : isError ? theme2.colors.error : theme2.colors.border,
1535
1611
  overflow: "hidden",
1536
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1537
- import_react_native8.TextInput,
1538
- {
1539
- style: textInputStyle,
1540
- value: internalValue,
1541
- defaultValue,
1542
- autoCapitalize,
1543
- autoComplete,
1544
- autoCorrect,
1545
- autoFocus,
1546
- placeholder: placeholder ?? label,
1547
- placeholderTextColor: theme2.colors.textSecondary + "80",
1548
- enterKeyHint: returnKeyLabel,
1549
- returnKeyType,
1550
- onSubmitEditing: onPressEnter,
1551
- readOnly: !editable || disabled || type === "date" || type === "time",
1552
- textAlign,
1553
- editable: !disabled,
1554
- keyboardAppearance,
1555
- keyboardType,
1556
- cursorColor: theme2.colors.primary,
1557
- selectionColor: theme2.colors.primary,
1558
- secureTextEntry,
1559
- onFocus: onFocusElement,
1560
- onBlur: onBlurElement,
1561
- onChangeText,
1562
- maxLength,
1563
- multiline,
1564
- numberOfLines,
1565
- onPress: withPressInputField ? onPressInputField : void 0,
1566
- ref: textInputRef
1567
- }
1568
- )
1612
+ children: [
1613
+ leftIcon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1614
+ Icon_default,
1615
+ {
1616
+ position: "absolute",
1617
+ left: iconSideSpace,
1618
+ name: leftIcon,
1619
+ nameIOS: leftIconIOS,
1620
+ size: iconSize,
1621
+ pointerEvents: "box-none"
1622
+ }
1623
+ ),
1624
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1625
+ import_react_native9.TextInput,
1626
+ {
1627
+ style: textInputStyle,
1628
+ value: internalValue,
1629
+ defaultValue,
1630
+ autoCapitalize,
1631
+ autoComplete,
1632
+ autoCorrect,
1633
+ autoFocus,
1634
+ placeholder: placeholder ?? label,
1635
+ placeholderTextColor: theme2.colors.textSecondary + "80",
1636
+ enterKeyHint: returnKeyLabel,
1637
+ returnKeyType,
1638
+ onSubmitEditing: onPressEnter,
1639
+ readOnly: !editable || disabled || type === "date" || type === "time",
1640
+ textAlign,
1641
+ editable: !disabled,
1642
+ keyboardAppearance,
1643
+ keyboardType,
1644
+ cursorColor: theme2.colors.primary,
1645
+ selectionColor: theme2.colors.primary,
1646
+ secureTextEntry,
1647
+ onFocus: onFocusElement,
1648
+ onBlur: onBlurElement,
1649
+ onChangeText,
1650
+ maxLength,
1651
+ multiline,
1652
+ numberOfLines,
1653
+ onPress: withPressInputField ? onPressInputField : void 0,
1654
+ ref: textInputRef
1655
+ }
1656
+ ),
1657
+ rightIcon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1658
+ Icon_default,
1659
+ {
1660
+ position: "absolute",
1661
+ right: iconSideSpace,
1662
+ name: rightIcon,
1663
+ nameIOS: rightIconIOS,
1664
+ size: iconSize,
1665
+ pointerEvents: "box-none"
1666
+ }
1667
+ )
1668
+ ]
1569
1669
  }
1570
1670
  )
1571
1671
  }
1572
1672
  ),
1573
- suffix && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1673
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1574
1674
  View_default,
1575
1675
  {
1576
1676
  isRow: true,
@@ -1584,19 +1684,19 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1584
1684
  borderColor: theme2.colors.border,
1585
1685
  paddingHorizontal: readyPaddingHorizontal,
1586
1686
  onPress: onPressSuffix,
1587
- children: typeof suffix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1687
+ children: typeof suffix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1588
1688
  Text_default,
1589
1689
  {
1590
1690
  fontWeight: 700,
1591
1691
  lineHeight,
1592
- marginTop: import_react_native8.Platform.OS === "ios" && onPressSuffix ? readyPaddingVertical : void 0,
1692
+ marginTop: import_react_native9.Platform.OS === "ios" && onPressSuffix ? readyPaddingVertical : void 0,
1593
1693
  children: suffix
1594
1694
  }
1595
1695
  ) : suffix
1596
1696
  }
1597
1697
  )
1598
1698
  ] }),
1599
- infoMessage && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1699
+ infoMessage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1600
1700
  Animate_default.Text,
1601
1701
  {
1602
1702
  fontSize: 14,
@@ -1608,7 +1708,7 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1608
1708
  children: infoMessage
1609
1709
  }
1610
1710
  ),
1611
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1711
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1612
1712
  Animate_default.Text,
1613
1713
  {
1614
1714
  fontSize: 14,
@@ -1625,8 +1725,8 @@ var InputFieldComponent = (0, import_react10.forwardRef)(
1625
1725
  );
1626
1726
  }
1627
1727
  );
1628
- InputFieldComponent.email = (0, import_react10.forwardRef)(function Email(props, ref) {
1629
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1728
+ InputFieldComponent.email = (0, import_react12.forwardRef)(function Email(props, ref) {
1729
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1630
1730
  InputFieldComponent,
1631
1731
  {
1632
1732
  placeholder: "your@email.here",
@@ -1639,8 +1739,8 @@ InputFieldComponent.email = (0, import_react10.forwardRef)(function Email(props,
1639
1739
  }
1640
1740
  );
1641
1741
  });
1642
- InputFieldComponent.password = (0, import_react10.forwardRef)(function Password(props, ref) {
1643
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1742
+ InputFieldComponent.password = (0, import_react12.forwardRef)(function Password(props, ref) {
1743
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1644
1744
  InputFieldComponent,
1645
1745
  {
1646
1746
  secureTextEntry: true,
@@ -1653,11 +1753,15 @@ InputFieldComponent.password = (0, import_react10.forwardRef)(function Password(
1653
1753
  }
1654
1754
  );
1655
1755
  });
1656
- InputFieldComponent.code = (0, import_react10.forwardRef)(function Password2({ isSmall, ...props }, ref) {
1657
- const theme2 = (0, import_react_better_core9.useTheme)();
1658
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1756
+ InputFieldComponent.search = (0, import_react12.forwardRef)(function Search(props, ref) {
1757
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InputFieldComponent, { placeholder: "Search...", leftIcon: "magnifyingGlass", ...props, ref });
1758
+ });
1759
+ InputFieldComponent.code = (0, import_react12.forwardRef)(function Password2({ isSmall, ...props }, ref) {
1760
+ const theme2 = (0, import_react_better_core10.useTheme)();
1761
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1659
1762
  InputFieldComponent,
1660
1763
  {
1764
+ flex: 1,
1661
1765
  fontSize: isSmall ? 36 : 42,
1662
1766
  fontWeight: 900,
1663
1767
  lineHeight: isSmall ? 42 : 50,
@@ -1669,29 +1773,30 @@ InputFieldComponent.code = (0, import_react10.forwardRef)(function Password2({ i
1669
1773
  }
1670
1774
  );
1671
1775
  });
1672
- var InputField = (0, import_react10.memo)(InputFieldComponent);
1776
+ var InputField = (0, import_react12.memo)(InputFieldComponent);
1673
1777
  InputField.email = InputFieldComponent.email;
1674
1778
  InputField.password = InputFieldComponent.password;
1779
+ InputField.search = InputFieldComponent.search;
1675
1780
  InputField.code = InputFieldComponent.code;
1676
1781
  var InputField_default = InputField;
1677
1782
 
1678
1783
  // src/components/StatusBar.tsx
1679
- var import_react11 = require("react");
1680
- var import_react_better_core10 = require("react-better-core");
1681
- var import_react_native9 = require("react-native");
1682
- var import_jsx_runtime10 = require("react/jsx-runtime");
1784
+ var import_react13 = require("react");
1785
+ var import_react_better_core11 = require("react-better-core");
1786
+ var import_react_native10 = require("react-native");
1787
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1683
1788
  function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }) {
1684
- const theme2 = (0, import_react_better_core10.useTheme)();
1685
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1686
- import_react_native9.StatusBar,
1789
+ const theme2 = (0, import_react_better_core11.useTheme)();
1790
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1791
+ import_react_native10.StatusBar,
1687
1792
  {
1688
1793
  backgroundColor: darkStatusBar ? theme2.colors.backgroundSecondary : void 0,
1689
- barStyle: barStyle ?? (import_react_native9.Platform.OS === "android" ? androidBarStyle : iOSBarStyle),
1794
+ barStyle: barStyle ?? (import_react_native10.Platform.OS === "android" ? androidBarStyle : iOSBarStyle),
1690
1795
  hidden
1691
1796
  }
1692
1797
  );
1693
1798
  }
1694
- var StatusBar_default = (0, import_react11.memo)(StatusBar);
1799
+ var StatusBar_default = (0, import_react13.memo)(StatusBar);
1695
1800
 
1696
1801
  // src/plugins/asyncStorage.ts
1697
1802
  var defaultAsyncStoragePluginOptions = {};
@@ -1710,6 +1815,7 @@ var asyncStoragePlugin = (options) => ({
1710
1815
  Animate,
1711
1816
  BetterComponentsProvider,
1712
1817
  Button,
1818
+ Icon,
1713
1819
  Image,
1714
1820
  InputField,
1715
1821
  Loader,