@blinkdotnew/mobile-ui 2.0.0-alpha.10 → 2.0.0-alpha.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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +100 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +100 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1318,31 +1318,44 @@ function AppHeader({ title, subtitle, variant = "simple", onBack, avatar, left,
|
|
|
1318
1318
|
import { Sheet, SizableText as SizableText24, XStack as XStack16, YStack as YStack21 } from "tamagui";
|
|
1319
1319
|
import { ScrollView as ScrollView2 } from "react-native";
|
|
1320
1320
|
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1321
|
-
function BottomSheet({ open, onOpenChange, title, children, snapPoints = [85], dismissOnSnapToBottom = true, showHandle = true, showClose = false }) {
|
|
1322
|
-
return /* @__PURE__ */ jsxs20(
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1321
|
+
function BottomSheet({ open, onOpenChange, title, children, snapPoints = [85], dismissOnSnapToBottom = true, showHandle = true, showClose = false, zIndex = 1e5 }) {
|
|
1322
|
+
return /* @__PURE__ */ jsxs20(
|
|
1323
|
+
Sheet,
|
|
1324
|
+
{
|
|
1325
|
+
modal: true,
|
|
1326
|
+
forceRemoveScrollEnabled: open,
|
|
1327
|
+
open,
|
|
1328
|
+
onOpenChange,
|
|
1329
|
+
snapPoints,
|
|
1330
|
+
dismissOnSnapToBottom,
|
|
1331
|
+
zIndex,
|
|
1332
|
+
animation: "medium",
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ jsx27(Sheet.Overlay, { animation: "lazy", enterStyle: { opacity: 0 }, exitStyle: { opacity: 0 } }),
|
|
1335
|
+
showHandle && /* @__PURE__ */ jsx27(Sheet.Handle, {}),
|
|
1336
|
+
/* @__PURE__ */ jsxs20(Sheet.Frame, { children: [
|
|
1337
|
+
(title || showClose) && /* @__PURE__ */ jsxs20(XStack16, { paddingHorizontal: "$4", paddingTop: "$3", paddingBottom: "$2", alignItems: "center", justifyContent: "space-between", children: [
|
|
1338
|
+
/* @__PURE__ */ jsx27(SizableText24, { size: "$6", fontWeight: "600", flexShrink: 1, children: title }),
|
|
1339
|
+
showClose && /* @__PURE__ */ jsx27(
|
|
1340
|
+
XStack16,
|
|
1341
|
+
{
|
|
1342
|
+
width: 28,
|
|
1343
|
+
height: 28,
|
|
1344
|
+
borderRadius: "$10",
|
|
1345
|
+
backgroundColor: "$color4",
|
|
1346
|
+
alignItems: "center",
|
|
1347
|
+
justifyContent: "center",
|
|
1348
|
+
pressStyle: { opacity: 0.7 },
|
|
1349
|
+
onPress: () => onOpenChange(false),
|
|
1350
|
+
children: /* @__PURE__ */ jsx27(SizableText24, { size: "$3", color: "$color10", fontWeight: "600", children: "\u2715" })
|
|
1351
|
+
}
|
|
1352
|
+
)
|
|
1353
|
+
] }),
|
|
1354
|
+
/* @__PURE__ */ jsx27(ScrollView2, { contentContainerStyle: { paddingBottom: 40 }, children: /* @__PURE__ */ jsx27(YStack21, { padding: "$4", children }) })
|
|
1355
|
+
] })
|
|
1356
|
+
]
|
|
1357
|
+
}
|
|
1358
|
+
);
|
|
1346
1359
|
}
|
|
1347
1360
|
|
|
1348
1361
|
// src/patterns/LoginScreen.tsx
|
|
@@ -1498,55 +1511,68 @@ function FloatingActionButton({ icon, label, onPress, position = "bottom-right",
|
|
|
1498
1511
|
// src/patterns/ActionSheet.tsx
|
|
1499
1512
|
import { Sheet as Sheet2, SizableText as SizableText29, XStack as XStack21, YStack as YStack24 } from "tamagui";
|
|
1500
1513
|
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1501
|
-
function ActionSheet({ open, onOpenChange, title, items, onSelect, cancelLabel = "Cancel" }) {
|
|
1502
|
-
return /* @__PURE__ */ jsxs25(
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1514
|
+
function ActionSheet({ open, onOpenChange, title, items, onSelect, cancelLabel = "Cancel", zIndex = 1e5 }) {
|
|
1515
|
+
return /* @__PURE__ */ jsxs25(
|
|
1516
|
+
Sheet2,
|
|
1517
|
+
{
|
|
1518
|
+
modal: true,
|
|
1519
|
+
forceRemoveScrollEnabled: open,
|
|
1520
|
+
open,
|
|
1521
|
+
onOpenChange,
|
|
1522
|
+
snapPoints: [50],
|
|
1523
|
+
dismissOnSnapToBottom: true,
|
|
1524
|
+
zIndex,
|
|
1525
|
+
animation: "medium",
|
|
1526
|
+
children: [
|
|
1527
|
+
/* @__PURE__ */ jsx32(Sheet2.Overlay, { animation: "lazy", enterStyle: { opacity: 0 }, exitStyle: { opacity: 0 } }),
|
|
1528
|
+
/* @__PURE__ */ jsx32(Sheet2.Handle, {}),
|
|
1529
|
+
/* @__PURE__ */ jsxs25(Sheet2.Frame, { children: [
|
|
1530
|
+
title && /* @__PURE__ */ jsx32(SizableText29, { size: "$3", color: "$color8", textAlign: "center", paddingTop: "$3", paddingBottom: "$1", children: title }),
|
|
1531
|
+
/* @__PURE__ */ jsx32(YStack24, { paddingHorizontal: "$3", paddingTop: "$2", children: items.map((item) => /* @__PURE__ */ jsxs25(
|
|
1532
|
+
XStack21,
|
|
1533
|
+
{
|
|
1534
|
+
height: 52,
|
|
1535
|
+
alignItems: "center",
|
|
1536
|
+
gap: "$3",
|
|
1537
|
+
paddingHorizontal: "$3",
|
|
1538
|
+
borderRadius: "$4",
|
|
1539
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1540
|
+
onPress: () => {
|
|
1541
|
+
onSelect(item.id);
|
|
1542
|
+
onOpenChange(false);
|
|
1543
|
+
},
|
|
1544
|
+
children: [
|
|
1545
|
+
item.icon && /* @__PURE__ */ jsx32(SizableText29, { size: "$5", children: item.icon }),
|
|
1546
|
+
/* @__PURE__ */ jsx32(
|
|
1547
|
+
SizableText29,
|
|
1548
|
+
{
|
|
1549
|
+
size: "$5",
|
|
1550
|
+
flex: 1,
|
|
1551
|
+
color: item.destructive ? "$red9" : "$color12",
|
|
1552
|
+
fontWeight: item.destructive ? "600" : "400",
|
|
1553
|
+
children: item.label
|
|
1554
|
+
}
|
|
1555
|
+
)
|
|
1556
|
+
]
|
|
1557
|
+
},
|
|
1558
|
+
item.id
|
|
1559
|
+
)) }),
|
|
1560
|
+
/* @__PURE__ */ jsx32(YStack24, { paddingHorizontal: "$3", paddingVertical: "$3", borderTopWidth: 1, borderTopColor: "$borderColor", marginTop: "$2", children: /* @__PURE__ */ jsx32(
|
|
1561
|
+
XStack21,
|
|
1562
|
+
{
|
|
1563
|
+
height: 48,
|
|
1564
|
+
alignItems: "center",
|
|
1565
|
+
justifyContent: "center",
|
|
1566
|
+
borderRadius: "$4",
|
|
1567
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1568
|
+
onPress: () => onOpenChange(false),
|
|
1569
|
+
children: /* @__PURE__ */ jsx32(SizableText29, { size: "$5", fontWeight: "600", color: "$color9", children: cancelLabel })
|
|
1570
|
+
}
|
|
1571
|
+
) })
|
|
1572
|
+
] })
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
);
|
|
1550
1576
|
}
|
|
1551
1577
|
|
|
1552
1578
|
// src/patterns/Skeleton.tsx
|