@boostdev/design-system-react-native 0.5.0 → 0.6.0
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/CHANGELOG.md +70 -0
- package/README.md +35 -1
- package/dist/index.cjs +596 -545
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +488 -437
- package/package.json +1 -1
- package/src/components/interaction/Button/Button.mdx +13 -1
- package/src/components/interaction/Button/Button.spec.tsx +83 -0
- package/src/components/interaction/Button/Button.tsx +9 -8
- package/src/components/interaction/form/Combobox/Combobox.spec.tsx +22 -0
- package/src/components/interaction/form/Combobox/Combobox.tsx +4 -3
- package/src/components/interaction/form/FileInput/FileInput.spec.tsx +18 -0
- package/src/components/interaction/form/FileInput/FileInput.tsx +3 -3
- package/src/components/interaction/form/FormInput/FormInput.spec.tsx +20 -0
- package/src/components/interaction/form/FormInput/FormInput.tsx +5 -4
- package/src/components/interaction/form/NumberInput/NumberInput.spec.tsx +21 -0
- package/src/components/interaction/form/NumberInput/NumberInput.tsx +7 -6
- package/src/components/interaction/form/Select/Select.mdx +2 -1
- package/src/components/interaction/form/Select/Select.spec.tsx +35 -1
- package/src/components/interaction/form/Select/Select.tsx +8 -7
- package/src/components/interaction/form/Textarea/Textarea.spec.tsx +18 -0
- package/src/components/interaction/form/Textarea/Textarea.tsx +3 -3
- package/src/components/ui/Collapsible/Collapsible.spec.tsx +1 -1
- package/src/components/ui/Collapsible/Collapsible.tsx +5 -10
- package/src/index.ts +1 -1
- package/src/native/Chevron.spec.tsx +34 -0
- package/src/native/Chevron.tsx +50 -0
- package/src/native/ThemeContext.spec.tsx +81 -1
- package/src/native/ThemeContext.tsx +32 -3
- package/src/test/cornerRadii.ts +15 -0
package/dist/index.cjs
CHANGED
|
@@ -114,15 +114,25 @@ var lineHeight = {
|
|
|
114
114
|
|
|
115
115
|
// src/native/ThemeContext.tsx
|
|
116
116
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
117
|
+
var defaultRadius = {
|
|
118
|
+
button: import_native.border.radius.m,
|
|
119
|
+
iconButton: import_native.border.radius.full,
|
|
120
|
+
field: import_native.border.radius.m
|
|
121
|
+
};
|
|
117
122
|
var ThemeContext = (0, import_react.createContext)(null);
|
|
118
123
|
function ThemeProvider({ children, colorScheme, tokens }) {
|
|
119
124
|
const systemScheme = (0, import_react_native.useColorScheme)();
|
|
120
125
|
const isDark = (colorScheme ?? systemScheme) === "dark";
|
|
126
|
+
const parentRadius = (0, import_react.useContext)(ThemeContext)?.radius ?? defaultRadius;
|
|
121
127
|
const value = (0, import_react.useMemo)(() => {
|
|
122
128
|
const base = isDark ? import_native.colors.dark : import_native.colors.light;
|
|
123
129
|
const overrides = isDark ? tokens?.dark : tokens?.light;
|
|
124
|
-
return {
|
|
125
|
-
|
|
130
|
+
return {
|
|
131
|
+
colors: { ...base, ...overrides },
|
|
132
|
+
isDark,
|
|
133
|
+
radius: { ...parentRadius, ...tokens?.radius }
|
|
134
|
+
};
|
|
135
|
+
}, [isDark, tokens, parentRadius]);
|
|
126
136
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value, children });
|
|
127
137
|
}
|
|
128
138
|
function useTheme() {
|
|
@@ -1162,12 +1172,50 @@ function Pagination({
|
|
|
1162
1172
|
|
|
1163
1173
|
// src/components/ui/Collapsible/Collapsible.tsx
|
|
1164
1174
|
var import_react5 = require("react");
|
|
1175
|
+
var import_react_native19 = require("react-native");
|
|
1176
|
+
|
|
1177
|
+
// src/native/Chevron.tsx
|
|
1165
1178
|
var import_react_native18 = require("react-native");
|
|
1166
1179
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1180
|
+
var SIZE = 8;
|
|
1181
|
+
var STROKE = 1.5;
|
|
1182
|
+
var CENTRE_SHIFT = -(SIZE - STROKE) / 4;
|
|
1170
1183
|
var styles15 = import_react_native18.StyleSheet.create({
|
|
1184
|
+
chevron: {
|
|
1185
|
+
// Border-box chevron (no glyph font dependency): a small square with two
|
|
1186
|
+
// adjacent borders, rotated to form a crisp "›" / "⌄" indicator.
|
|
1187
|
+
width: SIZE,
|
|
1188
|
+
height: SIZE,
|
|
1189
|
+
borderRightWidth: STROKE,
|
|
1190
|
+
borderBottomWidth: STROKE
|
|
1191
|
+
}
|
|
1192
|
+
});
|
|
1193
|
+
function Chevron({ color, rotate = "45deg", testID, style }) {
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1195
|
+
import_react_native18.Animated.View,
|
|
1196
|
+
{
|
|
1197
|
+
testID,
|
|
1198
|
+
style: [
|
|
1199
|
+
styles15.chevron,
|
|
1200
|
+
{
|
|
1201
|
+
borderColor: color,
|
|
1202
|
+
transform: [{ rotate }, { translateX: CENTRE_SHIFT }, { translateY: CENTRE_SHIFT }]
|
|
1203
|
+
},
|
|
1204
|
+
style
|
|
1205
|
+
],
|
|
1206
|
+
"aria-hidden": true,
|
|
1207
|
+
importantForAccessibility: "no-hide-descendants",
|
|
1208
|
+
accessibilityElementsHidden: true
|
|
1209
|
+
}
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
// src/components/ui/Collapsible/Collapsible.tsx
|
|
1214
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1215
|
+
if (import_react_native19.Platform.OS === "android" && import_react_native19.UIManager.setLayoutAnimationEnabledExperimental) {
|
|
1216
|
+
import_react_native19.UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
1217
|
+
}
|
|
1218
|
+
var styles16 = import_react_native19.StyleSheet.create({
|
|
1171
1219
|
container: {
|
|
1172
1220
|
borderRadius: import_native.border.radius.m,
|
|
1173
1221
|
overflow: "hidden"
|
|
@@ -1188,12 +1236,6 @@ var styles15 = import_react_native18.StyleSheet.create({
|
|
|
1188
1236
|
lineHeight: lineHeight.body
|
|
1189
1237
|
},
|
|
1190
1238
|
chevron: {
|
|
1191
|
-
// Border-box chevron (no glyph font dependency): a small square with two
|
|
1192
|
-
// adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
|
|
1193
|
-
width: 8,
|
|
1194
|
-
height: 8,
|
|
1195
|
-
borderRightWidth: 2,
|
|
1196
|
-
borderBottomWidth: 2,
|
|
1197
1239
|
marginStart: import_native.spacing.xs
|
|
1198
1240
|
},
|
|
1199
1241
|
content: {
|
|
@@ -1218,11 +1260,11 @@ function Collapsible({
|
|
|
1218
1260
|
const [internalOpen, setInternalOpen] = (0, import_react5.useState)(defaultOpen);
|
|
1219
1261
|
const isControlled = controlledOpen !== void 0;
|
|
1220
1262
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
1221
|
-
const rotation = (0, import_react5.useRef)(new
|
|
1263
|
+
const rotation = (0, import_react5.useRef)(new import_react_native19.Animated.Value(isOpen ? 1 : 0)).current;
|
|
1222
1264
|
const toggle = (0, import_react5.useCallback)(() => {
|
|
1223
1265
|
const next = !isOpen;
|
|
1224
|
-
|
|
1225
|
-
|
|
1266
|
+
import_react_native19.LayoutAnimation.configureNext(import_react_native19.LayoutAnimation.Presets.easeInEaseOut);
|
|
1267
|
+
import_react_native19.Animated.timing(rotation, {
|
|
1226
1268
|
toValue: next ? 1 : 0,
|
|
1227
1269
|
duration: 200,
|
|
1228
1270
|
useNativeDriver: true
|
|
@@ -1236,35 +1278,35 @@ function Collapsible({
|
|
|
1236
1278
|
inputRange: [0, 1],
|
|
1237
1279
|
outputRange: ["-45deg", "45deg"]
|
|
1238
1280
|
});
|
|
1239
|
-
return /* @__PURE__ */ (0,
|
|
1240
|
-
|
|
1281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1282
|
+
import_react_native19.View,
|
|
1241
1283
|
{
|
|
1242
|
-
style: [
|
|
1284
|
+
style: [styles16.container, { borderBottomWidth: 1, borderBottomColor: colors2.colorBgSubtle }, style],
|
|
1243
1285
|
accessibilityRole: "summary",
|
|
1244
1286
|
children: [
|
|
1245
|
-
/* @__PURE__ */ (0,
|
|
1246
|
-
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1288
|
+
import_react_native19.Pressable,
|
|
1247
1289
|
{
|
|
1248
1290
|
onPress: toggle,
|
|
1249
1291
|
accessibilityRole: "button",
|
|
1250
1292
|
accessibilityLabel: summary,
|
|
1251
1293
|
accessibilityState: { expanded: isOpen },
|
|
1252
|
-
style: ({ pressed }) => [
|
|
1294
|
+
style: ({ pressed }) => [styles16.header, pressed && styles16.pressed],
|
|
1253
1295
|
children: [
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
1256
|
-
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ScaledText, { style: [styles16.summaryText, { color: colors2.colorOnBg }], children: summary }),
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1298
|
+
Chevron,
|
|
1257
1299
|
{
|
|
1258
1300
|
testID: "bds-collapsible-chevron",
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1301
|
+
color: colors2.colorOnBgSubtle,
|
|
1302
|
+
rotate,
|
|
1303
|
+
style: styles16.chevron
|
|
1262
1304
|
}
|
|
1263
1305
|
)
|
|
1264
1306
|
]
|
|
1265
1307
|
}
|
|
1266
1308
|
),
|
|
1267
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1309
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: styles16.content, children })
|
|
1268
1310
|
]
|
|
1269
1311
|
}
|
|
1270
1312
|
);
|
|
@@ -1272,12 +1314,12 @@ function Collapsible({
|
|
|
1272
1314
|
|
|
1273
1315
|
// src/components/ui/Accordion/Accordion.tsx
|
|
1274
1316
|
var import_react6 = require("react");
|
|
1275
|
-
var
|
|
1276
|
-
var
|
|
1277
|
-
if (
|
|
1278
|
-
|
|
1317
|
+
var import_react_native20 = require("react-native");
|
|
1318
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1319
|
+
if (import_react_native20.Platform.OS === "android" && import_react_native20.UIManager.setLayoutAnimationEnabledExperimental) {
|
|
1320
|
+
import_react_native20.UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
1279
1321
|
}
|
|
1280
|
-
var
|
|
1322
|
+
var styles17 = import_react_native20.StyleSheet.create({
|
|
1281
1323
|
container: {
|
|
1282
1324
|
overflow: "hidden",
|
|
1283
1325
|
borderRadius: import_native.border.radius.s
|
|
@@ -1324,43 +1366,43 @@ function Accordion({
|
|
|
1324
1366
|
const { colors: colors2 } = useTheme();
|
|
1325
1367
|
const [openIds, setOpenIds] = (0, import_react6.useState)(defaultOpen);
|
|
1326
1368
|
const toggle = (id) => {
|
|
1327
|
-
|
|
1369
|
+
import_react_native20.LayoutAnimation.configureNext(import_react_native20.LayoutAnimation.Presets.easeInEaseOut);
|
|
1328
1370
|
setOpenIds((prev) => {
|
|
1329
1371
|
const isOpen = prev.includes(id);
|
|
1330
1372
|
if (isOpen) return prev.filter((i) => i !== id);
|
|
1331
1373
|
return allowMultiple ? [...prev, id] : [id];
|
|
1332
1374
|
});
|
|
1333
1375
|
};
|
|
1334
|
-
return /* @__PURE__ */ (0,
|
|
1376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: [styles17.container, style], children: items.map((item, index) => {
|
|
1335
1377
|
const isOpen = openIds.includes(item.id);
|
|
1336
1378
|
const isLast = index === items.length - 1;
|
|
1337
|
-
return /* @__PURE__ */ (0,
|
|
1338
|
-
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1380
|
+
import_react_native20.View,
|
|
1339
1381
|
{
|
|
1340
1382
|
style: [
|
|
1341
|
-
|
|
1383
|
+
styles17.item,
|
|
1342
1384
|
{ borderBottomColor: colors2.colorBgSubtle },
|
|
1343
1385
|
isLast && { borderBottomWidth: 0 }
|
|
1344
1386
|
],
|
|
1345
1387
|
children: [
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
1347
|
-
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1389
|
+
import_react_native20.Pressable,
|
|
1348
1390
|
{
|
|
1349
1391
|
onPress: () => toggle(item.id),
|
|
1350
1392
|
disabled: item.disabled,
|
|
1351
1393
|
accessibilityRole: "button",
|
|
1352
1394
|
accessibilityState: { expanded: isOpen, disabled: item.disabled },
|
|
1353
1395
|
style: ({ pressed }) => [
|
|
1354
|
-
|
|
1355
|
-
item.disabled &&
|
|
1356
|
-
pressed && !item.disabled &&
|
|
1396
|
+
styles17.header,
|
|
1397
|
+
item.disabled && styles17.disabled,
|
|
1398
|
+
pressed && !item.disabled && styles17.pressed
|
|
1357
1399
|
],
|
|
1358
1400
|
children: [
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
1360
|
-
/* @__PURE__ */ (0,
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ScaledText, { style: [styles17.titleText, { color: colors2.colorOnBg }], children: typeof item.title === "string" ? item.title : item.title }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1361
1403
|
ScaledText,
|
|
1362
1404
|
{
|
|
1363
|
-
style: [
|
|
1405
|
+
style: [styles17.chevron, { color: colors2.colorOnBgSubtle }],
|
|
1364
1406
|
importantForAccessibility: "no",
|
|
1365
1407
|
accessibilityElementsHidden: true,
|
|
1366
1408
|
children: isOpen ? "\u25BE" : "\u25B8"
|
|
@@ -1369,7 +1411,7 @@ function Accordion({
|
|
|
1369
1411
|
]
|
|
1370
1412
|
}
|
|
1371
1413
|
),
|
|
1372
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1414
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: styles17.panel, accessibilityRole: "summary", children: item.content })
|
|
1373
1415
|
]
|
|
1374
1416
|
},
|
|
1375
1417
|
item.id
|
|
@@ -1379,9 +1421,9 @@ function Accordion({
|
|
|
1379
1421
|
|
|
1380
1422
|
// src/components/ui/Tabs/Tabs.tsx
|
|
1381
1423
|
var import_react7 = require("react");
|
|
1382
|
-
var
|
|
1383
|
-
var
|
|
1384
|
-
var
|
|
1424
|
+
var import_react_native21 = require("react-native");
|
|
1425
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1426
|
+
var styles18 = import_react_native21.StyleSheet.create({
|
|
1385
1427
|
container: {
|
|
1386
1428
|
overflow: "hidden"
|
|
1387
1429
|
},
|
|
@@ -1420,18 +1462,18 @@ function Tabs({
|
|
|
1420
1462
|
}) {
|
|
1421
1463
|
const { colors: colors2 } = useTheme();
|
|
1422
1464
|
const [activeTab, setActiveTab] = (0, import_react7.useState)(defaultTab ?? tabs[0]?.id);
|
|
1423
|
-
return /* @__PURE__ */ (0,
|
|
1424
|
-
/* @__PURE__ */ (0,
|
|
1425
|
-
|
|
1465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native21.View, { style: [styles18.container, style], children: [
|
|
1466
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1467
|
+
import_react_native21.ScrollView,
|
|
1426
1468
|
{
|
|
1427
1469
|
horizontal: true,
|
|
1428
1470
|
showsHorizontalScrollIndicator: false,
|
|
1429
|
-
contentContainerStyle: [
|
|
1471
|
+
contentContainerStyle: [styles18.tabList, { borderBottomColor: colors2.colorBgSubtle }],
|
|
1430
1472
|
accessibilityRole: "tabbar",
|
|
1431
1473
|
children: tabs.map((tab) => {
|
|
1432
1474
|
const isActive = activeTab === tab.id;
|
|
1433
|
-
return /* @__PURE__ */ (0,
|
|
1434
|
-
|
|
1475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1476
|
+
import_react_native21.Pressable,
|
|
1435
1477
|
{
|
|
1436
1478
|
onPress: () => setActiveTab(tab.id),
|
|
1437
1479
|
disabled: tab.disabled,
|
|
@@ -1442,18 +1484,18 @@ function Tabs({
|
|
|
1442
1484
|
},
|
|
1443
1485
|
accessibilityLabel: typeof tab.label === "string" ? tab.label : void 0,
|
|
1444
1486
|
style: ({ pressed }) => [
|
|
1445
|
-
|
|
1487
|
+
styles18.tabButton,
|
|
1446
1488
|
{
|
|
1447
1489
|
borderBottomColor: isActive ? colors2.colorInteractive : "transparent"
|
|
1448
1490
|
},
|
|
1449
|
-
tab.disabled &&
|
|
1450
|
-
pressed && !tab.disabled &&
|
|
1491
|
+
tab.disabled && styles18.disabled,
|
|
1492
|
+
pressed && !tab.disabled && styles18.pressed
|
|
1451
1493
|
],
|
|
1452
|
-
children: /* @__PURE__ */ (0,
|
|
1494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1453
1495
|
ScaledText,
|
|
1454
1496
|
{
|
|
1455
1497
|
style: [
|
|
1456
|
-
|
|
1498
|
+
styles18.tabLabel,
|
|
1457
1499
|
{
|
|
1458
1500
|
color: isActive ? colors2.colorInteractive : colors2.colorOnBgSubtle,
|
|
1459
1501
|
fontWeight: isActive ? import_native.font.weight.semibold : import_native.font.weight.body
|
|
@@ -1471,15 +1513,15 @@ function Tabs({
|
|
|
1471
1513
|
tabs.map((tab) => {
|
|
1472
1514
|
const isActive = activeTab === tab.id;
|
|
1473
1515
|
if (!isActive) return null;
|
|
1474
|
-
return /* @__PURE__ */ (0,
|
|
1516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: styles18.panel, accessibilityRole: "tabpanel", children: tab.content }, tab.id);
|
|
1475
1517
|
})
|
|
1476
1518
|
] });
|
|
1477
1519
|
}
|
|
1478
1520
|
|
|
1479
1521
|
// src/components/ui/Table/Table.tsx
|
|
1480
|
-
var
|
|
1481
|
-
var
|
|
1482
|
-
var
|
|
1522
|
+
var import_react_native22 = require("react-native");
|
|
1523
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1524
|
+
var styles19 = import_react_native22.StyleSheet.create({
|
|
1483
1525
|
wrapper: {
|
|
1484
1526
|
borderRadius: import_native.border.radius.s,
|
|
1485
1527
|
overflow: "hidden"
|
|
@@ -1555,29 +1597,29 @@ function Table({
|
|
|
1555
1597
|
if (sortKey !== col.key) return base;
|
|
1556
1598
|
return `${base}, currently ${sortDirection === "asc" ? "ascending" : "descending"}`;
|
|
1557
1599
|
};
|
|
1558
|
-
return /* @__PURE__ */ (0,
|
|
1559
|
-
|
|
1600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1601
|
+
import_react_native22.ScrollView,
|
|
1560
1602
|
{
|
|
1561
1603
|
horizontal: true,
|
|
1562
1604
|
showsHorizontalScrollIndicator: true,
|
|
1563
|
-
style: [
|
|
1564
|
-
children: /* @__PURE__ */ (0,
|
|
1565
|
-
caption && /* @__PURE__ */ (0,
|
|
1566
|
-
/* @__PURE__ */ (0,
|
|
1567
|
-
(col) => col.sortable ? /* @__PURE__ */ (0,
|
|
1568
|
-
|
|
1605
|
+
style: [styles19.wrapper, { backgroundColor: colors2.colorBg }, style],
|
|
1606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native22.View, { children: [
|
|
1607
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScaledText, { style: [styles19.caption, { color: colors2.colorOnBgSubtle }], children: caption }),
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.View, { style: [styles19.headerRow, { backgroundColor: colors2.colorBgSubtle }], children: columns.map(
|
|
1609
|
+
(col) => col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1610
|
+
import_react_native22.Pressable,
|
|
1569
1611
|
{
|
|
1570
1612
|
onPress: () => handleSort(col.key),
|
|
1571
1613
|
accessibilityRole: "button",
|
|
1572
1614
|
accessibilityLabel: getSortLabel(col),
|
|
1573
|
-
style: ({ pressed }) => [
|
|
1615
|
+
style: ({ pressed }) => [styles19.headerCell, pressed && styles19.pressed],
|
|
1574
1616
|
children: [
|
|
1575
|
-
/* @__PURE__ */ (0,
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1617
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScaledText, { style: [styles19.headerText, { color: colors2.colorOnBg }], children: col.header }),
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1577
1619
|
ScaledText,
|
|
1578
1620
|
{
|
|
1579
1621
|
style: [
|
|
1580
|
-
|
|
1622
|
+
styles19.sortIndicator,
|
|
1581
1623
|
{
|
|
1582
1624
|
color: sortKey === col.key ? colors2.colorInteractive : colors2.colorOnBgSubtle
|
|
1583
1625
|
}
|
|
@@ -1590,18 +1632,18 @@ function Table({
|
|
|
1590
1632
|
]
|
|
1591
1633
|
},
|
|
1592
1634
|
col.key
|
|
1593
|
-
) : /* @__PURE__ */ (0,
|
|
1635
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.View, { style: styles19.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScaledText, { style: [styles19.headerText, { color: colors2.colorOnBg }], children: col.header }) }, col.key)
|
|
1594
1636
|
) }),
|
|
1595
|
-
rows.map((row, rowIndex) => /* @__PURE__ */ (0,
|
|
1596
|
-
|
|
1637
|
+
rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1638
|
+
import_react_native22.View,
|
|
1597
1639
|
{
|
|
1598
1640
|
style: [
|
|
1599
|
-
|
|
1641
|
+
styles19.row,
|
|
1600
1642
|
{ borderTopColor: colors2.colorBgSubtle },
|
|
1601
1643
|
rowIndex % 2 === 1 && { backgroundColor: colors2.colorBgSubtle }
|
|
1602
1644
|
],
|
|
1603
1645
|
accessibilityRole: "none",
|
|
1604
|
-
children: columns.map((col) => /* @__PURE__ */ (0,
|
|
1646
|
+
children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.View, { style: styles19.cell, children: col.render ? typeof col.render(row) === "string" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScaledText, { style: [styles19.cellText, { color: colors2.colorOnBg }], children: col.render(row) }) : col.render(row) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScaledText, { style: [styles19.cellText, { color: colors2.colorOnBg }], children: String(row[col.key] ?? "") }) }, col.key))
|
|
1605
1647
|
},
|
|
1606
1648
|
rowIndex
|
|
1607
1649
|
))
|
|
@@ -1612,8 +1654,8 @@ function Table({
|
|
|
1612
1654
|
|
|
1613
1655
|
// src/components/ui/Calendar/Calendar.tsx
|
|
1614
1656
|
var import_react8 = require("react");
|
|
1615
|
-
var
|
|
1616
|
-
var
|
|
1657
|
+
var import_react_native23 = require("react-native");
|
|
1658
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1617
1659
|
var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
1618
1660
|
var DAY_LABELS = {
|
|
1619
1661
|
Su: "Sunday",
|
|
@@ -1656,7 +1698,7 @@ function getFirstDayOfMonth(year, month) {
|
|
|
1656
1698
|
return new Date(year, month, 1).getDay();
|
|
1657
1699
|
}
|
|
1658
1700
|
var DAY_SIZE = 44;
|
|
1659
|
-
var
|
|
1701
|
+
var styles20 = import_react_native23.StyleSheet.create({
|
|
1660
1702
|
container: {
|
|
1661
1703
|
alignSelf: "flex-start"
|
|
1662
1704
|
},
|
|
@@ -1768,28 +1810,28 @@ function Calendar({
|
|
|
1768
1810
|
{ length: cells.length / 7 },
|
|
1769
1811
|
(_, i) => cells.slice(i * 7, i * 7 + 7)
|
|
1770
1812
|
);
|
|
1771
|
-
return /* @__PURE__ */ (0,
|
|
1772
|
-
|
|
1813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1814
|
+
import_react_native23.View,
|
|
1773
1815
|
{
|
|
1774
|
-
style: [
|
|
1816
|
+
style: [styles20.container, style],
|
|
1775
1817
|
accessibilityRole: "none",
|
|
1776
1818
|
accessibilityLabel: `${MONTHS[viewMonth]} ${viewYear} calendar`,
|
|
1777
1819
|
children: [
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
1779
|
-
/* @__PURE__ */ (0,
|
|
1780
|
-
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native23.View, { style: styles20.header, children: [
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1822
|
+
import_react_native23.Pressable,
|
|
1781
1823
|
{
|
|
1782
1824
|
onPress: () => navigate(-1),
|
|
1783
1825
|
accessibilityRole: "button",
|
|
1784
1826
|
accessibilityLabel: "Previous month",
|
|
1785
|
-
style: ({ pressed }) => [
|
|
1786
|
-
children: /* @__PURE__ */ (0,
|
|
1827
|
+
style: ({ pressed }) => [styles20.navButton, pressed && styles20.pressed],
|
|
1828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ScaledText, { style: [styles20.navText, { color: colors2.colorOnBg }], children: "\u2039" })
|
|
1787
1829
|
}
|
|
1788
1830
|
),
|
|
1789
|
-
/* @__PURE__ */ (0,
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1790
1832
|
ScaledText,
|
|
1791
1833
|
{
|
|
1792
|
-
style: [
|
|
1834
|
+
style: [styles20.monthYear, { color: colors2.colorOnBg }],
|
|
1793
1835
|
accessibilityRole: "text",
|
|
1794
1836
|
accessibilityLiveRegion: "polite",
|
|
1795
1837
|
children: [
|
|
@@ -1799,35 +1841,35 @@ function Calendar({
|
|
|
1799
1841
|
]
|
|
1800
1842
|
}
|
|
1801
1843
|
),
|
|
1802
|
-
/* @__PURE__ */ (0,
|
|
1803
|
-
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1845
|
+
import_react_native23.Pressable,
|
|
1804
1846
|
{
|
|
1805
1847
|
onPress: () => navigate(1),
|
|
1806
1848
|
accessibilityRole: "button",
|
|
1807
1849
|
accessibilityLabel: "Next month",
|
|
1808
|
-
style: ({ pressed }) => [
|
|
1809
|
-
children: /* @__PURE__ */ (0,
|
|
1850
|
+
style: ({ pressed }) => [styles20.navButton, pressed && styles20.pressed],
|
|
1851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ScaledText, { style: [styles20.navText, { color: colors2.colorOnBg }], children: "\u203A" })
|
|
1810
1852
|
}
|
|
1811
1853
|
)
|
|
1812
1854
|
] }),
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native23.View, { style: styles20.weekRow, children: DAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native23.View, { style: styles20.weekday, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1814
1856
|
ScaledText,
|
|
1815
1857
|
{
|
|
1816
|
-
style: [
|
|
1858
|
+
style: [styles20.weekdayText, { color: colors2.colorOnBgSubtle }],
|
|
1817
1859
|
accessibilityLabel: DAY_LABELS[d],
|
|
1818
1860
|
children: d
|
|
1819
1861
|
}
|
|
1820
1862
|
) }, d)) }),
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native23.View, { style: styles20.grid, children: rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native23.View, { style: styles20.dayRow, children: row.map((cell, colIndex) => {
|
|
1822
1864
|
if (!cell) {
|
|
1823
|
-
return /* @__PURE__ */ (0,
|
|
1865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native23.View, { style: styles20.dayCell }, colIndex);
|
|
1824
1866
|
}
|
|
1825
1867
|
const date = new Date(viewYear, viewMonth, cell.day);
|
|
1826
1868
|
const isSelected = selected ? isSameDay(date, selected) : false;
|
|
1827
1869
|
const isToday = isSameDay(date, today);
|
|
1828
1870
|
const disabled = isOutOfRange(date, min, max);
|
|
1829
|
-
return /* @__PURE__ */ (0,
|
|
1830
|
-
|
|
1871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1872
|
+
import_react_native23.Pressable,
|
|
1831
1873
|
{
|
|
1832
1874
|
onPress: () => selectDay(cell.day),
|
|
1833
1875
|
disabled,
|
|
@@ -1842,22 +1884,22 @@ function Calendar({
|
|
|
1842
1884
|
disabled
|
|
1843
1885
|
},
|
|
1844
1886
|
style: ({ pressed }) => [
|
|
1845
|
-
|
|
1887
|
+
styles20.dayCell,
|
|
1846
1888
|
isSelected && {
|
|
1847
1889
|
backgroundColor: colors2.colorInteractive
|
|
1848
1890
|
},
|
|
1849
1891
|
isToday && !isSelected && [
|
|
1850
|
-
|
|
1892
|
+
styles20.today,
|
|
1851
1893
|
{ borderColor: colors2.colorInteractive }
|
|
1852
1894
|
],
|
|
1853
|
-
disabled &&
|
|
1854
|
-
pressed && !disabled &&
|
|
1895
|
+
disabled && styles20.disabled,
|
|
1896
|
+
pressed && !disabled && styles20.pressed
|
|
1855
1897
|
],
|
|
1856
|
-
children: /* @__PURE__ */ (0,
|
|
1898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1857
1899
|
ScaledText,
|
|
1858
1900
|
{
|
|
1859
1901
|
style: [
|
|
1860
|
-
|
|
1902
|
+
styles20.dayText,
|
|
1861
1903
|
{
|
|
1862
1904
|
color: isSelected ? colors2.colorOnInteractive : colors2.colorOnBg,
|
|
1863
1905
|
fontWeight: isToday ? import_native.font.weight.semibold : import_native.font.weight.body
|
|
@@ -1877,11 +1919,11 @@ function Calendar({
|
|
|
1877
1919
|
|
|
1878
1920
|
// src/components/ui/Carousel/Carousel.tsx
|
|
1879
1921
|
var import_react9 = require("react");
|
|
1880
|
-
var
|
|
1881
|
-
var
|
|
1922
|
+
var import_react_native24 = require("react-native");
|
|
1923
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1882
1924
|
var DOT_SIZE = 8;
|
|
1883
1925
|
var DOT_HIT_SIZE = 44;
|
|
1884
|
-
var
|
|
1926
|
+
var styles21 = import_react_native24.StyleSheet.create({
|
|
1885
1927
|
container: {
|
|
1886
1928
|
width: "100%"
|
|
1887
1929
|
},
|
|
@@ -1938,7 +1980,7 @@ function Carousel({
|
|
|
1938
1980
|
const { colors: colors2 } = useTheme();
|
|
1939
1981
|
const scrollRef = (0, import_react9.useRef)(null);
|
|
1940
1982
|
const [activeIndex, setActiveIndex] = (0, import_react9.useState)(0);
|
|
1941
|
-
const [slideWidth, setSlideWidth] = (0, import_react9.useState)(
|
|
1983
|
+
const [slideWidth, setSlideWidth] = (0, import_react9.useState)(import_react_native24.Dimensions.get("window").width);
|
|
1942
1984
|
const handleScroll = (0, import_react9.useCallback)(
|
|
1943
1985
|
(e) => {
|
|
1944
1986
|
const offset = e.nativeEvent.contentOffset.x;
|
|
@@ -1954,15 +1996,15 @@ function Carousel({
|
|
|
1954
1996
|
const clamped = Math.max(0, Math.min(index, items.length - 1));
|
|
1955
1997
|
scrollRef.current?.scrollTo({ x: clamped * slideWidth, animated: true });
|
|
1956
1998
|
};
|
|
1957
|
-
return /* @__PURE__ */ (0,
|
|
1958
|
-
|
|
1999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2000
|
+
import_react_native24.View,
|
|
1959
2001
|
{
|
|
1960
|
-
style: [
|
|
2002
|
+
style: [styles21.container, style],
|
|
1961
2003
|
accessibilityRole: "none",
|
|
1962
2004
|
accessibilityLabel: label,
|
|
1963
2005
|
children: [
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1965
|
-
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2007
|
+
import_react_native24.ScrollView,
|
|
1966
2008
|
{
|
|
1967
2009
|
ref: scrollRef,
|
|
1968
2010
|
horizontal: true,
|
|
@@ -1971,13 +2013,13 @@ function Carousel({
|
|
|
1971
2013
|
onScroll: handleScroll,
|
|
1972
2014
|
scrollEventThrottle: 16,
|
|
1973
2015
|
onLayout: (e) => setSlideWidth(e.nativeEvent.layout.width),
|
|
1974
|
-
style:
|
|
1975
|
-
children: items.map((item, index) => /* @__PURE__ */ (0,
|
|
2016
|
+
style: styles21.scrollView,
|
|
2017
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native24.View, { style: [styles21.slide, { width: slideWidth }], children: item }, index))
|
|
1976
2018
|
}
|
|
1977
2019
|
),
|
|
1978
|
-
/* @__PURE__ */ (0,
|
|
1979
|
-
/* @__PURE__ */ (0,
|
|
1980
|
-
|
|
2020
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native24.View, { style: styles21.nav, children: [
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2022
|
+
import_react_native24.Pressable,
|
|
1981
2023
|
{
|
|
1982
2024
|
onPress: () => scrollTo(activeIndex - 1),
|
|
1983
2025
|
disabled: activeIndex <= 0,
|
|
@@ -1985,26 +2027,26 @@ function Carousel({
|
|
|
1985
2027
|
accessibilityLabel: "Previous",
|
|
1986
2028
|
accessibilityState: { disabled: activeIndex <= 0 },
|
|
1987
2029
|
style: ({ pressed }) => [
|
|
1988
|
-
|
|
2030
|
+
styles21.navButton,
|
|
1989
2031
|
activeIndex <= 0 && { opacity: 0.4 },
|
|
1990
|
-
pressed &&
|
|
2032
|
+
pressed && styles21.pressed
|
|
1991
2033
|
],
|
|
1992
|
-
children: /* @__PURE__ */ (0,
|
|
2034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ScaledText, { style: [styles21.navText, { color: colors2.colorOnBg }], children: "\u2039" })
|
|
1993
2035
|
}
|
|
1994
2036
|
),
|
|
1995
|
-
/* @__PURE__ */ (0,
|
|
1996
|
-
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native24.View, { style: styles21.dots, children: items.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2038
|
+
import_react_native24.Pressable,
|
|
1997
2039
|
{
|
|
1998
2040
|
onPress: () => scrollTo(index),
|
|
1999
2041
|
accessibilityRole: "button",
|
|
2000
2042
|
accessibilityLabel: `Go to slide ${index + 1}`,
|
|
2001
2043
|
accessibilityState: { selected: activeIndex === index },
|
|
2002
|
-
style:
|
|
2003
|
-
children: /* @__PURE__ */ (0,
|
|
2004
|
-
|
|
2044
|
+
style: styles21.dotWrapper,
|
|
2045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2046
|
+
import_react_native24.View,
|
|
2005
2047
|
{
|
|
2006
2048
|
style: [
|
|
2007
|
-
|
|
2049
|
+
styles21.dot,
|
|
2008
2050
|
{
|
|
2009
2051
|
backgroundColor: activeIndex === index ? colors2.colorInteractive : colors2.colorBgSubtle
|
|
2010
2052
|
}
|
|
@@ -2014,8 +2056,8 @@ function Carousel({
|
|
|
2014
2056
|
},
|
|
2015
2057
|
index
|
|
2016
2058
|
)) }),
|
|
2017
|
-
/* @__PURE__ */ (0,
|
|
2018
|
-
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2060
|
+
import_react_native24.Pressable,
|
|
2019
2061
|
{
|
|
2020
2062
|
onPress: () => scrollTo(activeIndex + 1),
|
|
2021
2063
|
disabled: activeIndex >= items.length - 1,
|
|
@@ -2023,11 +2065,11 @@ function Carousel({
|
|
|
2023
2065
|
accessibilityLabel: "Next",
|
|
2024
2066
|
accessibilityState: { disabled: activeIndex >= items.length - 1 },
|
|
2025
2067
|
style: ({ pressed }) => [
|
|
2026
|
-
|
|
2068
|
+
styles21.navButton,
|
|
2027
2069
|
activeIndex >= items.length - 1 && { opacity: 0.4 },
|
|
2028
|
-
pressed &&
|
|
2070
|
+
pressed && styles21.pressed
|
|
2029
2071
|
],
|
|
2030
|
-
children: /* @__PURE__ */ (0,
|
|
2072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ScaledText, { style: [styles21.navText, { color: colors2.colorOnBg }], children: "\u203A" })
|
|
2031
2073
|
}
|
|
2032
2074
|
)
|
|
2033
2075
|
] })
|
|
@@ -2037,8 +2079,8 @@ function Carousel({
|
|
|
2037
2079
|
}
|
|
2038
2080
|
|
|
2039
2081
|
// src/components/layout/Card/Card.tsx
|
|
2040
|
-
var
|
|
2041
|
-
var
|
|
2082
|
+
var import_react_native25 = require("react-native");
|
|
2083
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2042
2084
|
var paddingMap = {
|
|
2043
2085
|
none: 0,
|
|
2044
2086
|
small: import_native.spacing.s,
|
|
@@ -2050,7 +2092,7 @@ var alignMap = {
|
|
|
2050
2092
|
center: "center",
|
|
2051
2093
|
end: "flex-end"
|
|
2052
2094
|
};
|
|
2053
|
-
var
|
|
2095
|
+
var styles22 = import_react_native25.StyleSheet.create({
|
|
2054
2096
|
card: {
|
|
2055
2097
|
borderRadius: import_native.border.radius.m,
|
|
2056
2098
|
overflow: "hidden"
|
|
@@ -2085,29 +2127,29 @@ function Card({
|
|
|
2085
2127
|
alignItems: alignMap[textAlign]
|
|
2086
2128
|
};
|
|
2087
2129
|
if (onPress) {
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
-
|
|
2130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2131
|
+
import_react_native25.Pressable,
|
|
2090
2132
|
{
|
|
2091
2133
|
onPress,
|
|
2092
2134
|
accessibilityRole: "button",
|
|
2093
2135
|
accessibilityLabel,
|
|
2094
|
-
style: ({ pressed }) => [
|
|
2136
|
+
style: ({ pressed }) => [styles22.card, variantStyle, inner, pressed && { opacity: 0.8 }, style],
|
|
2095
2137
|
children
|
|
2096
2138
|
}
|
|
2097
2139
|
);
|
|
2098
2140
|
}
|
|
2099
|
-
return /* @__PURE__ */ (0,
|
|
2141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native25.View, { style: [styles22.card, variantStyle, inner, style], children });
|
|
2100
2142
|
}
|
|
2101
2143
|
|
|
2102
2144
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
2103
|
-
var
|
|
2104
|
-
var
|
|
2145
|
+
var import_react_native26 = require("react-native");
|
|
2146
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2105
2147
|
var alignMap2 = {
|
|
2106
2148
|
start: "flex-start",
|
|
2107
2149
|
center: "center",
|
|
2108
2150
|
end: "flex-end"
|
|
2109
2151
|
};
|
|
2110
|
-
var titleStyles =
|
|
2152
|
+
var titleStyles = import_react_native26.StyleSheet.create({
|
|
2111
2153
|
small: {
|
|
2112
2154
|
fontSize: import_native.font.size.heading3,
|
|
2113
2155
|
fontFamily: import_native.font.family.heading,
|
|
@@ -2127,7 +2169,7 @@ var titleStyles = import_react_native25.StyleSheet.create({
|
|
|
2127
2169
|
lineHeight: lineHeight.heading1
|
|
2128
2170
|
}
|
|
2129
2171
|
});
|
|
2130
|
-
var
|
|
2172
|
+
var styles23 = import_react_native26.StyleSheet.create({
|
|
2131
2173
|
container: {
|
|
2132
2174
|
gap: import_native.spacing.xxs
|
|
2133
2175
|
},
|
|
@@ -2146,8 +2188,8 @@ function SectionHeader({
|
|
|
2146
2188
|
}) {
|
|
2147
2189
|
const { colors: colors2 } = useTheme();
|
|
2148
2190
|
const align = alignMap2[alignment];
|
|
2149
|
-
return /* @__PURE__ */ (0,
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native26.View, { style: [styles23.container, { alignItems: align }, style], children: [
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2151
2193
|
ScaledText,
|
|
2152
2194
|
{
|
|
2153
2195
|
accessibilityRole: "header",
|
|
@@ -2155,16 +2197,16 @@ function SectionHeader({
|
|
|
2155
2197
|
children: title
|
|
2156
2198
|
}
|
|
2157
2199
|
),
|
|
2158
|
-
subtitle && /* @__PURE__ */ (0,
|
|
2200
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ScaledText, { style: [styles23.subtitle, { color: colors2.colorOnBgSubtle }], children: subtitle })
|
|
2159
2201
|
] });
|
|
2160
2202
|
}
|
|
2161
2203
|
|
|
2162
2204
|
// src/components/layout/IconWrapper/IconWrapper.tsx
|
|
2163
|
-
var
|
|
2164
|
-
var
|
|
2205
|
+
var import_react_native27 = require("react-native");
|
|
2206
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2165
2207
|
function IconWrapper({ children, style, accessibilityElementsHidden }) {
|
|
2166
|
-
return /* @__PURE__ */ (0,
|
|
2167
|
-
|
|
2208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2209
|
+
import_react_native27.View,
|
|
2168
2210
|
{
|
|
2169
2211
|
style: [{ alignItems: "center", justifyContent: "center" }, style],
|
|
2170
2212
|
importantForAccessibility: accessibilityElementsHidden ? "no-hide-descendants" : "auto",
|
|
@@ -2175,9 +2217,9 @@ function IconWrapper({ children, style, accessibilityElementsHidden }) {
|
|
|
2175
2217
|
}
|
|
2176
2218
|
|
|
2177
2219
|
// src/components/layout/ButtonGroup/ButtonGroup.tsx
|
|
2178
|
-
var
|
|
2179
|
-
var
|
|
2180
|
-
var
|
|
2220
|
+
var import_react_native28 = require("react-native");
|
|
2221
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2222
|
+
var styles24 = import_react_native28.StyleSheet.create({
|
|
2181
2223
|
group: {
|
|
2182
2224
|
flexDirection: "row",
|
|
2183
2225
|
flexWrap: "wrap",
|
|
@@ -2190,11 +2232,11 @@ var styles23 = import_react_native27.StyleSheet.create({
|
|
|
2190
2232
|
});
|
|
2191
2233
|
function ButtonContainer({ children, variant, accessibilityLabel, style }) {
|
|
2192
2234
|
const isColumn = variant === "card" || variant === "modal";
|
|
2193
|
-
return /* @__PURE__ */ (0,
|
|
2194
|
-
|
|
2235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2236
|
+
import_react_native28.View,
|
|
2195
2237
|
{
|
|
2196
2238
|
accessibilityLabel,
|
|
2197
|
-
style: [isColumn ?
|
|
2239
|
+
style: [isColumn ? styles24.column : styles24.group, style],
|
|
2198
2240
|
children
|
|
2199
2241
|
}
|
|
2200
2242
|
);
|
|
@@ -2202,14 +2244,14 @@ function ButtonContainer({ children, variant, accessibilityLabel, style }) {
|
|
|
2202
2244
|
var ButtonGroup = ButtonContainer;
|
|
2203
2245
|
|
|
2204
2246
|
// src/components/interaction/Button/Button.tsx
|
|
2205
|
-
var
|
|
2206
|
-
var
|
|
2247
|
+
var import_react_native29 = require("react-native");
|
|
2248
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2207
2249
|
var sizeTokens = {
|
|
2208
|
-
small: { height: 36, px: import_native.spacing.m, fontSize: import_native.font.size.bodyS
|
|
2209
|
-
medium: { height: 48, px: import_native.spacing.m, fontSize: import_native.font.size.body
|
|
2210
|
-
large: { height: 56, px: import_native.spacing.xxl, fontSize: import_native.font.size.heading3
|
|
2250
|
+
small: { height: 36, px: import_native.spacing.m, fontSize: import_native.font.size.bodyS },
|
|
2251
|
+
medium: { height: 48, px: import_native.spacing.m, fontSize: import_native.font.size.body },
|
|
2252
|
+
large: { height: 56, px: import_native.spacing.xxl, fontSize: import_native.font.size.heading3 }
|
|
2211
2253
|
};
|
|
2212
|
-
var
|
|
2254
|
+
var styles25 = import_react_native29.StyleSheet.create({
|
|
2213
2255
|
pressable: {
|
|
2214
2256
|
flexDirection: "row",
|
|
2215
2257
|
alignItems: "center",
|
|
@@ -2237,8 +2279,8 @@ function Button({
|
|
|
2237
2279
|
accessibilityLabel,
|
|
2238
2280
|
style
|
|
2239
2281
|
}) {
|
|
2240
|
-
const { colors: colors2 } = useTheme();
|
|
2241
|
-
const { height, px, fontSize
|
|
2282
|
+
const { colors: colors2, radius } = useTheme();
|
|
2283
|
+
const { height, px, fontSize } = sizeTokens[size];
|
|
2242
2284
|
const primaryColor = colors2.colorInteractive;
|
|
2243
2285
|
const onPrimaryColor = colors2.colorOnInteractive;
|
|
2244
2286
|
const outlineTextColor = colors2.colorInteractiveOnBg;
|
|
@@ -2246,7 +2288,8 @@ function Button({
|
|
|
2246
2288
|
const containerStyle = {
|
|
2247
2289
|
minHeight: height,
|
|
2248
2290
|
paddingHorizontal: isIconOnly ? import_native.spacing.xs : px,
|
|
2249
|
-
borderRadius
|
|
2291
|
+
// Corners come from the theme (`tokens.radius`); a borderRadius in `style` still wins.
|
|
2292
|
+
borderRadius: isIconOnly ? radius.iconButton : radius.button,
|
|
2250
2293
|
opacity: disabled ? 0.4 : 1,
|
|
2251
2294
|
// Icon-only: square with equal xs padding on both axes.
|
|
2252
2295
|
...isIconOnly && { aspectRatio: 1, paddingVertical: import_native.spacing.xs },
|
|
@@ -2261,29 +2304,29 @@ function Button({
|
|
|
2261
2304
|
}
|
|
2262
2305
|
};
|
|
2263
2306
|
const textColor = variant === "default" ? onPrimaryColor : outlineTextColor;
|
|
2264
|
-
return /* @__PURE__ */ (0,
|
|
2265
|
-
|
|
2307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2308
|
+
import_react_native29.Pressable,
|
|
2266
2309
|
{
|
|
2267
2310
|
onPress,
|
|
2268
2311
|
disabled,
|
|
2269
2312
|
accessibilityRole: "button",
|
|
2270
2313
|
accessibilityLabel,
|
|
2271
2314
|
accessibilityState: { disabled },
|
|
2272
|
-
style: ({ pressed }) => [
|
|
2315
|
+
style: ({ pressed }) => [styles25.pressable, containerStyle, pressed && { opacity: 0.75 }, style],
|
|
2273
2316
|
children: [
|
|
2274
|
-
iconStart && /* @__PURE__ */ (0,
|
|
2275
|
-
children && (isIconOnly ? children : /* @__PURE__ */ (0,
|
|
2276
|
-
iconEnd && /* @__PURE__ */ (0,
|
|
2317
|
+
iconStart && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native29.View, { importantForAccessibility: "no-hide-descendants", accessibilityElementsHidden: true, children: iconStart }),
|
|
2318
|
+
children && (isIconOnly ? children : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScaledText, { style: [styles25.label, { fontSize, color: textColor }], children })),
|
|
2319
|
+
iconEnd && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native29.View, { importantForAccessibility: "no-hide-descendants", children: iconEnd })
|
|
2277
2320
|
]
|
|
2278
2321
|
}
|
|
2279
2322
|
);
|
|
2280
2323
|
}
|
|
2281
2324
|
|
|
2282
2325
|
// src/components/interaction/Rating/Rating.tsx
|
|
2283
|
-
var
|
|
2284
|
-
var
|
|
2326
|
+
var import_react_native30 = require("react-native");
|
|
2327
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2285
2328
|
var STAR_SIZE = 24;
|
|
2286
|
-
var
|
|
2329
|
+
var styles26 = import_react_native30.StyleSheet.create({
|
|
2287
2330
|
container: {
|
|
2288
2331
|
flexDirection: "row",
|
|
2289
2332
|
alignItems: "center"
|
|
@@ -2296,17 +2339,17 @@ var styles25 = import_react_native29.StyleSheet.create({
|
|
|
2296
2339
|
function Rating({ value, max = 5, style, accessibilityLabel }) {
|
|
2297
2340
|
const { colors: colors2 } = useTheme();
|
|
2298
2341
|
const label = accessibilityLabel ?? `${value} out of ${max} stars`;
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
-
|
|
2342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2343
|
+
import_react_native30.View,
|
|
2301
2344
|
{
|
|
2302
|
-
style: [
|
|
2345
|
+
style: [styles26.container, style],
|
|
2303
2346
|
accessibilityRole: "image",
|
|
2304
2347
|
accessibilityLabel: label,
|
|
2305
|
-
children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ (0,
|
|
2348
|
+
children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2306
2349
|
ScaledText,
|
|
2307
2350
|
{
|
|
2308
2351
|
style: [
|
|
2309
|
-
|
|
2352
|
+
styles26.star,
|
|
2310
2353
|
{ color: i < value ? colors2.colorWarning : colors2.colorBgSubtle }
|
|
2311
2354
|
],
|
|
2312
2355
|
importantForAccessibility: "no",
|
|
@@ -2320,13 +2363,13 @@ function Rating({ value, max = 5, style, accessibilityLabel }) {
|
|
|
2320
2363
|
}
|
|
2321
2364
|
|
|
2322
2365
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2323
|
-
var
|
|
2366
|
+
var import_react_native32 = require("react-native");
|
|
2324
2367
|
|
|
2325
2368
|
// src/components/interaction/form/atoms/Label.tsx
|
|
2326
|
-
var
|
|
2369
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2327
2370
|
function Label({ label, style }) {
|
|
2328
2371
|
const { colors: colors2 } = useTheme();
|
|
2329
|
-
return /* @__PURE__ */ (0,
|
|
2372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2330
2373
|
ScaledText,
|
|
2331
2374
|
{
|
|
2332
2375
|
style: [
|
|
@@ -2345,9 +2388,9 @@ function Label({ label, style }) {
|
|
|
2345
2388
|
}
|
|
2346
2389
|
|
|
2347
2390
|
// src/components/interaction/form/atoms/Message.tsx
|
|
2348
|
-
var
|
|
2349
|
-
var
|
|
2350
|
-
var
|
|
2391
|
+
var import_react_native31 = require("react-native");
|
|
2392
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2393
|
+
var styles27 = import_react_native31.StyleSheet.create({
|
|
2351
2394
|
base: {
|
|
2352
2395
|
fontFamily: import_native.font.family.body,
|
|
2353
2396
|
fontSize: import_native.font.size.bodyS,
|
|
@@ -2358,20 +2401,20 @@ function Message({ message, type, style }) {
|
|
|
2358
2401
|
const { colors: colors2 } = useTheme();
|
|
2359
2402
|
if (!message) return null;
|
|
2360
2403
|
const color = type === "error" ? colors2.colorError : colors2.colorOnBgSubtle;
|
|
2361
|
-
return /* @__PURE__ */ (0,
|
|
2404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2362
2405
|
ScaledText,
|
|
2363
2406
|
{
|
|
2364
2407
|
accessibilityRole: type === "error" ? "alert" : "none",
|
|
2365
2408
|
accessibilityLiveRegion: type === "error" ? "assertive" : "polite",
|
|
2366
|
-
style: [
|
|
2409
|
+
style: [styles27.base, { color }, style],
|
|
2367
2410
|
children: message
|
|
2368
2411
|
}
|
|
2369
2412
|
);
|
|
2370
2413
|
}
|
|
2371
2414
|
|
|
2372
2415
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2373
|
-
var
|
|
2374
|
-
var
|
|
2416
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2417
|
+
var styles28 = import_react_native32.StyleSheet.create({
|
|
2375
2418
|
container: {
|
|
2376
2419
|
gap: import_native.spacing.xxs
|
|
2377
2420
|
},
|
|
@@ -2391,10 +2434,10 @@ function Switch({
|
|
|
2391
2434
|
style
|
|
2392
2435
|
}) {
|
|
2393
2436
|
const { colors: colors2 } = useTheme();
|
|
2394
|
-
return /* @__PURE__ */ (0,
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2396
|
-
/* @__PURE__ */ (0,
|
|
2397
|
-
|
|
2437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native32.View, { style: [styles28.container, style], children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native32.View, { style: styles28.row, children: [
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2440
|
+
import_react_native32.Switch,
|
|
2398
2441
|
{
|
|
2399
2442
|
value,
|
|
2400
2443
|
onValueChange: onChange,
|
|
@@ -2406,18 +2449,18 @@ function Switch({
|
|
|
2406
2449
|
trackColor: { false: colors2.colorBgSubtle, true: colors2.colorBlueSubtle }
|
|
2407
2450
|
}
|
|
2408
2451
|
),
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2452
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Label, { label })
|
|
2410
2453
|
] }),
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Message, { type: "error", message: error }),
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Message, { type: "hint", message: hint })
|
|
2413
2456
|
] });
|
|
2414
2457
|
}
|
|
2415
2458
|
|
|
2416
2459
|
// src/components/interaction/form/Checkbox/Checkbox.tsx
|
|
2417
|
-
var
|
|
2418
|
-
var
|
|
2460
|
+
var import_react_native33 = require("react-native");
|
|
2461
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2419
2462
|
var BOX = 22;
|
|
2420
|
-
var
|
|
2463
|
+
var styles29 = import_react_native33.StyleSheet.create({
|
|
2421
2464
|
container: {
|
|
2422
2465
|
gap: import_native.spacing.xxs
|
|
2423
2466
|
},
|
|
@@ -2454,31 +2497,31 @@ function Checkbox({
|
|
|
2454
2497
|
const { colors: colors2 } = useTheme();
|
|
2455
2498
|
const borderColor = error ? colors2.colorError : checked ? colors2.colorInteractive : colors2.colorOnBg;
|
|
2456
2499
|
const bgColor = checked ? colors2.colorInteractive : "transparent";
|
|
2457
|
-
return /* @__PURE__ */ (0,
|
|
2458
|
-
/* @__PURE__ */ (0,
|
|
2459
|
-
|
|
2500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native33.View, { style: [styles29.container, style], children: [
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2502
|
+
import_react_native33.Pressable,
|
|
2460
2503
|
{
|
|
2461
2504
|
onPress: () => !disabled && onChange?.(!checked),
|
|
2462
2505
|
accessibilityRole: "checkbox",
|
|
2463
2506
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
2464
2507
|
accessibilityState: { checked, disabled },
|
|
2465
2508
|
disabled,
|
|
2466
|
-
style: ({ pressed }) => [
|
|
2509
|
+
style: ({ pressed }) => [styles29.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
|
|
2467
2510
|
children: [
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native33.View, { style: [styles29.box, { borderColor, backgroundColor: bgColor }], children: checked && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label, { label: "\u2713", style: [styles29.checkmark, { color: colors2.colorOnInteractive }] }) }),
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label, { label })
|
|
2470
2513
|
]
|
|
2471
2514
|
}
|
|
2472
2515
|
),
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
2474
|
-
/* @__PURE__ */ (0,
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { type: "error", message: error }),
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { type: "hint", message: hint })
|
|
2475
2518
|
] });
|
|
2476
2519
|
}
|
|
2477
2520
|
|
|
2478
2521
|
// src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx
|
|
2479
|
-
var
|
|
2480
|
-
var
|
|
2481
|
-
var
|
|
2522
|
+
var import_react_native34 = require("react-native");
|
|
2523
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2524
|
+
var styles30 = import_react_native34.StyleSheet.create({
|
|
2482
2525
|
container: {
|
|
2483
2526
|
gap: import_native.spacing.xs
|
|
2484
2527
|
},
|
|
@@ -2505,31 +2548,31 @@ function CheckboxGroup({
|
|
|
2505
2548
|
style
|
|
2506
2549
|
}) {
|
|
2507
2550
|
const { colors: colors2 } = useTheme();
|
|
2508
|
-
return /* @__PURE__ */ (0,
|
|
2509
|
-
|
|
2551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2552
|
+
import_react_native34.View,
|
|
2510
2553
|
{
|
|
2511
|
-
style: [
|
|
2554
|
+
style: [styles30.container, disabled && { opacity: 0.4 }, style],
|
|
2512
2555
|
accessibilityRole: "none",
|
|
2513
2556
|
accessibilityLabel: legend,
|
|
2514
2557
|
children: [
|
|
2515
|
-
/* @__PURE__ */ (0,
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(ScaledText, { style: [styles30.legend, { color: colors2.colorOnBg }], children: [
|
|
2516
2559
|
legend,
|
|
2517
|
-
required && /* @__PURE__ */ (0,
|
|
2560
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ScaledText, { style: [styles30.required, { color: colors2.colorOnBgSubtle }], children: " *" })
|
|
2518
2561
|
] }),
|
|
2519
|
-
/* @__PURE__ */ (0,
|
|
2520
|
-
/* @__PURE__ */ (0,
|
|
2521
|
-
/* @__PURE__ */ (0,
|
|
2562
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native34.View, { style: styles30.items, children }),
|
|
2563
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { type: "error", message: error }),
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { type: "hint", message: hint })
|
|
2522
2565
|
]
|
|
2523
2566
|
}
|
|
2524
2567
|
);
|
|
2525
2568
|
}
|
|
2526
2569
|
|
|
2527
2570
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
2528
|
-
var
|
|
2529
|
-
var
|
|
2571
|
+
var import_react_native35 = require("react-native");
|
|
2572
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2530
2573
|
var DOT = 22;
|
|
2531
2574
|
var INNER = 10;
|
|
2532
|
-
var
|
|
2575
|
+
var styles31 = import_react_native35.StyleSheet.create({
|
|
2533
2576
|
container: {
|
|
2534
2577
|
gap: import_native.spacing.xxs
|
|
2535
2578
|
},
|
|
@@ -2565,31 +2608,31 @@ function Radio({
|
|
|
2565
2608
|
}) {
|
|
2566
2609
|
const { colors: colors2 } = useTheme();
|
|
2567
2610
|
const borderColor = error ? colors2.colorError : checked ? colors2.colorInteractive : colors2.colorOnBg;
|
|
2568
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
-
/* @__PURE__ */ (0,
|
|
2570
|
-
|
|
2611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { style: [styles31.container, style], children: [
|
|
2612
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2613
|
+
import_react_native35.Pressable,
|
|
2571
2614
|
{
|
|
2572
2615
|
onPress: () => !disabled && onChange?.(),
|
|
2573
2616
|
accessibilityRole: "radio",
|
|
2574
2617
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
2575
2618
|
accessibilityState: { checked, disabled },
|
|
2576
2619
|
disabled,
|
|
2577
|
-
style: ({ pressed }) => [
|
|
2620
|
+
style: ({ pressed }) => [styles31.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
|
|
2578
2621
|
children: [
|
|
2579
|
-
/* @__PURE__ */ (0,
|
|
2580
|
-
/* @__PURE__ */ (0,
|
|
2622
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.View, { style: [styles31.outer, { borderColor }], children: checked && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.View, { style: [styles31.inner, { backgroundColor: colors2.colorInteractive }] }) }),
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Label, { label })
|
|
2581
2624
|
]
|
|
2582
2625
|
}
|
|
2583
2626
|
),
|
|
2584
|
-
/* @__PURE__ */ (0,
|
|
2585
|
-
/* @__PURE__ */ (0,
|
|
2627
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { type: "error", message: error }),
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { type: "hint", message: hint })
|
|
2586
2629
|
] });
|
|
2587
2630
|
}
|
|
2588
2631
|
|
|
2589
2632
|
// src/components/interaction/form/RadioGroup/RadioGroup.tsx
|
|
2590
|
-
var
|
|
2591
|
-
var
|
|
2592
|
-
var
|
|
2633
|
+
var import_react_native36 = require("react-native");
|
|
2634
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2635
|
+
var styles32 = import_react_native36.StyleSheet.create({
|
|
2593
2636
|
container: {
|
|
2594
2637
|
gap: import_native.spacing.xs
|
|
2595
2638
|
},
|
|
@@ -2616,29 +2659,29 @@ function RadioGroup({
|
|
|
2616
2659
|
style
|
|
2617
2660
|
}) {
|
|
2618
2661
|
const { colors: colors2 } = useTheme();
|
|
2619
|
-
return /* @__PURE__ */ (0,
|
|
2620
|
-
|
|
2662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2663
|
+
import_react_native36.View,
|
|
2621
2664
|
{
|
|
2622
|
-
style: [
|
|
2665
|
+
style: [styles32.container, disabled && { opacity: 0.4 }, style],
|
|
2623
2666
|
accessibilityRole: "radiogroup",
|
|
2624
2667
|
accessibilityLabel: legend,
|
|
2625
2668
|
children: [
|
|
2626
|
-
/* @__PURE__ */ (0,
|
|
2669
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(ScaledText, { style: [styles32.legend, { color: colors2.colorOnBg }], children: [
|
|
2627
2670
|
legend,
|
|
2628
|
-
required && /* @__PURE__ */ (0,
|
|
2671
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ScaledText, { style: [styles32.required, { color: colors2.colorOnBgSubtle }], children: " *" })
|
|
2629
2672
|
] }),
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2673
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native36.View, { style: styles32.items, children }),
|
|
2674
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { type: "error", message: error }),
|
|
2675
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { type: "hint", message: hint })
|
|
2633
2676
|
]
|
|
2634
2677
|
}
|
|
2635
2678
|
);
|
|
2636
2679
|
}
|
|
2637
2680
|
|
|
2638
2681
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
2639
|
-
var
|
|
2640
|
-
var
|
|
2641
|
-
var
|
|
2682
|
+
var import_react_native37 = require("react-native");
|
|
2683
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2684
|
+
var styles33 = import_react_native37.StyleSheet.create({
|
|
2642
2685
|
container: {
|
|
2643
2686
|
gap: import_native.spacing.xxs
|
|
2644
2687
|
},
|
|
@@ -2650,7 +2693,6 @@ var styles32 = import_react_native36.StyleSheet.create({
|
|
|
2650
2693
|
paddingHorizontal: import_native.spacing.m,
|
|
2651
2694
|
borderWidth: 2,
|
|
2652
2695
|
borderStyle: "dashed",
|
|
2653
|
-
borderRadius: import_native.border.radius.s,
|
|
2654
2696
|
minHeight: 120
|
|
2655
2697
|
},
|
|
2656
2698
|
icon: {
|
|
@@ -2691,17 +2733,17 @@ function FileInput({
|
|
|
2691
2733
|
fileNames = [],
|
|
2692
2734
|
style
|
|
2693
2735
|
}) {
|
|
2694
|
-
const { colors: colors2 } = useTheme();
|
|
2736
|
+
const { colors: colors2, radius } = useTheme();
|
|
2695
2737
|
const borderColor = error ? colors2.colorError : colors2.colorBgSubtle;
|
|
2696
|
-
return /* @__PURE__ */ (0,
|
|
2697
|
-
/* @__PURE__ */ (0,
|
|
2738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native37.View, { style: [styles33.container, style], testID: name, children: [
|
|
2739
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2698
2740
|
Label,
|
|
2699
2741
|
{
|
|
2700
2742
|
label: required ? `${label} *` : label
|
|
2701
2743
|
}
|
|
2702
2744
|
),
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2704
|
-
|
|
2745
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2746
|
+
import_react_native37.Pressable,
|
|
2705
2747
|
{
|
|
2706
2748
|
onPress: () => !disabled && onSelect?.(),
|
|
2707
2749
|
disabled,
|
|
@@ -2709,44 +2751,46 @@ function FileInput({
|
|
|
2709
2751
|
accessibilityLabel: `${label}, tap to select file`,
|
|
2710
2752
|
accessibilityState: { disabled },
|
|
2711
2753
|
style: ({ pressed }) => [
|
|
2712
|
-
|
|
2754
|
+
styles33.dropZone,
|
|
2713
2755
|
{
|
|
2714
2756
|
borderColor,
|
|
2757
|
+
borderRadius: radius.field,
|
|
2715
2758
|
backgroundColor: "transparent"
|
|
2716
2759
|
},
|
|
2717
2760
|
pressed && { opacity: 0.7 },
|
|
2718
2761
|
disabled && { opacity: 0.4 }
|
|
2719
2762
|
],
|
|
2720
2763
|
children: [
|
|
2721
|
-
/* @__PURE__ */ (0,
|
|
2722
|
-
/* @__PURE__ */ (0,
|
|
2723
|
-
fileNames.length > 0 && /* @__PURE__ */ (0,
|
|
2724
|
-
accept && /* @__PURE__ */ (0,
|
|
2764
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ScaledText, { style: [styles33.icon, { color: colors2.colorInteractive }], children: "\u2191" }),
|
|
2765
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ScaledText, { style: [styles33.prompt, { color: colors2.colorOnBgSubtle }], children: fileNames.length > 0 ? "Selected files:" : "Tap to select file" }),
|
|
2766
|
+
fileNames.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native37.View, { style: styles33.fileList, children: fileNames.map((fileName) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ScaledText, { style: [styles33.fileName, { color: colors2.colorOnBg }], children: fileName }, fileName)) }),
|
|
2767
|
+
accept && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ScaledText, { style: [styles33.acceptHint, { color: colors2.colorOnBgSubtle }], children: accept })
|
|
2725
2768
|
]
|
|
2726
2769
|
}
|
|
2727
2770
|
),
|
|
2728
|
-
/* @__PURE__ */ (0,
|
|
2729
|
-
/* @__PURE__ */ (0,
|
|
2771
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { type: "error", message: error }),
|
|
2772
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { type: "hint", message: hint })
|
|
2730
2773
|
] });
|
|
2731
2774
|
}
|
|
2732
2775
|
|
|
2733
2776
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
2734
2777
|
var import_react10 = require("react");
|
|
2735
|
-
var
|
|
2778
|
+
var import_react_native38 = require("react-native");
|
|
2736
2779
|
|
|
2737
2780
|
// src/components/interaction/form/atoms/inputHelpers.ts
|
|
2738
2781
|
var OPTICAL_TEXT_SHIFT = -1.5;
|
|
2739
2782
|
|
|
2740
2783
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
2741
|
-
var
|
|
2784
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2742
2785
|
var INPUT_HEIGHT = 44;
|
|
2743
2786
|
var MAX_DROPDOWN_HEIGHT = 200;
|
|
2744
|
-
var
|
|
2787
|
+
var styles34 = import_react_native38.StyleSheet.create({
|
|
2745
2788
|
container: {
|
|
2746
2789
|
gap: import_native.spacing.xxs
|
|
2747
2790
|
},
|
|
2748
2791
|
/**
|
|
2749
|
-
* Draws the
|
|
2792
|
+
* Draws the rounded border (`radius.field` from the theme) and provides the fixed
|
|
2793
|
+
* 44pt touch-target height.
|
|
2750
2794
|
* justifyContent: 'center' vertically centers the inner TextInput.
|
|
2751
2795
|
* position: 'relative' is required for the dropdown's absolute positioning.
|
|
2752
2796
|
*/
|
|
@@ -2754,8 +2798,7 @@ var styles33 = import_react_native37.StyleSheet.create({
|
|
|
2754
2798
|
position: "relative",
|
|
2755
2799
|
height: INPUT_HEIGHT,
|
|
2756
2800
|
justifyContent: "center",
|
|
2757
|
-
borderWidth: 1
|
|
2758
|
-
borderRadius: import_native.border.radius.full
|
|
2801
|
+
borderWidth: 1
|
|
2759
2802
|
},
|
|
2760
2803
|
/**
|
|
2761
2804
|
* No vertical padding: iOS centers text automatically inside the wrapper height.
|
|
@@ -2808,7 +2851,7 @@ function Combobox({
|
|
|
2808
2851
|
hint,
|
|
2809
2852
|
style
|
|
2810
2853
|
}) {
|
|
2811
|
-
const { colors: colors2 } = useTheme();
|
|
2854
|
+
const { colors: colors2, radius } = useTheme();
|
|
2812
2855
|
const selectedOption = (0, import_react10.useMemo)(
|
|
2813
2856
|
() => options.find((o) => o.value === value),
|
|
2814
2857
|
[options, value]
|
|
@@ -2837,21 +2880,22 @@ function Combobox({
|
|
|
2837
2880
|
setTimeout(() => setIsOpen(false), 150);
|
|
2838
2881
|
};
|
|
2839
2882
|
const borderColor = error ? colors2.colorError : colors2.colorOnBg;
|
|
2840
|
-
return /* @__PURE__ */ (0,
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
2842
|
-
/* @__PURE__ */ (0,
|
|
2843
|
-
|
|
2883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native38.View, { style: [styles34.container, style], children: [
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label, { label }),
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2886
|
+
import_react_native38.View,
|
|
2844
2887
|
{
|
|
2845
2888
|
style: [
|
|
2846
|
-
|
|
2889
|
+
styles34.inputWrapper,
|
|
2847
2890
|
{
|
|
2848
2891
|
borderColor,
|
|
2892
|
+
borderRadius: radius.field,
|
|
2849
2893
|
backgroundColor: colors2.colorBg
|
|
2850
2894
|
},
|
|
2851
2895
|
disabled && { opacity: 0.4 }
|
|
2852
2896
|
],
|
|
2853
2897
|
children: [
|
|
2854
|
-
/* @__PURE__ */ (0,
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2855
2899
|
ScaledTextInput,
|
|
2856
2900
|
{
|
|
2857
2901
|
value: inputValue,
|
|
@@ -2865,16 +2909,16 @@ function Combobox({
|
|
|
2865
2909
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
2866
2910
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2867
2911
|
style: [
|
|
2868
|
-
|
|
2912
|
+
styles34.input,
|
|
2869
2913
|
{ color: colors2.colorOnBg }
|
|
2870
2914
|
]
|
|
2871
2915
|
}
|
|
2872
2916
|
),
|
|
2873
|
-
isOpen && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
2874
|
-
|
|
2917
|
+
isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2918
|
+
import_react_native38.ScrollView,
|
|
2875
2919
|
{
|
|
2876
2920
|
style: [
|
|
2877
|
-
|
|
2921
|
+
styles34.dropdown,
|
|
2878
2922
|
{
|
|
2879
2923
|
borderColor: colors2.colorBgSubtle,
|
|
2880
2924
|
backgroundColor: colors2.colorBg
|
|
@@ -2885,8 +2929,8 @@ function Combobox({
|
|
|
2885
2929
|
children: filtered.map((option) => {
|
|
2886
2930
|
const isSelected = option.value === value;
|
|
2887
2931
|
const isDisabled = option.disabled;
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
2889
|
-
|
|
2932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2933
|
+
import_react_native38.Pressable,
|
|
2890
2934
|
{
|
|
2891
2935
|
onPress: () => !isDisabled && selectOption(option),
|
|
2892
2936
|
disabled: isDisabled,
|
|
@@ -2894,16 +2938,16 @@ function Combobox({
|
|
|
2894
2938
|
accessibilityLabel: option.label,
|
|
2895
2939
|
accessibilityState: { selected: isSelected, disabled: isDisabled },
|
|
2896
2940
|
style: ({ pressed }) => [
|
|
2897
|
-
|
|
2941
|
+
styles34.option,
|
|
2898
2942
|
isSelected && { backgroundColor: colors2.colorBlueSubtle },
|
|
2899
2943
|
pressed && !isDisabled && { backgroundColor: colors2.colorBgSubtle },
|
|
2900
2944
|
isDisabled && { opacity: 0.4 }
|
|
2901
2945
|
],
|
|
2902
|
-
children: /* @__PURE__ */ (0,
|
|
2946
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2903
2947
|
ScaledText,
|
|
2904
2948
|
{
|
|
2905
2949
|
style: [
|
|
2906
|
-
|
|
2950
|
+
styles34.optionText,
|
|
2907
2951
|
{
|
|
2908
2952
|
color: isSelected ? colors2.colorInteractive : colors2.colorOnBg
|
|
2909
2953
|
},
|
|
@@ -2921,15 +2965,15 @@ function Combobox({
|
|
|
2921
2965
|
]
|
|
2922
2966
|
}
|
|
2923
2967
|
),
|
|
2924
|
-
/* @__PURE__ */ (0,
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { type: "error", message: error }),
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { type: "hint", message: hint })
|
|
2926
2970
|
] });
|
|
2927
2971
|
}
|
|
2928
2972
|
|
|
2929
2973
|
// src/components/interaction/form/SegmentedControl/SegmentedControl.tsx
|
|
2930
2974
|
var import_react11 = require("react");
|
|
2931
|
-
var
|
|
2932
|
-
var
|
|
2975
|
+
var import_react_native39 = require("react-native");
|
|
2976
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2933
2977
|
var TRACK_PADDING = import_native.spacing.xxxs;
|
|
2934
2978
|
var sizeTokens2 = {
|
|
2935
2979
|
small: { minHeight: 32, fontSize: import_native.font.size.bodyS, px: import_native.spacing.s, py: import_native.spacing.xxs },
|
|
@@ -2944,7 +2988,7 @@ var thumbShadow = {
|
|
|
2944
2988
|
shadowRadius: 2,
|
|
2945
2989
|
elevation: 2
|
|
2946
2990
|
};
|
|
2947
|
-
var
|
|
2991
|
+
var styles35 = import_react_native39.StyleSheet.create({
|
|
2948
2992
|
track: {
|
|
2949
2993
|
flexDirection: "row",
|
|
2950
2994
|
borderRadius: import_native.border.radius.full,
|
|
@@ -2979,10 +3023,10 @@ function SegmentedControl({
|
|
|
2979
3023
|
const items = import_react11.Children.toArray(children);
|
|
2980
3024
|
const trackBg = colors2.colorBgSubtle;
|
|
2981
3025
|
const thumbBg = variant === "outline" ? colors2.colorBg : colors2.colorInteractive;
|
|
2982
|
-
return /* @__PURE__ */ (0,
|
|
2983
|
-
|
|
3026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3027
|
+
import_react_native39.View,
|
|
2984
3028
|
{
|
|
2985
|
-
style: [
|
|
3029
|
+
style: [styles35.track, { backgroundColor: trackBg }, style],
|
|
2986
3030
|
accessibilityRole: "tablist",
|
|
2987
3031
|
accessibilityLabel,
|
|
2988
3032
|
children: items.map((child, index) => {
|
|
@@ -2995,8 +3039,8 @@ function SegmentedControl({
|
|
|
2995
3039
|
paddingVertical: py,
|
|
2996
3040
|
...isActive ? { backgroundColor: thumbBg, ...thumbShadow } : { backgroundColor: "transparent" }
|
|
2997
3041
|
};
|
|
2998
|
-
return /* @__PURE__ */ (0,
|
|
2999
|
-
|
|
3042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3043
|
+
import_react_native39.Pressable,
|
|
3000
3044
|
{
|
|
3001
3045
|
onPress: () => !disabled && onValueChange?.(index),
|
|
3002
3046
|
disabled,
|
|
@@ -3004,15 +3048,15 @@ function SegmentedControl({
|
|
|
3004
3048
|
accessibilityLabel: label ?? void 0,
|
|
3005
3049
|
accessibilityState: { selected: isActive, disabled },
|
|
3006
3050
|
style: ({ pressed }) => [
|
|
3007
|
-
|
|
3051
|
+
styles35.segment,
|
|
3008
3052
|
segmentStyle,
|
|
3009
3053
|
pressed && !disabled && { opacity: 0.7 },
|
|
3010
3054
|
disabled && { opacity: 0.4 }
|
|
3011
3055
|
],
|
|
3012
|
-
children: label !== null ? /* @__PURE__ */ (0,
|
|
3056
|
+
children: label !== null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3013
3057
|
ScaledText,
|
|
3014
3058
|
{
|
|
3015
|
-
style: [
|
|
3059
|
+
style: [styles35.label, { fontSize, color: labelColor }],
|
|
3016
3060
|
numberOfLines: 1,
|
|
3017
3061
|
adjustsFontSizeToFit: true,
|
|
3018
3062
|
minimumFontScale: 0.5,
|
|
@@ -3029,8 +3073,8 @@ function SegmentedControl({
|
|
|
3029
3073
|
|
|
3030
3074
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
3031
3075
|
var import_react12 = require("react");
|
|
3032
|
-
var
|
|
3033
|
-
var
|
|
3076
|
+
var import_react_native40 = require("react-native");
|
|
3077
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3034
3078
|
var INPUT_HEIGHT2 = 44;
|
|
3035
3079
|
var keyboardTypeMap = {
|
|
3036
3080
|
text: "default",
|
|
@@ -3041,19 +3085,19 @@ var keyboardTypeMap = {
|
|
|
3041
3085
|
number: "numeric",
|
|
3042
3086
|
search: "default"
|
|
3043
3087
|
};
|
|
3044
|
-
var
|
|
3088
|
+
var styles36 = import_react_native40.StyleSheet.create({
|
|
3045
3089
|
container: {
|
|
3046
3090
|
gap: import_native.spacing.xxs
|
|
3047
3091
|
},
|
|
3048
3092
|
/**
|
|
3049
|
-
* The wrapper draws the
|
|
3093
|
+
* The wrapper draws the rounded border (`radius.field` from the theme) and provides
|
|
3094
|
+
* at least 44pt touch-target height.
|
|
3050
3095
|
* justifyContent: 'center' vertically centers the inner TextInput on both iOS and Android.
|
|
3051
3096
|
*/
|
|
3052
3097
|
inputWrapper: {
|
|
3053
3098
|
minHeight: INPUT_HEIGHT2,
|
|
3054
3099
|
justifyContent: "center",
|
|
3055
|
-
borderWidth: 1
|
|
3056
|
-
borderRadius: import_native.border.radius.full
|
|
3100
|
+
borderWidth: 1
|
|
3057
3101
|
},
|
|
3058
3102
|
/**
|
|
3059
3103
|
* No vertical padding: iOS centers text automatically inside the wrapper height.
|
|
@@ -3086,23 +3130,24 @@ function FormInput({
|
|
|
3086
3130
|
onFocus,
|
|
3087
3131
|
style
|
|
3088
3132
|
}) {
|
|
3089
|
-
const { colors: colors2 } = useTheme();
|
|
3133
|
+
const { colors: colors2, radius } = useTheme();
|
|
3090
3134
|
const [focused, setFocused] = (0, import_react12.useState)(false);
|
|
3091
3135
|
const borderColor = error ? colors2.colorError : focused ? colors2.colorInteractive : colors2.colorOnBg;
|
|
3092
|
-
return /* @__PURE__ */ (0,
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3095
|
-
|
|
3136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native40.View, { style: [styles36.container, style], children: [
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Label, { label }),
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3139
|
+
import_react_native40.View,
|
|
3096
3140
|
{
|
|
3097
3141
|
style: [
|
|
3098
|
-
|
|
3142
|
+
styles36.inputWrapper,
|
|
3099
3143
|
{
|
|
3100
3144
|
borderColor,
|
|
3145
|
+
borderRadius: radius.field,
|
|
3101
3146
|
backgroundColor: colors2.colorBg
|
|
3102
3147
|
},
|
|
3103
3148
|
disabled && { opacity: 0.4 }
|
|
3104
3149
|
],
|
|
3105
|
-
children: /* @__PURE__ */ (0,
|
|
3150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3106
3151
|
ScaledTextInput,
|
|
3107
3152
|
{
|
|
3108
3153
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
@@ -3127,23 +3172,23 @@ function FormInput({
|
|
|
3127
3172
|
onBlur?.();
|
|
3128
3173
|
},
|
|
3129
3174
|
style: [
|
|
3130
|
-
|
|
3175
|
+
styles36.input,
|
|
3131
3176
|
{ color: colors2.colorOnBg }
|
|
3132
3177
|
]
|
|
3133
3178
|
}
|
|
3134
3179
|
)
|
|
3135
3180
|
}
|
|
3136
3181
|
),
|
|
3137
|
-
/* @__PURE__ */ (0,
|
|
3138
|
-
/* @__PURE__ */ (0,
|
|
3182
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { type: "error", message: error }),
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { type: "hint", message: hint })
|
|
3139
3184
|
] });
|
|
3140
3185
|
}
|
|
3141
3186
|
|
|
3142
3187
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
3143
3188
|
var import_react13 = require("react");
|
|
3144
|
-
var
|
|
3145
|
-
var
|
|
3146
|
-
var
|
|
3189
|
+
var import_react_native41 = require("react-native");
|
|
3190
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3191
|
+
var styles37 = import_react_native41.StyleSheet.create({
|
|
3147
3192
|
container: {
|
|
3148
3193
|
gap: import_native.spacing.xxs
|
|
3149
3194
|
},
|
|
@@ -3154,7 +3199,6 @@ var styles36 = import_react_native40.StyleSheet.create({
|
|
|
3154
3199
|
paddingHorizontal: import_native.spacing.s,
|
|
3155
3200
|
paddingVertical: import_native.spacing.xs,
|
|
3156
3201
|
borderWidth: 1,
|
|
3157
|
-
borderRadius: import_native.border.radius.xs,
|
|
3158
3202
|
minHeight: 100,
|
|
3159
3203
|
textAlignVertical: "top"
|
|
3160
3204
|
}
|
|
@@ -3174,12 +3218,12 @@ function Textarea({
|
|
|
3174
3218
|
onFocus,
|
|
3175
3219
|
style
|
|
3176
3220
|
}) {
|
|
3177
|
-
const { colors: colors2 } = useTheme();
|
|
3221
|
+
const { colors: colors2, radius } = useTheme();
|
|
3178
3222
|
const [focused, setFocused] = (0, import_react13.useState)(false);
|
|
3179
3223
|
const borderColor = error ? colors2.colorError : focused ? colors2.colorInteractive : colors2.colorOnBg;
|
|
3180
|
-
return /* @__PURE__ */ (0,
|
|
3181
|
-
/* @__PURE__ */ (0,
|
|
3182
|
-
/* @__PURE__ */ (0,
|
|
3224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native41.View, { style: [styles37.container, style], children: [
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { label }),
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3183
3227
|
ScaledTextInput,
|
|
3184
3228
|
{
|
|
3185
3229
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
@@ -3202,9 +3246,10 @@ function Textarea({
|
|
|
3202
3246
|
onBlur?.();
|
|
3203
3247
|
},
|
|
3204
3248
|
style: [
|
|
3205
|
-
|
|
3249
|
+
styles37.textarea,
|
|
3206
3250
|
{
|
|
3207
3251
|
borderColor,
|
|
3252
|
+
borderRadius: radius.field,
|
|
3208
3253
|
color: colors2.colorOnBg,
|
|
3209
3254
|
backgroundColor: colors2.colorBg
|
|
3210
3255
|
},
|
|
@@ -3212,16 +3257,16 @@ function Textarea({
|
|
|
3212
3257
|
]
|
|
3213
3258
|
}
|
|
3214
3259
|
),
|
|
3215
|
-
/* @__PURE__ */ (0,
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { type: "error", message: error }),
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { type: "hint", message: hint })
|
|
3217
3262
|
] });
|
|
3218
3263
|
}
|
|
3219
3264
|
|
|
3220
3265
|
// src/components/interaction/form/Select/Select.tsx
|
|
3221
3266
|
var import_react14 = require("react");
|
|
3222
|
-
var
|
|
3223
|
-
var
|
|
3224
|
-
var
|
|
3267
|
+
var import_react_native42 = require("react-native");
|
|
3268
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3269
|
+
var styles38 = import_react_native42.StyleSheet.create({
|
|
3225
3270
|
container: {
|
|
3226
3271
|
gap: import_native.spacing.xxs
|
|
3227
3272
|
},
|
|
@@ -3232,7 +3277,6 @@ var styles37 = import_react_native41.StyleSheet.create({
|
|
|
3232
3277
|
paddingHorizontal: import_native.spacing.s,
|
|
3233
3278
|
paddingVertical: import_native.spacing.xs,
|
|
3234
3279
|
borderWidth: 1,
|
|
3235
|
-
borderRadius: import_native.border.radius.full,
|
|
3236
3280
|
minHeight: 44
|
|
3237
3281
|
},
|
|
3238
3282
|
triggerText: {
|
|
@@ -3242,8 +3286,6 @@ var styles37 = import_react_native41.StyleSheet.create({
|
|
|
3242
3286
|
flex: 1
|
|
3243
3287
|
},
|
|
3244
3288
|
chevron: {
|
|
3245
|
-
fontFamily: import_native.font.family.body,
|
|
3246
|
-
fontSize: import_native.font.size.body,
|
|
3247
3289
|
marginStart: import_native.spacing.xs
|
|
3248
3290
|
},
|
|
3249
3291
|
overlay: {
|
|
@@ -3299,7 +3341,7 @@ function Select({
|
|
|
3299
3341
|
onChange,
|
|
3300
3342
|
style
|
|
3301
3343
|
}) {
|
|
3302
|
-
const { colors: colors2 } = useTheme();
|
|
3344
|
+
const { colors: colors2, radius } = useTheme();
|
|
3303
3345
|
const [open, setOpen] = (0, import_react14.useState)(false);
|
|
3304
3346
|
const selectedOption = options.find((o) => o.value === value);
|
|
3305
3347
|
const displayText = selectedOption?.label ?? placeholder;
|
|
@@ -3309,10 +3351,10 @@ function Select({
|
|
|
3309
3351
|
onChange?.(optionValue);
|
|
3310
3352
|
setOpen(false);
|
|
3311
3353
|
};
|
|
3312
|
-
return /* @__PURE__ */ (0,
|
|
3313
|
-
/* @__PURE__ */ (0,
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3315
|
-
|
|
3354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native42.View, { style: [styles38.container, style], children: [
|
|
3355
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Label, { label }),
|
|
3356
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3357
|
+
import_react_native42.Pressable,
|
|
3316
3358
|
{
|
|
3317
3359
|
accessibilityRole: "button",
|
|
3318
3360
|
accessibilityLabel: typeof label === "string" ? `${label}, ${displayText}` : name,
|
|
@@ -3321,19 +3363,20 @@ function Select({
|
|
|
3321
3363
|
disabled,
|
|
3322
3364
|
onPress: () => setOpen(true),
|
|
3323
3365
|
style: [
|
|
3324
|
-
|
|
3366
|
+
styles38.trigger,
|
|
3325
3367
|
{
|
|
3326
3368
|
borderColor,
|
|
3369
|
+
borderRadius: radius.field,
|
|
3327
3370
|
backgroundColor: colors2.colorBg
|
|
3328
3371
|
},
|
|
3329
3372
|
disabled && { opacity: 0.4 }
|
|
3330
3373
|
],
|
|
3331
3374
|
children: [
|
|
3332
|
-
/* @__PURE__ */ (0,
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3333
3376
|
ScaledText,
|
|
3334
3377
|
{
|
|
3335
3378
|
style: [
|
|
3336
|
-
|
|
3379
|
+
styles38.triggerText,
|
|
3337
3380
|
{
|
|
3338
3381
|
color: isPlaceholder ? colors2.colorOnBgSubtle : colors2.colorOnBg
|
|
3339
3382
|
}
|
|
@@ -3341,53 +3384,60 @@ function Select({
|
|
|
3341
3384
|
children: displayText
|
|
3342
3385
|
}
|
|
3343
3386
|
),
|
|
3344
|
-
/* @__PURE__ */ (0,
|
|
3387
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3388
|
+
Chevron,
|
|
3389
|
+
{
|
|
3390
|
+
testID: "bds-select-chevron",
|
|
3391
|
+
color: colors2.colorOnBgSubtle,
|
|
3392
|
+
style: styles38.chevron
|
|
3393
|
+
}
|
|
3394
|
+
)
|
|
3345
3395
|
]
|
|
3346
3396
|
}
|
|
3347
3397
|
),
|
|
3348
|
-
/* @__PURE__ */ (0,
|
|
3349
|
-
|
|
3398
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3399
|
+
import_react_native42.Modal,
|
|
3350
3400
|
{
|
|
3351
3401
|
visible: open,
|
|
3352
3402
|
transparent: true,
|
|
3353
3403
|
animationType: "slide",
|
|
3354
3404
|
onRequestClose: () => setOpen(false),
|
|
3355
|
-
children: /* @__PURE__ */ (0,
|
|
3356
|
-
|
|
3405
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3406
|
+
import_react_native42.Pressable,
|
|
3357
3407
|
{
|
|
3358
|
-
style:
|
|
3408
|
+
style: styles38.overlay,
|
|
3359
3409
|
onPress: () => setOpen(false),
|
|
3360
3410
|
accessibilityRole: "button",
|
|
3361
3411
|
accessibilityLabel: "Close options",
|
|
3362
|
-
children: /* @__PURE__ */ (0,
|
|
3363
|
-
|
|
3412
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3413
|
+
import_react_native42.Pressable,
|
|
3364
3414
|
{
|
|
3365
|
-
style: [
|
|
3415
|
+
style: [styles38.sheet, { backgroundColor: colors2.colorBg }],
|
|
3366
3416
|
onPress: () => {
|
|
3367
3417
|
},
|
|
3368
|
-
children: /* @__PURE__ */ (0,
|
|
3369
|
-
/* @__PURE__ */ (0,
|
|
3370
|
-
/* @__PURE__ */ (0,
|
|
3371
|
-
/* @__PURE__ */ (0,
|
|
3372
|
-
|
|
3418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native42.SafeAreaView, { children: [
|
|
3419
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native42.View, { style: styles38.sheetHeader, children: [
|
|
3420
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ScaledText, { style: [styles38.sheetTitle, { color: colors2.colorOnBg }], children: typeof label === "string" ? label : "Select" }),
|
|
3421
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3422
|
+
import_react_native42.Pressable,
|
|
3373
3423
|
{
|
|
3374
3424
|
accessibilityRole: "button",
|
|
3375
3425
|
accessibilityLabel: "Close",
|
|
3376
3426
|
onPress: () => setOpen(false),
|
|
3377
3427
|
hitSlop: 8,
|
|
3378
|
-
children: /* @__PURE__ */ (0,
|
|
3428
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ScaledText, { style: [styles38.closeText, { color: colors2.colorInteractive }], children: "Done" })
|
|
3379
3429
|
}
|
|
3380
3430
|
)
|
|
3381
3431
|
] }),
|
|
3382
|
-
/* @__PURE__ */ (0,
|
|
3383
|
-
|
|
3432
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3433
|
+
import_react_native42.FlatList,
|
|
3384
3434
|
{
|
|
3385
3435
|
data: options,
|
|
3386
3436
|
keyExtractor: (item) => item.value,
|
|
3387
3437
|
renderItem: ({ item }) => {
|
|
3388
3438
|
const isSelected = item.value === value;
|
|
3389
|
-
return /* @__PURE__ */ (0,
|
|
3390
|
-
|
|
3439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3440
|
+
import_react_native42.Pressable,
|
|
3391
3441
|
{
|
|
3392
3442
|
accessibilityRole: "button",
|
|
3393
3443
|
accessibilityLabel: item.label,
|
|
@@ -3398,16 +3448,16 @@ function Select({
|
|
|
3398
3448
|
disabled: item.disabled,
|
|
3399
3449
|
onPress: () => handleSelect(item.value),
|
|
3400
3450
|
style: ({ pressed }) => [
|
|
3401
|
-
|
|
3451
|
+
styles38.optionItem,
|
|
3402
3452
|
isSelected && { backgroundColor: colors2.colorBgSubtle },
|
|
3403
3453
|
pressed && { opacity: 0.7 },
|
|
3404
3454
|
item.disabled && { opacity: 0.4 }
|
|
3405
3455
|
],
|
|
3406
|
-
children: /* @__PURE__ */ (0,
|
|
3456
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3407
3457
|
ScaledText,
|
|
3408
3458
|
{
|
|
3409
3459
|
style: [
|
|
3410
|
-
|
|
3460
|
+
styles38.optionText,
|
|
3411
3461
|
{
|
|
3412
3462
|
color: isSelected ? colors2.colorInteractive : colors2.colorOnBg,
|
|
3413
3463
|
fontWeight: isSelected ? import_native.font.weight.semibold : import_native.font.weight.body
|
|
@@ -3428,18 +3478,18 @@ function Select({
|
|
|
3428
3478
|
)
|
|
3429
3479
|
}
|
|
3430
3480
|
),
|
|
3431
|
-
/* @__PURE__ */ (0,
|
|
3432
|
-
/* @__PURE__ */ (0,
|
|
3481
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { type: "error", message: error }),
|
|
3482
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { type: "hint", message: hint })
|
|
3433
3483
|
] });
|
|
3434
3484
|
}
|
|
3435
3485
|
|
|
3436
3486
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
3437
3487
|
var import_react15 = require("react");
|
|
3438
|
-
var
|
|
3439
|
-
var
|
|
3488
|
+
var import_react_native43 = require("react-native");
|
|
3489
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3440
3490
|
var TRACK_HEIGHT = 6;
|
|
3441
3491
|
var THUMB_SIZE = 24;
|
|
3442
|
-
var
|
|
3492
|
+
var styles39 = import_react_native43.StyleSheet.create({
|
|
3443
3493
|
container: {
|
|
3444
3494
|
gap: import_native.spacing.xxs
|
|
3445
3495
|
},
|
|
@@ -3533,34 +3583,34 @@ function Slider({
|
|
|
3533
3583
|
updateValue(valueFromTouch(e.nativeEvent.pageX, pageX));
|
|
3534
3584
|
});
|
|
3535
3585
|
};
|
|
3536
|
-
return /* @__PURE__ */ (0,
|
|
3537
|
-
|
|
3586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3587
|
+
import_react_native43.View,
|
|
3538
3588
|
{
|
|
3539
|
-
style: [
|
|
3589
|
+
style: [styles39.container, style],
|
|
3540
3590
|
accessibilityRole: "adjustable",
|
|
3541
3591
|
accessibilityLabel: label,
|
|
3542
3592
|
accessibilityValue: { min, max, now: currentValue, text: String(currentValue) },
|
|
3543
3593
|
accessibilityState: { disabled },
|
|
3544
3594
|
children: [
|
|
3545
|
-
/* @__PURE__ */ (0,
|
|
3546
|
-
/* @__PURE__ */ (0,
|
|
3547
|
-
showValue && /* @__PURE__ */ (0,
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: styles39.labelRow, children: [
|
|
3596
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Label, { label }),
|
|
3597
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ScaledText, { style: [styles39.valueText, { color: colors2.colorOnBg }], children: currentValue })
|
|
3548
3598
|
] }),
|
|
3549
|
-
/* @__PURE__ */ (0,
|
|
3550
|
-
|
|
3599
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3600
|
+
import_react_native43.View,
|
|
3551
3601
|
{
|
|
3552
|
-
style: [
|
|
3602
|
+
style: [styles39.trackContainer, disabled && { opacity: 0.4 }],
|
|
3553
3603
|
onLayout: handleTrackLayout,
|
|
3554
3604
|
onStartShouldSetResponder: handleStartShouldSetResponder,
|
|
3555
3605
|
onMoveShouldSetResponder: handleStartShouldSetResponder,
|
|
3556
3606
|
onResponderGrant: handleResponderGrant,
|
|
3557
3607
|
onResponderMove: handleResponderMove,
|
|
3558
3608
|
children: [
|
|
3559
|
-
/* @__PURE__ */ (0,
|
|
3560
|
-
|
|
3609
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native43.View, { style: [styles39.track, { backgroundColor: colors2.colorBgSubtle }], children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3610
|
+
import_react_native43.View,
|
|
3561
3611
|
{
|
|
3562
3612
|
style: [
|
|
3563
|
-
|
|
3613
|
+
styles39.fill,
|
|
3564
3614
|
{
|
|
3565
3615
|
width: `${fillPct}%`,
|
|
3566
3616
|
backgroundColor: error ? colors2.colorError : colors2.colorInteractive
|
|
@@ -3568,11 +3618,11 @@ function Slider({
|
|
|
3568
3618
|
]
|
|
3569
3619
|
}
|
|
3570
3620
|
) }),
|
|
3571
|
-
/* @__PURE__ */ (0,
|
|
3572
|
-
|
|
3621
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3622
|
+
import_react_native43.View,
|
|
3573
3623
|
{
|
|
3574
3624
|
style: [
|
|
3575
|
-
|
|
3625
|
+
styles39.thumb,
|
|
3576
3626
|
{
|
|
3577
3627
|
start: `${fillPct}%`,
|
|
3578
3628
|
marginStart: -(THUMB_SIZE / 2),
|
|
@@ -3585,8 +3635,8 @@ function Slider({
|
|
|
3585
3635
|
]
|
|
3586
3636
|
}
|
|
3587
3637
|
),
|
|
3588
|
-
/* @__PURE__ */ (0,
|
|
3589
|
-
/* @__PURE__ */ (0,
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Message, { type: "error", message: error }),
|
|
3639
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Message, { type: "hint", message: hint })
|
|
3590
3640
|
]
|
|
3591
3641
|
}
|
|
3592
3642
|
);
|
|
@@ -3594,10 +3644,10 @@ function Slider({
|
|
|
3594
3644
|
|
|
3595
3645
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
3596
3646
|
var import_react16 = require("react");
|
|
3597
|
-
var
|
|
3598
|
-
var
|
|
3647
|
+
var import_react_native44 = require("react-native");
|
|
3648
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3599
3649
|
var STEPPER_SIZE = 44;
|
|
3600
|
-
var
|
|
3650
|
+
var styles40 = import_react_native44.StyleSheet.create({
|
|
3601
3651
|
container: {
|
|
3602
3652
|
gap: import_native.spacing.xxs
|
|
3603
3653
|
},
|
|
@@ -3612,14 +3662,11 @@ var styles39 = import_react_native43.StyleSheet.create({
|
|
|
3612
3662
|
justifyContent: "center",
|
|
3613
3663
|
borderWidth: 1
|
|
3614
3664
|
},
|
|
3665
|
+
// The steppers round only the field's outer corners, with `radius.field` from the theme.
|
|
3615
3666
|
stepperStart: {
|
|
3616
|
-
borderTopStartRadius: import_native.border.radius.full,
|
|
3617
|
-
borderBottomStartRadius: import_native.border.radius.full,
|
|
3618
3667
|
borderEndWidth: 0
|
|
3619
3668
|
},
|
|
3620
3669
|
stepperEnd: {
|
|
3621
|
-
borderTopEndRadius: import_native.border.radius.full,
|
|
3622
|
-
borderBottomEndRadius: import_native.border.radius.full,
|
|
3623
3670
|
borderStartWidth: 0
|
|
3624
3671
|
},
|
|
3625
3672
|
stepperText: {
|
|
@@ -3670,7 +3717,7 @@ function NumberInput({
|
|
|
3670
3717
|
onChange,
|
|
3671
3718
|
style
|
|
3672
3719
|
}) {
|
|
3673
|
-
const { colors: colors2 } = useTheme();
|
|
3720
|
+
const { colors: colors2, radius } = useTheme();
|
|
3674
3721
|
const isControlled = value !== void 0;
|
|
3675
3722
|
const [internalValue, setInternalValue] = (0, import_react16.useState)(defaultValue ?? 0);
|
|
3676
3723
|
const currentValue = isControlled ? value : internalValue;
|
|
@@ -3686,11 +3733,11 @@ function NumberInput({
|
|
|
3686
3733
|
const canDecrease = min === void 0 || currentValue > min;
|
|
3687
3734
|
const canIncrease = max === void 0 || currentValue < max;
|
|
3688
3735
|
const borderColor = error ? colors2.colorError : colors2.colorOnBg;
|
|
3689
|
-
return /* @__PURE__ */ (0,
|
|
3690
|
-
/* @__PURE__ */ (0,
|
|
3691
|
-
/* @__PURE__ */ (0,
|
|
3692
|
-
/* @__PURE__ */ (0,
|
|
3693
|
-
|
|
3736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native44.View, { style: [styles40.container, style], children: [
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Label, { label }),
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native44.View, { style: [styles40.inputRow, disabled && { opacity: 0.4 }], children: [
|
|
3739
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3740
|
+
import_react_native44.Pressable,
|
|
3694
3741
|
{
|
|
3695
3742
|
accessibilityRole: "button",
|
|
3696
3743
|
accessibilityLabel: "Decrease",
|
|
@@ -3698,36 +3745,38 @@ function NumberInput({
|
|
|
3698
3745
|
disabled: disabled || !canDecrease,
|
|
3699
3746
|
onPress: () => update(currentValue - step),
|
|
3700
3747
|
style: ({ pressed }) => [
|
|
3701
|
-
|
|
3702
|
-
|
|
3748
|
+
styles40.stepper,
|
|
3749
|
+
styles40.stepperStart,
|
|
3703
3750
|
{
|
|
3704
3751
|
borderColor,
|
|
3752
|
+
borderTopStartRadius: radius.field,
|
|
3753
|
+
borderBottomStartRadius: radius.field,
|
|
3705
3754
|
backgroundColor: colors2.colorBgSubtle
|
|
3706
3755
|
},
|
|
3707
3756
|
pressed && { opacity: 0.7 },
|
|
3708
3757
|
(disabled || !canDecrease) && { opacity: 0.4 }
|
|
3709
3758
|
],
|
|
3710
|
-
children: /* @__PURE__ */ (0,
|
|
3759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3711
3760
|
ScaledText,
|
|
3712
3761
|
{
|
|
3713
|
-
style: [
|
|
3762
|
+
style: [styles40.stepperText, { color: colors2.colorOnBg }],
|
|
3714
3763
|
"aria-hidden": true,
|
|
3715
3764
|
children: "\u2212"
|
|
3716
3765
|
}
|
|
3717
3766
|
)
|
|
3718
3767
|
}
|
|
3719
3768
|
),
|
|
3720
|
-
/* @__PURE__ */ (0,
|
|
3721
|
-
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3770
|
+
import_react_native44.View,
|
|
3722
3771
|
{
|
|
3723
3772
|
style: [
|
|
3724
|
-
|
|
3773
|
+
styles40.inputWrapper,
|
|
3725
3774
|
{
|
|
3726
3775
|
borderColor,
|
|
3727
3776
|
backgroundColor: colors2.colorBg
|
|
3728
3777
|
}
|
|
3729
3778
|
],
|
|
3730
|
-
children: /* @__PURE__ */ (0,
|
|
3779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3731
3780
|
ScaledTextInput,
|
|
3732
3781
|
{
|
|
3733
3782
|
accessibilityLabel: label,
|
|
@@ -3747,15 +3796,15 @@ function NumberInput({
|
|
|
3747
3796
|
update(safe);
|
|
3748
3797
|
},
|
|
3749
3798
|
style: [
|
|
3750
|
-
|
|
3799
|
+
styles40.input,
|
|
3751
3800
|
{ color: colors2.colorOnBg }
|
|
3752
3801
|
]
|
|
3753
3802
|
}
|
|
3754
3803
|
)
|
|
3755
3804
|
}
|
|
3756
3805
|
),
|
|
3757
|
-
/* @__PURE__ */ (0,
|
|
3758
|
-
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3807
|
+
import_react_native44.Pressable,
|
|
3759
3808
|
{
|
|
3760
3809
|
accessibilityRole: "button",
|
|
3761
3810
|
accessibilityLabel: "Increase",
|
|
@@ -3763,19 +3812,21 @@ function NumberInput({
|
|
|
3763
3812
|
disabled: disabled || !canIncrease,
|
|
3764
3813
|
onPress: () => update(currentValue + step),
|
|
3765
3814
|
style: ({ pressed }) => [
|
|
3766
|
-
|
|
3767
|
-
|
|
3815
|
+
styles40.stepper,
|
|
3816
|
+
styles40.stepperEnd,
|
|
3768
3817
|
{
|
|
3769
3818
|
borderColor,
|
|
3819
|
+
borderTopEndRadius: radius.field,
|
|
3820
|
+
borderBottomEndRadius: radius.field,
|
|
3770
3821
|
backgroundColor: colors2.colorBgSubtle
|
|
3771
3822
|
},
|
|
3772
3823
|
pressed && { opacity: 0.7 },
|
|
3773
3824
|
(disabled || !canIncrease) && { opacity: 0.4 }
|
|
3774
3825
|
],
|
|
3775
|
-
children: /* @__PURE__ */ (0,
|
|
3826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3776
3827
|
ScaledText,
|
|
3777
3828
|
{
|
|
3778
|
-
style: [
|
|
3829
|
+
style: [styles40.stepperText, { color: colors2.colorOnBg }],
|
|
3779
3830
|
"aria-hidden": true,
|
|
3780
3831
|
children: "+"
|
|
3781
3832
|
}
|
|
@@ -3783,15 +3834,15 @@ function NumberInput({
|
|
|
3783
3834
|
}
|
|
3784
3835
|
)
|
|
3785
3836
|
] }),
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
3837
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message, { type: "error", message: error }),
|
|
3838
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message, { type: "hint", message: hint })
|
|
3788
3839
|
] });
|
|
3789
3840
|
}
|
|
3790
3841
|
|
|
3791
3842
|
// src/components/interaction/Dialog/Dialog.tsx
|
|
3792
|
-
var
|
|
3793
|
-
var
|
|
3794
|
-
var
|
|
3843
|
+
var import_react_native45 = require("react-native");
|
|
3844
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3845
|
+
var styles41 = import_react_native45.StyleSheet.create({
|
|
3795
3846
|
overlay: {
|
|
3796
3847
|
flex: 1,
|
|
3797
3848
|
justifyContent: "center",
|
|
@@ -3847,50 +3898,50 @@ function Dialog({
|
|
|
3847
3898
|
style
|
|
3848
3899
|
}) {
|
|
3849
3900
|
const { colors: colors2 } = useTheme();
|
|
3850
|
-
return /* @__PURE__ */ (0,
|
|
3851
|
-
|
|
3901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3902
|
+
import_react_native45.Modal,
|
|
3852
3903
|
{
|
|
3853
3904
|
visible: isOpen,
|
|
3854
3905
|
transparent: true,
|
|
3855
3906
|
animationType: "fade",
|
|
3856
3907
|
onRequestClose: onClose,
|
|
3857
|
-
children: /* @__PURE__ */ (0,
|
|
3858
|
-
/* @__PURE__ */ (0,
|
|
3859
|
-
|
|
3908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native45.View, { style: styles41.overlay, children: [
|
|
3909
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3910
|
+
import_react_native45.Pressable,
|
|
3860
3911
|
{
|
|
3861
3912
|
testID: "bds-dialog-backdrop",
|
|
3862
|
-
style:
|
|
3913
|
+
style: import_react_native45.StyleSheet.absoluteFill,
|
|
3863
3914
|
onPress: onClose,
|
|
3864
3915
|
accessible: false,
|
|
3865
3916
|
importantForAccessibility: "no"
|
|
3866
3917
|
}
|
|
3867
3918
|
),
|
|
3868
|
-
/* @__PURE__ */ (0,
|
|
3869
|
-
|
|
3919
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3920
|
+
import_react_native45.View,
|
|
3870
3921
|
{
|
|
3871
|
-
style: [
|
|
3922
|
+
style: [styles41.panel, { backgroundColor: colors2.colorGreySubtle }, style],
|
|
3872
3923
|
accessibilityViewIsModal: true,
|
|
3873
3924
|
onAccessibilityEscape: onClose,
|
|
3874
3925
|
children: [
|
|
3875
|
-
/* @__PURE__ */ (0,
|
|
3876
|
-
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3927
|
+
import_react_native45.Pressable,
|
|
3877
3928
|
{
|
|
3878
|
-
style:
|
|
3929
|
+
style: styles41.closeButton,
|
|
3879
3930
|
onPress: onClose,
|
|
3880
3931
|
accessibilityRole: "button",
|
|
3881
3932
|
accessibilityLabel: "Close dialog",
|
|
3882
3933
|
hitSlop: 8,
|
|
3883
|
-
children: /* @__PURE__ */ (0,
|
|
3934
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3884
3935
|
ScaledText,
|
|
3885
3936
|
{
|
|
3886
|
-
style: [
|
|
3937
|
+
style: [styles41.closeText, { color: colors2.colorOnBgSubtle }],
|
|
3887
3938
|
"aria-hidden": true,
|
|
3888
3939
|
children: "\u2715"
|
|
3889
3940
|
}
|
|
3890
3941
|
)
|
|
3891
3942
|
}
|
|
3892
3943
|
),
|
|
3893
|
-
!!title && /* @__PURE__ */ (0,
|
|
3944
|
+
!!title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native45.View, { style: styles41.header, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ScaledText, { style: [styles41.title, { color: colors2.colorOnGreySubtle }], children: title }) }),
|
|
3894
3945
|
children
|
|
3895
3946
|
]
|
|
3896
3947
|
}
|
|
@@ -3902,9 +3953,9 @@ function Dialog({
|
|
|
3902
3953
|
|
|
3903
3954
|
// src/components/interaction/SideSheet/SideSheet.tsx
|
|
3904
3955
|
var import_react17 = require("react");
|
|
3905
|
-
var
|
|
3906
|
-
var
|
|
3907
|
-
var
|
|
3956
|
+
var import_react_native46 = require("react-native");
|
|
3957
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3958
|
+
var styles42 = import_react_native46.StyleSheet.create({
|
|
3908
3959
|
overlay: {
|
|
3909
3960
|
flex: 1,
|
|
3910
3961
|
justifyContent: "flex-end"
|
|
@@ -3961,31 +4012,31 @@ function SideSheet({
|
|
|
3961
4012
|
style
|
|
3962
4013
|
}) {
|
|
3963
4014
|
const { colors: colors2 } = useTheme();
|
|
3964
|
-
const screenHeight =
|
|
3965
|
-
const slideAnim = (0, import_react17.useRef)(new
|
|
3966
|
-
const backdropAnim = (0, import_react17.useRef)(new
|
|
4015
|
+
const screenHeight = import_react_native46.Dimensions.get("window").height;
|
|
4016
|
+
const slideAnim = (0, import_react17.useRef)(new import_react_native46.Animated.Value(screenHeight)).current;
|
|
4017
|
+
const backdropAnim = (0, import_react17.useRef)(new import_react_native46.Animated.Value(0)).current;
|
|
3967
4018
|
(0, import_react17.useEffect)(() => {
|
|
3968
4019
|
if (isOpen) {
|
|
3969
|
-
|
|
3970
|
-
|
|
4020
|
+
import_react_native46.Animated.parallel([
|
|
4021
|
+
import_react_native46.Animated.timing(slideAnim, {
|
|
3971
4022
|
toValue: 0,
|
|
3972
4023
|
duration: 250,
|
|
3973
4024
|
useNativeDriver: true
|
|
3974
4025
|
}),
|
|
3975
|
-
|
|
4026
|
+
import_react_native46.Animated.timing(backdropAnim, {
|
|
3976
4027
|
toValue: 1,
|
|
3977
4028
|
duration: 250,
|
|
3978
4029
|
useNativeDriver: true
|
|
3979
4030
|
})
|
|
3980
4031
|
]).start();
|
|
3981
4032
|
} else {
|
|
3982
|
-
|
|
3983
|
-
|
|
4033
|
+
import_react_native46.Animated.parallel([
|
|
4034
|
+
import_react_native46.Animated.timing(slideAnim, {
|
|
3984
4035
|
toValue: screenHeight,
|
|
3985
4036
|
duration: 200,
|
|
3986
4037
|
useNativeDriver: true
|
|
3987
4038
|
}),
|
|
3988
|
-
|
|
4039
|
+
import_react_native46.Animated.timing(backdropAnim, {
|
|
3989
4040
|
toValue: 0,
|
|
3990
4041
|
duration: 200,
|
|
3991
4042
|
useNativeDriver: true
|
|
@@ -3993,25 +4044,25 @@ function SideSheet({
|
|
|
3993
4044
|
]).start();
|
|
3994
4045
|
}
|
|
3995
4046
|
}, [isOpen, slideAnim, backdropAnim, screenHeight]);
|
|
3996
|
-
return /* @__PURE__ */ (0,
|
|
3997
|
-
|
|
4047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4048
|
+
import_react_native46.Modal,
|
|
3998
4049
|
{
|
|
3999
4050
|
visible: isOpen,
|
|
4000
4051
|
transparent: true,
|
|
4001
4052
|
animationType: "none",
|
|
4002
4053
|
onRequestClose: onClose,
|
|
4003
|
-
children: /* @__PURE__ */ (0,
|
|
4004
|
-
/* @__PURE__ */ (0,
|
|
4005
|
-
|
|
4054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native46.View, { style: styles42.overlay, children: [
|
|
4055
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4056
|
+
import_react_native46.Animated.View,
|
|
4006
4057
|
{
|
|
4007
4058
|
style: [
|
|
4008
|
-
|
|
4059
|
+
import_react_native46.StyleSheet.absoluteFill,
|
|
4009
4060
|
{ backgroundColor: "rgba(0, 0, 0, 0.5)", opacity: backdropAnim }
|
|
4010
4061
|
],
|
|
4011
|
-
children: /* @__PURE__ */ (0,
|
|
4012
|
-
|
|
4062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4063
|
+
import_react_native46.Pressable,
|
|
4013
4064
|
{
|
|
4014
|
-
style:
|
|
4065
|
+
style: import_react_native46.StyleSheet.absoluteFill,
|
|
4015
4066
|
onPress: onClose,
|
|
4016
4067
|
testID: "bds-sidesheet-backdrop",
|
|
4017
4068
|
accessible: false,
|
|
@@ -4020,11 +4071,11 @@ function SideSheet({
|
|
|
4020
4071
|
)
|
|
4021
4072
|
}
|
|
4022
4073
|
),
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4024
|
-
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4075
|
+
import_react_native46.Animated.View,
|
|
4025
4076
|
{
|
|
4026
4077
|
style: [
|
|
4027
|
-
|
|
4078
|
+
styles42.panel,
|
|
4028
4079
|
{
|
|
4029
4080
|
backgroundColor: colors2.colorBg,
|
|
4030
4081
|
transform: [{ translateY: slideAnim }]
|
|
@@ -4034,24 +4085,24 @@ function SideSheet({
|
|
|
4034
4085
|
accessibilityViewIsModal: true,
|
|
4035
4086
|
onAccessibilityEscape: onClose,
|
|
4036
4087
|
children: [
|
|
4037
|
-
/* @__PURE__ */ (0,
|
|
4038
|
-
|
|
4088
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4089
|
+
import_react_native46.View,
|
|
4039
4090
|
{
|
|
4040
|
-
style: [
|
|
4091
|
+
style: [styles42.header, { borderBottomColor: colors2.colorBgSubtle }],
|
|
4041
4092
|
children: [
|
|
4042
|
-
!!title && /* @__PURE__ */ (0,
|
|
4043
|
-
/* @__PURE__ */ (0,
|
|
4044
|
-
|
|
4093
|
+
!!title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ScaledText, { style: [styles42.title, { color: colors2.colorOnBg }], children: title }),
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4095
|
+
import_react_native46.Pressable,
|
|
4045
4096
|
{
|
|
4046
|
-
style:
|
|
4097
|
+
style: styles42.closeButton,
|
|
4047
4098
|
onPress: onClose,
|
|
4048
4099
|
accessibilityRole: "button",
|
|
4049
4100
|
accessibilityLabel: "Close side sheet",
|
|
4050
4101
|
hitSlop: 8,
|
|
4051
|
-
children: /* @__PURE__ */ (0,
|
|
4102
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4052
4103
|
ScaledText,
|
|
4053
4104
|
{
|
|
4054
|
-
style: [
|
|
4105
|
+
style: [styles42.closeText, { color: colors2.colorOnBgSubtle }],
|
|
4055
4106
|
"aria-hidden": true,
|
|
4056
4107
|
children: "\u2715"
|
|
4057
4108
|
}
|
|
@@ -4061,7 +4112,7 @@ function SideSheet({
|
|
|
4061
4112
|
]
|
|
4062
4113
|
}
|
|
4063
4114
|
),
|
|
4064
|
-
/* @__PURE__ */ (0,
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native46.View, { style: styles42.body, testID: "bds-sidesheet-body", children })
|
|
4065
4116
|
]
|
|
4066
4117
|
}
|
|
4067
4118
|
)
|
|
@@ -4072,10 +4123,10 @@ function SideSheet({
|
|
|
4072
4123
|
|
|
4073
4124
|
// src/components/interaction/Toast/Toast.tsx
|
|
4074
4125
|
var import_react18 = require("react");
|
|
4075
|
-
var
|
|
4076
|
-
var
|
|
4126
|
+
var import_react_native47 = require("react-native");
|
|
4127
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4077
4128
|
var ToastContext = (0, import_react18.createContext)(void 0);
|
|
4078
|
-
var
|
|
4129
|
+
var styles43 = import_react_native47.StyleSheet.create({
|
|
4079
4130
|
container: {
|
|
4080
4131
|
position: "absolute",
|
|
4081
4132
|
top: 0,
|
|
@@ -4120,8 +4171,8 @@ function ToastItem({
|
|
|
4120
4171
|
onRemove
|
|
4121
4172
|
}) {
|
|
4122
4173
|
const { colors: colors2 } = useTheme();
|
|
4123
|
-
const slideAnim = (0, import_react18.useRef)(new
|
|
4124
|
-
const opacityAnim = (0, import_react18.useRef)(new
|
|
4174
|
+
const slideAnim = (0, import_react18.useRef)(new import_react_native47.Animated.Value(-100)).current;
|
|
4175
|
+
const opacityAnim = (0, import_react18.useRef)(new import_react_native47.Animated.Value(0)).current;
|
|
4125
4176
|
const variantColors = (0, import_react18.useMemo)(
|
|
4126
4177
|
() => ({
|
|
4127
4178
|
success: { bg: colors2.colorSuccess, text: colors2.colorOnSuccess },
|
|
@@ -4131,13 +4182,13 @@ function ToastItem({
|
|
|
4131
4182
|
[colors2]
|
|
4132
4183
|
);
|
|
4133
4184
|
(0, import_react18.useEffect)(() => {
|
|
4134
|
-
|
|
4135
|
-
|
|
4185
|
+
import_react_native47.Animated.parallel([
|
|
4186
|
+
import_react_native47.Animated.timing(slideAnim, {
|
|
4136
4187
|
toValue: 0,
|
|
4137
4188
|
duration: 200,
|
|
4138
4189
|
useNativeDriver: true
|
|
4139
4190
|
}),
|
|
4140
|
-
|
|
4191
|
+
import_react_native47.Animated.timing(opacityAnim, {
|
|
4141
4192
|
toValue: 1,
|
|
4142
4193
|
duration: 200,
|
|
4143
4194
|
useNativeDriver: true
|
|
@@ -4149,11 +4200,11 @@ function ToastItem({
|
|
|
4149
4200
|
return () => clearTimeout(timer);
|
|
4150
4201
|
}, [onRemove]);
|
|
4151
4202
|
const { bg, text } = variantColors[toast.variant];
|
|
4152
|
-
return /* @__PURE__ */ (0,
|
|
4153
|
-
|
|
4203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4204
|
+
import_react_native47.Animated.View,
|
|
4154
4205
|
{
|
|
4155
4206
|
style: [
|
|
4156
|
-
|
|
4207
|
+
styles43.toast,
|
|
4157
4208
|
{
|
|
4158
4209
|
backgroundColor: bg,
|
|
4159
4210
|
transform: [{ translateY: slideAnim }],
|
|
@@ -4163,16 +4214,16 @@ function ToastItem({
|
|
|
4163
4214
|
accessibilityRole: "alert",
|
|
4164
4215
|
accessibilityLiveRegion: "polite",
|
|
4165
4216
|
children: [
|
|
4166
|
-
/* @__PURE__ */ (0,
|
|
4167
|
-
/* @__PURE__ */ (0,
|
|
4168
|
-
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScaledText, { style: [styles43.message, { color: text }], children: toast.message }),
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4219
|
+
import_react_native47.Pressable,
|
|
4169
4220
|
{
|
|
4170
|
-
style:
|
|
4221
|
+
style: styles43.closeButton,
|
|
4171
4222
|
onPress: onRemove,
|
|
4172
4223
|
accessibilityRole: "button",
|
|
4173
4224
|
accessibilityLabel: "Dismiss",
|
|
4174
4225
|
hitSlop: 8,
|
|
4175
|
-
children: /* @__PURE__ */ (0,
|
|
4226
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScaledText, { style: [styles43.closeText, { color: text }], "aria-hidden": true, children: "\u2715" })
|
|
4176
4227
|
}
|
|
4177
4228
|
)
|
|
4178
4229
|
]
|
|
@@ -4192,15 +4243,15 @@ function ToastProvider({
|
|
|
4192
4243
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
4193
4244
|
}, []);
|
|
4194
4245
|
const value = (0, import_react18.useMemo)(() => ({ showToast }), [showToast]);
|
|
4195
|
-
return /* @__PURE__ */ (0,
|
|
4246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native47.View, { style: [{ flex: 1 }, style], children: [
|
|
4196
4247
|
children,
|
|
4197
|
-
toasts.length > 0 && /* @__PURE__ */ (0,
|
|
4198
|
-
|
|
4248
|
+
toasts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4249
|
+
import_react_native47.View,
|
|
4199
4250
|
{
|
|
4200
|
-
style:
|
|
4251
|
+
style: styles43.container,
|
|
4201
4252
|
accessibilityRole: "summary",
|
|
4202
4253
|
accessibilityLabel: "Notifications",
|
|
4203
|
-
children: toasts.map((toast) => /* @__PURE__ */ (0,
|
|
4254
|
+
children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4204
4255
|
ToastItem,
|
|
4205
4256
|
{
|
|
4206
4257
|
toast,
|
|
@@ -4222,9 +4273,9 @@ function useToast() {
|
|
|
4222
4273
|
|
|
4223
4274
|
// src/components/interaction/DropdownMenu/DropdownMenu.tsx
|
|
4224
4275
|
var import_react19 = __toESM(require("react"), 1);
|
|
4225
|
-
var
|
|
4226
|
-
var
|
|
4227
|
-
var
|
|
4276
|
+
var import_react_native48 = require("react-native");
|
|
4277
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4278
|
+
var styles44 = import_react_native48.StyleSheet.create({
|
|
4228
4279
|
overlay: {
|
|
4229
4280
|
flex: 1,
|
|
4230
4281
|
justifyContent: "flex-end"
|
|
@@ -4282,31 +4333,31 @@ function DropdownMenu({
|
|
|
4282
4333
|
}) {
|
|
4283
4334
|
const { colors: colors2 } = useTheme();
|
|
4284
4335
|
const [open, setOpen] = (0, import_react19.useState)(false);
|
|
4285
|
-
const screenHeight =
|
|
4286
|
-
const slideAnim = (0, import_react19.useRef)(new
|
|
4287
|
-
const backdropAnim = (0, import_react19.useRef)(new
|
|
4336
|
+
const screenHeight = import_react_native48.Dimensions.get("window").height;
|
|
4337
|
+
const slideAnim = (0, import_react19.useRef)(new import_react_native48.Animated.Value(screenHeight)).current;
|
|
4338
|
+
const backdropAnim = (0, import_react19.useRef)(new import_react_native48.Animated.Value(0)).current;
|
|
4288
4339
|
(0, import_react19.useEffect)(() => {
|
|
4289
4340
|
if (open) {
|
|
4290
|
-
|
|
4291
|
-
|
|
4341
|
+
import_react_native48.Animated.parallel([
|
|
4342
|
+
import_react_native48.Animated.timing(slideAnim, {
|
|
4292
4343
|
toValue: 0,
|
|
4293
4344
|
duration: 250,
|
|
4294
4345
|
useNativeDriver: true
|
|
4295
4346
|
}),
|
|
4296
|
-
|
|
4347
|
+
import_react_native48.Animated.timing(backdropAnim, {
|
|
4297
4348
|
toValue: 1,
|
|
4298
4349
|
duration: 250,
|
|
4299
4350
|
useNativeDriver: true
|
|
4300
4351
|
})
|
|
4301
4352
|
]).start();
|
|
4302
4353
|
} else {
|
|
4303
|
-
|
|
4304
|
-
|
|
4354
|
+
import_react_native48.Animated.parallel([
|
|
4355
|
+
import_react_native48.Animated.timing(slideAnim, {
|
|
4305
4356
|
toValue: screenHeight,
|
|
4306
4357
|
duration: 200,
|
|
4307
4358
|
useNativeDriver: true
|
|
4308
4359
|
}),
|
|
4309
|
-
|
|
4360
|
+
import_react_native48.Animated.timing(backdropAnim, {
|
|
4310
4361
|
toValue: 0,
|
|
4311
4362
|
duration: 200,
|
|
4312
4363
|
useNativeDriver: true
|
|
@@ -4318,31 +4369,31 @@ function DropdownMenu({
|
|
|
4318
4369
|
item.onPress?.();
|
|
4319
4370
|
setOpen(false);
|
|
4320
4371
|
};
|
|
4321
|
-
return /* @__PURE__ */ (0,
|
|
4372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native48.View, { style, children: [
|
|
4322
4373
|
import_react19.default.cloneElement(trigger, {
|
|
4323
4374
|
onPress: () => setOpen(true),
|
|
4324
4375
|
accessibilityRole: "button",
|
|
4325
4376
|
accessibilityLabel: title
|
|
4326
4377
|
}),
|
|
4327
|
-
/* @__PURE__ */ (0,
|
|
4328
|
-
|
|
4378
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4379
|
+
import_react_native48.Modal,
|
|
4329
4380
|
{
|
|
4330
4381
|
visible: open,
|
|
4331
4382
|
transparent: true,
|
|
4332
4383
|
animationType: "none",
|
|
4333
4384
|
onRequestClose: () => setOpen(false),
|
|
4334
|
-
children: /* @__PURE__ */ (0,
|
|
4335
|
-
/* @__PURE__ */ (0,
|
|
4336
|
-
|
|
4385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native48.View, { style: styles44.overlay, children: [
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4387
|
+
import_react_native48.Animated.View,
|
|
4337
4388
|
{
|
|
4338
4389
|
style: [
|
|
4339
|
-
|
|
4390
|
+
import_react_native48.StyleSheet.absoluteFill,
|
|
4340
4391
|
{ backgroundColor: "rgba(0, 0, 0, 0.5)", opacity: backdropAnim }
|
|
4341
4392
|
],
|
|
4342
|
-
children: /* @__PURE__ */ (0,
|
|
4343
|
-
|
|
4393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4394
|
+
import_react_native48.Pressable,
|
|
4344
4395
|
{
|
|
4345
|
-
style:
|
|
4396
|
+
style: import_react_native48.StyleSheet.absoluteFill,
|
|
4346
4397
|
onPress: () => setOpen(false),
|
|
4347
4398
|
testID: "bds-dropdownmenu-backdrop",
|
|
4348
4399
|
accessible: false,
|
|
@@ -4351,11 +4402,11 @@ function DropdownMenu({
|
|
|
4351
4402
|
)
|
|
4352
4403
|
}
|
|
4353
4404
|
),
|
|
4354
|
-
/* @__PURE__ */ (0,
|
|
4355
|
-
|
|
4405
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4406
|
+
import_react_native48.Animated.View,
|
|
4356
4407
|
{
|
|
4357
4408
|
style: [
|
|
4358
|
-
|
|
4409
|
+
styles44.sheet,
|
|
4359
4410
|
{
|
|
4360
4411
|
backgroundColor: colors2.colorBg,
|
|
4361
4412
|
transform: [{ translateY: slideAnim }]
|
|
@@ -4363,28 +4414,28 @@ function DropdownMenu({
|
|
|
4363
4414
|
],
|
|
4364
4415
|
accessibilityViewIsModal: true,
|
|
4365
4416
|
onAccessibilityEscape: () => setOpen(false),
|
|
4366
|
-
children: /* @__PURE__ */ (0,
|
|
4367
|
-
/* @__PURE__ */ (0,
|
|
4368
|
-
|
|
4417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native48.SafeAreaView, { children: [
|
|
4418
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4419
|
+
import_react_native48.View,
|
|
4369
4420
|
{
|
|
4370
4421
|
style: [
|
|
4371
|
-
|
|
4422
|
+
styles44.sheetHeader,
|
|
4372
4423
|
{ borderBottomColor: colors2.colorBgSubtle }
|
|
4373
4424
|
],
|
|
4374
4425
|
children: [
|
|
4375
|
-
/* @__PURE__ */ (0,
|
|
4376
|
-
/* @__PURE__ */ (0,
|
|
4377
|
-
|
|
4426
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ScaledText, { style: [styles44.sheetTitle, { color: colors2.colorOnBg }], children: title }),
|
|
4427
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4428
|
+
import_react_native48.Pressable,
|
|
4378
4429
|
{
|
|
4379
4430
|
accessibilityRole: "button",
|
|
4380
4431
|
accessibilityLabel: "Close",
|
|
4381
4432
|
onPress: () => setOpen(false),
|
|
4382
4433
|
hitSlop: 8,
|
|
4383
|
-
children: /* @__PURE__ */ (0,
|
|
4434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4384
4435
|
ScaledText,
|
|
4385
4436
|
{
|
|
4386
4437
|
style: [
|
|
4387
|
-
|
|
4438
|
+
styles44.closeText,
|
|
4388
4439
|
{ color: colors2.colorInteractive }
|
|
4389
4440
|
],
|
|
4390
4441
|
children: "Done"
|
|
@@ -4395,24 +4446,24 @@ function DropdownMenu({
|
|
|
4395
4446
|
]
|
|
4396
4447
|
}
|
|
4397
4448
|
),
|
|
4398
|
-
/* @__PURE__ */ (0,
|
|
4399
|
-
|
|
4449
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4450
|
+
import_react_native48.FlatList,
|
|
4400
4451
|
{
|
|
4401
4452
|
data: items,
|
|
4402
4453
|
keyExtractor: (item) => item.id,
|
|
4403
|
-
renderItem: ({ item }) => /* @__PURE__ */ (0,
|
|
4404
|
-
item.separator && /* @__PURE__ */ (0,
|
|
4405
|
-
|
|
4454
|
+
renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
4455
|
+
item.separator && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4456
|
+
import_react_native48.View,
|
|
4406
4457
|
{
|
|
4407
4458
|
style: [
|
|
4408
|
-
|
|
4459
|
+
styles44.separator,
|
|
4409
4460
|
{ backgroundColor: colors2.colorBgSubtle }
|
|
4410
4461
|
],
|
|
4411
4462
|
accessibilityRole: "none"
|
|
4412
4463
|
}
|
|
4413
4464
|
),
|
|
4414
|
-
/* @__PURE__ */ (0,
|
|
4415
|
-
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4466
|
+
import_react_native48.Pressable,
|
|
4416
4467
|
{
|
|
4417
4468
|
accessibilityRole: "menuitem",
|
|
4418
4469
|
accessibilityLabel: item.label,
|
|
@@ -4420,24 +4471,24 @@ function DropdownMenu({
|
|
|
4420
4471
|
disabled: item.disabled,
|
|
4421
4472
|
onPress: () => handleItemPress(item),
|
|
4422
4473
|
style: ({ pressed }) => [
|
|
4423
|
-
|
|
4474
|
+
styles44.item,
|
|
4424
4475
|
pressed && { backgroundColor: colors2.colorBgSubtle },
|
|
4425
4476
|
item.disabled && { opacity: 0.4 }
|
|
4426
4477
|
],
|
|
4427
4478
|
children: [
|
|
4428
|
-
!!item.icon && /* @__PURE__ */ (0,
|
|
4429
|
-
|
|
4479
|
+
!!item.icon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4480
|
+
import_react_native48.View,
|
|
4430
4481
|
{
|
|
4431
4482
|
importantForAccessibility: "no-hide-descendants",
|
|
4432
4483
|
accessibilityElementsHidden: true,
|
|
4433
4484
|
children: item.icon
|
|
4434
4485
|
}
|
|
4435
4486
|
),
|
|
4436
|
-
/* @__PURE__ */ (0,
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4437
4488
|
ScaledText,
|
|
4438
4489
|
{
|
|
4439
4490
|
style: [
|
|
4440
|
-
|
|
4491
|
+
styles44.itemText,
|
|
4441
4492
|
{ color: colors2.colorOnBg }
|
|
4442
4493
|
],
|
|
4443
4494
|
children: item.label
|
|
@@ -4460,9 +4511,9 @@ function DropdownMenu({
|
|
|
4460
4511
|
|
|
4461
4512
|
// src/components/interaction/Popover/Popover.tsx
|
|
4462
4513
|
var import_react20 = __toESM(require("react"), 1);
|
|
4463
|
-
var
|
|
4464
|
-
var
|
|
4465
|
-
var
|
|
4514
|
+
var import_react_native49 = require("react-native");
|
|
4515
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4516
|
+
var styles45 = import_react_native49.StyleSheet.create({
|
|
4466
4517
|
wrapper: {
|
|
4467
4518
|
alignSelf: "flex-start"
|
|
4468
4519
|
},
|
|
@@ -4494,35 +4545,35 @@ function Popover({
|
|
|
4494
4545
|
const { colors: colors2 } = useTheme();
|
|
4495
4546
|
const [isOpen, setIsOpen] = (0, import_react20.useState)(false);
|
|
4496
4547
|
const close = () => setIsOpen(false);
|
|
4497
|
-
return /* @__PURE__ */ (0,
|
|
4548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native49.View, { style: [styles45.wrapper, style], children: [
|
|
4498
4549
|
import_react20.default.cloneElement(children, {
|
|
4499
4550
|
onPress: () => setIsOpen(true),
|
|
4500
4551
|
accessibilityRole: "button",
|
|
4501
4552
|
accessibilityLabel: accessibilityLabel ?? "Open popover"
|
|
4502
4553
|
}),
|
|
4503
|
-
/* @__PURE__ */ (0,
|
|
4504
|
-
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4555
|
+
import_react_native49.Modal,
|
|
4505
4556
|
{
|
|
4506
4557
|
visible: isOpen,
|
|
4507
4558
|
transparent: true,
|
|
4508
4559
|
animationType: "fade",
|
|
4509
4560
|
onRequestClose: close,
|
|
4510
|
-
children: /* @__PURE__ */ (0,
|
|
4511
|
-
/* @__PURE__ */ (0,
|
|
4512
|
-
|
|
4561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native49.View, { style: styles45.overlay, onAccessibilityEscape: close, children: [
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4563
|
+
import_react_native49.Pressable,
|
|
4513
4564
|
{
|
|
4514
4565
|
testID: "bds-popover-backdrop",
|
|
4515
|
-
style:
|
|
4566
|
+
style: import_react_native49.StyleSheet.absoluteFill,
|
|
4516
4567
|
onPress: close,
|
|
4517
4568
|
onAccessibilityTap: close,
|
|
4518
4569
|
accessibilityRole: "button",
|
|
4519
4570
|
accessibilityLabel: "Close popover"
|
|
4520
4571
|
}
|
|
4521
4572
|
),
|
|
4522
|
-
/* @__PURE__ */ (0,
|
|
4523
|
-
|
|
4573
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4574
|
+
import_react_native49.View,
|
|
4524
4575
|
{
|
|
4525
|
-
style: [
|
|
4576
|
+
style: [styles45.panel, { backgroundColor: colors2.colorBg }],
|
|
4526
4577
|
accessibilityLabel,
|
|
4527
4578
|
children: content
|
|
4528
4579
|
}
|