react-native-better-html 1.0.10 → 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.mjs CHANGED
@@ -1167,6 +1167,10 @@ var InputFieldComponent = forwardRef(
1167
1167
  defaultValue,
1168
1168
  value,
1169
1169
  editable = true,
1170
+ label,
1171
+ isError,
1172
+ infoMessage,
1173
+ errorMessage,
1170
1174
  autoFocus,
1171
1175
  autoCapitalize,
1172
1176
  autoComplete,
@@ -1237,81 +1241,108 @@ var InputFieldComponent = forwardRef(
1237
1241
  []
1238
1242
  );
1239
1243
  const prefixSuffixBackgroundColor = colorTheme === "light" ? darkenColor(theme2.colors.backgroundContent, 0.03) : lightenColor(theme2.colors.backgroundContent, 0.1);
1240
- return /* @__PURE__ */ jsxs4(View_default, { isRow: true, position: "relative", alignItems: "center", flex: 1, height: readyHeight, children: [
1241
- prefix && /* @__PURE__ */ jsx9(
1242
- View_default,
1243
- {
1244
- isRow: true,
1245
- height: "100%",
1246
- backgroundColor: prefixSuffixBackgroundColor,
1247
- alignItems: "center",
1248
- borderWidth,
1249
- borderRightWidth: 0,
1250
- borderTopLeftRadius: theme2.styles.borderRadius,
1251
- borderBottomLeftRadius: theme2.styles.borderRadius,
1252
- borderColor: theme2.colors.border,
1253
- paddingHorizontal: readyPaddingHorizontal,
1254
- children: /* @__PURE__ */ jsx9(Text_default, { fontWeight: 700, children: prefix })
1255
- }
1256
- ),
1257
- /* @__PURE__ */ jsx9(
1258
- Animate_default.View,
1244
+ return /* @__PURE__ */ jsxs4(View_default, { flex: 1, gap: theme2.styles.gap / 3, children: [
1245
+ label && /* @__PURE__ */ jsx9(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: label }),
1246
+ /* @__PURE__ */ jsxs4(View_default, { isRow: true, position: "relative", alignItems: "center", flex: 1, height: readyHeight, children: [
1247
+ prefix && /* @__PURE__ */ jsx9(
1248
+ View_default,
1249
+ {
1250
+ isRow: true,
1251
+ height: "100%",
1252
+ backgroundColor: prefixSuffixBackgroundColor,
1253
+ alignItems: "center",
1254
+ borderWidth,
1255
+ borderRightWidth: 0,
1256
+ borderTopLeftRadius: theme2.styles.borderRadius,
1257
+ borderBottomLeftRadius: theme2.styles.borderRadius,
1258
+ borderColor: theme2.colors.border,
1259
+ paddingHorizontal: readyPaddingHorizontal,
1260
+ children: typeof prefix === "string" ? /* @__PURE__ */ jsx9(Text_default, { fontWeight: 700, children: prefix }) : prefix
1261
+ }
1262
+ ),
1263
+ /* @__PURE__ */ jsx9(
1264
+ Animate_default.View,
1265
+ {
1266
+ flex: 1,
1267
+ backgroundColor: theme2.colors.backgroundContent,
1268
+ borderTopLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1269
+ borderBottomLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1270
+ borderTopRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1271
+ borderBottomRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1272
+ borderWidth,
1273
+ initialBorderColor: theme2.colors.border,
1274
+ animateBorderColor: isFocused ? theme2.colors.primary : isError ? theme2.colors.error : theme2.colors.border,
1275
+ overflow: "hidden",
1276
+ children: /* @__PURE__ */ jsx9(
1277
+ TextInput,
1278
+ {
1279
+ style: textInputStyle,
1280
+ value: internalValue,
1281
+ defaultValue,
1282
+ autoCapitalize,
1283
+ autoComplete,
1284
+ autoCorrect,
1285
+ autoFocus,
1286
+ placeholder,
1287
+ placeholderTextColor: theme2.colors.textSecondary + "80",
1288
+ enterKeyHint: returnKeyLabel,
1289
+ returnKeyType,
1290
+ onSubmitEditing: onPressEnter,
1291
+ readOnly: !editable,
1292
+ textAlign,
1293
+ keyboardAppearance,
1294
+ keyboardType,
1295
+ cursorColor: theme2.colors.primary,
1296
+ selectionColor: theme2.colors.primary,
1297
+ secureTextEntry,
1298
+ onFocus: onFocusElement,
1299
+ onBlur: onBlurElement,
1300
+ onChangeText,
1301
+ onPress,
1302
+ ref: textInputRef
1303
+ }
1304
+ )
1305
+ }
1306
+ ),
1307
+ suffix && /* @__PURE__ */ jsx9(
1308
+ View_default,
1309
+ {
1310
+ isRow: true,
1311
+ height: "100%",
1312
+ backgroundColor: prefixSuffixBackgroundColor,
1313
+ alignItems: "center",
1314
+ borderWidth,
1315
+ borderLeftWidth: 0,
1316
+ borderTopRightRadius: theme2.styles.borderRadius,
1317
+ borderBottomRightRadius: theme2.styles.borderRadius,
1318
+ borderColor: theme2.colors.border,
1319
+ paddingHorizontal: readyPaddingHorizontal,
1320
+ children: typeof suffix === "string" ? /* @__PURE__ */ jsx9(Text_default, { fontWeight: 700, children: suffix }) : suffix
1321
+ }
1322
+ )
1323
+ ] }),
1324
+ infoMessage && /* @__PURE__ */ jsx9(
1325
+ Animate_default.Text,
1259
1326
  {
1260
- flex: 1,
1261
- backgroundColor: theme2.colors.backgroundContent,
1262
- borderTopLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1263
- borderBottomLeftRadius: prefix ? 0 : theme2.styles.borderRadius,
1264
- borderTopRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1265
- borderBottomRightRadius: suffix ? 0 : theme2.styles.borderRadius,
1266
- borderWidth,
1267
- initialBorderColor: theme2.colors.border,
1268
- animateBorderColor: isFocused ? theme2.colors.primary : theme2.colors.border,
1269
- overflow: "hidden",
1270
- children: /* @__PURE__ */ jsx9(
1271
- TextInput,
1272
- {
1273
- style: textInputStyle,
1274
- value: internalValue,
1275
- defaultValue,
1276
- autoCapitalize,
1277
- autoComplete,
1278
- autoCorrect,
1279
- autoFocus,
1280
- placeholder,
1281
- placeholderTextColor: theme2.colors.textSecondary + "80",
1282
- enterKeyHint: returnKeyLabel,
1283
- returnKeyType,
1284
- onSubmitEditing: onPressEnter,
1285
- readOnly: !editable,
1286
- textAlign,
1287
- keyboardAppearance,
1288
- keyboardType,
1289
- cursorColor: theme2.colors.primary,
1290
- selectionColor: theme2.colors.primary,
1291
- secureTextEntry,
1292
- onFocus: onFocusElement,
1293
- onBlur: onBlurElement,
1294
- onChangeText,
1295
- onPress,
1296
- ref: textInputRef
1297
- }
1298
- )
1327
+ fontSize: 14,
1328
+ color: theme2.colors.textSecondary,
1329
+ initialHeight: 0,
1330
+ initialOpacity: 0,
1331
+ animateHeight: 17,
1332
+ animateOpacity: 1,
1333
+ children: infoMessage
1299
1334
  }
1300
1335
  ),
1301
- suffix && /* @__PURE__ */ jsx9(
1302
- View_default,
1336
+ errorMessage && /* @__PURE__ */ jsx9(
1337
+ Animate_default.Text,
1303
1338
  {
1304
- isRow: true,
1305
- height: "100%",
1306
- backgroundColor: prefixSuffixBackgroundColor,
1307
- alignItems: "center",
1308
- borderWidth,
1309
- borderLeftWidth: 0,
1310
- borderTopRightRadius: theme2.styles.borderRadius,
1311
- borderBottomRightRadius: theme2.styles.borderRadius,
1312
- borderColor: theme2.colors.border,
1313
- paddingHorizontal: readyPaddingHorizontal,
1314
- children: /* @__PURE__ */ jsx9(Text_default, { fontWeight: 700, children: suffix })
1339
+ fontSize: 14,
1340
+ color: theme2.colors.error,
1341
+ initialHeight: 0,
1342
+ initialOpacity: 0,
1343
+ animateHeight: 17,
1344
+ animateOpacity: 1,
1345
+ children: errorMessage
1315
1346
  }
1316
1347
  )
1317
1348
  ] });
@@ -1345,15 +1376,16 @@ InputFieldComponent.password = forwardRef(function Password(props, ref) {
1345
1376
  }
1346
1377
  );
1347
1378
  });
1348
- InputFieldComponent.code = forwardRef(function Password2(props, ref) {
1379
+ InputFieldComponent.code = forwardRef(function Password2({ isSmall, ...props }, ref) {
1349
1380
  const theme2 = useTheme8();
1350
1381
  return /* @__PURE__ */ jsx9(
1351
1382
  InputFieldComponent,
1352
1383
  {
1353
- fontSize: 42,
1384
+ fontSize: isSmall ? 36 : 42,
1354
1385
  fontWeight: 900,
1355
- lineHeight: 50,
1356
- paddingVertical: theme2.styles.space * 2,
1386
+ lineHeight: isSmall ? 42 : 50,
1387
+ paddingVertical: isSmall ? theme2.styles.space : theme2.styles.space * 2,
1388
+ paddingHorizontal: isSmall ? theme2.styles.gap : void 0,
1357
1389
  textAlign: "center",
1358
1390
  ...props,
1359
1391
  ref
@@ -1369,14 +1401,15 @@ var InputField_default = InputField;
1369
1401
  // src/components/StatusBar.tsx
1370
1402
  import { memo as memo10 } from "react";
1371
1403
  import { useTheme as useTheme9 } from "react-better-core";
1372
- import { StatusBar as NativeStatusBar } from "react-native";
1404
+ import { StatusBar as NativeStatusBar, Platform as Platform4 } from "react-native";
1373
1405
  import { jsx as jsx10 } from "react/jsx-runtime";
1374
- function StatusBar({ darkStatusBar, hidden }) {
1406
+ function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }) {
1375
1407
  const theme2 = useTheme9();
1376
1408
  return /* @__PURE__ */ jsx10(
1377
1409
  NativeStatusBar,
1378
1410
  {
1379
1411
  backgroundColor: darkStatusBar ? theme2.colors.backgroundSecondary : void 0,
1412
+ barStyle: barStyle ?? (Platform4.OS === "android" ? androidBarStyle : iOSBarStyle),
1380
1413
  hidden
1381
1414
  }
1382
1415
  );