react-native-better-html 1.0.19 → 1.0.21
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1297,6 +1297,7 @@ var getAlertDurationFromAuto = (duration, alert) => {
|
|
|
1297
1297
|
};
|
|
1298
1298
|
function Alert({ alert }) {
|
|
1299
1299
|
const theme2 = useTheme8();
|
|
1300
|
+
const device = useDevice();
|
|
1300
1301
|
const alertControls2 = useAlertControls();
|
|
1301
1302
|
const alertsPlugin2 = usePlugin("alerts");
|
|
1302
1303
|
const pluginConfig = alertsPlugin2?.getConfig() ?? {};
|
|
@@ -1349,9 +1350,12 @@ function Alert({ alert }) {
|
|
|
1349
1350
|
clearTimeout(timeout);
|
|
1350
1351
|
};
|
|
1351
1352
|
}, [onPressCloseAlert, defaultAlertDurationNumber]);
|
|
1353
|
+
const iconSize = 16;
|
|
1354
|
+
const iconPadding = (theme2.styles.space + theme2.styles.gap) / 2;
|
|
1352
1355
|
return defaultAlertDisplay === "prominent" ? /* @__PURE__ */ jsx8(Fragment2, {}) : /* @__PURE__ */ jsx8(
|
|
1353
1356
|
Animate_default.View,
|
|
1354
1357
|
{
|
|
1358
|
+
maxWidth: "100%",
|
|
1355
1359
|
initialOpacity: 0,
|
|
1356
1360
|
animateOpacity: isRemoved ? 0 : 1,
|
|
1357
1361
|
initialX: 40,
|
|
@@ -1364,20 +1368,29 @@ function Alert({ alert }) {
|
|
|
1364
1368
|
justifyContent: "center",
|
|
1365
1369
|
backgroundColor: alertData[alert.type].backgroundColor,
|
|
1366
1370
|
borderRadius: 999,
|
|
1367
|
-
padding:
|
|
1371
|
+
padding: iconPadding,
|
|
1368
1372
|
children: /* @__PURE__ */ jsx8(
|
|
1369
1373
|
Icon_default,
|
|
1370
1374
|
{
|
|
1371
1375
|
name: alertData[alert.type].icon,
|
|
1376
|
+
nameIOS: alertData[alert.type].iconIOS,
|
|
1377
|
+
size: iconSize,
|
|
1372
1378
|
color: alertData[alert.type].iconColor ?? theme2.colors.base
|
|
1373
1379
|
}
|
|
1374
1380
|
)
|
|
1375
1381
|
}
|
|
1376
1382
|
),
|
|
1377
|
-
/* @__PURE__ */ jsxs3(
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1383
|
+
/* @__PURE__ */ jsxs3(
|
|
1384
|
+
View_default,
|
|
1385
|
+
{
|
|
1386
|
+
maxWidth: device.windowDimensions.width - theme2.styles.space - theme2.styles.space - (iconPadding + iconSize + iconPadding) - theme2.styles.space - 60 - theme2.styles.space - theme2.styles.space - theme2.styles.space,
|
|
1387
|
+
gap: theme2.styles.gap / 3,
|
|
1388
|
+
children: [
|
|
1389
|
+
/* @__PURE__ */ jsx8(Text_default, { fontSize: 18, fontWeight: 700, children: alert.title ?? alertData[alert.type].title }),
|
|
1390
|
+
/* @__PURE__ */ jsx8(Text_default.body, { children: alert.message })
|
|
1391
|
+
]
|
|
1392
|
+
}
|
|
1393
|
+
),
|
|
1381
1394
|
pluginConfig.withCloseButton && /* @__PURE__ */ jsx8(Button_default.icon, { icon: "XMark", onPress: onPressCloseAlert })
|
|
1382
1395
|
] }) })
|
|
1383
1396
|
}
|
|
@@ -1578,6 +1591,7 @@ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
|
1578
1591
|
var ScreenHolderComponent = ({
|
|
1579
1592
|
noScroll,
|
|
1580
1593
|
noSideSpace,
|
|
1594
|
+
noTopSpace,
|
|
1581
1595
|
refreshTimeout = 1,
|
|
1582
1596
|
onRefresh,
|
|
1583
1597
|
onRefreshEnd,
|
|
@@ -1614,7 +1628,7 @@ var ScreenHolderComponent = ({
|
|
|
1614
1628
|
{
|
|
1615
1629
|
flex: 1,
|
|
1616
1630
|
paddingHorizontal: !noSideSpace ? theme2.styles.space : void 0,
|
|
1617
|
-
paddingTop: theme2.styles.gap + (insideTopSafeArea ? device.safeArea.afterCalculations.top : 0),
|
|
1631
|
+
paddingTop: (!noTopSpace ? theme2.styles.gap : 0) + (insideTopSafeArea ? device.safeArea.afterCalculations.top : 0),
|
|
1618
1632
|
paddingBottom: Platform4.OS === "ios" && keyboard.isOpened ? device.safeArea.afterCalculations.top : bottomSpace + (insideBottomSafeArea ? device.safeArea.afterCalculations.bottom : 0),
|
|
1619
1633
|
children
|
|
1620
1634
|
}
|