@mitumba/ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +188 -3
- package/dist/index.d.ts +188 -3
- package/dist/index.js +1719 -1082
- package/dist/index.mjs +1706 -1076
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1146,10 +1146,819 @@ import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
|
1146
1146
|
import { tokens as tokens11 } from "@mitumba/tokens";
|
|
1147
1147
|
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1148
1148
|
|
|
1149
|
-
// src/components/
|
|
1149
|
+
// src/components/feedback/EmptyState/EmptyState.tsx
|
|
1150
|
+
import React7 from "react";
|
|
1150
1151
|
import Box9 from "@mui/material/Box";
|
|
1152
|
+
import Typography7 from "@mui/material/Typography";
|
|
1151
1153
|
import { tokens as tokens12 } from "@mitumba/tokens";
|
|
1152
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1154
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1155
|
+
function EmptyState({
|
|
1156
|
+
illustration,
|
|
1157
|
+
icon,
|
|
1158
|
+
title,
|
|
1159
|
+
subtitle,
|
|
1160
|
+
action,
|
|
1161
|
+
variant = "standard",
|
|
1162
|
+
showBlob = true
|
|
1163
|
+
}) {
|
|
1164
|
+
const isCompact = variant === "compact";
|
|
1165
|
+
const isElevated = variant === "elevated";
|
|
1166
|
+
const displayIllustration = illustration || icon;
|
|
1167
|
+
const renderIllustrationContent = () => {
|
|
1168
|
+
if (!displayIllustration) return null;
|
|
1169
|
+
const isValidElement = React7.isValidElement(displayIllustration);
|
|
1170
|
+
const isBasicTag = isValidElement && typeof displayIllustration.type === "string";
|
|
1171
|
+
if (isValidElement && isBasicTag) {
|
|
1172
|
+
return displayIllustration;
|
|
1173
|
+
}
|
|
1174
|
+
return /* @__PURE__ */ jsxs8(
|
|
1175
|
+
Box9,
|
|
1176
|
+
{
|
|
1177
|
+
sx: {
|
|
1178
|
+
display: "flex",
|
|
1179
|
+
alignItems: "center",
|
|
1180
|
+
justifyContent: "center",
|
|
1181
|
+
mb: isCompact ? 0 : tokens12.spacing.md,
|
|
1182
|
+
position: "relative",
|
|
1183
|
+
width: isCompact ? 48 : 80,
|
|
1184
|
+
// Reigned in from 120
|
|
1185
|
+
height: isCompact ? 48 : 80
|
|
1186
|
+
// Reigned in from 120
|
|
1187
|
+
},
|
|
1188
|
+
children: [
|
|
1189
|
+
showBlob && !isCompact && /* @__PURE__ */ jsx12(
|
|
1190
|
+
Box9,
|
|
1191
|
+
{
|
|
1192
|
+
sx: {
|
|
1193
|
+
position: "absolute",
|
|
1194
|
+
width: "100%",
|
|
1195
|
+
height: "100%",
|
|
1196
|
+
backgroundColor: tokens12.colors.background,
|
|
1197
|
+
borderRadius: "50% 50% 50% 0",
|
|
1198
|
+
transform: "rotate(-45deg)",
|
|
1199
|
+
opacity: 0.6,
|
|
1200
|
+
zIndex: 0
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
),
|
|
1204
|
+
/* @__PURE__ */ jsx12(
|
|
1205
|
+
Box9,
|
|
1206
|
+
{
|
|
1207
|
+
sx: {
|
|
1208
|
+
zIndex: 1,
|
|
1209
|
+
color: tokens12.colors.textDisabled,
|
|
1210
|
+
display: "flex",
|
|
1211
|
+
backgroundColor: isElevated ? "transparent" : tokens12.colors.surface,
|
|
1212
|
+
borderRadius: tokens12.radius.full,
|
|
1213
|
+
p: isCompact ? 0 : tokens12.spacing.lg,
|
|
1214
|
+
"& svg": { fontSize: isCompact ? 24 : 40 }
|
|
1215
|
+
// Reigned in
|
|
1216
|
+
},
|
|
1217
|
+
children: displayIllustration
|
|
1218
|
+
}
|
|
1219
|
+
)
|
|
1220
|
+
]
|
|
1221
|
+
}
|
|
1222
|
+
);
|
|
1223
|
+
};
|
|
1224
|
+
return /* @__PURE__ */ jsxs8(
|
|
1225
|
+
Box9,
|
|
1226
|
+
{
|
|
1227
|
+
sx: {
|
|
1228
|
+
display: "flex",
|
|
1229
|
+
flexDirection: "column",
|
|
1230
|
+
alignItems: "center",
|
|
1231
|
+
justifyContent: "center",
|
|
1232
|
+
textAlign: "center",
|
|
1233
|
+
width: "100%",
|
|
1234
|
+
boxSizing: "border-box",
|
|
1235
|
+
padding: isCompact || isElevated ? tokens12.spacing.xl : tokens12.spacing.xxxl,
|
|
1236
|
+
gap: isCompact ? tokens12.spacing.xs : tokens12.spacing.sm,
|
|
1237
|
+
// Professional density
|
|
1238
|
+
backgroundColor: isElevated ? tokens12.colors.surface : tokens12.colors.background,
|
|
1239
|
+
borderRadius: tokens12.radius.lg,
|
|
1240
|
+
// Reigned in from XL
|
|
1241
|
+
border: isElevated ? "none" : `1px dashed ${tokens12.colors.divider}`,
|
|
1242
|
+
boxShadow: isElevated ? tokens12.shadows.card : "none",
|
|
1243
|
+
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
1244
|
+
},
|
|
1245
|
+
children: [
|
|
1246
|
+
renderIllustrationContent(),
|
|
1247
|
+
/* @__PURE__ */ jsx12(
|
|
1248
|
+
Typography7,
|
|
1249
|
+
{
|
|
1250
|
+
sx: {
|
|
1251
|
+
fontSize: isCompact ? tokens12.typography.fontSizes.base : tokens12.typography.fontSizes.lg,
|
|
1252
|
+
// Reigned in
|
|
1253
|
+
fontWeight: 800,
|
|
1254
|
+
color: tokens12.colors.textPrimary,
|
|
1255
|
+
fontFamily: tokens12.typography.fontFamily,
|
|
1256
|
+
lineHeight: 1.1,
|
|
1257
|
+
width: "100%",
|
|
1258
|
+
mt: isCompact ? 0 : 1
|
|
1259
|
+
},
|
|
1260
|
+
children: title
|
|
1261
|
+
}
|
|
1262
|
+
),
|
|
1263
|
+
/* @__PURE__ */ jsx12(
|
|
1264
|
+
Typography7,
|
|
1265
|
+
{
|
|
1266
|
+
sx: {
|
|
1267
|
+
fontSize: isCompact ? tokens12.typography.fontSizes.xs : tokens12.typography.fontSizes.base,
|
|
1268
|
+
color: tokens12.colors.textSecondary,
|
|
1269
|
+
fontFamily: tokens12.typography.fontFamily,
|
|
1270
|
+
width: "100%",
|
|
1271
|
+
marginInline: "auto",
|
|
1272
|
+
lineHeight: 1.4,
|
|
1273
|
+
mt: 0.5
|
|
1274
|
+
},
|
|
1275
|
+
children: subtitle
|
|
1276
|
+
}
|
|
1277
|
+
),
|
|
1278
|
+
action && /* @__PURE__ */ jsx12(Box9, { sx: { mt: isCompact ? tokens12.spacing.sm : tokens12.spacing.base }, children: /* @__PURE__ */ jsx12(
|
|
1279
|
+
MitumbaPrimaryButton,
|
|
1280
|
+
{
|
|
1281
|
+
label: action.label,
|
|
1282
|
+
onClick: action.onClick,
|
|
1283
|
+
variant: action.variant || "primary",
|
|
1284
|
+
size: isCompact ? "small" : "medium",
|
|
1285
|
+
fullWidth: false
|
|
1286
|
+
}
|
|
1287
|
+
) })
|
|
1288
|
+
]
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
// src/components/feedback/ErrorState/ErrorState.tsx
|
|
1294
|
+
import Box10 from "@mui/material/Box";
|
|
1295
|
+
import Typography8 from "@mui/material/Typography";
|
|
1296
|
+
import Stack from "@mui/material/Stack";
|
|
1297
|
+
import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
|
|
1298
|
+
import SentimentVeryDissatisfiedIcon from "@mui/icons-material/SentimentVeryDissatisfied";
|
|
1299
|
+
import WifiOffIcon from "@mui/icons-material/WifiOff";
|
|
1300
|
+
import GppBadIcon from "@mui/icons-material/GppBad";
|
|
1301
|
+
import BugReportIcon from "@mui/icons-material/BugReport";
|
|
1302
|
+
import { tokens as tokens13 } from "@mitumba/tokens";
|
|
1303
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1304
|
+
function ErrorState({
|
|
1305
|
+
title = "Something went wrong",
|
|
1306
|
+
subtitle = "Please try again",
|
|
1307
|
+
type = "general",
|
|
1308
|
+
variant = "standard",
|
|
1309
|
+
onRetry,
|
|
1310
|
+
retryLabel = "Try Again",
|
|
1311
|
+
onBack,
|
|
1312
|
+
illustration,
|
|
1313
|
+
showBlob = true
|
|
1314
|
+
}) {
|
|
1315
|
+
const isCompact = variant === "compact";
|
|
1316
|
+
const isElevated = variant === "elevated";
|
|
1317
|
+
const typeConfig = {
|
|
1318
|
+
general: { icon: /* @__PURE__ */ jsx13(BugReportIcon, {}), color: tokens13.colors.error },
|
|
1319
|
+
"404": { icon: /* @__PURE__ */ jsx13(SentimentVeryDissatisfiedIcon, {}), color: tokens13.colors.earth },
|
|
1320
|
+
"500": { icon: /* @__PURE__ */ jsx13(ErrorOutlineIcon, {}), color: tokens13.colors.error },
|
|
1321
|
+
network: { icon: /* @__PURE__ */ jsx13(WifiOffIcon, {}), color: tokens13.colors.info },
|
|
1322
|
+
forbidden: { icon: /* @__PURE__ */ jsx13(GppBadIcon, {}), color: tokens13.colors.error }
|
|
1323
|
+
};
|
|
1324
|
+
const activeConfig = typeConfig[type];
|
|
1325
|
+
const displayIllustration = illustration || activeConfig.icon;
|
|
1326
|
+
const renderIllustrationContent = () => {
|
|
1327
|
+
if (!displayIllustration) return null;
|
|
1328
|
+
return /* @__PURE__ */ jsxs9(
|
|
1329
|
+
Box10,
|
|
1330
|
+
{
|
|
1331
|
+
sx: {
|
|
1332
|
+
display: "flex",
|
|
1333
|
+
alignItems: "center",
|
|
1334
|
+
justifyContent: "center",
|
|
1335
|
+
mb: isCompact ? 0 : tokens13.spacing.md,
|
|
1336
|
+
position: "relative",
|
|
1337
|
+
width: isCompact ? 48 : 80,
|
|
1338
|
+
// Reigned in from 120
|
|
1339
|
+
height: isCompact ? 48 : 80
|
|
1340
|
+
// Reigned in from 120
|
|
1341
|
+
},
|
|
1342
|
+
children: [
|
|
1343
|
+
showBlob && !isCompact && /* @__PURE__ */ jsx13(
|
|
1344
|
+
Box10,
|
|
1345
|
+
{
|
|
1346
|
+
sx: {
|
|
1347
|
+
position: "absolute",
|
|
1348
|
+
width: "100%",
|
|
1349
|
+
height: "100%",
|
|
1350
|
+
backgroundColor: `${activeConfig.color}15`,
|
|
1351
|
+
borderRadius: "50%",
|
|
1352
|
+
// Reigned in from asymmetric morph
|
|
1353
|
+
opacity: 0.6,
|
|
1354
|
+
zIndex: 0
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
),
|
|
1358
|
+
/* @__PURE__ */ jsx13(
|
|
1359
|
+
Box10,
|
|
1360
|
+
{
|
|
1361
|
+
sx: {
|
|
1362
|
+
zIndex: 1,
|
|
1363
|
+
color: activeConfig.color,
|
|
1364
|
+
display: "flex",
|
|
1365
|
+
backgroundColor: tokens13.colors.surface,
|
|
1366
|
+
borderRadius: tokens13.radius.full,
|
|
1367
|
+
boxShadow: tokens13.shadows.card,
|
|
1368
|
+
p: isCompact ? 1 : tokens13.spacing.lg,
|
|
1369
|
+
"& svg": { fontSize: isCompact ? 24 : 40 }
|
|
1370
|
+
// Reigned in
|
|
1371
|
+
},
|
|
1372
|
+
children: displayIllustration
|
|
1373
|
+
}
|
|
1374
|
+
)
|
|
1375
|
+
]
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
};
|
|
1379
|
+
return /* @__PURE__ */ jsx13(
|
|
1380
|
+
Box10,
|
|
1381
|
+
{
|
|
1382
|
+
sx: {
|
|
1383
|
+
display: "flex",
|
|
1384
|
+
flexDirection: "column",
|
|
1385
|
+
alignItems: "center",
|
|
1386
|
+
justifyContent: "center",
|
|
1387
|
+
textAlign: "center",
|
|
1388
|
+
width: "100%",
|
|
1389
|
+
boxSizing: "border-box",
|
|
1390
|
+
padding: isCompact || isElevated ? tokens13.spacing.xl : tokens13.spacing.xxxl,
|
|
1391
|
+
gap: isCompact ? tokens13.spacing.xs : tokens13.spacing.sm,
|
|
1392
|
+
// Professional density
|
|
1393
|
+
backgroundColor: isElevated ? tokens13.colors.surface : `${activeConfig.color}05`,
|
|
1394
|
+
borderRadius: tokens13.radius.lg,
|
|
1395
|
+
// Reigned in from XL
|
|
1396
|
+
border: isElevated ? "none" : `1px solid ${activeConfig.color}20`,
|
|
1397
|
+
boxShadow: isElevated ? tokens13.shadows.deep : "none"
|
|
1398
|
+
},
|
|
1399
|
+
children: /* @__PURE__ */ jsxs9(
|
|
1400
|
+
Box10,
|
|
1401
|
+
{
|
|
1402
|
+
sx: {
|
|
1403
|
+
width: "100%",
|
|
1404
|
+
display: "flex",
|
|
1405
|
+
flexDirection: "column",
|
|
1406
|
+
alignItems: "center"
|
|
1407
|
+
},
|
|
1408
|
+
children: [
|
|
1409
|
+
renderIllustrationContent(),
|
|
1410
|
+
/* @__PURE__ */ jsx13(
|
|
1411
|
+
Typography8,
|
|
1412
|
+
{
|
|
1413
|
+
sx: {
|
|
1414
|
+
fontSize: isCompact ? tokens13.typography.fontSizes.base : tokens13.typography.fontSizes.lg,
|
|
1415
|
+
// Reigned in
|
|
1416
|
+
fontWeight: 800,
|
|
1417
|
+
color: activeConfig.color,
|
|
1418
|
+
fontFamily: tokens13.typography.fontFamily,
|
|
1419
|
+
lineHeight: 1.1,
|
|
1420
|
+
mt: isCompact ? 0 : 1.5
|
|
1421
|
+
},
|
|
1422
|
+
children: title
|
|
1423
|
+
}
|
|
1424
|
+
),
|
|
1425
|
+
/* @__PURE__ */ jsx13(
|
|
1426
|
+
Typography8,
|
|
1427
|
+
{
|
|
1428
|
+
sx: {
|
|
1429
|
+
fontSize: isCompact ? tokens13.typography.fontSizes.xs : tokens13.typography.fontSizes.base,
|
|
1430
|
+
color: tokens13.colors.textSecondary,
|
|
1431
|
+
fontFamily: tokens13.typography.fontFamily,
|
|
1432
|
+
maxWidth: 400,
|
|
1433
|
+
marginInline: "auto",
|
|
1434
|
+
lineHeight: 1.4,
|
|
1435
|
+
mt: 0.5
|
|
1436
|
+
},
|
|
1437
|
+
children: subtitle
|
|
1438
|
+
}
|
|
1439
|
+
),
|
|
1440
|
+
(onRetry || onBack) && /* @__PURE__ */ jsxs9(
|
|
1441
|
+
Stack,
|
|
1442
|
+
{
|
|
1443
|
+
direction: isCompact ? "column" : "row",
|
|
1444
|
+
spacing: 2,
|
|
1445
|
+
sx: { mt: isCompact ? 2 : 4, width: { xs: "100%", sm: "auto" } },
|
|
1446
|
+
children: [
|
|
1447
|
+
onBack && /* @__PURE__ */ jsx13(
|
|
1448
|
+
MitumbaPrimaryButton,
|
|
1449
|
+
{
|
|
1450
|
+
label: "Go Back",
|
|
1451
|
+
onClick: onBack,
|
|
1452
|
+
variant: "outline",
|
|
1453
|
+
size: isCompact ? "small" : "medium"
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
onRetry && /* @__PURE__ */ jsx13(
|
|
1457
|
+
MitumbaPrimaryButton,
|
|
1458
|
+
{
|
|
1459
|
+
label: retryLabel,
|
|
1460
|
+
onClick: onRetry,
|
|
1461
|
+
variant: type === "404" ? "earth" : "primary",
|
|
1462
|
+
size: isCompact ? "small" : "medium",
|
|
1463
|
+
sx: {
|
|
1464
|
+
...type !== "404" && {
|
|
1465
|
+
backgroundColor: activeConfig.color,
|
|
1466
|
+
"&:hover": {
|
|
1467
|
+
backgroundColor: tokens13.colors[`${type === "network" ? "info" : "error"}Dark`] || activeConfig.color
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
)
|
|
1473
|
+
]
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1478
|
+
)
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
// src/components/feedback/MitumbaModal/MitumbaModal.tsx
|
|
1484
|
+
import Dialog from "@mui/material/Dialog";
|
|
1485
|
+
import DialogTitle from "@mui/material/DialogTitle";
|
|
1486
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
1487
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
1488
|
+
import IconButton3 from "@mui/material/IconButton";
|
|
1489
|
+
import CloseIcon from "@mui/icons-material/Close";
|
|
1490
|
+
import { tokens as tokens14 } from "@mitumba/tokens";
|
|
1491
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1492
|
+
function MitumbaModal({
|
|
1493
|
+
open,
|
|
1494
|
+
onClose,
|
|
1495
|
+
title,
|
|
1496
|
+
children,
|
|
1497
|
+
actions,
|
|
1498
|
+
maxWidth = "sm"
|
|
1499
|
+
}) {
|
|
1500
|
+
return /* @__PURE__ */ jsxs10(
|
|
1501
|
+
Dialog,
|
|
1502
|
+
{
|
|
1503
|
+
open,
|
|
1504
|
+
onClose,
|
|
1505
|
+
maxWidth,
|
|
1506
|
+
fullWidth: true,
|
|
1507
|
+
slotProps: {
|
|
1508
|
+
backdrop: {
|
|
1509
|
+
sx: { backgroundColor: "rgba(0, 0, 0, 0.4)", backdropFilter: "blur(4px)" }
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
PaperProps: {
|
|
1513
|
+
sx: {
|
|
1514
|
+
borderRadius: `${tokens14.radius.lg}px`,
|
|
1515
|
+
// Reigned in from XXXL
|
|
1516
|
+
boxShadow: tokens14.shadows.deep,
|
|
1517
|
+
margin: tokens14.spacing.lg,
|
|
1518
|
+
backgroundColor: tokens14.colors.surface,
|
|
1519
|
+
backgroundImage: "none",
|
|
1520
|
+
overflow: "hidden",
|
|
1521
|
+
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
children: [
|
|
1525
|
+
/* @__PURE__ */ jsxs10(
|
|
1526
|
+
DialogTitle,
|
|
1527
|
+
{
|
|
1528
|
+
sx: {
|
|
1529
|
+
display: "flex",
|
|
1530
|
+
alignItems: "center",
|
|
1531
|
+
justifyContent: "space-between",
|
|
1532
|
+
px: 3,
|
|
1533
|
+
pt: 3,
|
|
1534
|
+
pb: 1.5,
|
|
1535
|
+
fontSize: tokens14.typography.fontSizes.lg,
|
|
1536
|
+
fontWeight: 800,
|
|
1537
|
+
color: tokens14.colors.textPrimary,
|
|
1538
|
+
fontFamily: tokens14.typography.fontFamily,
|
|
1539
|
+
lineHeight: 1.1
|
|
1540
|
+
},
|
|
1541
|
+
children: [
|
|
1542
|
+
title,
|
|
1543
|
+
/* @__PURE__ */ jsx14(
|
|
1544
|
+
IconButton3,
|
|
1545
|
+
{
|
|
1546
|
+
onClick: onClose,
|
|
1547
|
+
sx: {
|
|
1548
|
+
color: tokens14.colors.textDisabled,
|
|
1549
|
+
transition: "all 0.2s ease",
|
|
1550
|
+
backgroundColor: tokens14.colors.background,
|
|
1551
|
+
p: 1,
|
|
1552
|
+
"&:hover": {
|
|
1553
|
+
color: tokens14.colors.error,
|
|
1554
|
+
backgroundColor: tokens14.colors.errorLight,
|
|
1555
|
+
transform: "rotate(90deg)"
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
"aria-label": "Close modal",
|
|
1559
|
+
children: /* @__PURE__ */ jsx14(CloseIcon, { sx: { fontSize: 20 } })
|
|
1560
|
+
}
|
|
1561
|
+
)
|
|
1562
|
+
]
|
|
1563
|
+
}
|
|
1564
|
+
),
|
|
1565
|
+
/* @__PURE__ */ jsx14(
|
|
1566
|
+
DialogContent,
|
|
1567
|
+
{
|
|
1568
|
+
sx: {
|
|
1569
|
+
px: 3,
|
|
1570
|
+
pb: actions ? 1.5 : 3,
|
|
1571
|
+
color: tokens14.colors.textSecondary,
|
|
1572
|
+
fontSize: tokens14.typography.fontSizes.base,
|
|
1573
|
+
fontFamily: tokens14.typography.fontFamily,
|
|
1574
|
+
lineHeight: 1.5
|
|
1575
|
+
},
|
|
1576
|
+
children
|
|
1577
|
+
}
|
|
1578
|
+
),
|
|
1579
|
+
actions && /* @__PURE__ */ jsx14(
|
|
1580
|
+
DialogActions,
|
|
1581
|
+
{
|
|
1582
|
+
sx: {
|
|
1583
|
+
px: 3,
|
|
1584
|
+
pb: 3,
|
|
1585
|
+
pt: 1.5,
|
|
1586
|
+
gap: 1.5,
|
|
1587
|
+
justifyContent: "flex-end",
|
|
1588
|
+
"& .MuiButton-root": {
|
|
1589
|
+
minWidth: 80
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
children: actions
|
|
1593
|
+
}
|
|
1594
|
+
)
|
|
1595
|
+
]
|
|
1596
|
+
}
|
|
1597
|
+
);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
// src/components/feedback/MitumbaSkeleton/MitumbaSkeleton.tsx
|
|
1601
|
+
import Box11 from "@mui/material/Box";
|
|
1602
|
+
import { tokens as tokens15 } from "@mitumba/tokens";
|
|
1603
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1604
|
+
var variantStyles = {
|
|
1605
|
+
rectangular: { borderRadius: `${tokens15.radius.xxs}px` },
|
|
1606
|
+
rounded: { borderRadius: `${tokens15.radius.md}px` },
|
|
1607
|
+
circular: { borderRadius: "50%" }
|
|
1608
|
+
};
|
|
1609
|
+
function MitumbaSkeleton({
|
|
1610
|
+
width,
|
|
1611
|
+
height,
|
|
1612
|
+
borderRadius,
|
|
1613
|
+
variant = "rounded"
|
|
1614
|
+
}) {
|
|
1615
|
+
return /* @__PURE__ */ jsx15(
|
|
1616
|
+
Box11,
|
|
1617
|
+
{
|
|
1618
|
+
sx: {
|
|
1619
|
+
width,
|
|
1620
|
+
height,
|
|
1621
|
+
position: "relative",
|
|
1622
|
+
overflow: "hidden",
|
|
1623
|
+
borderRadius: borderRadius ? `${borderRadius}px` : variantStyles[variant].borderRadius,
|
|
1624
|
+
backgroundColor: tokens15.colors.background,
|
|
1625
|
+
// Base block
|
|
1626
|
+
"&::before": {
|
|
1627
|
+
content: '""',
|
|
1628
|
+
position: "absolute",
|
|
1629
|
+
inset: 0,
|
|
1630
|
+
backgroundColor: tokens15.colors.divider,
|
|
1631
|
+
opacity: 0.5
|
|
1632
|
+
},
|
|
1633
|
+
// Shimmer wave
|
|
1634
|
+
"&::after": {
|
|
1635
|
+
content: '""',
|
|
1636
|
+
position: "absolute",
|
|
1637
|
+
top: 0,
|
|
1638
|
+
left: 0,
|
|
1639
|
+
right: 0,
|
|
1640
|
+
bottom: 0,
|
|
1641
|
+
background: `linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)`,
|
|
1642
|
+
transform: "translateX(-100%)",
|
|
1643
|
+
animation: "shimmer 2s infinite cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1644
|
+
},
|
|
1645
|
+
"@keyframes shimmer": {
|
|
1646
|
+
"100%": { transform: "translateX(100%)" }
|
|
1647
|
+
}
|
|
1648
|
+
},
|
|
1649
|
+
"aria-label": "Loading content..."
|
|
1650
|
+
}
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
// src/components/feedback/MitumbaToast/MitumbaToast.tsx
|
|
1655
|
+
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
1656
|
+
import Snackbar from "@mui/material/Snackbar";
|
|
1657
|
+
import Alert from "@mui/material/Alert";
|
|
1658
|
+
import Slide from "@mui/material/Slide";
|
|
1659
|
+
import Box12 from "@mui/material/Box";
|
|
1660
|
+
import LinearProgress from "@mui/material/LinearProgress";
|
|
1661
|
+
import CircularProgress2 from "@mui/material/CircularProgress";
|
|
1662
|
+
import { tokens as tokens16 } from "@mitumba/tokens";
|
|
1663
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1664
|
+
function SlideTransition(props) {
|
|
1665
|
+
return /* @__PURE__ */ jsx16(Slide, { ...props, direction: "up" });
|
|
1666
|
+
}
|
|
1667
|
+
function MitumbaToast({
|
|
1668
|
+
message,
|
|
1669
|
+
severity,
|
|
1670
|
+
open,
|
|
1671
|
+
onClose,
|
|
1672
|
+
duration = 4e3,
|
|
1673
|
+
action,
|
|
1674
|
+
showIconProgress = false,
|
|
1675
|
+
showLinearProgress = false
|
|
1676
|
+
}) {
|
|
1677
|
+
const [progress, setProgress] = useState4(100);
|
|
1678
|
+
useEffect2(() => {
|
|
1679
|
+
if (open && duration !== Infinity) {
|
|
1680
|
+
const startTime = Date.now();
|
|
1681
|
+
const timer = setInterval(() => {
|
|
1682
|
+
const elapsed = Date.now() - startTime;
|
|
1683
|
+
const remaining = Math.max(0, 100 - elapsed / duration * 100);
|
|
1684
|
+
setProgress(remaining);
|
|
1685
|
+
if (elapsed >= duration) {
|
|
1686
|
+
clearInterval(timer);
|
|
1687
|
+
onClose();
|
|
1688
|
+
}
|
|
1689
|
+
}, 50);
|
|
1690
|
+
return () => clearInterval(timer);
|
|
1691
|
+
}
|
|
1692
|
+
setProgress(100);
|
|
1693
|
+
return void 0;
|
|
1694
|
+
}, [open, onClose, duration]);
|
|
1695
|
+
const severityColors = {
|
|
1696
|
+
success: tokens16.colors.green,
|
|
1697
|
+
error: tokens16.colors.error,
|
|
1698
|
+
warning: tokens16.colors.warning,
|
|
1699
|
+
info: tokens16.colors.info
|
|
1700
|
+
};
|
|
1701
|
+
const baseColor = severityColors[severity];
|
|
1702
|
+
const darkColor = tokens16.colors[`${severity === "success" ? "green" : severity}Dark`] || baseColor;
|
|
1703
|
+
return /* @__PURE__ */ jsx16(
|
|
1704
|
+
Snackbar,
|
|
1705
|
+
{
|
|
1706
|
+
open,
|
|
1707
|
+
onClose,
|
|
1708
|
+
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
1709
|
+
TransitionComponent: SlideTransition,
|
|
1710
|
+
sx: {
|
|
1711
|
+
bottom: { xs: tokens16.spacing.xl, sm: tokens16.spacing.xxl }
|
|
1712
|
+
},
|
|
1713
|
+
children: /* @__PURE__ */ jsxs11(Box12, { sx: { position: "relative", overflow: "hidden", borderRadius: `${tokens16.radius.md}px` }, children: [
|
|
1714
|
+
/* @__PURE__ */ jsx16(
|
|
1715
|
+
Alert,
|
|
1716
|
+
{
|
|
1717
|
+
severity,
|
|
1718
|
+
onClose,
|
|
1719
|
+
action,
|
|
1720
|
+
variant: "filled",
|
|
1721
|
+
icon: showIconProgress ? /* @__PURE__ */ jsxs11(Box12, { sx: { position: "relative", display: "flex", alignItems: "center", justifyContent: "center" }, children: [
|
|
1722
|
+
/* @__PURE__ */ jsx16(
|
|
1723
|
+
CircularProgress2,
|
|
1724
|
+
{
|
|
1725
|
+
variant: "determinate",
|
|
1726
|
+
value: progress,
|
|
1727
|
+
size: 28,
|
|
1728
|
+
sx: {
|
|
1729
|
+
color: "rgba(255, 255, 255, 0.4)",
|
|
1730
|
+
position: "absolute"
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
),
|
|
1734
|
+
/* @__PURE__ */ jsx16(Box12, { sx: { zIndex: 1, display: "flex" } })
|
|
1735
|
+
] }) : void 0,
|
|
1736
|
+
sx: {
|
|
1737
|
+
borderRadius: tokens16.radius.md,
|
|
1738
|
+
boxShadow: tokens16.shadows.deep,
|
|
1739
|
+
fontWeight: 700,
|
|
1740
|
+
fontFamily: tokens16.typography.fontFamily,
|
|
1741
|
+
minWidth: { xs: "calc(100vw - 32px)", sm: 380 },
|
|
1742
|
+
maxWidth: { xs: "calc(100vw - 32px)", sm: 560 },
|
|
1743
|
+
backgroundColor: baseColor,
|
|
1744
|
+
color: tokens16.colors.white,
|
|
1745
|
+
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1746
|
+
"& .MuiAlert-icon": {
|
|
1747
|
+
fontSize: 24,
|
|
1748
|
+
opacity: 1,
|
|
1749
|
+
color: tokens16.colors.white,
|
|
1750
|
+
display: "flex",
|
|
1751
|
+
alignItems: "center"
|
|
1752
|
+
},
|
|
1753
|
+
"& .MuiAlert-message": {
|
|
1754
|
+
fontSize: tokens16.typography.fontSizes.base,
|
|
1755
|
+
padding: "10px 0",
|
|
1756
|
+
lineHeight: 1.2
|
|
1757
|
+
},
|
|
1758
|
+
"& .MuiAlert-action": {
|
|
1759
|
+
alignItems: "center",
|
|
1760
|
+
paddingTop: 0,
|
|
1761
|
+
paddingBottom: 0,
|
|
1762
|
+
marginRight: "-4px",
|
|
1763
|
+
gap: 1,
|
|
1764
|
+
"& .MuiIconButton-root, & .MuiButton-root": {
|
|
1765
|
+
color: tokens16.colors.white,
|
|
1766
|
+
fontWeight: 800,
|
|
1767
|
+
textTransform: "none",
|
|
1768
|
+
fontSize: 14,
|
|
1769
|
+
borderRadius: tokens16.radius.full,
|
|
1770
|
+
// Pill buttons from benchmark
|
|
1771
|
+
px: 2,
|
|
1772
|
+
"&:hover": {
|
|
1773
|
+
backgroundColor: "rgba(255,255,255,0.15)"
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
"&:hover": {
|
|
1778
|
+
backgroundColor: darkColor,
|
|
1779
|
+
transform: "translateY(-2px)"
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
children: message
|
|
1783
|
+
}
|
|
1784
|
+
),
|
|
1785
|
+
showLinearProgress && duration !== Infinity && /* @__PURE__ */ jsx16(
|
|
1786
|
+
LinearProgress,
|
|
1787
|
+
{
|
|
1788
|
+
variant: "determinate",
|
|
1789
|
+
value: progress,
|
|
1790
|
+
sx: {
|
|
1791
|
+
position: "absolute",
|
|
1792
|
+
bottom: 0,
|
|
1793
|
+
left: 0,
|
|
1794
|
+
right: 0,
|
|
1795
|
+
height: 3,
|
|
1796
|
+
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
1797
|
+
"& .MuiLinearProgress-bar": {
|
|
1798
|
+
backgroundColor: "rgba(255, 255, 255, 0.6)"
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
)
|
|
1803
|
+
] })
|
|
1804
|
+
}
|
|
1805
|
+
);
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
// src/components/feedback/OfflineBanner/OfflineBanner.tsx
|
|
1809
|
+
import { useState as useState5, useEffect as useEffect3 } from "react";
|
|
1810
|
+
import WifiOffIcon2 from "@mui/icons-material/WifiOff";
|
|
1811
|
+
import { tokens as tokens18 } from "@mitumba/tokens";
|
|
1812
|
+
|
|
1813
|
+
// src/components/feedback/MitumbaBanner/MitumbaBanner.tsx
|
|
1814
|
+
import { useMemo as useMemo5 } from "react";
|
|
1815
|
+
import Box13 from "@mui/material/Box";
|
|
1816
|
+
import Typography9 from "@mui/material/Typography";
|
|
1817
|
+
import IconButton4 from "@mui/material/IconButton";
|
|
1818
|
+
import CloseIcon2 from "@mui/icons-material/Close";
|
|
1819
|
+
import CheckCircleIcon2 from "@mui/icons-material/CheckCircle";
|
|
1820
|
+
import ErrorIcon2 from "@mui/icons-material/Error";
|
|
1821
|
+
import WarningIcon2 from "@mui/icons-material/Warning";
|
|
1822
|
+
import InfoIcon from "@mui/icons-material/Info";
|
|
1823
|
+
import HelpIcon from "@mui/icons-material/Help";
|
|
1824
|
+
import { tokens as tokens17 } from "@mitumba/tokens";
|
|
1825
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1826
|
+
function MitumbaBanner({
|
|
1827
|
+
title,
|
|
1828
|
+
children,
|
|
1829
|
+
severity = "info",
|
|
1830
|
+
icon: propIcon,
|
|
1831
|
+
onClose,
|
|
1832
|
+
action,
|
|
1833
|
+
sx
|
|
1834
|
+
}) {
|
|
1835
|
+
const config = useMemo5(() => {
|
|
1836
|
+
const map = {
|
|
1837
|
+
success: { color: tokens17.colors.green, bgColor: `${tokens17.colors.green}12`, icon: /* @__PURE__ */ jsx17(CheckCircleIcon2, {}) },
|
|
1838
|
+
error: { color: tokens17.colors.error, bgColor: `${tokens17.colors.error}12`, icon: /* @__PURE__ */ jsx17(ErrorIcon2, {}) },
|
|
1839
|
+
warning: { color: tokens17.colors.warning, bgColor: `${tokens17.colors.warning}12`, icon: /* @__PURE__ */ jsx17(WarningIcon2, {}) },
|
|
1840
|
+
info: { color: tokens17.colors.info, bgColor: `${tokens17.colors.info}12`, icon: /* @__PURE__ */ jsx17(InfoIcon, {}) },
|
|
1841
|
+
neutral: { color: tokens17.colors.textSecondary, bgColor: tokens17.colors.background, icon: /* @__PURE__ */ jsx17(HelpIcon, {}) }
|
|
1842
|
+
};
|
|
1843
|
+
return map[severity];
|
|
1844
|
+
}, [severity]);
|
|
1845
|
+
return /* @__PURE__ */ jsxs12(
|
|
1846
|
+
Box13,
|
|
1847
|
+
{
|
|
1848
|
+
sx: [
|
|
1849
|
+
{
|
|
1850
|
+
width: "100%",
|
|
1851
|
+
display: "flex",
|
|
1852
|
+
gap: 2,
|
|
1853
|
+
p: { xs: 2, sm: 2.5 },
|
|
1854
|
+
borderRadius: `${tokens17.radius.md}px`,
|
|
1855
|
+
backgroundColor: config.bgColor,
|
|
1856
|
+
// High-fidelity top-border accent from benchmark
|
|
1857
|
+
borderTop: `4px solid ${config.color}`,
|
|
1858
|
+
borderLeft: `1px solid ${tokens17.colors.divider}`,
|
|
1859
|
+
borderRight: `1px solid ${tokens17.colors.divider}`,
|
|
1860
|
+
borderBottom: `1px solid ${tokens17.colors.divider}`,
|
|
1861
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.03)",
|
|
1862
|
+
position: "relative",
|
|
1863
|
+
boxSizing: "border-box",
|
|
1864
|
+
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
1865
|
+
},
|
|
1866
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
1867
|
+
],
|
|
1868
|
+
children: [
|
|
1869
|
+
/* @__PURE__ */ jsx17(Box13, { sx: { color: config.color, mt: 0.2, flexShrink: 0 }, children: propIcon || config.icon }),
|
|
1870
|
+
/* @__PURE__ */ jsxs12(Box13, { sx: { flexGrow: 1, minWidth: 0 }, children: [
|
|
1871
|
+
/* @__PURE__ */ jsx17(
|
|
1872
|
+
Typography9,
|
|
1873
|
+
{
|
|
1874
|
+
sx: {
|
|
1875
|
+
fontSize: tokens17.typography.fontSizes.base,
|
|
1876
|
+
fontWeight: 800,
|
|
1877
|
+
color: tokens17.colors.textPrimary,
|
|
1878
|
+
fontFamily: tokens17.typography.fontFamily,
|
|
1879
|
+
lineHeight: 1.2,
|
|
1880
|
+
mb: 0.5
|
|
1881
|
+
},
|
|
1882
|
+
children: title
|
|
1883
|
+
}
|
|
1884
|
+
),
|
|
1885
|
+
children && /* @__PURE__ */ jsx17(
|
|
1886
|
+
Typography9,
|
|
1887
|
+
{
|
|
1888
|
+
sx: {
|
|
1889
|
+
fontSize: tokens17.typography.fontSizes.sm,
|
|
1890
|
+
color: tokens17.colors.textSecondary,
|
|
1891
|
+
fontFamily: tokens17.typography.fontFamily,
|
|
1892
|
+
lineHeight: 1.5
|
|
1893
|
+
},
|
|
1894
|
+
children
|
|
1895
|
+
}
|
|
1896
|
+
)
|
|
1897
|
+
] }),
|
|
1898
|
+
/* @__PURE__ */ jsxs12(Box13, { sx: { display: "flex", gap: 1, alignItems: "flex-start" }, children: [
|
|
1899
|
+
action,
|
|
1900
|
+
onClose && /* @__PURE__ */ jsx17(
|
|
1901
|
+
IconButton4,
|
|
1902
|
+
{
|
|
1903
|
+
onClick: onClose,
|
|
1904
|
+
size: "small",
|
|
1905
|
+
sx: {
|
|
1906
|
+
color: tokens17.colors.textDisabled,
|
|
1907
|
+
p: 0.5,
|
|
1908
|
+
"&:hover": { color: tokens17.colors.textPrimary, backgroundColor: "rgba(0,0,0,0.05)" }
|
|
1909
|
+
},
|
|
1910
|
+
children: /* @__PURE__ */ jsx17(CloseIcon2, { sx: { fontSize: 18 } })
|
|
1911
|
+
}
|
|
1912
|
+
)
|
|
1913
|
+
] })
|
|
1914
|
+
]
|
|
1915
|
+
}
|
|
1916
|
+
);
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
// src/components/feedback/OfflineBanner/OfflineBanner.tsx
|
|
1920
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1921
|
+
function OfflineBanner({ onRetry, sx }) {
|
|
1922
|
+
const [isOnline, setIsOnline] = useState5(
|
|
1923
|
+
typeof window !== "undefined" ? window.navigator.onLine : true
|
|
1924
|
+
);
|
|
1925
|
+
useEffect3(() => {
|
|
1926
|
+
const handleOnline = () => setIsOnline(true);
|
|
1927
|
+
const handleOffline = () => setIsOnline(false);
|
|
1928
|
+
window.addEventListener("online", handleOnline);
|
|
1929
|
+
window.addEventListener("offline", handleOffline);
|
|
1930
|
+
return () => {
|
|
1931
|
+
window.removeEventListener("online", handleOnline);
|
|
1932
|
+
window.removeEventListener("offline", handleOffline);
|
|
1933
|
+
};
|
|
1934
|
+
}, []);
|
|
1935
|
+
if (isOnline) return null;
|
|
1936
|
+
return /* @__PURE__ */ jsx18(
|
|
1937
|
+
MitumbaBanner,
|
|
1938
|
+
{
|
|
1939
|
+
severity: "warning",
|
|
1940
|
+
title: "You are currently offline",
|
|
1941
|
+
icon: /* @__PURE__ */ jsx18(WifiOffIcon2, {}),
|
|
1942
|
+
action: /* @__PURE__ */ jsx18(
|
|
1943
|
+
MitumbaPrimaryButton,
|
|
1944
|
+
{
|
|
1945
|
+
label: "Retry",
|
|
1946
|
+
size: "small",
|
|
1947
|
+
onClick: onRetry,
|
|
1948
|
+
variant: "secondary",
|
|
1949
|
+
sx: { height: 28, fontSize: 11, borderRadius: tokens18.radius.full }
|
|
1950
|
+
}
|
|
1951
|
+
),
|
|
1952
|
+
sx,
|
|
1953
|
+
children: "Please check your internet connection to continue browsing the marketplace."
|
|
1954
|
+
}
|
|
1955
|
+
);
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
// src/components/layout/PageContainer/PageContainer.tsx
|
|
1959
|
+
import Box14 from "@mui/material/Box";
|
|
1960
|
+
import { tokens as tokens19 } from "@mitumba/tokens";
|
|
1961
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1153
1962
|
var maxWidthValues = {
|
|
1154
1963
|
sm: 640,
|
|
1155
1964
|
md: 900,
|
|
@@ -1161,16 +1970,16 @@ function PageContainer({
|
|
|
1161
1970
|
maxWidth = "lg",
|
|
1162
1971
|
noPadding = false
|
|
1163
1972
|
}) {
|
|
1164
|
-
return /* @__PURE__ */
|
|
1165
|
-
|
|
1973
|
+
return /* @__PURE__ */ jsx19(
|
|
1974
|
+
Box14,
|
|
1166
1975
|
{
|
|
1167
1976
|
sx: {
|
|
1168
1977
|
mx: "auto",
|
|
1169
1978
|
maxWidth: maxWidthValues[maxWidth],
|
|
1170
1979
|
px: noPadding ? 0 : {
|
|
1171
|
-
xs:
|
|
1172
|
-
md:
|
|
1173
|
-
lg:
|
|
1980
|
+
xs: tokens19.spacing.base,
|
|
1981
|
+
md: tokens19.spacing.lg,
|
|
1982
|
+
lg: tokens19.spacing.xl
|
|
1174
1983
|
},
|
|
1175
1984
|
width: "100%"
|
|
1176
1985
|
},
|
|
@@ -1180,10 +1989,10 @@ function PageContainer({
|
|
|
1180
1989
|
}
|
|
1181
1990
|
|
|
1182
1991
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
1183
|
-
import
|
|
1184
|
-
import
|
|
1185
|
-
import { tokens as
|
|
1186
|
-
import { jsx as
|
|
1992
|
+
import Box15 from "@mui/material/Box";
|
|
1993
|
+
import Typography10 from "@mui/material/Typography";
|
|
1994
|
+
import { tokens as tokens20 } from "@mitumba/tokens";
|
|
1995
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1187
1996
|
function SectionHeader({
|
|
1188
1997
|
title,
|
|
1189
1998
|
subtitle,
|
|
@@ -1197,8 +2006,8 @@ function SectionHeader({
|
|
|
1197
2006
|
}) {
|
|
1198
2007
|
const isCentered = align === "center";
|
|
1199
2008
|
const isLarge = variant === "large";
|
|
1200
|
-
return /* @__PURE__ */
|
|
1201
|
-
|
|
2009
|
+
return /* @__PURE__ */ jsxs13(
|
|
2010
|
+
Box15,
|
|
1202
2011
|
{
|
|
1203
2012
|
sx: [
|
|
1204
2013
|
{
|
|
@@ -1208,52 +2017,52 @@ function SectionHeader({
|
|
|
1208
2017
|
alignItems: isCentered ? "center" : "flex-end",
|
|
1209
2018
|
justifyContent: isCentered ? "center" : "space-between",
|
|
1210
2019
|
textAlign: isCentered ? "center" : "left",
|
|
1211
|
-
gap:
|
|
1212
|
-
mb: isLarge ?
|
|
2020
|
+
gap: tokens20.spacing.base,
|
|
2021
|
+
mb: isLarge ? tokens20.spacing.xxxl : tokens20.spacing.xxl
|
|
1213
2022
|
},
|
|
1214
2023
|
...Array.isArray(sx) ? sx : [sx]
|
|
1215
2024
|
],
|
|
1216
2025
|
children: [
|
|
1217
|
-
/* @__PURE__ */
|
|
1218
|
-
overline && /* @__PURE__ */
|
|
1219
|
-
|
|
2026
|
+
/* @__PURE__ */ jsxs13(Box15, { sx: { flex: 1 }, children: [
|
|
2027
|
+
overline && /* @__PURE__ */ jsx20(
|
|
2028
|
+
Typography10,
|
|
1220
2029
|
{
|
|
1221
2030
|
variant: "caption",
|
|
1222
2031
|
sx: {
|
|
1223
2032
|
display: "block",
|
|
1224
2033
|
fontWeight: 800,
|
|
1225
|
-
color:
|
|
2034
|
+
color: tokens20.colors.green,
|
|
1226
2035
|
textTransform: "uppercase",
|
|
1227
2036
|
letterSpacing: "0.1em",
|
|
1228
|
-
fontFamily:
|
|
2037
|
+
fontFamily: tokens20.typography.fontFamily,
|
|
1229
2038
|
mb: 0.5
|
|
1230
2039
|
},
|
|
1231
2040
|
children: overline
|
|
1232
2041
|
}
|
|
1233
2042
|
),
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
|
|
2043
|
+
/* @__PURE__ */ jsx20(
|
|
2044
|
+
Typography10,
|
|
1236
2045
|
{
|
|
1237
2046
|
component: "h2",
|
|
1238
2047
|
sx: {
|
|
1239
|
-
color:
|
|
1240
|
-
fontSize: isLarge ?
|
|
2048
|
+
color: tokens20.colors.textPrimary,
|
|
2049
|
+
fontSize: isLarge ? tokens20.typography.fontSizes.display : tokens20.typography.fontSizes.xxl,
|
|
1241
2050
|
fontWeight: 900,
|
|
1242
2051
|
lineHeight: 1.1,
|
|
1243
|
-
fontFamily:
|
|
2052
|
+
fontFamily: tokens20.typography.fontFamily,
|
|
1244
2053
|
letterSpacing: "-0.02em"
|
|
1245
2054
|
},
|
|
1246
2055
|
children: title
|
|
1247
2056
|
}
|
|
1248
2057
|
),
|
|
1249
|
-
subtitle && /* @__PURE__ */
|
|
1250
|
-
|
|
2058
|
+
subtitle && /* @__PURE__ */ jsx20(
|
|
2059
|
+
Typography10,
|
|
1251
2060
|
{
|
|
1252
2061
|
sx: {
|
|
1253
|
-
color:
|
|
1254
|
-
fontSize: isLarge ?
|
|
2062
|
+
color: tokens20.colors.textSecondary,
|
|
2063
|
+
fontSize: isLarge ? tokens20.typography.fontSizes.md : tokens20.typography.fontSizes.base,
|
|
1255
2064
|
mt: 1,
|
|
1256
|
-
fontFamily:
|
|
2065
|
+
fontFamily: tokens20.typography.fontFamily,
|
|
1257
2066
|
maxWidth: 560,
|
|
1258
2067
|
marginInline: isCentered ? "auto" : "unset",
|
|
1259
2068
|
lineHeight: 1.4
|
|
@@ -1262,7 +2071,7 @@ function SectionHeader({
|
|
|
1262
2071
|
}
|
|
1263
2072
|
)
|
|
1264
2073
|
] }),
|
|
1265
|
-
(action || actionLabel) && /* @__PURE__ */
|
|
2074
|
+
(action || actionLabel) && /* @__PURE__ */ jsx20(Box15, { sx: { flexShrink: 0, mb: isCentered ? 0 : 0.5 }, children: action || /* @__PURE__ */ jsx20(
|
|
1266
2075
|
MitumbaPrimaryButton,
|
|
1267
2076
|
{
|
|
1268
2077
|
label: actionLabel,
|
|
@@ -1279,16 +2088,16 @@ function SectionHeader({
|
|
|
1279
2088
|
}
|
|
1280
2089
|
|
|
1281
2090
|
// src/components/layout/MitumbaDivider/MitumbaDivider.tsx
|
|
1282
|
-
import
|
|
1283
|
-
import { tokens as
|
|
1284
|
-
import { jsx as
|
|
2091
|
+
import Box16 from "@mui/material/Box";
|
|
2092
|
+
import { tokens as tokens21 } from "@mitumba/tokens";
|
|
2093
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1285
2094
|
function MitumbaDivider() {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1287
|
-
|
|
2095
|
+
return /* @__PURE__ */ jsx21(
|
|
2096
|
+
Box16,
|
|
1288
2097
|
{
|
|
1289
2098
|
component: "hr",
|
|
1290
2099
|
sx: {
|
|
1291
|
-
backgroundColor:
|
|
2100
|
+
backgroundColor: tokens21.colors.divider,
|
|
1292
2101
|
border: "none",
|
|
1293
2102
|
height: "1px",
|
|
1294
2103
|
marginBlock: 0,
|
|
@@ -1299,9 +2108,9 @@ function MitumbaDivider() {
|
|
|
1299
2108
|
}
|
|
1300
2109
|
|
|
1301
2110
|
// src/components/layout/MitumbaGrid/MitumbaGrid.tsx
|
|
1302
|
-
import
|
|
1303
|
-
import { tokens as
|
|
1304
|
-
import { jsx as
|
|
2111
|
+
import Box17 from "@mui/material/Box";
|
|
2112
|
+
import { tokens as tokens22 } from "@mitumba/tokens";
|
|
2113
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1305
2114
|
function MitumbaGrid({
|
|
1306
2115
|
children,
|
|
1307
2116
|
columns = { xs: 4, sm: 8, md: 8, lg: 12 },
|
|
@@ -1309,17 +2118,17 @@ function MitumbaGrid({
|
|
|
1309
2118
|
sx
|
|
1310
2119
|
}) {
|
|
1311
2120
|
const defaultGap = {
|
|
1312
|
-
xs:
|
|
2121
|
+
xs: tokens22.spacing.base,
|
|
1313
2122
|
// 12px
|
|
1314
|
-
sm:
|
|
2123
|
+
sm: tokens22.spacing.base,
|
|
1315
2124
|
// 12px
|
|
1316
|
-
md:
|
|
2125
|
+
md: tokens22.spacing.lg,
|
|
1317
2126
|
// 16px
|
|
1318
|
-
lg:
|
|
2127
|
+
lg: tokens22.spacing.lg
|
|
1319
2128
|
// 16px
|
|
1320
2129
|
};
|
|
1321
|
-
return /* @__PURE__ */
|
|
1322
|
-
|
|
2130
|
+
return /* @__PURE__ */ jsx22(
|
|
2131
|
+
Box17,
|
|
1323
2132
|
{
|
|
1324
2133
|
sx: [
|
|
1325
2134
|
{
|
|
@@ -1343,22 +2152,22 @@ function MitumbaGrid({
|
|
|
1343
2152
|
// src/components/navigation/MitumbaBreadcrumb/MitumbaBreadcrumb.tsx
|
|
1344
2153
|
import Breadcrumbs from "@mui/material/Breadcrumbs";
|
|
1345
2154
|
import Link from "@mui/material/Link";
|
|
1346
|
-
import
|
|
1347
|
-
import { tokens as
|
|
1348
|
-
import { jsx as
|
|
2155
|
+
import Typography11 from "@mui/material/Typography";
|
|
2156
|
+
import { tokens as tokens23 } from "@mitumba/tokens";
|
|
2157
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1349
2158
|
function MitumbaBreadcrumb({ items }) {
|
|
1350
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ jsx23(
|
|
1351
2160
|
Breadcrumbs,
|
|
1352
2161
|
{
|
|
1353
|
-
separator: /* @__PURE__ */
|
|
1354
|
-
|
|
2162
|
+
separator: /* @__PURE__ */ jsx23(
|
|
2163
|
+
Typography11,
|
|
1355
2164
|
{
|
|
1356
2165
|
sx: {
|
|
1357
|
-
color:
|
|
2166
|
+
color: tokens23.colors.divider,
|
|
1358
2167
|
mx: 0.5,
|
|
1359
2168
|
fontWeight: 400,
|
|
1360
2169
|
fontSize: 16,
|
|
1361
|
-
fontFamily:
|
|
2170
|
+
fontFamily: tokens23.typography.fontFamily
|
|
1362
2171
|
},
|
|
1363
2172
|
children: "/"
|
|
1364
2173
|
}
|
|
@@ -1371,14 +2180,14 @@ function MitumbaBreadcrumb({ items }) {
|
|
|
1371
2180
|
children: items.map((item, index) => {
|
|
1372
2181
|
const isLast = index === items.length - 1;
|
|
1373
2182
|
if (isLast) {
|
|
1374
|
-
return /* @__PURE__ */
|
|
1375
|
-
|
|
2183
|
+
return /* @__PURE__ */ jsx23(
|
|
2184
|
+
Typography11,
|
|
1376
2185
|
{
|
|
1377
2186
|
sx: {
|
|
1378
|
-
color:
|
|
1379
|
-
fontSize:
|
|
2187
|
+
color: tokens23.colors.textPrimary,
|
|
2188
|
+
fontSize: tokens23.typography.fontSizes.sm,
|
|
1380
2189
|
fontWeight: 800,
|
|
1381
|
-
fontFamily:
|
|
2190
|
+
fontFamily: tokens23.typography.fontFamily,
|
|
1382
2191
|
whiteSpace: "nowrap"
|
|
1383
2192
|
},
|
|
1384
2193
|
children: item.label
|
|
@@ -1386,20 +2195,20 @@ function MitumbaBreadcrumb({ items }) {
|
|
|
1386
2195
|
item.label
|
|
1387
2196
|
);
|
|
1388
2197
|
}
|
|
1389
|
-
return /* @__PURE__ */
|
|
2198
|
+
return /* @__PURE__ */ jsx23(
|
|
1390
2199
|
Link,
|
|
1391
2200
|
{
|
|
1392
2201
|
href: item.href || "#",
|
|
1393
2202
|
sx: {
|
|
1394
|
-
color:
|
|
1395
|
-
fontSize:
|
|
2203
|
+
color: tokens23.colors.textSecondary,
|
|
2204
|
+
fontSize: tokens23.typography.fontSizes.sm,
|
|
1396
2205
|
fontWeight: 600,
|
|
1397
|
-
fontFamily:
|
|
2206
|
+
fontFamily: tokens23.typography.fontFamily,
|
|
1398
2207
|
textDecoration: "none",
|
|
1399
2208
|
transition: "all 0.2s ease",
|
|
1400
2209
|
whiteSpace: "nowrap",
|
|
1401
2210
|
"&:hover": {
|
|
1402
|
-
color:
|
|
2211
|
+
color: tokens23.colors.green,
|
|
1403
2212
|
transform: "translateY(-1px)"
|
|
1404
2213
|
}
|
|
1405
2214
|
},
|
|
@@ -1413,21 +2222,21 @@ function MitumbaBreadcrumb({ items }) {
|
|
|
1413
2222
|
}
|
|
1414
2223
|
|
|
1415
2224
|
// src/components/navigation/MobileBottomNav/MobileBottomNav.tsx
|
|
1416
|
-
import
|
|
1417
|
-
import
|
|
2225
|
+
import Box18 from "@mui/material/Box";
|
|
2226
|
+
import Typography12 from "@mui/material/Typography";
|
|
1418
2227
|
import HomeIcon from "@mui/icons-material/Home";
|
|
1419
2228
|
import SearchIcon2 from "@mui/icons-material/Search";
|
|
1420
2229
|
import LocalMallIcon from "@mui/icons-material/LocalMall";
|
|
1421
2230
|
import PersonIcon2 from "@mui/icons-material/Person";
|
|
1422
2231
|
import AutoAwesomeIcon from "@mui/icons-material/AutoAwesome";
|
|
1423
|
-
import { tokens as
|
|
1424
|
-
import { jsx as
|
|
2232
|
+
import { tokens as tokens24 } from "@mitumba/tokens";
|
|
2233
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1425
2234
|
var DEFAULT_ITEMS = [
|
|
1426
|
-
{ id: "home", label: "Home", icon: /* @__PURE__ */
|
|
1427
|
-
{ id: "search", label: "Search", icon: /* @__PURE__ */
|
|
1428
|
-
{ id: "vazi", label: "VAZI", icon: /* @__PURE__ */
|
|
1429
|
-
{ id: "orders", label: "Orders", icon: /* @__PURE__ */
|
|
1430
|
-
{ id: "profile", label: "Profile", icon: /* @__PURE__ */
|
|
2235
|
+
{ id: "home", label: "Home", icon: /* @__PURE__ */ jsx24(HomeIcon, {}) },
|
|
2236
|
+
{ id: "search", label: "Search", icon: /* @__PURE__ */ jsx24(SearchIcon2, {}) },
|
|
2237
|
+
{ id: "vazi", label: "VAZI", icon: /* @__PURE__ */ jsx24(AutoAwesomeIcon, {}) },
|
|
2238
|
+
{ id: "orders", label: "Orders", icon: /* @__PURE__ */ jsx24(LocalMallIcon, {}) },
|
|
2239
|
+
{ id: "profile", label: "Profile", icon: /* @__PURE__ */ jsx24(PersonIcon2, {}) }
|
|
1431
2240
|
];
|
|
1432
2241
|
function MobileBottomNav({
|
|
1433
2242
|
activeTab,
|
|
@@ -1436,8 +2245,8 @@ function MobileBottomNav({
|
|
|
1436
2245
|
items = DEFAULT_ITEMS,
|
|
1437
2246
|
sx
|
|
1438
2247
|
}) {
|
|
1439
|
-
return /* @__PURE__ */
|
|
1440
|
-
|
|
2248
|
+
return /* @__PURE__ */ jsx24(
|
|
2249
|
+
Box18,
|
|
1441
2250
|
{
|
|
1442
2251
|
sx: [
|
|
1443
2252
|
{
|
|
@@ -1446,8 +2255,8 @@ function MobileBottomNav({
|
|
|
1446
2255
|
left: 0,
|
|
1447
2256
|
right: 0,
|
|
1448
2257
|
height: 80,
|
|
1449
|
-
backgroundColor:
|
|
1450
|
-
borderTop: `1px solid ${
|
|
2258
|
+
backgroundColor: tokens24.colors.surface,
|
|
2259
|
+
borderTop: `1px solid ${tokens24.colors.divider}`,
|
|
1451
2260
|
boxShadow: "0 -4px 12px rgba(0,0,0,0.05)",
|
|
1452
2261
|
display: "flex",
|
|
1453
2262
|
alignItems: "center",
|
|
@@ -1468,31 +2277,31 @@ function MobileBottomNav({
|
|
|
1468
2277
|
"& .icon-wrapper": {
|
|
1469
2278
|
width: 64,
|
|
1470
2279
|
height: 32,
|
|
1471
|
-
borderRadius:
|
|
1472
|
-
backgroundColor: isActive ? `${
|
|
2280
|
+
borderRadius: tokens24.radius.full,
|
|
2281
|
+
backgroundColor: isActive ? `${tokens24.colors.green}20` : "transparent",
|
|
1473
2282
|
display: "flex",
|
|
1474
2283
|
alignItems: "center",
|
|
1475
2284
|
justifyContent: "center",
|
|
1476
2285
|
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1477
|
-
color: isActive ?
|
|
2286
|
+
color: isActive ? tokens24.colors.green : tokens24.colors.textSecondary
|
|
1478
2287
|
},
|
|
1479
2288
|
"& .label": {
|
|
1480
2289
|
fontSize: 10,
|
|
1481
2290
|
fontWeight: isActive ? 800 : 600,
|
|
1482
|
-
color: isActive ?
|
|
2291
|
+
color: isActive ? tokens24.colors.green : tokens24.colors.textSecondary
|
|
1483
2292
|
}
|
|
1484
2293
|
};
|
|
1485
2294
|
}
|
|
1486
2295
|
if (variant === "expansive") {
|
|
1487
2296
|
return {
|
|
1488
2297
|
flexDirection: "column",
|
|
1489
|
-
backgroundColor: isActive ?
|
|
1490
|
-
borderRadius: `${
|
|
2298
|
+
backgroundColor: isActive ? tokens24.colors.green : "transparent",
|
|
2299
|
+
borderRadius: `${tokens24.radius.md}px`,
|
|
1491
2300
|
py: 1,
|
|
1492
2301
|
px: 2,
|
|
1493
2302
|
minWidth: 70,
|
|
1494
2303
|
transition: "all 0.3s ease",
|
|
1495
|
-
color: isActive ?
|
|
2304
|
+
color: isActive ? tokens24.colors.white : tokens24.colors.textSecondary,
|
|
1496
2305
|
"& .icon-wrapper": {
|
|
1497
2306
|
fontSize: 24,
|
|
1498
2307
|
mb: 0.2
|
|
@@ -1507,7 +2316,7 @@ function MobileBottomNav({
|
|
|
1507
2316
|
return {
|
|
1508
2317
|
flexDirection: "column",
|
|
1509
2318
|
position: "relative",
|
|
1510
|
-
color: isActive ?
|
|
2319
|
+
color: isActive ? tokens24.colors.green : tokens24.colors.textSecondary,
|
|
1511
2320
|
"& .label": {
|
|
1512
2321
|
fontSize: 11,
|
|
1513
2322
|
fontWeight: 700,
|
|
@@ -1520,7 +2329,7 @@ function MobileBottomNav({
|
|
|
1520
2329
|
left: "25%",
|
|
1521
2330
|
width: isActive ? "50%" : 0,
|
|
1522
2331
|
height: 3,
|
|
1523
|
-
backgroundColor:
|
|
2332
|
+
backgroundColor: tokens24.colors.green,
|
|
1524
2333
|
borderRadius: "3px 3px 0 0",
|
|
1525
2334
|
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
1526
2335
|
}
|
|
@@ -1532,9 +2341,9 @@ function MobileBottomNav({
|
|
|
1532
2341
|
gap: 1,
|
|
1533
2342
|
px: isActive ? 2 : 1,
|
|
1534
2343
|
py: 1,
|
|
1535
|
-
borderRadius:
|
|
1536
|
-
backgroundColor: isActive ?
|
|
1537
|
-
color: isActive ?
|
|
2344
|
+
borderRadius: tokens24.radius.full,
|
|
2345
|
+
backgroundColor: isActive ? tokens24.colors.green : "transparent",
|
|
2346
|
+
color: isActive ? tokens24.colors.white : tokens24.colors.textSecondary,
|
|
1538
2347
|
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
1539
2348
|
"& .label": {
|
|
1540
2349
|
display: isActive ? "block" : "none",
|
|
@@ -1549,10 +2358,10 @@ function MobileBottomNav({
|
|
|
1549
2358
|
gap: 1,
|
|
1550
2359
|
px: 2,
|
|
1551
2360
|
py: 1.2,
|
|
1552
|
-
borderRadius:
|
|
1553
|
-
border: isActive ? `1.5px solid ${
|
|
1554
|
-
color: isActive ?
|
|
1555
|
-
backgroundColor: isActive ? `${
|
|
2361
|
+
borderRadius: tokens24.radius.full,
|
|
2362
|
+
border: isActive ? `1.5px solid ${tokens24.colors.green}` : "1.5px solid transparent",
|
|
2363
|
+
color: isActive ? tokens24.colors.green : tokens24.colors.textSecondary,
|
|
2364
|
+
backgroundColor: isActive ? `${tokens24.colors.green}10` : "transparent",
|
|
1556
2365
|
transition: "all 0.3s ease",
|
|
1557
2366
|
"& .label": {
|
|
1558
2367
|
display: isActive ? "block" : "none",
|
|
@@ -1563,8 +2372,8 @@ function MobileBottomNav({
|
|
|
1563
2372
|
}
|
|
1564
2373
|
return {};
|
|
1565
2374
|
};
|
|
1566
|
-
return /* @__PURE__ */
|
|
1567
|
-
|
|
2375
|
+
return /* @__PURE__ */ jsxs14(
|
|
2376
|
+
Box18,
|
|
1568
2377
|
{
|
|
1569
2378
|
onClick: () => onTabChange(item.id),
|
|
1570
2379
|
sx: {
|
|
@@ -1579,8 +2388,8 @@ function MobileBottomNav({
|
|
|
1579
2388
|
"&:active": { transform: "scale(0.92)" }
|
|
1580
2389
|
},
|
|
1581
2390
|
children: [
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ jsx24(Box18, { className: "icon-wrapper", sx: { display: "flex" }, children: isActive && item.activeIcon ? item.activeIcon : item.icon }),
|
|
2392
|
+
/* @__PURE__ */ jsx24(Typography12, { className: "label", sx: { fontFamily: tokens24.typography.fontFamily }, children: item.label })
|
|
1584
2393
|
]
|
|
1585
2394
|
},
|
|
1586
2395
|
item.id
|
|
@@ -1592,24 +2401,24 @@ function MobileBottomNav({
|
|
|
1592
2401
|
|
|
1593
2402
|
// src/components/navigation/TopNav/TopNav.tsx
|
|
1594
2403
|
import AppBar from "@mui/material/AppBar";
|
|
1595
|
-
import
|
|
1596
|
-
import
|
|
2404
|
+
import Box20 from "@mui/material/Box";
|
|
2405
|
+
import IconButton5 from "@mui/material/IconButton";
|
|
1597
2406
|
import Toolbar from "@mui/material/Toolbar";
|
|
1598
|
-
import
|
|
1599
|
-
import
|
|
2407
|
+
import Typography14 from "@mui/material/Typography";
|
|
2408
|
+
import Stack2 from "@mui/material/Stack";
|
|
1600
2409
|
import Link2 from "@mui/material/Link";
|
|
1601
2410
|
import Badge from "@mui/material/Badge";
|
|
1602
2411
|
import ShoppingCartIcon from "@mui/icons-material/ShoppingCart";
|
|
1603
|
-
import { tokens as
|
|
2412
|
+
import { tokens as tokens26 } from "@mitumba/tokens";
|
|
1604
2413
|
|
|
1605
2414
|
// src/components/forms/MitumbaSearchBar/MitumbaSearchBar.tsx
|
|
1606
|
-
import { useState as
|
|
1607
|
-
import
|
|
1608
|
-
import
|
|
2415
|
+
import { useState as useState6, useCallback } from "react";
|
|
2416
|
+
import Box19 from "@mui/material/Box";
|
|
2417
|
+
import Typography13 from "@mui/material/Typography";
|
|
1609
2418
|
import SearchIcon3 from "@mui/icons-material/Search";
|
|
1610
|
-
import
|
|
1611
|
-
import { tokens as
|
|
1612
|
-
import { jsx as
|
|
2419
|
+
import CloseIcon3 from "@mui/icons-material/Close";
|
|
2420
|
+
import { tokens as tokens25 } from "@mitumba/tokens";
|
|
2421
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1613
2422
|
function MitumbaSearchBar({
|
|
1614
2423
|
value,
|
|
1615
2424
|
onChange,
|
|
@@ -1618,7 +2427,7 @@ function MitumbaSearchBar({
|
|
|
1618
2427
|
suggestions,
|
|
1619
2428
|
onSuggestionClick
|
|
1620
2429
|
}) {
|
|
1621
|
-
const [isFocused, setIsFocused] =
|
|
2430
|
+
const [isFocused, setIsFocused] = useState6(false);
|
|
1622
2431
|
const handleKeyDown = useCallback(
|
|
1623
2432
|
(e) => {
|
|
1624
2433
|
if (e.key === "Enter") {
|
|
@@ -1630,31 +2439,31 @@ function MitumbaSearchBar({
|
|
|
1630
2439
|
const handleClear = useCallback(() => {
|
|
1631
2440
|
onChange("");
|
|
1632
2441
|
}, [onChange]);
|
|
1633
|
-
return /* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */
|
|
1635
|
-
|
|
2442
|
+
return /* @__PURE__ */ jsxs15(Box19, { sx: { position: "relative", width: "100%" }, children: [
|
|
2443
|
+
/* @__PURE__ */ jsxs15(
|
|
2444
|
+
Box19,
|
|
1636
2445
|
{
|
|
1637
2446
|
sx: {
|
|
1638
2447
|
display: "flex",
|
|
1639
2448
|
alignItems: "center",
|
|
1640
2449
|
border: "1px solid",
|
|
1641
|
-
borderColor: isFocused ?
|
|
2450
|
+
borderColor: isFocused ? tokens25.colors.green : tokens25.colors.border,
|
|
1642
2451
|
borderWidth: isFocused ? "2px" : "1px",
|
|
1643
|
-
borderRadius:
|
|
1644
|
-
backgroundColor:
|
|
1645
|
-
paddingInline:
|
|
2452
|
+
borderRadius: tokens25.radius.lg,
|
|
2453
|
+
backgroundColor: tokens25.colors.surface,
|
|
2454
|
+
paddingInline: tokens25.spacing.base,
|
|
1646
2455
|
paddingBlock: isFocused ? "11px" : "12px",
|
|
1647
|
-
gap:
|
|
2456
|
+
gap: tokens25.spacing.sm,
|
|
1648
2457
|
transition: "all 200ms ease",
|
|
1649
|
-
boxShadow: isFocused ?
|
|
2458
|
+
boxShadow: isFocused ? tokens25.shadows.focus : "none",
|
|
1650
2459
|
"&:hover": {
|
|
1651
|
-
borderColor: isFocused ?
|
|
2460
|
+
borderColor: isFocused ? tokens25.colors.green : tokens25.colors.textDisabled
|
|
1652
2461
|
}
|
|
1653
2462
|
},
|
|
1654
2463
|
children: [
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
|
|
2464
|
+
/* @__PURE__ */ jsx25(SearchIcon3, { sx: { color: tokens25.colors.textSecondary, fontSize: 20 } }),
|
|
2465
|
+
/* @__PURE__ */ jsx25(
|
|
2466
|
+
Box19,
|
|
1658
2467
|
{
|
|
1659
2468
|
component: "input",
|
|
1660
2469
|
type: "text",
|
|
@@ -1669,27 +2478,27 @@ function MitumbaSearchBar({
|
|
|
1669
2478
|
border: "none",
|
|
1670
2479
|
outline: "none",
|
|
1671
2480
|
backgroundColor: "transparent",
|
|
1672
|
-
fontSize:
|
|
1673
|
-
fontFamily:
|
|
1674
|
-
color:
|
|
2481
|
+
fontSize: tokens25.typography.fontSizes.base,
|
|
2482
|
+
fontFamily: tokens25.typography.fontFamily,
|
|
2483
|
+
color: tokens25.colors.textPrimary,
|
|
1675
2484
|
width: "100%",
|
|
1676
2485
|
height: "24px",
|
|
1677
2486
|
"&::placeholder": {
|
|
1678
|
-
color:
|
|
2487
|
+
color: tokens25.colors.textDisabled,
|
|
1679
2488
|
opacity: 1
|
|
1680
2489
|
}
|
|
1681
2490
|
}
|
|
1682
2491
|
}
|
|
1683
2492
|
),
|
|
1684
|
-
value && /* @__PURE__ */
|
|
1685
|
-
|
|
2493
|
+
value && /* @__PURE__ */ jsx25(
|
|
2494
|
+
Box19,
|
|
1686
2495
|
{
|
|
1687
2496
|
component: "button",
|
|
1688
2497
|
onClick: handleClear,
|
|
1689
2498
|
"aria-label": "Clear search",
|
|
1690
2499
|
sx: {
|
|
1691
2500
|
cursor: "pointer",
|
|
1692
|
-
color:
|
|
2501
|
+
color: tokens25.colors.textDisabled,
|
|
1693
2502
|
display: "flex",
|
|
1694
2503
|
alignItems: "center",
|
|
1695
2504
|
background: "none",
|
|
@@ -1697,32 +2506,32 @@ function MitumbaSearchBar({
|
|
|
1697
2506
|
padding: 0,
|
|
1698
2507
|
transition: "all 200ms ease",
|
|
1699
2508
|
"&:hover": {
|
|
1700
|
-
color:
|
|
2509
|
+
color: tokens25.colors.error
|
|
1701
2510
|
},
|
|
1702
2511
|
"&:focus-visible": {
|
|
1703
|
-
outline: `2px solid ${
|
|
1704
|
-
borderRadius:
|
|
2512
|
+
outline: `2px solid ${tokens25.colors.greenLight}`,
|
|
2513
|
+
borderRadius: tokens25.radius.xs
|
|
1705
2514
|
}
|
|
1706
2515
|
},
|
|
1707
|
-
children: /* @__PURE__ */
|
|
2516
|
+
children: /* @__PURE__ */ jsx25(CloseIcon3, { sx: { fontSize: 18 } })
|
|
1708
2517
|
}
|
|
1709
2518
|
)
|
|
1710
2519
|
]
|
|
1711
2520
|
}
|
|
1712
2521
|
),
|
|
1713
|
-
isFocused && suggestions && suggestions.length > 0 && /* @__PURE__ */
|
|
1714
|
-
|
|
2522
|
+
isFocused && suggestions && suggestions.length > 0 && /* @__PURE__ */ jsx25(
|
|
2523
|
+
Box19,
|
|
1715
2524
|
{
|
|
1716
2525
|
sx: {
|
|
1717
2526
|
position: "absolute",
|
|
1718
2527
|
top: "100%",
|
|
1719
2528
|
left: 0,
|
|
1720
2529
|
right: 0,
|
|
1721
|
-
mt:
|
|
1722
|
-
backgroundColor:
|
|
1723
|
-
border: `1px solid ${
|
|
1724
|
-
borderRadius:
|
|
1725
|
-
boxShadow:
|
|
2530
|
+
mt: tokens25.spacing.xs,
|
|
2531
|
+
backgroundColor: tokens25.colors.surface,
|
|
2532
|
+
border: `1px solid ${tokens25.colors.border}`,
|
|
2533
|
+
borderRadius: tokens25.radius.md,
|
|
2534
|
+
boxShadow: tokens25.shadows.elevated,
|
|
1726
2535
|
zIndex: 10,
|
|
1727
2536
|
overflow: "hidden",
|
|
1728
2537
|
animation: "fadeIn 200ms ease",
|
|
@@ -1731,29 +2540,29 @@ function MitumbaSearchBar({
|
|
|
1731
2540
|
to: { opacity: 1, transform: "translateY(0)" }
|
|
1732
2541
|
}
|
|
1733
2542
|
},
|
|
1734
|
-
children: suggestions.map((suggestion) => /* @__PURE__ */
|
|
1735
|
-
|
|
2543
|
+
children: suggestions.map((suggestion) => /* @__PURE__ */ jsx25(
|
|
2544
|
+
Box19,
|
|
1736
2545
|
{
|
|
1737
2546
|
onClick: () => {
|
|
1738
2547
|
onSuggestionClick?.(suggestion);
|
|
1739
2548
|
setIsFocused(false);
|
|
1740
2549
|
},
|
|
1741
2550
|
sx: {
|
|
1742
|
-
paddingInline:
|
|
1743
|
-
paddingBlock:
|
|
2551
|
+
paddingInline: tokens25.spacing.base,
|
|
2552
|
+
paddingBlock: tokens25.spacing.sm,
|
|
1744
2553
|
cursor: "pointer",
|
|
1745
2554
|
transition: "background-color 200ms ease",
|
|
1746
2555
|
"&:hover": {
|
|
1747
|
-
backgroundColor:
|
|
2556
|
+
backgroundColor: tokens25.colors.background
|
|
1748
2557
|
}
|
|
1749
2558
|
},
|
|
1750
|
-
children: /* @__PURE__ */
|
|
1751
|
-
|
|
2559
|
+
children: /* @__PURE__ */ jsx25(
|
|
2560
|
+
Typography13,
|
|
1752
2561
|
{
|
|
1753
2562
|
sx: {
|
|
1754
|
-
fontSize:
|
|
1755
|
-
fontFamily:
|
|
1756
|
-
color:
|
|
2563
|
+
fontSize: tokens25.typography.fontSizes.base,
|
|
2564
|
+
fontFamily: tokens25.typography.fontFamily,
|
|
2565
|
+
color: tokens25.colors.textPrimary
|
|
1757
2566
|
},
|
|
1758
2567
|
children: suggestion
|
|
1759
2568
|
}
|
|
@@ -1767,7 +2576,7 @@ function MitumbaSearchBar({
|
|
|
1767
2576
|
}
|
|
1768
2577
|
|
|
1769
2578
|
// src/components/navigation/TopNav/TopNav.tsx
|
|
1770
|
-
import { jsx as
|
|
2579
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1771
2580
|
function TopNav({
|
|
1772
2581
|
announcement,
|
|
1773
2582
|
logo,
|
|
@@ -1788,38 +2597,38 @@ function TopNav({
|
|
|
1788
2597
|
cartCount = 0,
|
|
1789
2598
|
sx
|
|
1790
2599
|
}) {
|
|
1791
|
-
return /* @__PURE__ */
|
|
2600
|
+
return /* @__PURE__ */ jsxs16(
|
|
1792
2601
|
AppBar,
|
|
1793
2602
|
{
|
|
1794
2603
|
position: sticky ? "sticky" : "static",
|
|
1795
2604
|
elevation: 0,
|
|
1796
2605
|
sx: [
|
|
1797
2606
|
{
|
|
1798
|
-
backgroundColor: transparent ? "transparent" :
|
|
1799
|
-
borderBottom: transparent ? "none" : `1px solid ${
|
|
1800
|
-
color:
|
|
2607
|
+
backgroundColor: transparent ? "transparent" : tokens26.colors.surface,
|
|
2608
|
+
borderBottom: transparent ? "none" : `1px solid ${tokens26.colors.divider}`,
|
|
2609
|
+
color: tokens26.colors.textPrimary,
|
|
1801
2610
|
zIndex: (theme) => theme.zIndex.appBar
|
|
1802
2611
|
},
|
|
1803
2612
|
...Array.isArray(sx) ? sx : [sx]
|
|
1804
2613
|
],
|
|
1805
2614
|
children: [
|
|
1806
|
-
announcement && /* @__PURE__ */
|
|
1807
|
-
|
|
2615
|
+
announcement && /* @__PURE__ */ jsx26(
|
|
2616
|
+
Box20,
|
|
1808
2617
|
{
|
|
1809
2618
|
sx: {
|
|
1810
|
-
backgroundColor:
|
|
1811
|
-
color:
|
|
2619
|
+
backgroundColor: tokens26.colors.green,
|
|
2620
|
+
color: tokens26.colors.white,
|
|
1812
2621
|
py: 1,
|
|
1813
2622
|
px: 2,
|
|
1814
2623
|
textAlign: "center",
|
|
1815
2624
|
fontSize: 12,
|
|
1816
2625
|
fontWeight: 700,
|
|
1817
|
-
fontFamily:
|
|
2626
|
+
fontFamily: tokens26.typography.fontFamily
|
|
1818
2627
|
},
|
|
1819
2628
|
children: announcement
|
|
1820
2629
|
}
|
|
1821
2630
|
),
|
|
1822
|
-
/* @__PURE__ */
|
|
2631
|
+
/* @__PURE__ */ jsxs16(
|
|
1823
2632
|
Toolbar,
|
|
1824
2633
|
{
|
|
1825
2634
|
sx: {
|
|
@@ -1829,45 +2638,45 @@ function TopNav({
|
|
|
1829
2638
|
gap: 4
|
|
1830
2639
|
},
|
|
1831
2640
|
children: [
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
|
|
2641
|
+
/* @__PURE__ */ jsx26(
|
|
2642
|
+
Box20,
|
|
1834
2643
|
{
|
|
1835
2644
|
onClick: onLogoClick,
|
|
1836
2645
|
sx: { cursor: "pointer", display: "flex", alignItems: "center" },
|
|
1837
|
-
children: logo || /* @__PURE__ */
|
|
1838
|
-
|
|
2646
|
+
children: logo || /* @__PURE__ */ jsx26(
|
|
2647
|
+
Typography14,
|
|
1839
2648
|
{
|
|
1840
2649
|
variant: "h6",
|
|
1841
2650
|
sx: {
|
|
1842
2651
|
fontWeight: 900,
|
|
1843
|
-
color:
|
|
2652
|
+
color: tokens26.colors.green,
|
|
1844
2653
|
letterSpacing: "-0.02em",
|
|
1845
|
-
fontFamily:
|
|
2654
|
+
fontFamily: tokens26.typography.fontFamily
|
|
1846
2655
|
},
|
|
1847
2656
|
children: "MITUMBA"
|
|
1848
2657
|
}
|
|
1849
2658
|
)
|
|
1850
2659
|
}
|
|
1851
2660
|
),
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
|
|
2661
|
+
/* @__PURE__ */ jsx26(
|
|
2662
|
+
Stack2,
|
|
1854
2663
|
{
|
|
1855
2664
|
direction: "row",
|
|
1856
2665
|
spacing: 4,
|
|
1857
2666
|
sx: { display: { xs: "none", md: "flex" }, flexGrow: 1, justifyContent: "center" },
|
|
1858
|
-
children: links.map((link) => /* @__PURE__ */
|
|
2667
|
+
children: links.map((link) => /* @__PURE__ */ jsx26(
|
|
1859
2668
|
Link2,
|
|
1860
2669
|
{
|
|
1861
2670
|
href: link.href,
|
|
1862
2671
|
sx: {
|
|
1863
|
-
color: link.active ?
|
|
2672
|
+
color: link.active ? tokens26.colors.green : tokens26.colors.textSecondary,
|
|
1864
2673
|
textDecoration: "none",
|
|
1865
2674
|
fontWeight: 700,
|
|
1866
2675
|
fontSize: 14,
|
|
1867
|
-
fontFamily:
|
|
2676
|
+
fontFamily: tokens26.typography.fontFamily,
|
|
1868
2677
|
transition: "all 0.2s ease",
|
|
1869
2678
|
"&:hover": {
|
|
1870
|
-
color:
|
|
2679
|
+
color: tokens26.colors.green,
|
|
1871
2680
|
transform: "translateY(-1px)"
|
|
1872
2681
|
}
|
|
1873
2682
|
},
|
|
@@ -1877,7 +2686,7 @@ function TopNav({
|
|
|
1877
2686
|
))
|
|
1878
2687
|
}
|
|
1879
2688
|
),
|
|
1880
|
-
onSearchSubmit && /* @__PURE__ */
|
|
2689
|
+
onSearchSubmit && /* @__PURE__ */ jsx26(Box20, { sx: { display: { xs: "none", lg: "block" }, width: 300 }, children: /* @__PURE__ */ jsx26(
|
|
1881
2690
|
MitumbaSearchBar,
|
|
1882
2691
|
{
|
|
1883
2692
|
value: searchValue,
|
|
@@ -1887,10 +2696,10 @@ function TopNav({
|
|
|
1887
2696
|
placeholder: "Search listings..."
|
|
1888
2697
|
}
|
|
1889
2698
|
) }),
|
|
1890
|
-
/* @__PURE__ */
|
|
2699
|
+
/* @__PURE__ */ jsxs16(Stack2, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
1891
2700
|
actions,
|
|
1892
|
-
/* @__PURE__ */
|
|
1893
|
-
isAuthenticated && user ? /* @__PURE__ */
|
|
2701
|
+
/* @__PURE__ */ jsx26(IconButton5, { onClick: onCartClick, sx: { color: tokens26.colors.textPrimary }, children: /* @__PURE__ */ jsx26(Badge, { badgeContent: cartCount, color: "error", sx: { "& .MuiBadge-badge": { fontWeight: 800, fontSize: 10 } }, children: /* @__PURE__ */ jsx26(ShoppingCartIcon, {}) }) }),
|
|
2702
|
+
isAuthenticated && user ? /* @__PURE__ */ jsx26(Box20, { onClick: onProfileClick, sx: { cursor: "pointer", transition: "transform 0.2s ease", "&:hover": { transform: "scale(1.05)" } }, children: /* @__PURE__ */ jsx26(MitumbaAvatar, { name: user.name, size: "sm", imageUrl: user.avatarUrl }) }) : /* @__PURE__ */ jsx26(
|
|
1894
2703
|
MitumbaPrimaryButton,
|
|
1895
2704
|
{
|
|
1896
2705
|
label: "Sign In",
|
|
@@ -1901,7 +2710,7 @@ function TopNav({
|
|
|
1901
2710
|
sx: { fontWeight: 800 }
|
|
1902
2711
|
}
|
|
1903
2712
|
),
|
|
1904
|
-
cta && /* @__PURE__ */
|
|
2713
|
+
cta && /* @__PURE__ */ jsx26(Box20, { sx: { display: { xs: "none", sm: "block" } }, children: cta })
|
|
1905
2714
|
] })
|
|
1906
2715
|
]
|
|
1907
2716
|
}
|
|
@@ -1914,18 +2723,18 @@ function TopNav({
|
|
|
1914
2723
|
// src/components/navigation/MitumbaTabs/MitumbaTabs.tsx
|
|
1915
2724
|
import Tabs from "@mui/material/Tabs";
|
|
1916
2725
|
import Tab from "@mui/material/Tab";
|
|
1917
|
-
import
|
|
1918
|
-
import { tokens as
|
|
1919
|
-
import { jsx as
|
|
2726
|
+
import Box21 from "@mui/material/Box";
|
|
2727
|
+
import { tokens as tokens27 } from "@mitumba/tokens";
|
|
2728
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1920
2729
|
|
|
1921
2730
|
// src/components/navigation/MitumbaPagination/MitumbaPagination.tsx
|
|
1922
2731
|
import Pagination from "@mui/material/Pagination";
|
|
1923
2732
|
import PaginationItem from "@mui/material/PaginationItem";
|
|
1924
|
-
import
|
|
2733
|
+
import Stack3 from "@mui/material/Stack";
|
|
1925
2734
|
import ChevronLeftIcon2 from "@mui/icons-material/ChevronLeft";
|
|
1926
2735
|
import ChevronRightIcon2 from "@mui/icons-material/ChevronRight";
|
|
1927
|
-
import { tokens as
|
|
1928
|
-
import { jsx as
|
|
2736
|
+
import { tokens as tokens28 } from "@mitumba/tokens";
|
|
2737
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1929
2738
|
|
|
1930
2739
|
// src/components/navigation/MitumbaStepper/MitumbaStepper.tsx
|
|
1931
2740
|
import Stepper from "@mui/material/Stepper";
|
|
@@ -1933,27 +2742,27 @@ import Step from "@mui/material/Step";
|
|
|
1933
2742
|
import StepLabel from "@mui/material/StepLabel";
|
|
1934
2743
|
import StepConnector, { stepConnectorClasses } from "@mui/material/StepConnector";
|
|
1935
2744
|
import { styled } from "@mui/material/styles";
|
|
1936
|
-
import
|
|
1937
|
-
import
|
|
2745
|
+
import Box22 from "@mui/material/Box";
|
|
2746
|
+
import Typography15 from "@mui/material/Typography";
|
|
1938
2747
|
import CheckIcon3 from "@mui/icons-material/Check";
|
|
1939
|
-
import { tokens as
|
|
1940
|
-
import { jsx as
|
|
2748
|
+
import { tokens as tokens29 } from "@mitumba/tokens";
|
|
2749
|
+
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1941
2750
|
var MitumbaConnector = styled(StepConnector)(() => ({
|
|
1942
2751
|
[`&.${stepConnectorClasses.alternativeLabel}`]: {
|
|
1943
2752
|
top: 18
|
|
1944
2753
|
},
|
|
1945
2754
|
[`&.${stepConnectorClasses.active}`]: {
|
|
1946
2755
|
[`& .${stepConnectorClasses.line}`]: {
|
|
1947
|
-
borderColor:
|
|
2756
|
+
borderColor: tokens29.colors.green
|
|
1948
2757
|
}
|
|
1949
2758
|
},
|
|
1950
2759
|
[`&.${stepConnectorClasses.completed}`]: {
|
|
1951
2760
|
[`& .${stepConnectorClasses.line}`]: {
|
|
1952
|
-
borderColor:
|
|
2761
|
+
borderColor: tokens29.colors.green
|
|
1953
2762
|
}
|
|
1954
2763
|
},
|
|
1955
2764
|
[`& .${stepConnectorClasses.line}`]: {
|
|
1956
|
-
borderColor:
|
|
2765
|
+
borderColor: tokens29.colors.divider,
|
|
1957
2766
|
borderTopWidth: 2,
|
|
1958
2767
|
borderRadius: 1,
|
|
1959
2768
|
transition: "all 0.3s ease",
|
|
@@ -1967,23 +2776,23 @@ var MitumbaConnector = styled(StepConnector)(() => ({
|
|
|
1967
2776
|
}));
|
|
1968
2777
|
|
|
1969
2778
|
// src/components/seller/STIScoreChip/STIScoreChip.tsx
|
|
1970
|
-
import
|
|
1971
|
-
import { tokens as
|
|
1972
|
-
import { jsx as
|
|
2779
|
+
import Box23 from "@mui/material/Box";
|
|
2780
|
+
import { tokens as tokens30 } from "@mitumba/tokens";
|
|
2781
|
+
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1973
2782
|
function getSTIConfig(score) {
|
|
1974
2783
|
if (score >= 85) {
|
|
1975
|
-
return { color:
|
|
2784
|
+
return { color: tokens30.colors.stiTrusted, label: "Trusted \u2605" };
|
|
1976
2785
|
}
|
|
1977
2786
|
if (score >= 60) {
|
|
1978
|
-
return { color:
|
|
2787
|
+
return { color: tokens30.colors.stiGood, label: "Good" };
|
|
1979
2788
|
}
|
|
1980
2789
|
if (score >= 40) {
|
|
1981
|
-
return { color:
|
|
2790
|
+
return { color: tokens30.colors.stiAtRisk, label: "At risk" };
|
|
1982
2791
|
}
|
|
1983
2792
|
if (score >= 20) {
|
|
1984
|
-
return { color:
|
|
2793
|
+
return { color: tokens30.colors.stiFlagged, label: "Flagged" };
|
|
1985
2794
|
}
|
|
1986
|
-
return { color:
|
|
2795
|
+
return { color: tokens30.colors.stiSuspended, label: "Suspended" };
|
|
1987
2796
|
}
|
|
1988
2797
|
function STIScoreChip({
|
|
1989
2798
|
score,
|
|
@@ -1993,16 +2802,16 @@ function STIScoreChip({
|
|
|
1993
2802
|
const clampedScore = Math.min(100, Math.max(0, score));
|
|
1994
2803
|
const { color, label } = getSTIConfig(clampedScore);
|
|
1995
2804
|
const shouldShowLabel = showLabel ?? !compact;
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
|
|
2805
|
+
return /* @__PURE__ */ jsxs18(
|
|
2806
|
+
Box23,
|
|
1998
2807
|
{
|
|
1999
2808
|
sx: {
|
|
2000
2809
|
display: "inline-flex",
|
|
2001
2810
|
alignItems: "center",
|
|
2002
|
-
gap:
|
|
2811
|
+
gap: tokens30.spacing.xs,
|
|
2003
2812
|
height: compact ? "24px" : "32px",
|
|
2004
|
-
px: compact ?
|
|
2005
|
-
borderRadius:
|
|
2813
|
+
px: compact ? tokens30.spacing.sm : tokens30.spacing.md,
|
|
2814
|
+
borderRadius: tokens30.radius.full,
|
|
2006
2815
|
backgroundColor: `${color}14`,
|
|
2007
2816
|
border: `1px solid ${color}40`,
|
|
2008
2817
|
width: "fit-content",
|
|
@@ -2010,35 +2819,35 @@ function STIScoreChip({
|
|
|
2010
2819
|
},
|
|
2011
2820
|
"aria-label": `STI Score: ${clampedScore}, ${label}`,
|
|
2012
2821
|
children: [
|
|
2013
|
-
shouldShowLabel && /* @__PURE__ */
|
|
2014
|
-
|
|
2822
|
+
shouldShowLabel && /* @__PURE__ */ jsx30(
|
|
2823
|
+
Box23,
|
|
2015
2824
|
{
|
|
2016
2825
|
component: "span",
|
|
2017
2826
|
sx: {
|
|
2018
2827
|
color,
|
|
2019
|
-
fontSize: compact ? 10 :
|
|
2020
|
-
fontWeight:
|
|
2828
|
+
fontSize: compact ? 10 : tokens30.typography.fontSizes.xs,
|
|
2829
|
+
fontWeight: tokens30.typography.fontWeights.bold,
|
|
2021
2830
|
textTransform: "uppercase",
|
|
2022
|
-
letterSpacing:
|
|
2831
|
+
letterSpacing: tokens30.typography.letterSpacings.wide,
|
|
2023
2832
|
lineHeight: 1
|
|
2024
2833
|
},
|
|
2025
2834
|
children: label
|
|
2026
2835
|
}
|
|
2027
2836
|
),
|
|
2028
|
-
/* @__PURE__ */
|
|
2029
|
-
|
|
2837
|
+
/* @__PURE__ */ jsx30(
|
|
2838
|
+
Box23,
|
|
2030
2839
|
{
|
|
2031
2840
|
component: "span",
|
|
2032
2841
|
sx: {
|
|
2033
2842
|
color,
|
|
2034
|
-
fontSize: compact ?
|
|
2035
|
-
fontWeight:
|
|
2843
|
+
fontSize: compact ? tokens30.typography.fontSizes.xs : tokens30.typography.fontSizes.sm,
|
|
2844
|
+
fontWeight: tokens30.typography.fontWeights.extrabold,
|
|
2036
2845
|
lineHeight: 1,
|
|
2037
2846
|
minWidth: "1.2em",
|
|
2038
2847
|
textAlign: "center",
|
|
2039
2848
|
...shouldShowLabel && {
|
|
2040
2849
|
borderLeft: `1px solid ${color}40`,
|
|
2041
|
-
paddingLeft:
|
|
2850
|
+
paddingLeft: tokens30.spacing.xs,
|
|
2042
2851
|
marginLeft: "2px"
|
|
2043
2852
|
}
|
|
2044
2853
|
},
|
|
@@ -2051,31 +2860,31 @@ function STIScoreChip({
|
|
|
2051
2860
|
}
|
|
2052
2861
|
|
|
2053
2862
|
// src/components/seller/SellerCard/SellerCard.tsx
|
|
2054
|
-
import
|
|
2055
|
-
import
|
|
2863
|
+
import Box24 from "@mui/material/Box";
|
|
2864
|
+
import Typography16 from "@mui/material/Typography";
|
|
2056
2865
|
import Inventory2OutlinedIcon from "@mui/icons-material/Inventory2Outlined";
|
|
2057
2866
|
import LocationOnOutlinedIcon from "@mui/icons-material/LocationOnOutlined";
|
|
2058
|
-
import { tokens as
|
|
2867
|
+
import { tokens as tokens31 } from "@mitumba/tokens";
|
|
2059
2868
|
|
|
2060
2869
|
// src/components/vazi/VAZIBadge/VAZIBadge.tsx
|
|
2061
2870
|
import AutoAwesomeIcon2 from "@mui/icons-material/AutoAwesome";
|
|
2062
|
-
import { jsx as
|
|
2871
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2063
2872
|
function VAZIBadge({ size = "small" }) {
|
|
2064
|
-
return /* @__PURE__ */
|
|
2873
|
+
return /* @__PURE__ */ jsx31(
|
|
2065
2874
|
MitumbaChip,
|
|
2066
2875
|
{
|
|
2067
2876
|
label: "VAZI Curation",
|
|
2068
2877
|
status: "special",
|
|
2069
2878
|
variant: "solid",
|
|
2070
2879
|
size,
|
|
2071
|
-
icon: /* @__PURE__ */
|
|
2880
|
+
icon: /* @__PURE__ */ jsx31(AutoAwesomeIcon2, {}),
|
|
2072
2881
|
color: "purple"
|
|
2073
2882
|
}
|
|
2074
2883
|
);
|
|
2075
2884
|
}
|
|
2076
2885
|
|
|
2077
2886
|
// src/components/seller/SellerCard/SellerCard.tsx
|
|
2078
|
-
import { jsx as
|
|
2887
|
+
import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2079
2888
|
function SellerCard({
|
|
2080
2889
|
name,
|
|
2081
2890
|
avatarUrl,
|
|
@@ -2085,8 +2894,8 @@ function SellerCard({
|
|
|
2085
2894
|
isVaziFeatured = false,
|
|
2086
2895
|
onTap
|
|
2087
2896
|
}) {
|
|
2088
|
-
return /* @__PURE__ */
|
|
2089
|
-
|
|
2897
|
+
return /* @__PURE__ */ jsxs19(
|
|
2898
|
+
Box24,
|
|
2090
2899
|
{
|
|
2091
2900
|
onClick: onTap,
|
|
2092
2901
|
onKeyDown: (e) => {
|
|
@@ -2101,75 +2910,75 @@ function SellerCard({
|
|
|
2101
2910
|
sx: {
|
|
2102
2911
|
display: "flex",
|
|
2103
2912
|
alignItems: "center",
|
|
2104
|
-
gap:
|
|
2105
|
-
p:
|
|
2106
|
-
borderRadius:
|
|
2107
|
-
bgcolor:
|
|
2108
|
-
boxShadow:
|
|
2109
|
-
border: `1px solid ${
|
|
2913
|
+
gap: tokens31.spacing.base,
|
|
2914
|
+
p: tokens31.spacing.base,
|
|
2915
|
+
borderRadius: tokens31.radius.lg,
|
|
2916
|
+
bgcolor: tokens31.colors.surface,
|
|
2917
|
+
boxShadow: tokens31.shadows.card,
|
|
2918
|
+
border: `1px solid ${tokens31.colors.divider}`,
|
|
2110
2919
|
cursor: onTap ? "pointer" : "default",
|
|
2111
2920
|
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
2112
2921
|
"&:hover": onTap ? {
|
|
2113
|
-
boxShadow:
|
|
2922
|
+
boxShadow: tokens31.shadows.elevated,
|
|
2114
2923
|
transform: "translateY(-2px)",
|
|
2115
|
-
borderColor:
|
|
2924
|
+
borderColor: tokens31.colors.border
|
|
2116
2925
|
} : void 0,
|
|
2117
2926
|
"&:focus-visible": {
|
|
2118
|
-
outline: `2px solid ${
|
|
2119
|
-
boxShadow:
|
|
2927
|
+
outline: `2px solid ${tokens31.colors.greenLight}`,
|
|
2928
|
+
boxShadow: tokens31.shadows.focus
|
|
2120
2929
|
}
|
|
2121
2930
|
},
|
|
2122
2931
|
children: [
|
|
2123
|
-
/* @__PURE__ */
|
|
2124
|
-
/* @__PURE__ */
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
|
|
2932
|
+
/* @__PURE__ */ jsx32(MitumbaAvatar, { name, imageUrl: avatarUrl, size: "md" }),
|
|
2933
|
+
/* @__PURE__ */ jsxs19(Box24, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
2934
|
+
/* @__PURE__ */ jsxs19(Box24, { sx: { display: "flex", alignItems: "center", gap: tokens31.spacing.sm }, children: [
|
|
2935
|
+
/* @__PURE__ */ jsx32(
|
|
2936
|
+
Typography16,
|
|
2128
2937
|
{
|
|
2129
2938
|
sx: {
|
|
2130
|
-
fontWeight:
|
|
2131
|
-
fontSize:
|
|
2132
|
-
color:
|
|
2939
|
+
fontWeight: tokens31.typography.fontWeights.bold,
|
|
2940
|
+
fontSize: tokens31.typography.fontSizes.base,
|
|
2941
|
+
color: tokens31.colors.textPrimary,
|
|
2133
2942
|
lineHeight: 1.2,
|
|
2134
2943
|
overflow: "hidden",
|
|
2135
2944
|
textOverflow: "ellipsis",
|
|
2136
2945
|
whiteSpace: "nowrap",
|
|
2137
|
-
fontFamily:
|
|
2946
|
+
fontFamily: tokens31.typography.fontFamily
|
|
2138
2947
|
},
|
|
2139
2948
|
children: name
|
|
2140
2949
|
}
|
|
2141
2950
|
),
|
|
2142
|
-
isVaziFeatured && /* @__PURE__ */
|
|
2951
|
+
isVaziFeatured && /* @__PURE__ */ jsx32(VAZIBadge, { size: "small" })
|
|
2143
2952
|
] }),
|
|
2144
|
-
/* @__PURE__ */
|
|
2145
|
-
/* @__PURE__ */
|
|
2146
|
-
/* @__PURE__ */
|
|
2147
|
-
/* @__PURE__ */
|
|
2148
|
-
/* @__PURE__ */
|
|
2149
|
-
|
|
2953
|
+
/* @__PURE__ */ jsxs19(Box24, { sx: { display: "flex", alignItems: "center", gap: tokens31.spacing.sm, mt: tokens31.spacing.xs }, children: [
|
|
2954
|
+
/* @__PURE__ */ jsx32(STIScoreChip, { score: stiScore, compact: true }),
|
|
2955
|
+
/* @__PURE__ */ jsxs19(Box24, { sx: { display: "flex", alignItems: "center", gap: "4px", opacity: 0.7 }, children: [
|
|
2956
|
+
/* @__PURE__ */ jsx32(Inventory2OutlinedIcon, { sx: { fontSize: 14, color: tokens31.colors.textSecondary } }),
|
|
2957
|
+
/* @__PURE__ */ jsx32(
|
|
2958
|
+
Typography16,
|
|
2150
2959
|
{
|
|
2151
2960
|
sx: {
|
|
2152
|
-
color:
|
|
2961
|
+
color: tokens31.colors.textSecondary,
|
|
2153
2962
|
fontSize: 10,
|
|
2154
|
-
fontWeight:
|
|
2963
|
+
fontWeight: tokens31.typography.fontWeights.semibold,
|
|
2155
2964
|
textTransform: "uppercase",
|
|
2156
|
-
letterSpacing:
|
|
2965
|
+
letterSpacing: tokens31.typography.letterSpacings.wide
|
|
2157
2966
|
},
|
|
2158
2967
|
children: totalListings
|
|
2159
2968
|
}
|
|
2160
2969
|
)
|
|
2161
2970
|
] }),
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2164
|
-
/* @__PURE__ */
|
|
2165
|
-
|
|
2971
|
+
/* @__PURE__ */ jsxs19(Box24, { sx: { display: "flex", alignItems: "center", gap: "4px", opacity: 0.7 }, children: [
|
|
2972
|
+
/* @__PURE__ */ jsx32(LocationOnOutlinedIcon, { sx: { fontSize: 14, color: tokens31.colors.textSecondary } }),
|
|
2973
|
+
/* @__PURE__ */ jsx32(
|
|
2974
|
+
Typography16,
|
|
2166
2975
|
{
|
|
2167
2976
|
sx: {
|
|
2168
|
-
color:
|
|
2977
|
+
color: tokens31.colors.textSecondary,
|
|
2169
2978
|
fontSize: 10,
|
|
2170
|
-
fontWeight:
|
|
2979
|
+
fontWeight: tokens31.typography.fontWeights.semibold,
|
|
2171
2980
|
textTransform: "uppercase",
|
|
2172
|
-
letterSpacing:
|
|
2981
|
+
letterSpacing: tokens31.typography.letterSpacings.wide
|
|
2173
2982
|
},
|
|
2174
2983
|
children: city
|
|
2175
2984
|
}
|
|
@@ -2183,13 +2992,13 @@ function SellerCard({
|
|
|
2183
2992
|
}
|
|
2184
2993
|
|
|
2185
2994
|
// src/components/seller/STIBreakdownPanel/STIBreakdownPanel.tsx
|
|
2186
|
-
import
|
|
2187
|
-
import
|
|
2188
|
-
import
|
|
2995
|
+
import Box25 from "@mui/material/Box";
|
|
2996
|
+
import Typography17 from "@mui/material/Typography";
|
|
2997
|
+
import LinearProgress2 from "@mui/material/LinearProgress";
|
|
2189
2998
|
import AddOutlinedIcon from "@mui/icons-material/AddOutlined";
|
|
2190
2999
|
import RemoveOutlinedIcon from "@mui/icons-material/RemoveOutlined";
|
|
2191
|
-
import { tokens as
|
|
2192
|
-
import { jsx as
|
|
3000
|
+
import { tokens as tokens32 } from "@mitumba/tokens";
|
|
3001
|
+
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2193
3002
|
function formatPercent(value) {
|
|
2194
3003
|
return `${Math.round(value * 100)}%`;
|
|
2195
3004
|
}
|
|
@@ -2207,103 +3016,103 @@ function STIBreakdownPanel({
|
|
|
2207
3016
|
{ label: "Avg Response Time", display: `${avgResponseHours}h` },
|
|
2208
3017
|
{ label: "Days Active", display: `${daysActive}` }
|
|
2209
3018
|
];
|
|
2210
|
-
return /* @__PURE__ */
|
|
2211
|
-
|
|
3019
|
+
return /* @__PURE__ */ jsxs20(
|
|
3020
|
+
Box25,
|
|
2212
3021
|
{
|
|
2213
3022
|
sx: {
|
|
2214
|
-
p:
|
|
2215
|
-
borderRadius:
|
|
2216
|
-
bgcolor:
|
|
2217
|
-
boxShadow:
|
|
2218
|
-
border: `1px solid ${
|
|
3023
|
+
p: tokens32.spacing.base,
|
|
3024
|
+
borderRadius: tokens32.radius.lg,
|
|
3025
|
+
bgcolor: tokens32.colors.surface,
|
|
3026
|
+
boxShadow: tokens32.shadows.card,
|
|
3027
|
+
border: `1px solid ${tokens32.colors.divider}`
|
|
2219
3028
|
},
|
|
2220
3029
|
children: [
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2224
|
-
/* @__PURE__ */
|
|
2225
|
-
|
|
3030
|
+
/* @__PURE__ */ jsx33(Box25, { sx: { display: "flex", alignItems: "center", gap: tokens32.spacing.base, mb: tokens32.spacing.lg }, children: /* @__PURE__ */ jsx33(STIScoreChip, { score }) }),
|
|
3031
|
+
/* @__PURE__ */ jsx33(Box25, { component: "section", "aria-label": "Score factors", sx: { mb: tokens32.spacing.lg }, children: factors.map((factor) => /* @__PURE__ */ jsxs20(Box25, { sx: { mb: tokens32.spacing.md }, children: [
|
|
3032
|
+
/* @__PURE__ */ jsxs20(Box25, { sx: { display: "flex", justifyContent: "space-between", mb: tokens32.spacing.xs }, children: [
|
|
3033
|
+
/* @__PURE__ */ jsx33(
|
|
3034
|
+
Typography17,
|
|
2226
3035
|
{
|
|
2227
3036
|
variant: "body2",
|
|
2228
|
-
sx: { color:
|
|
3037
|
+
sx: { color: tokens32.colors.textSecondary, fontSize: tokens32.typography.fontSizes.sm },
|
|
2229
3038
|
children: factor.label
|
|
2230
3039
|
}
|
|
2231
3040
|
),
|
|
2232
|
-
/* @__PURE__ */
|
|
2233
|
-
|
|
3041
|
+
/* @__PURE__ */ jsx33(
|
|
3042
|
+
Typography17,
|
|
2234
3043
|
{
|
|
2235
3044
|
variant: "body2",
|
|
2236
|
-
sx: { fontWeight:
|
|
3045
|
+
sx: { fontWeight: tokens32.typography.fontWeights.semibold, fontSize: tokens32.typography.fontSizes.sm },
|
|
2237
3046
|
children: factor.display
|
|
2238
3047
|
}
|
|
2239
3048
|
)
|
|
2240
3049
|
] }),
|
|
2241
|
-
factor.value !== void 0 && /* @__PURE__ */
|
|
2242
|
-
|
|
3050
|
+
factor.value !== void 0 && /* @__PURE__ */ jsx33(
|
|
3051
|
+
LinearProgress2,
|
|
2243
3052
|
{
|
|
2244
3053
|
variant: "determinate",
|
|
2245
3054
|
value: factor.value * 100,
|
|
2246
3055
|
sx: {
|
|
2247
|
-
height:
|
|
2248
|
-
borderRadius:
|
|
2249
|
-
bgcolor:
|
|
3056
|
+
height: tokens32.spacing.sm,
|
|
3057
|
+
borderRadius: tokens32.radius.full,
|
|
3058
|
+
bgcolor: tokens32.colors.background,
|
|
2250
3059
|
"& .MuiLinearProgress-bar": {
|
|
2251
|
-
bgcolor:
|
|
2252
|
-
borderRadius:
|
|
3060
|
+
bgcolor: tokens32.colors.green,
|
|
3061
|
+
borderRadius: tokens32.radius.full
|
|
2253
3062
|
}
|
|
2254
3063
|
},
|
|
2255
3064
|
"aria-label": `${factor.label} progress`
|
|
2256
3065
|
}
|
|
2257
3066
|
)
|
|
2258
3067
|
] }, factor.label)) }),
|
|
2259
|
-
recentEvents.length > 0 && /* @__PURE__ */
|
|
2260
|
-
/* @__PURE__ */
|
|
2261
|
-
|
|
3068
|
+
recentEvents.length > 0 && /* @__PURE__ */ jsxs20(Box25, { component: "section", "aria-label": "Recent STI events", children: [
|
|
3069
|
+
/* @__PURE__ */ jsx33(
|
|
3070
|
+
Typography17,
|
|
2262
3071
|
{
|
|
2263
3072
|
variant: "body2",
|
|
2264
3073
|
sx: {
|
|
2265
|
-
fontWeight:
|
|
2266
|
-
fontSize:
|
|
2267
|
-
color:
|
|
2268
|
-
mb:
|
|
3074
|
+
fontWeight: tokens32.typography.fontWeights.semibold,
|
|
3075
|
+
fontSize: tokens32.typography.fontSizes.sm,
|
|
3076
|
+
color: tokens32.colors.textPrimary,
|
|
3077
|
+
mb: tokens32.spacing.sm
|
|
2269
3078
|
},
|
|
2270
3079
|
children: "Recent Events"
|
|
2271
3080
|
}
|
|
2272
3081
|
),
|
|
2273
|
-
recentEvents.map((event) => /* @__PURE__ */
|
|
2274
|
-
|
|
3082
|
+
recentEvents.map((event) => /* @__PURE__ */ jsxs20(
|
|
3083
|
+
Box25,
|
|
2275
3084
|
{
|
|
2276
3085
|
sx: {
|
|
2277
3086
|
display: "flex",
|
|
2278
3087
|
alignItems: "flex-start",
|
|
2279
|
-
gap:
|
|
2280
|
-
py:
|
|
2281
|
-
borderBottom: `1px solid ${
|
|
3088
|
+
gap: tokens32.spacing.sm,
|
|
3089
|
+
py: tokens32.spacing.sm,
|
|
3090
|
+
borderBottom: `1px solid ${tokens32.colors.divider}`
|
|
2282
3091
|
},
|
|
2283
3092
|
children: [
|
|
2284
|
-
event.type === "positive" ? /* @__PURE__ */
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */
|
|
2287
|
-
/* @__PURE__ */
|
|
2288
|
-
|
|
3093
|
+
event.type === "positive" ? /* @__PURE__ */ jsx33(AddOutlinedIcon, { sx: { fontSize: 16, color: tokens32.colors.success, mt: tokens32.spacing.xs } }) : /* @__PURE__ */ jsx33(RemoveOutlinedIcon, { sx: { fontSize: 16, color: tokens32.colors.error, mt: tokens32.spacing.xs } }),
|
|
3094
|
+
/* @__PURE__ */ jsxs20(Box25, { sx: { flex: 1 }, children: [
|
|
3095
|
+
/* @__PURE__ */ jsxs20(Box25, { sx: { display: "flex", justifyContent: "space-between" }, children: [
|
|
3096
|
+
/* @__PURE__ */ jsx33(
|
|
3097
|
+
Typography17,
|
|
2289
3098
|
{
|
|
2290
3099
|
variant: "body2",
|
|
2291
3100
|
sx: {
|
|
2292
|
-
fontSize:
|
|
2293
|
-
color:
|
|
2294
|
-
fontWeight:
|
|
3101
|
+
fontSize: tokens32.typography.fontSizes.sm,
|
|
3102
|
+
color: tokens32.colors.textPrimary,
|
|
3103
|
+
fontWeight: tokens32.typography.fontWeights.medium
|
|
2295
3104
|
},
|
|
2296
3105
|
children: event.reason
|
|
2297
3106
|
}
|
|
2298
3107
|
),
|
|
2299
|
-
/* @__PURE__ */
|
|
2300
|
-
|
|
3108
|
+
/* @__PURE__ */ jsxs20(
|
|
3109
|
+
Typography17,
|
|
2301
3110
|
{
|
|
2302
3111
|
variant: "caption",
|
|
2303
3112
|
sx: {
|
|
2304
|
-
fontSize:
|
|
2305
|
-
fontWeight:
|
|
2306
|
-
color: event.type === "positive" ?
|
|
3113
|
+
fontSize: tokens32.typography.fontSizes.xs,
|
|
3114
|
+
fontWeight: tokens32.typography.fontWeights.bold,
|
|
3115
|
+
color: event.type === "positive" ? tokens32.colors.success : tokens32.colors.error
|
|
2307
3116
|
},
|
|
2308
3117
|
children: [
|
|
2309
3118
|
event.type === "positive" ? "+" : "",
|
|
@@ -2312,7 +3121,7 @@ function STIBreakdownPanel({
|
|
|
2312
3121
|
}
|
|
2313
3122
|
)
|
|
2314
3123
|
] }),
|
|
2315
|
-
/* @__PURE__ */
|
|
3124
|
+
/* @__PURE__ */ jsx33(Typography17, { variant: "caption", sx: { fontSize: tokens32.typography.fontSizes.xs, color: tokens32.colors.textSecondary }, children: event.timestamp })
|
|
2316
3125
|
] })
|
|
2317
3126
|
]
|
|
2318
3127
|
},
|
|
@@ -2325,16 +3134,16 @@ function STIBreakdownPanel({
|
|
|
2325
3134
|
}
|
|
2326
3135
|
|
|
2327
3136
|
// src/components/listing/ListingCard/ListingCard.tsx
|
|
2328
|
-
import { useState as
|
|
2329
|
-
import
|
|
2330
|
-
import
|
|
2331
|
-
import
|
|
2332
|
-
import
|
|
3137
|
+
import { useState as useState7 } from "react";
|
|
3138
|
+
import Box26 from "@mui/material/Box";
|
|
3139
|
+
import Typography18 from "@mui/material/Typography";
|
|
3140
|
+
import Stack4 from "@mui/material/Stack";
|
|
3141
|
+
import IconButton6 from "@mui/material/IconButton";
|
|
2333
3142
|
import FavoriteIcon from "@mui/icons-material/Favorite";
|
|
2334
3143
|
import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorder";
|
|
2335
3144
|
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
|
|
2336
|
-
import { tokens as
|
|
2337
|
-
import { jsx as
|
|
3145
|
+
import { tokens as tokens33 } from "@mitumba/tokens";
|
|
3146
|
+
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2338
3147
|
function ListingCard({
|
|
2339
3148
|
images,
|
|
2340
3149
|
title,
|
|
@@ -2350,7 +3159,7 @@ function ListingCard({
|
|
|
2350
3159
|
onLikeClick,
|
|
2351
3160
|
sx
|
|
2352
3161
|
}) {
|
|
2353
|
-
const [activeImage, setActiveImage] =
|
|
3162
|
+
const [activeImage, setActiveImage] = useState7(0);
|
|
2354
3163
|
const handleBuy = (e) => {
|
|
2355
3164
|
e.stopPropagation();
|
|
2356
3165
|
onBuyClick?.(e);
|
|
@@ -2359,15 +3168,15 @@ function ListingCard({
|
|
|
2359
3168
|
e.stopPropagation();
|
|
2360
3169
|
onLikeClick?.(e);
|
|
2361
3170
|
};
|
|
2362
|
-
return /* @__PURE__ */
|
|
2363
|
-
|
|
3171
|
+
return /* @__PURE__ */ jsxs21(
|
|
3172
|
+
Box26,
|
|
2364
3173
|
{
|
|
2365
3174
|
onClick,
|
|
2366
3175
|
sx: [
|
|
2367
3176
|
{
|
|
2368
3177
|
width: "100%",
|
|
2369
|
-
backgroundColor:
|
|
2370
|
-
borderRadius: `${
|
|
3178
|
+
backgroundColor: tokens33.colors.surface,
|
|
3179
|
+
borderRadius: `${tokens33.radius.lg}px`,
|
|
2371
3180
|
// Standardized to 16px (Serious)
|
|
2372
3181
|
overflow: "hidden",
|
|
2373
3182
|
// High-end layered shadow, no clunky borders
|
|
@@ -2380,15 +3189,15 @@ function ListingCard({
|
|
|
2380
3189
|
position: "relative",
|
|
2381
3190
|
"&:hover": {
|
|
2382
3191
|
transform: "translateY(-6px)",
|
|
2383
|
-
boxShadow:
|
|
3192
|
+
boxShadow: tokens33.shadows.deep
|
|
2384
3193
|
}
|
|
2385
3194
|
},
|
|
2386
3195
|
...Array.isArray(sx) ? sx : [sx]
|
|
2387
3196
|
],
|
|
2388
3197
|
children: [
|
|
2389
|
-
/* @__PURE__ */
|
|
2390
|
-
/* @__PURE__ */
|
|
2391
|
-
|
|
3198
|
+
/* @__PURE__ */ jsxs21(Box26, { sx: { position: "relative", width: "100%", pt: "100%", backgroundColor: tokens33.colors.background }, children: [
|
|
3199
|
+
/* @__PURE__ */ jsx34(
|
|
3200
|
+
Box26,
|
|
2392
3201
|
{
|
|
2393
3202
|
component: "img",
|
|
2394
3203
|
src: images[activeImage],
|
|
@@ -2404,8 +3213,8 @@ function ListingCard({
|
|
|
2404
3213
|
}
|
|
2405
3214
|
}
|
|
2406
3215
|
),
|
|
2407
|
-
badge && /* @__PURE__ */
|
|
2408
|
-
|
|
3216
|
+
badge && /* @__PURE__ */ jsx34(
|
|
3217
|
+
Box26,
|
|
2409
3218
|
{
|
|
2410
3219
|
sx: {
|
|
2411
3220
|
position: "absolute",
|
|
@@ -2415,20 +3224,20 @@ function ListingCard({
|
|
|
2415
3224
|
backdropFilter: "blur(4px)",
|
|
2416
3225
|
px: 1.5,
|
|
2417
3226
|
py: 0.5,
|
|
2418
|
-
borderRadius:
|
|
3227
|
+
borderRadius: tokens33.radius.full,
|
|
2419
3228
|
fontSize: 10,
|
|
2420
3229
|
fontWeight: 800,
|
|
2421
|
-
color:
|
|
2422
|
-
fontFamily:
|
|
3230
|
+
color: tokens33.colors.textPrimary,
|
|
3231
|
+
fontFamily: tokens33.typography.fontFamily,
|
|
2423
3232
|
textTransform: "uppercase",
|
|
2424
|
-
boxShadow:
|
|
3233
|
+
boxShadow: tokens33.shadows.card,
|
|
2425
3234
|
zIndex: 2
|
|
2426
3235
|
},
|
|
2427
3236
|
children: badge
|
|
2428
3237
|
}
|
|
2429
3238
|
),
|
|
2430
|
-
brandLogoUrl && /* @__PURE__ */
|
|
2431
|
-
|
|
3239
|
+
brandLogoUrl && /* @__PURE__ */ jsx34(
|
|
3240
|
+
Box26,
|
|
2432
3241
|
{
|
|
2433
3242
|
sx: {
|
|
2434
3243
|
position: "absolute",
|
|
@@ -2436,21 +3245,21 @@ function ListingCard({
|
|
|
2436
3245
|
right: 12,
|
|
2437
3246
|
width: 32,
|
|
2438
3247
|
height: 32,
|
|
2439
|
-
backgroundColor:
|
|
3248
|
+
backgroundColor: tokens33.colors.white,
|
|
2440
3249
|
borderRadius: "50%",
|
|
2441
3250
|
display: "flex",
|
|
2442
3251
|
alignItems: "center",
|
|
2443
3252
|
justifyContent: "center",
|
|
2444
|
-
boxShadow:
|
|
3253
|
+
boxShadow: tokens33.shadows.card,
|
|
2445
3254
|
p: 0.5,
|
|
2446
3255
|
zIndex: 2,
|
|
2447
3256
|
"& img": { width: "100%", height: "100%", objectFit: "contain" }
|
|
2448
3257
|
},
|
|
2449
|
-
children: /* @__PURE__ */
|
|
3258
|
+
children: /* @__PURE__ */ jsx34("img", { src: brandLogoUrl, alt: "brand" })
|
|
2450
3259
|
}
|
|
2451
3260
|
),
|
|
2452
|
-
/* @__PURE__ */
|
|
2453
|
-
|
|
3261
|
+
/* @__PURE__ */ jsx34(
|
|
3262
|
+
IconButton6,
|
|
2454
3263
|
{
|
|
2455
3264
|
onClick: handleLike,
|
|
2456
3265
|
sx: {
|
|
@@ -2459,16 +3268,16 @@ function ListingCard({
|
|
|
2459
3268
|
right: 12,
|
|
2460
3269
|
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
2461
3270
|
backdropFilter: "blur(4px)",
|
|
2462
|
-
boxShadow:
|
|
2463
|
-
color: isLiked ?
|
|
3271
|
+
boxShadow: tokens33.shadows.card,
|
|
3272
|
+
color: isLiked ? tokens33.colors.error : tokens33.colors.textSecondary,
|
|
2464
3273
|
zIndex: 2,
|
|
2465
|
-
"&:hover": { backgroundColor:
|
|
3274
|
+
"&:hover": { backgroundColor: tokens33.colors.white, transform: "scale(1.1)" }
|
|
2466
3275
|
},
|
|
2467
|
-
children: isLiked ? /* @__PURE__ */
|
|
3276
|
+
children: isLiked ? /* @__PURE__ */ jsx34(FavoriteIcon, { sx: { fontSize: 18 } }) : /* @__PURE__ */ jsx34(FavoriteBorderIcon, { sx: { fontSize: 18 } })
|
|
2468
3277
|
}
|
|
2469
3278
|
),
|
|
2470
|
-
images.length > 1 && /* @__PURE__ */
|
|
2471
|
-
|
|
3279
|
+
images.length > 1 && /* @__PURE__ */ jsx34(
|
|
3280
|
+
Stack4,
|
|
2472
3281
|
{
|
|
2473
3282
|
direction: "row",
|
|
2474
3283
|
spacing: 0.8,
|
|
@@ -2479,8 +3288,8 @@ function ListingCard({
|
|
|
2479
3288
|
transform: "translateX(-50%)",
|
|
2480
3289
|
zIndex: 2
|
|
2481
3290
|
},
|
|
2482
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
2483
|
-
|
|
3291
|
+
children: images.map((img, i) => /* @__PURE__ */ jsx34(
|
|
3292
|
+
Box26,
|
|
2484
3293
|
{
|
|
2485
3294
|
onClick: (e) => {
|
|
2486
3295
|
e.stopPropagation();
|
|
@@ -2489,8 +3298,8 @@ function ListingCard({
|
|
|
2489
3298
|
sx: {
|
|
2490
3299
|
width: activeImage === i ? 12 : 6,
|
|
2491
3300
|
height: 6,
|
|
2492
|
-
borderRadius:
|
|
2493
|
-
backgroundColor:
|
|
3301
|
+
borderRadius: tokens33.radius.full,
|
|
3302
|
+
backgroundColor: tokens33.colors.white,
|
|
2494
3303
|
opacity: activeImage === i ? 1 : 0.5,
|
|
2495
3304
|
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
2496
3305
|
cursor: "pointer",
|
|
@@ -2502,16 +3311,16 @@ function ListingCard({
|
|
|
2502
3311
|
}
|
|
2503
3312
|
)
|
|
2504
3313
|
] }),
|
|
2505
|
-
/* @__PURE__ */
|
|
3314
|
+
/* @__PURE__ */ jsxs21(Box26, { sx: { p: 2.5 }, children: [
|
|
2506
3315
|
" ",
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
|
|
3316
|
+
/* @__PURE__ */ jsx34(
|
|
3317
|
+
Typography18,
|
|
2509
3318
|
{
|
|
2510
3319
|
sx: {
|
|
2511
|
-
fontSize:
|
|
3320
|
+
fontSize: tokens33.typography.fontSizes.base,
|
|
2512
3321
|
fontWeight: 800,
|
|
2513
|
-
color:
|
|
2514
|
-
fontFamily:
|
|
3322
|
+
color: tokens33.colors.textPrimary,
|
|
3323
|
+
fontFamily: tokens33.typography.fontFamily,
|
|
2515
3324
|
lineHeight: 1.2,
|
|
2516
3325
|
mb: 0.5,
|
|
2517
3326
|
whiteSpace: "nowrap",
|
|
@@ -2521,13 +3330,13 @@ function ListingCard({
|
|
|
2521
3330
|
children: title
|
|
2522
3331
|
}
|
|
2523
3332
|
),
|
|
2524
|
-
(brand || size) && /* @__PURE__ */
|
|
2525
|
-
|
|
3333
|
+
(brand || size) && /* @__PURE__ */ jsxs21(
|
|
3334
|
+
Typography18,
|
|
2526
3335
|
{
|
|
2527
3336
|
sx: {
|
|
2528
|
-
fontSize:
|
|
2529
|
-
color:
|
|
2530
|
-
fontFamily:
|
|
3337
|
+
fontSize: tokens33.typography.fontSizes.xs,
|
|
3338
|
+
color: tokens33.colors.textSecondary,
|
|
3339
|
+
fontFamily: tokens33.typography.fontFamily,
|
|
2531
3340
|
fontWeight: 600,
|
|
2532
3341
|
mb: 2
|
|
2533
3342
|
},
|
|
@@ -2538,34 +3347,34 @@ function ListingCard({
|
|
|
2538
3347
|
]
|
|
2539
3348
|
}
|
|
2540
3349
|
),
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
/* @__PURE__ */
|
|
2543
|
-
|
|
3350
|
+
/* @__PURE__ */ jsxs21(Stack4, { direction: "row", alignItems: "center", justifyContent: "space-between", spacing: 2, children: [
|
|
3351
|
+
/* @__PURE__ */ jsxs21(
|
|
3352
|
+
Box26,
|
|
2544
3353
|
{
|
|
2545
3354
|
sx: {
|
|
2546
|
-
backgroundColor:
|
|
3355
|
+
backgroundColor: tokens33.colors.background,
|
|
2547
3356
|
px: 1.5,
|
|
2548
3357
|
py: 0.8,
|
|
2549
|
-
borderRadius:
|
|
2550
|
-
fontSize:
|
|
3358
|
+
borderRadius: tokens33.radius.full,
|
|
3359
|
+
fontSize: tokens33.typography.fontSizes.base,
|
|
2551
3360
|
fontWeight: 800,
|
|
2552
|
-
color:
|
|
2553
|
-
fontFamily:
|
|
3361
|
+
color: tokens33.colors.textPrimary,
|
|
3362
|
+
fontFamily: tokens33.typography.fontFamily,
|
|
2554
3363
|
display: "flex",
|
|
2555
3364
|
alignItems: "baseline",
|
|
2556
3365
|
gap: 0.5
|
|
2557
3366
|
},
|
|
2558
3367
|
children: [
|
|
2559
|
-
/* @__PURE__ */
|
|
3368
|
+
/* @__PURE__ */ jsx34(Typography18, { component: "span", sx: { fontSize: 10, fontWeight: 900 }, children: "KES" }),
|
|
2560
3369
|
price.toLocaleString(),
|
|
2561
|
-
originalPrice && /* @__PURE__ */
|
|
2562
|
-
|
|
3370
|
+
originalPrice && /* @__PURE__ */ jsx34(
|
|
3371
|
+
Typography18,
|
|
2563
3372
|
{
|
|
2564
3373
|
component: "span",
|
|
2565
3374
|
sx: {
|
|
2566
3375
|
ml: 0.5,
|
|
2567
3376
|
fontSize: 10,
|
|
2568
|
-
color:
|
|
3377
|
+
color: tokens33.colors.textDisabled,
|
|
2569
3378
|
textDecoration: "line-through",
|
|
2570
3379
|
fontWeight: 600
|
|
2571
3380
|
},
|
|
@@ -2575,17 +3384,17 @@ function ListingCard({
|
|
|
2575
3384
|
]
|
|
2576
3385
|
}
|
|
2577
3386
|
),
|
|
2578
|
-
/* @__PURE__ */
|
|
3387
|
+
/* @__PURE__ */ jsx34(
|
|
2579
3388
|
MitumbaPrimaryButton,
|
|
2580
3389
|
{
|
|
2581
3390
|
label: "Buy Now",
|
|
2582
3391
|
variant: "primary",
|
|
2583
3392
|
size: "small",
|
|
2584
3393
|
onClick: handleBuy,
|
|
2585
|
-
icon: /* @__PURE__ */
|
|
3394
|
+
icon: /* @__PURE__ */ jsx34(ArrowOutwardIcon, { sx: { fontSize: 16 } }),
|
|
2586
3395
|
iconPosition: "right",
|
|
2587
3396
|
sx: {
|
|
2588
|
-
borderRadius:
|
|
3397
|
+
borderRadius: tokens33.radius.full,
|
|
2589
3398
|
px: 2.5,
|
|
2590
3399
|
height: 32,
|
|
2591
3400
|
// Forced small height for density
|
|
@@ -2602,73 +3411,17 @@ function ListingCard({
|
|
|
2602
3411
|
}
|
|
2603
3412
|
|
|
2604
3413
|
// src/components/listing/ListingCardSkeleton/ListingCardSkeleton.tsx
|
|
2605
|
-
import
|
|
2606
|
-
import { tokens as
|
|
2607
|
-
|
|
2608
|
-
// src/components/feedback/MitumbaSkeleton/MitumbaSkeleton.tsx
|
|
2609
|
-
import Box22 from "@mui/material/Box";
|
|
2610
|
-
import { tokens as tokens27 } from "@mitumba/tokens";
|
|
2611
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2612
|
-
var variantStyles = {
|
|
2613
|
-
rectangular: { borderRadius: `${tokens27.radius.xxs}px` },
|
|
2614
|
-
rounded: { borderRadius: `${tokens27.radius.md}px` },
|
|
2615
|
-
circular: { borderRadius: "50%" }
|
|
2616
|
-
};
|
|
2617
|
-
function MitumbaSkeleton({
|
|
2618
|
-
width,
|
|
2619
|
-
height,
|
|
2620
|
-
borderRadius,
|
|
2621
|
-
variant = "rounded"
|
|
2622
|
-
}) {
|
|
2623
|
-
return /* @__PURE__ */ jsx28(
|
|
2624
|
-
Box22,
|
|
2625
|
-
{
|
|
2626
|
-
sx: {
|
|
2627
|
-
width,
|
|
2628
|
-
height,
|
|
2629
|
-
position: "relative",
|
|
2630
|
-
overflow: "hidden",
|
|
2631
|
-
borderRadius: borderRadius ? `${borderRadius}px` : variantStyles[variant].borderRadius,
|
|
2632
|
-
backgroundColor: tokens27.colors.background,
|
|
2633
|
-
// Base block
|
|
2634
|
-
"&::before": {
|
|
2635
|
-
content: '""',
|
|
2636
|
-
position: "absolute",
|
|
2637
|
-
inset: 0,
|
|
2638
|
-
backgroundColor: tokens27.colors.divider,
|
|
2639
|
-
opacity: 0.5
|
|
2640
|
-
},
|
|
2641
|
-
// Shimmer wave
|
|
2642
|
-
"&::after": {
|
|
2643
|
-
content: '""',
|
|
2644
|
-
position: "absolute",
|
|
2645
|
-
top: 0,
|
|
2646
|
-
left: 0,
|
|
2647
|
-
right: 0,
|
|
2648
|
-
bottom: 0,
|
|
2649
|
-
background: `linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)`,
|
|
2650
|
-
transform: "translateX(-100%)",
|
|
2651
|
-
animation: "shimmer 2s infinite cubic-bezier(0.4, 0, 0.2, 1)"
|
|
2652
|
-
},
|
|
2653
|
-
"@keyframes shimmer": {
|
|
2654
|
-
"100%": { transform: "translateX(100%)" }
|
|
2655
|
-
}
|
|
2656
|
-
},
|
|
2657
|
-
"aria-label": "Loading content..."
|
|
2658
|
-
}
|
|
2659
|
-
);
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
// src/components/listing/ListingCardSkeleton/ListingCardSkeleton.tsx
|
|
2663
|
-
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3414
|
+
import Box27 from "@mui/material/Box";
|
|
3415
|
+
import { tokens as tokens34 } from "@mitumba/tokens";
|
|
3416
|
+
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2664
3417
|
function ListingCardSkeleton() {
|
|
2665
|
-
return /* @__PURE__ */
|
|
2666
|
-
|
|
3418
|
+
return /* @__PURE__ */ jsxs22(
|
|
3419
|
+
Box27,
|
|
2667
3420
|
{
|
|
2668
3421
|
sx: {
|
|
2669
3422
|
width: "100%",
|
|
2670
|
-
backgroundColor:
|
|
2671
|
-
borderRadius: `${
|
|
3423
|
+
backgroundColor: tokens34.colors.surface,
|
|
3424
|
+
borderRadius: `${tokens34.radius.lg}px`,
|
|
2672
3425
|
// 16px (Serious Standard)
|
|
2673
3426
|
overflow: "hidden",
|
|
2674
3427
|
boxShadow: `
|
|
@@ -2677,15 +3430,15 @@ function ListingCardSkeleton() {
|
|
|
2677
3430
|
`
|
|
2678
3431
|
},
|
|
2679
3432
|
children: [
|
|
2680
|
-
/* @__PURE__ */
|
|
3433
|
+
/* @__PURE__ */ jsx35(Box27, { sx: { position: "relative", width: "100%", pt: "100%" }, children: /* @__PURE__ */ jsx35(
|
|
2681
3434
|
MitumbaSkeleton,
|
|
2682
3435
|
{
|
|
2683
3436
|
variant: "rectangular",
|
|
2684
3437
|
sx: { position: "absolute", inset: 0, height: "100%", width: "100%" }
|
|
2685
3438
|
}
|
|
2686
3439
|
) }),
|
|
2687
|
-
/* @__PURE__ */
|
|
2688
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsxs22(Box27, { sx: { p: 2.5 }, children: [
|
|
3441
|
+
/* @__PURE__ */ jsx35(
|
|
2689
3442
|
MitumbaSkeleton,
|
|
2690
3443
|
{
|
|
2691
3444
|
variant: "rectangular",
|
|
@@ -2694,7 +3447,7 @@ function ListingCardSkeleton() {
|
|
|
2694
3447
|
sx: { mb: 1, borderRadius: 1 }
|
|
2695
3448
|
}
|
|
2696
3449
|
),
|
|
2697
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ jsx35(
|
|
2698
3451
|
MitumbaSkeleton,
|
|
2699
3452
|
{
|
|
2700
3453
|
variant: "rectangular",
|
|
@@ -2703,8 +3456,8 @@ function ListingCardSkeleton() {
|
|
|
2703
3456
|
sx: { mb: 3, borderRadius: 1 }
|
|
2704
3457
|
}
|
|
2705
3458
|
),
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
3459
|
+
/* @__PURE__ */ jsxs22(Box27, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
3460
|
+
/* @__PURE__ */ jsx35(
|
|
2708
3461
|
MitumbaSkeleton,
|
|
2709
3462
|
{
|
|
2710
3463
|
variant: "rounded",
|
|
@@ -2713,7 +3466,7 @@ function ListingCardSkeleton() {
|
|
|
2713
3466
|
sx: { borderRadius: 100 }
|
|
2714
3467
|
}
|
|
2715
3468
|
),
|
|
2716
|
-
/* @__PURE__ */
|
|
3469
|
+
/* @__PURE__ */ jsx35(
|
|
2717
3470
|
MitumbaSkeleton,
|
|
2718
3471
|
{
|
|
2719
3472
|
variant: "rounded",
|
|
@@ -2730,8 +3483,8 @@ function ListingCardSkeleton() {
|
|
|
2730
3483
|
}
|
|
2731
3484
|
|
|
2732
3485
|
// src/components/listing/ListingGrid/ListingGrid.tsx
|
|
2733
|
-
import
|
|
2734
|
-
import { jsx as
|
|
3486
|
+
import Box28 from "@mui/material/Box";
|
|
3487
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2735
3488
|
function ListingGrid({
|
|
2736
3489
|
children,
|
|
2737
3490
|
columns = { xs: 2, sm: 2, md: 3, lg: 4 },
|
|
@@ -2740,7 +3493,7 @@ function ListingGrid({
|
|
|
2740
3493
|
sx
|
|
2741
3494
|
}) {
|
|
2742
3495
|
if (isLoading) {
|
|
2743
|
-
return /* @__PURE__ */
|
|
3496
|
+
return /* @__PURE__ */ jsx36(MitumbaGrid, { columns, gap, sx, children: [...Array(8)].map((_, i) => /* @__PURE__ */ jsx36(Box28, { sx: { width: "100%", pt: "100%", position: "relative" }, children: /* @__PURE__ */ jsx36(
|
|
2744
3497
|
MitumbaSkeleton,
|
|
2745
3498
|
{
|
|
2746
3499
|
variant: "rounded",
|
|
@@ -2748,7 +3501,7 @@ function ListingGrid({
|
|
|
2748
3501
|
}
|
|
2749
3502
|
) }, `listing-skeleton-${i + 1}`)) });
|
|
2750
3503
|
}
|
|
2751
|
-
return /* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ jsx36(Box28, { sx: { width: "100%" }, children: /* @__PURE__ */ jsx36(
|
|
2752
3505
|
MitumbaGrid,
|
|
2753
3506
|
{
|
|
2754
3507
|
columns,
|
|
@@ -2760,12 +3513,12 @@ function ListingGrid({
|
|
|
2760
3513
|
}
|
|
2761
3514
|
|
|
2762
3515
|
// src/components/listing/ListingImageGallery/ListingImageGallery.tsx
|
|
2763
|
-
import { useState as
|
|
2764
|
-
import
|
|
2765
|
-
import { tokens as
|
|
2766
|
-
import { jsx as
|
|
3516
|
+
import { useState as useState8, useCallback as useCallback2, useEffect as useEffect4 } from "react";
|
|
3517
|
+
import Box29 from "@mui/material/Box";
|
|
3518
|
+
import { tokens as tokens35 } from "@mitumba/tokens";
|
|
3519
|
+
import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2767
3520
|
function ListingImageGallery({ images, title }) {
|
|
2768
|
-
const [activeIndex, setActiveIndex] =
|
|
3521
|
+
const [activeIndex, setActiveIndex] = useState8(0);
|
|
2769
3522
|
const goTo = useCallback2(
|
|
2770
3523
|
(index) => {
|
|
2771
3524
|
const clamped = Math.max(0, Math.min(images.length - 1, index));
|
|
@@ -2783,59 +3536,59 @@ function ListingImageGallery({ images, title }) {
|
|
|
2783
3536
|
},
|
|
2784
3537
|
[activeIndex, goTo]
|
|
2785
3538
|
);
|
|
2786
|
-
|
|
3539
|
+
useEffect4(() => {
|
|
2787
3540
|
window.addEventListener("keydown", handleKeyDown);
|
|
2788
3541
|
return () => {
|
|
2789
3542
|
window.removeEventListener("keydown", handleKeyDown);
|
|
2790
3543
|
};
|
|
2791
3544
|
}, [handleKeyDown]);
|
|
2792
3545
|
if (images.length === 0) {
|
|
2793
|
-
return /* @__PURE__ */
|
|
2794
|
-
|
|
3546
|
+
return /* @__PURE__ */ jsx37(
|
|
3547
|
+
Box29,
|
|
2795
3548
|
{
|
|
2796
3549
|
sx: {
|
|
2797
3550
|
alignItems: "center",
|
|
2798
3551
|
aspectRatio: "1 / 1",
|
|
2799
|
-
backgroundColor:
|
|
2800
|
-
borderRadius: `${
|
|
2801
|
-
color:
|
|
3552
|
+
backgroundColor: tokens35.colors.background,
|
|
3553
|
+
borderRadius: `${tokens35.radius.lg}px`,
|
|
3554
|
+
color: tokens35.colors.textSecondary,
|
|
2802
3555
|
display: "flex",
|
|
2803
|
-
fontSize:
|
|
3556
|
+
fontSize: tokens35.typography.fontSizes.base,
|
|
2804
3557
|
justifyContent: "center",
|
|
2805
3558
|
width: "100%",
|
|
2806
|
-
border: `1px dashed ${
|
|
3559
|
+
border: `1px dashed ${tokens35.colors.divider}`
|
|
2807
3560
|
},
|
|
2808
3561
|
children: "No images available"
|
|
2809
3562
|
}
|
|
2810
3563
|
);
|
|
2811
3564
|
}
|
|
2812
|
-
return /* @__PURE__ */
|
|
2813
|
-
|
|
3565
|
+
return /* @__PURE__ */ jsxs23(
|
|
3566
|
+
Box29,
|
|
2814
3567
|
{
|
|
2815
3568
|
sx: {
|
|
2816
3569
|
display: "flex",
|
|
2817
3570
|
flexDirection: "column",
|
|
2818
|
-
gap:
|
|
3571
|
+
gap: tokens35.spacing.base,
|
|
2819
3572
|
width: "100%"
|
|
2820
3573
|
},
|
|
2821
3574
|
children: [
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
|
|
3575
|
+
/* @__PURE__ */ jsx37(
|
|
3576
|
+
Box29,
|
|
2824
3577
|
{
|
|
2825
3578
|
sx: {
|
|
2826
3579
|
aspectRatio: "1 / 1",
|
|
2827
|
-
borderRadius: `${
|
|
3580
|
+
borderRadius: `${tokens35.radius.lg}px`,
|
|
2828
3581
|
overflow: "hidden",
|
|
2829
3582
|
position: "relative",
|
|
2830
3583
|
width: "100%",
|
|
2831
|
-
backgroundColor:
|
|
3584
|
+
backgroundColor: tokens35.colors.background,
|
|
2832
3585
|
boxShadow: `
|
|
2833
3586
|
0 2px 4px 0 rgba(0, 0, 0, 0.05),
|
|
2834
3587
|
0 8px 16px -4px rgba(0, 0, 0, 0.1)
|
|
2835
3588
|
`
|
|
2836
3589
|
},
|
|
2837
|
-
children: /* @__PURE__ */
|
|
2838
|
-
|
|
3590
|
+
children: /* @__PURE__ */ jsx37(
|
|
3591
|
+
Box29,
|
|
2839
3592
|
{
|
|
2840
3593
|
component: "img",
|
|
2841
3594
|
src: images[activeIndex],
|
|
@@ -2851,8 +3604,8 @@ function ListingImageGallery({ images, title }) {
|
|
|
2851
3604
|
)
|
|
2852
3605
|
}
|
|
2853
3606
|
),
|
|
2854
|
-
images.length > 1 && /* @__PURE__ */
|
|
2855
|
-
|
|
3607
|
+
images.length > 1 && /* @__PURE__ */ jsx37(
|
|
3608
|
+
Box29,
|
|
2856
3609
|
{
|
|
2857
3610
|
sx: {
|
|
2858
3611
|
display: "flex",
|
|
@@ -2863,8 +3616,8 @@ function ListingImageGallery({ images, title }) {
|
|
|
2863
3616
|
msOverflowStyle: "none",
|
|
2864
3617
|
scrollbarWidth: "none"
|
|
2865
3618
|
},
|
|
2866
|
-
children: images.map((img, index) => /* @__PURE__ */
|
|
2867
|
-
|
|
3619
|
+
children: images.map((img, index) => /* @__PURE__ */ jsx37(
|
|
3620
|
+
Box29,
|
|
2868
3621
|
{
|
|
2869
3622
|
onClick: () => goTo(index),
|
|
2870
3623
|
onKeyDown: (e) => {
|
|
@@ -2876,8 +3629,8 @@ function ListingImageGallery({ images, title }) {
|
|
|
2876
3629
|
role: "button",
|
|
2877
3630
|
tabIndex: 0,
|
|
2878
3631
|
sx: {
|
|
2879
|
-
border: index === activeIndex ? `2px solid ${
|
|
2880
|
-
borderRadius: `${
|
|
3632
|
+
border: index === activeIndex ? `2px solid ${tokens35.colors.green}` : `2px solid transparent`,
|
|
3633
|
+
borderRadius: `${tokens35.radius.md}px`,
|
|
2881
3634
|
cursor: "pointer",
|
|
2882
3635
|
flexShrink: 0,
|
|
2883
3636
|
height: 56,
|
|
@@ -2892,13 +3645,13 @@ function ListingImageGallery({ images, title }) {
|
|
|
2892
3645
|
},
|
|
2893
3646
|
"&:focus-visible": {
|
|
2894
3647
|
outline: "none",
|
|
2895
|
-
boxShadow:
|
|
3648
|
+
boxShadow: tokens35.shadows.focus
|
|
2896
3649
|
}
|
|
2897
3650
|
},
|
|
2898
3651
|
"aria-label": `View image ${index + 1} of ${images.length}`,
|
|
2899
3652
|
"aria-pressed": index === activeIndex,
|
|
2900
|
-
children: /* @__PURE__ */
|
|
2901
|
-
|
|
3653
|
+
children: /* @__PURE__ */ jsx37(
|
|
3654
|
+
Box29,
|
|
2902
3655
|
{
|
|
2903
3656
|
component: "img",
|
|
2904
3657
|
src: img,
|
|
@@ -2922,7 +3675,7 @@ function ListingImageGallery({ images, title }) {
|
|
|
2922
3675
|
}
|
|
2923
3676
|
|
|
2924
3677
|
// src/components/listing/ConditionBadge/ConditionBadge.tsx
|
|
2925
|
-
import { jsx as
|
|
3678
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2926
3679
|
function ConditionBadge({ grade, showLabel = false }) {
|
|
2927
3680
|
const gradeConfig = {
|
|
2928
3681
|
A: { status: "success", label: "Like new" },
|
|
@@ -2930,7 +3683,7 @@ function ConditionBadge({ grade, showLabel = false }) {
|
|
|
2930
3683
|
C: { status: "incomplete", label: "Fair" }
|
|
2931
3684
|
};
|
|
2932
3685
|
const config = gradeConfig[grade];
|
|
2933
|
-
return /* @__PURE__ */
|
|
3686
|
+
return /* @__PURE__ */ jsx38(
|
|
2934
3687
|
MitumbaChip,
|
|
2935
3688
|
{
|
|
2936
3689
|
label: showLabel ? `${grade} \u2022 ${config.label}` : grade,
|
|
@@ -2943,33 +3696,33 @@ function ConditionBadge({ grade, showLabel = false }) {
|
|
|
2943
3696
|
}
|
|
2944
3697
|
|
|
2945
3698
|
// src/components/commerce/PriceTag/PriceTag.tsx
|
|
2946
|
-
import
|
|
2947
|
-
import { tokens as
|
|
2948
|
-
import { jsx as
|
|
3699
|
+
import Typography19 from "@mui/material/Typography";
|
|
3700
|
+
import { tokens as tokens36 } from "@mitumba/tokens";
|
|
3701
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2949
3702
|
function PriceTag({ priceKes, size = "medium", color = "default", strikethrough = false }) {
|
|
2950
3703
|
const formattedNumber = new Intl.NumberFormat("en-KE").format(priceKes);
|
|
2951
3704
|
const formatted = `KES ${formattedNumber}`;
|
|
2952
3705
|
const sizeStyles = {
|
|
2953
3706
|
small: {
|
|
2954
|
-
fontSize:
|
|
2955
|
-
fontWeight:
|
|
3707
|
+
fontSize: tokens36.typography.fontSizes.sm,
|
|
3708
|
+
fontWeight: tokens36.typography.fontWeights.semibold
|
|
2956
3709
|
},
|
|
2957
3710
|
medium: {
|
|
2958
|
-
fontSize:
|
|
2959
|
-
fontWeight:
|
|
3711
|
+
fontSize: tokens36.typography.fontSizes.base,
|
|
3712
|
+
fontWeight: tokens36.typography.fontWeights.bold
|
|
2960
3713
|
},
|
|
2961
3714
|
large: {
|
|
2962
|
-
fontSize:
|
|
2963
|
-
fontWeight:
|
|
3715
|
+
fontSize: tokens36.typography.fontSizes.xl,
|
|
3716
|
+
fontWeight: tokens36.typography.fontWeights.extrabold
|
|
2964
3717
|
}
|
|
2965
3718
|
};
|
|
2966
3719
|
const colorMap = {
|
|
2967
|
-
green:
|
|
2968
|
-
earth:
|
|
2969
|
-
default:
|
|
3720
|
+
green: tokens36.colors.green,
|
|
3721
|
+
earth: tokens36.colors.earth,
|
|
3722
|
+
default: tokens36.colors.textPrimary
|
|
2970
3723
|
};
|
|
2971
|
-
return /* @__PURE__ */
|
|
2972
|
-
|
|
3724
|
+
return /* @__PURE__ */ jsx39(
|
|
3725
|
+
Typography19,
|
|
2973
3726
|
{
|
|
2974
3727
|
component: "span",
|
|
2975
3728
|
sx: {
|
|
@@ -2987,32 +3740,32 @@ function PriceTag({ priceKes, size = "medium", color = "default", strikethrough
|
|
|
2987
3740
|
|
|
2988
3741
|
// src/components/commerce/DeliveryBadge/DeliveryBadge.tsx
|
|
2989
3742
|
import LocalShippingIcon from "@mui/icons-material/LocalShipping";
|
|
2990
|
-
import { jsx as
|
|
3743
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2991
3744
|
function DeliveryBadge({ type, estimatedDays }) {
|
|
2992
3745
|
const statusMap = {
|
|
2993
3746
|
"same-city": "active",
|
|
2994
3747
|
"intercity": "common"
|
|
2995
3748
|
};
|
|
2996
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsx40(
|
|
2997
3750
|
MitumbaChip,
|
|
2998
3751
|
{
|
|
2999
3752
|
label: estimatedDays || type,
|
|
3000
3753
|
status: statusMap[type],
|
|
3001
3754
|
variant: "soft",
|
|
3002
3755
|
size: "small",
|
|
3003
|
-
icon: /* @__PURE__ */
|
|
3756
|
+
icon: /* @__PURE__ */ jsx40(LocalShippingIcon, {})
|
|
3004
3757
|
}
|
|
3005
3758
|
);
|
|
3006
3759
|
}
|
|
3007
3760
|
|
|
3008
3761
|
// src/components/commerce/CartItem/CartItem.tsx
|
|
3009
|
-
import
|
|
3010
|
-
import
|
|
3011
|
-
import
|
|
3012
|
-
import
|
|
3013
|
-
import
|
|
3014
|
-
import { tokens as
|
|
3015
|
-
import { jsx as
|
|
3762
|
+
import Box30 from "@mui/material/Box";
|
|
3763
|
+
import Typography20 from "@mui/material/Typography";
|
|
3764
|
+
import IconButton7 from "@mui/material/IconButton";
|
|
3765
|
+
import CloseIcon4 from "@mui/icons-material/Close";
|
|
3766
|
+
import Stack5 from "@mui/material/Stack";
|
|
3767
|
+
import { tokens as tokens37 } from "@mitumba/tokens";
|
|
3768
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3016
3769
|
function CartItem({
|
|
3017
3770
|
imageUrl,
|
|
3018
3771
|
title,
|
|
@@ -3026,15 +3779,15 @@ function CartItem({
|
|
|
3026
3779
|
onSizeChange,
|
|
3027
3780
|
sx
|
|
3028
3781
|
}) {
|
|
3029
|
-
return /* @__PURE__ */
|
|
3030
|
-
|
|
3782
|
+
return /* @__PURE__ */ jsxs24(
|
|
3783
|
+
Box30,
|
|
3031
3784
|
{
|
|
3032
3785
|
sx: [
|
|
3033
3786
|
{
|
|
3034
3787
|
display: "flex",
|
|
3035
3788
|
width: "100%",
|
|
3036
|
-
backgroundColor:
|
|
3037
|
-
borderRadius: `${
|
|
3789
|
+
backgroundColor: tokens37.colors.surface,
|
|
3790
|
+
borderRadius: `${tokens37.radius.lg}px`,
|
|
3038
3791
|
// 16px (Serious Standard)
|
|
3039
3792
|
p: { xs: 2, md: 3 },
|
|
3040
3793
|
boxShadow: `
|
|
@@ -3043,28 +3796,28 @@ function CartItem({
|
|
|
3043
3796
|
`,
|
|
3044
3797
|
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
3045
3798
|
position: "relative",
|
|
3046
|
-
border: `1px solid ${
|
|
3799
|
+
border: `1px solid ${tokens37.colors.divider}`,
|
|
3047
3800
|
"&:hover": {
|
|
3048
3801
|
transform: "translateY(-4px)",
|
|
3049
|
-
boxShadow:
|
|
3802
|
+
boxShadow: tokens37.shadows.deep
|
|
3050
3803
|
}
|
|
3051
3804
|
},
|
|
3052
3805
|
...Array.isArray(sx) ? sx : [sx]
|
|
3053
3806
|
],
|
|
3054
3807
|
children: [
|
|
3055
|
-
/* @__PURE__ */
|
|
3056
|
-
|
|
3808
|
+
/* @__PURE__ */ jsx41(
|
|
3809
|
+
Box30,
|
|
3057
3810
|
{
|
|
3058
3811
|
sx: {
|
|
3059
3812
|
width: { xs: 80, sm: 120, md: 140 },
|
|
3060
3813
|
height: { xs: 80, sm: 120, md: 140 },
|
|
3061
|
-
borderRadius: `${
|
|
3814
|
+
borderRadius: `${tokens37.radius.md}px`,
|
|
3062
3815
|
overflow: "hidden",
|
|
3063
|
-
backgroundColor:
|
|
3816
|
+
backgroundColor: tokens37.colors.background,
|
|
3064
3817
|
flexShrink: 0
|
|
3065
3818
|
},
|
|
3066
|
-
children: /* @__PURE__ */
|
|
3067
|
-
|
|
3819
|
+
children: /* @__PURE__ */ jsx41(
|
|
3820
|
+
Box30,
|
|
3068
3821
|
{
|
|
3069
3822
|
component: "img",
|
|
3070
3823
|
src: imageUrl,
|
|
@@ -3074,8 +3827,8 @@ function CartItem({
|
|
|
3074
3827
|
)
|
|
3075
3828
|
}
|
|
3076
3829
|
),
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
|
|
3830
|
+
/* @__PURE__ */ jsxs24(
|
|
3831
|
+
Box30,
|
|
3079
3832
|
{
|
|
3080
3833
|
sx: {
|
|
3081
3834
|
flexGrow: 1,
|
|
@@ -3087,15 +3840,15 @@ function CartItem({
|
|
|
3087
3840
|
gap: { xs: 2, lg: 4 }
|
|
3088
3841
|
},
|
|
3089
3842
|
children: [
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
|
|
3843
|
+
/* @__PURE__ */ jsxs24(Box30, { sx: { flex: 1.5 }, children: [
|
|
3844
|
+
/* @__PURE__ */ jsx41(
|
|
3845
|
+
Typography20,
|
|
3093
3846
|
{
|
|
3094
3847
|
sx: {
|
|
3095
|
-
fontSize:
|
|
3848
|
+
fontSize: tokens37.typography.fontSizes.lg,
|
|
3096
3849
|
fontWeight: 900,
|
|
3097
|
-
color:
|
|
3098
|
-
fontFamily:
|
|
3850
|
+
color: tokens37.colors.textPrimary,
|
|
3851
|
+
fontFamily: tokens37.typography.fontFamily,
|
|
3099
3852
|
textTransform: "uppercase",
|
|
3100
3853
|
lineHeight: 1.1,
|
|
3101
3854
|
mb: 0.5
|
|
@@ -3103,13 +3856,13 @@ function CartItem({
|
|
|
3103
3856
|
children: title
|
|
3104
3857
|
}
|
|
3105
3858
|
),
|
|
3106
|
-
subtitle && /* @__PURE__ */
|
|
3107
|
-
|
|
3859
|
+
subtitle && /* @__PURE__ */ jsx41(
|
|
3860
|
+
Typography20,
|
|
3108
3861
|
{
|
|
3109
3862
|
variant: "caption",
|
|
3110
3863
|
sx: {
|
|
3111
3864
|
display: "block",
|
|
3112
|
-
color:
|
|
3865
|
+
color: tokens37.colors.textSecondary,
|
|
3113
3866
|
fontWeight: 700,
|
|
3114
3867
|
textTransform: "uppercase",
|
|
3115
3868
|
fontSize: 10
|
|
@@ -3117,13 +3870,13 @@ function CartItem({
|
|
|
3117
3870
|
children: subtitle
|
|
3118
3871
|
}
|
|
3119
3872
|
),
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
|
|
3873
|
+
/* @__PURE__ */ jsx41(
|
|
3874
|
+
Typography20,
|
|
3122
3875
|
{
|
|
3123
3876
|
variant: "caption",
|
|
3124
3877
|
sx: {
|
|
3125
3878
|
display: "block",
|
|
3126
|
-
color:
|
|
3879
|
+
color: tokens37.colors.green,
|
|
3127
3880
|
fontWeight: 800,
|
|
3128
3881
|
fontSize: 9,
|
|
3129
3882
|
mt: 1,
|
|
@@ -3134,10 +3887,10 @@ function CartItem({
|
|
|
3134
3887
|
}
|
|
3135
3888
|
)
|
|
3136
3889
|
] }),
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
3140
|
-
/* @__PURE__ */
|
|
3890
|
+
/* @__PURE__ */ jsxs24(Stack5, { direction: "row", spacing: { xs: 2, sm: 4, md: 6 }, alignItems: "center", sx: { width: { xs: "100%", lg: "auto" } }, children: [
|
|
3891
|
+
/* @__PURE__ */ jsxs24(Box30, { sx: { width: 80 }, children: [
|
|
3892
|
+
/* @__PURE__ */ jsx41(Typography20, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: tokens37.colors.textDisabled, fontSize: 10 }, children: "SIZE" }),
|
|
3893
|
+
/* @__PURE__ */ jsx41(
|
|
3141
3894
|
MitumbaSelect,
|
|
3142
3895
|
{
|
|
3143
3896
|
value: size,
|
|
@@ -3149,9 +3902,9 @@ function CartItem({
|
|
|
3149
3902
|
}
|
|
3150
3903
|
)
|
|
3151
3904
|
] }),
|
|
3152
|
-
/* @__PURE__ */
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ jsxs24(Box30, { sx: { width: 80 }, children: [
|
|
3906
|
+
/* @__PURE__ */ jsx41(Typography20, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: tokens37.colors.textDisabled, fontSize: 10 }, children: "QUANTITY" }),
|
|
3907
|
+
/* @__PURE__ */ jsx41(
|
|
3155
3908
|
MitumbaSelect,
|
|
3156
3909
|
{
|
|
3157
3910
|
value: quantity,
|
|
@@ -3163,9 +3916,9 @@ function CartItem({
|
|
|
3163
3916
|
}
|
|
3164
3917
|
)
|
|
3165
3918
|
] }),
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3919
|
+
/* @__PURE__ */ jsxs24(Box30, { sx: { textAlign: "right", minWidth: 100 }, children: [
|
|
3920
|
+
/* @__PURE__ */ jsx41(Typography20, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: tokens37.colors.textDisabled, fontSize: 10 }, children: "PRICE" }),
|
|
3921
|
+
/* @__PURE__ */ jsxs24(Typography20, { sx: { fontWeight: 900, color: tokens37.colors.textPrimary, fontSize: tokens37.typography.fontSizes.base, fontFamily: tokens37.typography.fontFamily }, children: [
|
|
3169
3922
|
"KES ",
|
|
3170
3923
|
priceKes.toLocaleString()
|
|
3171
3924
|
] })
|
|
@@ -3174,24 +3927,24 @@ function CartItem({
|
|
|
3174
3927
|
]
|
|
3175
3928
|
}
|
|
3176
3929
|
),
|
|
3177
|
-
/* @__PURE__ */
|
|
3178
|
-
|
|
3930
|
+
/* @__PURE__ */ jsx41(
|
|
3931
|
+
IconButton7,
|
|
3179
3932
|
{
|
|
3180
3933
|
onClick: onRemove,
|
|
3181
3934
|
sx: {
|
|
3182
3935
|
position: "absolute",
|
|
3183
3936
|
top: 8,
|
|
3184
3937
|
right: 8,
|
|
3185
|
-
color:
|
|
3938
|
+
color: tokens37.colors.textDisabled,
|
|
3186
3939
|
"&:hover": {
|
|
3187
|
-
color:
|
|
3188
|
-
backgroundColor:
|
|
3940
|
+
color: tokens37.colors.error,
|
|
3941
|
+
backgroundColor: tokens37.colors.errorLight,
|
|
3189
3942
|
transform: "rotate(90deg)"
|
|
3190
3943
|
},
|
|
3191
3944
|
transition: "all 0.3s ease"
|
|
3192
3945
|
},
|
|
3193
3946
|
size: "small",
|
|
3194
|
-
children: /* @__PURE__ */
|
|
3947
|
+
children: /* @__PURE__ */ jsx41(CloseIcon4, { sx: { fontSize: 16 } })
|
|
3195
3948
|
}
|
|
3196
3949
|
)
|
|
3197
3950
|
]
|
|
@@ -3200,12 +3953,12 @@ function CartItem({
|
|
|
3200
3953
|
}
|
|
3201
3954
|
|
|
3202
3955
|
// src/components/commerce/OrderStatusTimeline/OrderStatusTimeline.tsx
|
|
3203
|
-
import
|
|
3204
|
-
import
|
|
3956
|
+
import Box31 from "@mui/material/Box";
|
|
3957
|
+
import Typography21 from "@mui/material/Typography";
|
|
3205
3958
|
import CheckCircleOutlinedIcon from "@mui/icons-material/CheckCircleOutlined";
|
|
3206
3959
|
import RadioButtonUncheckedOutlinedIcon from "@mui/icons-material/RadioButtonUncheckedOutlined";
|
|
3207
|
-
import { tokens as
|
|
3208
|
-
import { jsx as
|
|
3960
|
+
import { tokens as tokens38 } from "@mitumba/tokens";
|
|
3961
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3209
3962
|
var ORDER_STATUS_ORDER = [
|
|
3210
3963
|
"CREATED",
|
|
3211
3964
|
"PAYMENT_PENDING",
|
|
@@ -3230,65 +3983,65 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3230
3983
|
const currentIndex = ORDER_STATUS_ORDER.indexOf(currentStatus);
|
|
3231
3984
|
const lastEvent = events.length > 0 ? events[events.length - 1] : null;
|
|
3232
3985
|
const currentNote = lastEvent?.note;
|
|
3233
|
-
return /* @__PURE__ */
|
|
3234
|
-
|
|
3986
|
+
return /* @__PURE__ */ jsxs25(
|
|
3987
|
+
Box31,
|
|
3235
3988
|
{
|
|
3236
3989
|
sx: {
|
|
3237
|
-
p:
|
|
3238
|
-
borderRadius:
|
|
3239
|
-
bgcolor:
|
|
3240
|
-
boxShadow:
|
|
3241
|
-
border: `1px solid ${
|
|
3990
|
+
p: tokens38.spacing.base,
|
|
3991
|
+
borderRadius: tokens38.radius.lg,
|
|
3992
|
+
bgcolor: tokens38.colors.surface,
|
|
3993
|
+
boxShadow: tokens38.shadows.card,
|
|
3994
|
+
border: `1px solid ${tokens38.colors.divider}`
|
|
3242
3995
|
},
|
|
3243
3996
|
children: [
|
|
3244
|
-
/* @__PURE__ */
|
|
3245
|
-
/* @__PURE__ */
|
|
3246
|
-
|
|
3997
|
+
/* @__PURE__ */ jsxs25(Box31, { sx: { display: "flex", alignItems: "center", gap: tokens38.spacing.sm, mb: tokens38.spacing.base }, children: [
|
|
3998
|
+
/* @__PURE__ */ jsx42(
|
|
3999
|
+
Typography21,
|
|
3247
4000
|
{
|
|
3248
4001
|
sx: {
|
|
3249
|
-
fontWeight:
|
|
3250
|
-
fontSize:
|
|
3251
|
-
color:
|
|
3252
|
-
fontFamily:
|
|
4002
|
+
fontWeight: tokens38.typography.fontWeights.bold,
|
|
4003
|
+
fontSize: tokens38.typography.fontSizes.md,
|
|
4004
|
+
color: tokens38.colors.textPrimary,
|
|
4005
|
+
fontFamily: tokens38.typography.fontFamily
|
|
3253
4006
|
},
|
|
3254
4007
|
children: "Order Tracking"
|
|
3255
4008
|
}
|
|
3256
4009
|
),
|
|
3257
|
-
/* @__PURE__ */
|
|
3258
|
-
|
|
4010
|
+
/* @__PURE__ */ jsx42(
|
|
4011
|
+
Box31,
|
|
3259
4012
|
{
|
|
3260
4013
|
sx: {
|
|
3261
|
-
px:
|
|
4014
|
+
px: tokens38.spacing.sm,
|
|
3262
4015
|
py: "2px",
|
|
3263
|
-
borderRadius:
|
|
3264
|
-
bgcolor:
|
|
3265
|
-
color:
|
|
4016
|
+
borderRadius: tokens38.radius.sm,
|
|
4017
|
+
bgcolor: tokens38.colors.greenLight,
|
|
4018
|
+
color: tokens38.colors.greenDark,
|
|
3266
4019
|
fontSize: 10,
|
|
3267
|
-
fontWeight:
|
|
4020
|
+
fontWeight: tokens38.typography.fontWeights.extrabold,
|
|
3268
4021
|
textTransform: "uppercase",
|
|
3269
|
-
letterSpacing:
|
|
4022
|
+
letterSpacing: tokens38.typography.letterSpacings.wide
|
|
3270
4023
|
},
|
|
3271
4024
|
children: ORDER_STATUS_LABELS[currentStatus]
|
|
3272
4025
|
}
|
|
3273
4026
|
)
|
|
3274
4027
|
] }),
|
|
3275
|
-
currentNote && /* @__PURE__ */
|
|
3276
|
-
|
|
4028
|
+
currentNote && /* @__PURE__ */ jsx42(
|
|
4029
|
+
Box31,
|
|
3277
4030
|
{
|
|
3278
4031
|
sx: {
|
|
3279
|
-
p:
|
|
3280
|
-
borderRadius:
|
|
3281
|
-
bgcolor:
|
|
3282
|
-
borderLeft: `3px solid ${
|
|
3283
|
-
mb:
|
|
4032
|
+
p: tokens38.spacing.sm,
|
|
4033
|
+
borderRadius: tokens38.radius.sm,
|
|
4034
|
+
bgcolor: tokens38.colors.background,
|
|
4035
|
+
borderLeft: `3px solid ${tokens38.colors.info}`,
|
|
4036
|
+
mb: tokens38.spacing.lg
|
|
3284
4037
|
},
|
|
3285
|
-
children: /* @__PURE__ */
|
|
3286
|
-
|
|
4038
|
+
children: /* @__PURE__ */ jsxs25(
|
|
4039
|
+
Typography21,
|
|
3287
4040
|
{
|
|
3288
4041
|
sx: {
|
|
3289
|
-
color:
|
|
3290
|
-
fontSize:
|
|
3291
|
-
fontFamily:
|
|
4042
|
+
color: tokens38.colors.textPrimary,
|
|
4043
|
+
fontSize: tokens38.typography.fontSizes.sm,
|
|
4044
|
+
fontFamily: tokens38.typography.fontFamily,
|
|
3292
4045
|
fontStyle: "italic"
|
|
3293
4046
|
},
|
|
3294
4047
|
children: [
|
|
@@ -3300,24 +4053,24 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3300
4053
|
)
|
|
3301
4054
|
}
|
|
3302
4055
|
),
|
|
3303
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ jsx42(Box31, { component: "ol", sx: { listStyle: "none", p: 0, m: 0 }, children: ORDER_STATUS_ORDER.map((status, index) => {
|
|
3304
4057
|
const isCompleted = index <= currentIndex;
|
|
3305
4058
|
const isCurrent = status === currentStatus;
|
|
3306
4059
|
const statusEvents = events.filter((e) => e.status === status);
|
|
3307
4060
|
const latestEvent = statusEvents.length > 0 ? statusEvents[statusEvents.length - 1] : null;
|
|
3308
|
-
return /* @__PURE__ */
|
|
3309
|
-
|
|
4061
|
+
return /* @__PURE__ */ jsxs25(
|
|
4062
|
+
Box31,
|
|
3310
4063
|
{
|
|
3311
4064
|
component: "li",
|
|
3312
4065
|
sx: {
|
|
3313
4066
|
display: "flex",
|
|
3314
4067
|
alignItems: "flex-start",
|
|
3315
|
-
gap:
|
|
4068
|
+
gap: tokens38.spacing.base,
|
|
3316
4069
|
position: "relative"
|
|
3317
4070
|
},
|
|
3318
4071
|
children: [
|
|
3319
|
-
/* @__PURE__ */
|
|
3320
|
-
|
|
4072
|
+
/* @__PURE__ */ jsxs25(
|
|
4073
|
+
Box31,
|
|
3321
4074
|
{
|
|
3322
4075
|
sx: {
|
|
3323
4076
|
display: "flex",
|
|
@@ -3326,8 +4079,8 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3326
4079
|
minWidth: "24px"
|
|
3327
4080
|
},
|
|
3328
4081
|
children: [
|
|
3329
|
-
/* @__PURE__ */
|
|
3330
|
-
|
|
4082
|
+
/* @__PURE__ */ jsx42(
|
|
4083
|
+
Box31,
|
|
3331
4084
|
{
|
|
3332
4085
|
sx: {
|
|
3333
4086
|
display: "flex",
|
|
@@ -3336,35 +4089,35 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3336
4089
|
width: "24px",
|
|
3337
4090
|
height: "24px",
|
|
3338
4091
|
zIndex: 1,
|
|
3339
|
-
backgroundColor:
|
|
4092
|
+
backgroundColor: tokens38.colors.surface
|
|
3340
4093
|
},
|
|
3341
|
-
children: isCompleted ? /* @__PURE__ */
|
|
4094
|
+
children: isCompleted ? /* @__PURE__ */ jsx42(
|
|
3342
4095
|
CheckCircleOutlinedIcon,
|
|
3343
4096
|
{
|
|
3344
4097
|
sx: {
|
|
3345
4098
|
fontSize: 20,
|
|
3346
|
-
color: isCurrent ?
|
|
4099
|
+
color: isCurrent ? tokens38.colors.green : tokens38.colors.textDisabled
|
|
3347
4100
|
}
|
|
3348
4101
|
}
|
|
3349
|
-
) : /* @__PURE__ */
|
|
4102
|
+
) : /* @__PURE__ */ jsx42(
|
|
3350
4103
|
RadioButtonUncheckedOutlinedIcon,
|
|
3351
4104
|
{
|
|
3352
4105
|
sx: {
|
|
3353
4106
|
fontSize: 18,
|
|
3354
|
-
color:
|
|
4107
|
+
color: tokens38.colors.divider
|
|
3355
4108
|
}
|
|
3356
4109
|
}
|
|
3357
4110
|
)
|
|
3358
4111
|
}
|
|
3359
4112
|
),
|
|
3360
|
-
index < ORDER_STATUS_ORDER.length - 1 && /* @__PURE__ */
|
|
3361
|
-
|
|
4113
|
+
index < ORDER_STATUS_ORDER.length - 1 && /* @__PURE__ */ jsx42(
|
|
4114
|
+
Box31,
|
|
3362
4115
|
{
|
|
3363
4116
|
sx: {
|
|
3364
4117
|
width: "2px",
|
|
3365
4118
|
flex: 1,
|
|
3366
|
-
minHeight:
|
|
3367
|
-
bgcolor: index < currentIndex ?
|
|
4119
|
+
minHeight: tokens38.spacing.lg,
|
|
4120
|
+
bgcolor: index < currentIndex ? tokens38.colors.green : tokens38.colors.divider,
|
|
3368
4121
|
marginBlock: "2px"
|
|
3369
4122
|
}
|
|
3370
4123
|
}
|
|
@@ -3372,27 +4125,27 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3372
4125
|
]
|
|
3373
4126
|
}
|
|
3374
4127
|
),
|
|
3375
|
-
/* @__PURE__ */
|
|
3376
|
-
/* @__PURE__ */
|
|
3377
|
-
|
|
4128
|
+
/* @__PURE__ */ jsxs25(Box31, { sx: { pt: "2px", pb: tokens38.spacing.lg }, children: [
|
|
4129
|
+
/* @__PURE__ */ jsx42(
|
|
4130
|
+
Typography21,
|
|
3378
4131
|
{
|
|
3379
4132
|
sx: {
|
|
3380
|
-
fontWeight: isCurrent ?
|
|
3381
|
-
fontSize:
|
|
3382
|
-
fontFamily:
|
|
3383
|
-
color: isCompleted ?
|
|
4133
|
+
fontWeight: isCurrent ? tokens38.typography.fontWeights.bold : tokens38.typography.fontWeights.medium,
|
|
4134
|
+
fontSize: tokens38.typography.fontSizes.sm,
|
|
4135
|
+
fontFamily: tokens38.typography.fontFamily,
|
|
4136
|
+
color: isCompleted ? tokens38.colors.textPrimary : tokens38.colors.textDisabled,
|
|
3384
4137
|
lineHeight: 1
|
|
3385
4138
|
},
|
|
3386
4139
|
children: ORDER_STATUS_LABELS[status]
|
|
3387
4140
|
}
|
|
3388
4141
|
),
|
|
3389
|
-
latestEvent && /* @__PURE__ */
|
|
3390
|
-
|
|
4142
|
+
latestEvent && /* @__PURE__ */ jsx42(
|
|
4143
|
+
Typography21,
|
|
3391
4144
|
{
|
|
3392
4145
|
sx: {
|
|
3393
|
-
color:
|
|
4146
|
+
color: tokens38.colors.textSecondary,
|
|
3394
4147
|
fontSize: 10,
|
|
3395
|
-
fontFamily:
|
|
4148
|
+
fontFamily: tokens38.typography.fontFamily,
|
|
3396
4149
|
mt: "4px"
|
|
3397
4150
|
},
|
|
3398
4151
|
children: latestEvent.timestamp
|
|
@@ -3410,196 +4163,66 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3410
4163
|
}
|
|
3411
4164
|
|
|
3412
4165
|
// src/components/commerce/EscrowStatusBanner/EscrowStatusBanner.tsx
|
|
3413
|
-
import
|
|
3414
|
-
import
|
|
3415
|
-
import
|
|
3416
|
-
import
|
|
3417
|
-
import
|
|
3418
|
-
import
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
color: tokens33.colors.error,
|
|
3456
|
-
bg: `${tokens33.colors.error}14`
|
|
3457
|
-
}
|
|
3458
|
-
};
|
|
3459
|
-
function EscrowStatusBanner({
|
|
3460
|
-
status,
|
|
3461
|
-
hoursRemaining,
|
|
3462
|
-
onConfirmDelivery,
|
|
3463
|
-
onRaiseDispute
|
|
3464
|
-
}) {
|
|
3465
|
-
const config = STATUS_CONFIG[status];
|
|
3466
|
-
const Icon = config.icon;
|
|
3467
|
-
return /* @__PURE__ */ jsxs21(
|
|
3468
|
-
Box28,
|
|
4166
|
+
import SecurityIcon from "@mui/icons-material/Security";
|
|
4167
|
+
import LocalShippingIcon2 from "@mui/icons-material/LocalShipping";
|
|
4168
|
+
import AccountBalanceWalletIcon from "@mui/icons-material/AccountBalanceWallet";
|
|
4169
|
+
import HistoryIcon from "@mui/icons-material/History";
|
|
4170
|
+
import ErrorOutlineIcon2 from "@mui/icons-material/ErrorOutline";
|
|
4171
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
4172
|
+
function EscrowStatusBanner({ status, amountKes, hoursRemaining, sx }) {
|
|
4173
|
+
const config = {
|
|
4174
|
+
FUNDED: {
|
|
4175
|
+
severity: "info",
|
|
4176
|
+
icon: /* @__PURE__ */ jsx43(SecurityIcon, {}),
|
|
4177
|
+
title: "Payment in Escrow",
|
|
4178
|
+
message: `KES ${amountKes.toLocaleString()} is securely held. We'll release it once you confirm delivery.`
|
|
4179
|
+
},
|
|
4180
|
+
SHIPPED: {
|
|
4181
|
+
severity: "info",
|
|
4182
|
+
icon: /* @__PURE__ */ jsx43(LocalShippingIcon2, {}),
|
|
4183
|
+
title: "Item Shipped",
|
|
4184
|
+
message: "The seller has dispatched your item. Track your package and confirm receipt to release funds."
|
|
4185
|
+
},
|
|
4186
|
+
TIMEOUT_WARNING: {
|
|
4187
|
+
severity: "warning",
|
|
4188
|
+
icon: /* @__PURE__ */ jsx43(HistoryIcon, {}),
|
|
4189
|
+
title: "Action Required",
|
|
4190
|
+
message: `Only ${hoursRemaining || 24} hours left to confirm delivery before funds are automatically released.`
|
|
4191
|
+
},
|
|
4192
|
+
RELEASED: {
|
|
4193
|
+
severity: "success",
|
|
4194
|
+
icon: /* @__PURE__ */ jsx43(AccountBalanceWalletIcon, {}),
|
|
4195
|
+
title: "Payment Released",
|
|
4196
|
+
message: `Funds have been successfully transferred to the seller's wallet. Thank you for shopping!`
|
|
4197
|
+
},
|
|
4198
|
+
REFUNDED: {
|
|
4199
|
+
severity: "error",
|
|
4200
|
+
icon: /* @__PURE__ */ jsx43(ErrorOutlineIcon2, {}),
|
|
4201
|
+
title: "Payment Refunded",
|
|
4202
|
+
message: `The escrow has been cancelled and KES ${amountKes.toLocaleString()} has been returned to your wallet.`
|
|
4203
|
+
}
|
|
4204
|
+
};
|
|
4205
|
+
const { severity, icon, title, message } = config[status];
|
|
4206
|
+
return /* @__PURE__ */ jsx43(
|
|
4207
|
+
MitumbaBanner,
|
|
3469
4208
|
{
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
boxShadow: tokens33.shadows.card
|
|
3476
|
-
},
|
|
3477
|
-
role: "status",
|
|
3478
|
-
"aria-label": `Escrow status: ${config.label}`,
|
|
3479
|
-
children: [
|
|
3480
|
-
/* @__PURE__ */ jsxs21(Box28, { sx: { display: "flex", alignItems: "center", gap: tokens33.spacing.base }, children: [
|
|
3481
|
-
/* @__PURE__ */ jsx37(
|
|
3482
|
-
Box28,
|
|
3483
|
-
{
|
|
3484
|
-
sx: {
|
|
3485
|
-
display: "flex",
|
|
3486
|
-
alignItems: "center",
|
|
3487
|
-
justifyContent: "center",
|
|
3488
|
-
width: 44,
|
|
3489
|
-
height: 44,
|
|
3490
|
-
borderRadius: tokens33.radius.md,
|
|
3491
|
-
bgcolor: config.color,
|
|
3492
|
-
color: tokens33.colors.white,
|
|
3493
|
-
flexShrink: 0,
|
|
3494
|
-
boxShadow: tokens33.shadows.card
|
|
3495
|
-
},
|
|
3496
|
-
children: /* @__PURE__ */ jsx37(Icon, { sx: { fontSize: 24 } })
|
|
3497
|
-
}
|
|
3498
|
-
),
|
|
3499
|
-
/* @__PURE__ */ jsxs21(Box28, { sx: { flex: 1 }, children: [
|
|
3500
|
-
/* @__PURE__ */ jsx37(
|
|
3501
|
-
Typography19,
|
|
3502
|
-
{
|
|
3503
|
-
sx: {
|
|
3504
|
-
fontWeight: tokens33.typography.fontWeights.bold,
|
|
3505
|
-
fontSize: tokens33.typography.fontSizes.base,
|
|
3506
|
-
color: config.color,
|
|
3507
|
-
lineHeight: 1.2,
|
|
3508
|
-
fontFamily: tokens33.typography.fontFamily
|
|
3509
|
-
},
|
|
3510
|
-
children: config.label
|
|
3511
|
-
}
|
|
3512
|
-
),
|
|
3513
|
-
/* @__PURE__ */ jsx37(
|
|
3514
|
-
Typography19,
|
|
3515
|
-
{
|
|
3516
|
-
sx: {
|
|
3517
|
-
fontSize: tokens33.typography.fontSizes.sm,
|
|
3518
|
-
color: tokens33.colors.textPrimary,
|
|
3519
|
-
mt: "2px",
|
|
3520
|
-
fontFamily: tokens33.typography.fontFamily,
|
|
3521
|
-
opacity: 0.8
|
|
3522
|
-
},
|
|
3523
|
-
children: config.message
|
|
3524
|
-
}
|
|
3525
|
-
)
|
|
3526
|
-
] })
|
|
3527
|
-
] }),
|
|
3528
|
-
status === "TIMEOUT_WARNING" && hoursRemaining !== void 0 && /* @__PURE__ */ jsxs21(
|
|
3529
|
-
Box28,
|
|
3530
|
-
{
|
|
3531
|
-
sx: {
|
|
3532
|
-
mt: tokens33.spacing.base,
|
|
3533
|
-
p: tokens33.spacing.sm,
|
|
3534
|
-
borderRadius: tokens33.radius.sm,
|
|
3535
|
-
bgcolor: tokens33.colors.white,
|
|
3536
|
-
display: "flex",
|
|
3537
|
-
alignItems: "center",
|
|
3538
|
-
gap: tokens33.spacing.sm,
|
|
3539
|
-
border: `1px solid ${tokens33.colors.warning}40`
|
|
3540
|
-
},
|
|
3541
|
-
children: [
|
|
3542
|
-
/* @__PURE__ */ jsx37(AccessTimeOutlinedIcon, { sx: { color: tokens33.colors.warning, fontSize: 18 } }),
|
|
3543
|
-
/* @__PURE__ */ jsxs21(
|
|
3544
|
-
Typography19,
|
|
3545
|
-
{
|
|
3546
|
-
sx: {
|
|
3547
|
-
fontSize: tokens33.typography.fontSizes.sm,
|
|
3548
|
-
fontWeight: tokens33.typography.fontWeights.bold,
|
|
3549
|
-
color: tokens33.colors.warning
|
|
3550
|
-
},
|
|
3551
|
-
children: [
|
|
3552
|
-
hoursRemaining,
|
|
3553
|
-
" hour",
|
|
3554
|
-
hoursRemaining === 1 ? "" : "s",
|
|
3555
|
-
" remaining"
|
|
3556
|
-
]
|
|
3557
|
-
}
|
|
3558
|
-
)
|
|
3559
|
-
]
|
|
3560
|
-
}
|
|
3561
|
-
),
|
|
3562
|
-
(onConfirmDelivery || onRaiseDispute) && /* @__PURE__ */ jsxs21(Box28, { sx: { display: "flex", gap: tokens33.spacing.sm, mt: tokens33.spacing.base }, children: [
|
|
3563
|
-
onConfirmDelivery && /* @__PURE__ */ jsx37(
|
|
3564
|
-
MitumbaPrimaryButton,
|
|
3565
|
-
{
|
|
3566
|
-
label: "Confirm Delivery",
|
|
3567
|
-
onClick: onConfirmDelivery,
|
|
3568
|
-
size: "medium",
|
|
3569
|
-
variant: "primary"
|
|
3570
|
-
}
|
|
3571
|
-
),
|
|
3572
|
-
onRaiseDispute && /* @__PURE__ */ jsx37(
|
|
3573
|
-
MitumbaPrimaryButton,
|
|
3574
|
-
{
|
|
3575
|
-
label: "Raise Dispute",
|
|
3576
|
-
onClick: onRaiseDispute,
|
|
3577
|
-
size: "medium",
|
|
3578
|
-
variant: "ghost",
|
|
3579
|
-
sx: {
|
|
3580
|
-
color: tokens33.colors.error,
|
|
3581
|
-
borderColor: tokens33.colors.error,
|
|
3582
|
-
"&:hover": {
|
|
3583
|
-
bgcolor: tokens33.colors.errorLight,
|
|
3584
|
-
borderColor: tokens33.colors.errorDark
|
|
3585
|
-
}
|
|
3586
|
-
}
|
|
3587
|
-
}
|
|
3588
|
-
)
|
|
3589
|
-
] })
|
|
3590
|
-
]
|
|
4209
|
+
severity,
|
|
4210
|
+
icon,
|
|
4211
|
+
title,
|
|
4212
|
+
sx,
|
|
4213
|
+
children: message
|
|
3591
4214
|
}
|
|
3592
4215
|
);
|
|
3593
4216
|
}
|
|
3594
4217
|
|
|
3595
4218
|
// src/components/vazi/VAZIOutfitCard/VAZIOutfitCard.tsx
|
|
3596
|
-
import
|
|
4219
|
+
import Box32 from "@mui/material/Box";
|
|
3597
4220
|
import Card from "@mui/material/Card";
|
|
3598
4221
|
import CardContent from "@mui/material/CardContent";
|
|
3599
|
-
import
|
|
3600
|
-
import { tokens as
|
|
4222
|
+
import Typography22 from "@mui/material/Typography";
|
|
4223
|
+
import { tokens as tokens39 } from "@mitumba/tokens";
|
|
3601
4224
|
import { useCallback as useCallback3 } from "react";
|
|
3602
|
-
import { jsx as
|
|
4225
|
+
import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3603
4226
|
function VAZIOutfitCard({
|
|
3604
4227
|
outfitName,
|
|
3605
4228
|
items,
|
|
@@ -3618,7 +4241,7 @@ function VAZIOutfitCard({
|
|
|
3618
4241
|
},
|
|
3619
4242
|
[onTap]
|
|
3620
4243
|
);
|
|
3621
|
-
return /* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ jsxs26(
|
|
3622
4245
|
Card,
|
|
3623
4246
|
{
|
|
3624
4247
|
onClick: onTap,
|
|
@@ -3626,49 +4249,49 @@ function VAZIOutfitCard({
|
|
|
3626
4249
|
role: "button",
|
|
3627
4250
|
tabIndex: onTap ? 0 : -1,
|
|
3628
4251
|
sx: {
|
|
3629
|
-
borderRadius:
|
|
3630
|
-
boxShadow:
|
|
4252
|
+
borderRadius: tokens39.radius.lg,
|
|
4253
|
+
boxShadow: tokens39.shadows.card,
|
|
3631
4254
|
cursor: onTap ? "pointer" : "default",
|
|
3632
4255
|
display: "flex",
|
|
3633
4256
|
flexDirection: "column",
|
|
3634
4257
|
overflow: "hidden",
|
|
3635
4258
|
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3636
4259
|
width: "100%",
|
|
3637
|
-
backgroundColor:
|
|
3638
|
-
border: `1px solid ${
|
|
4260
|
+
backgroundColor: tokens39.colors.surface,
|
|
4261
|
+
border: `1px solid ${tokens39.colors.divider}`,
|
|
3639
4262
|
"&:hover": onTap ? {
|
|
3640
4263
|
transform: "translateY(-4px)",
|
|
3641
|
-
boxShadow:
|
|
3642
|
-
borderColor:
|
|
4264
|
+
boxShadow: tokens39.shadows.elevated,
|
|
4265
|
+
borderColor: tokens39.colors.earthLight
|
|
3643
4266
|
} : void 0,
|
|
3644
4267
|
"&:focus-visible": {
|
|
3645
|
-
outline: `2px solid ${
|
|
3646
|
-
boxShadow:
|
|
4268
|
+
outline: `2px solid ${tokens39.colors.earthLight}`,
|
|
4269
|
+
boxShadow: tokens39.shadows.focus
|
|
3647
4270
|
}
|
|
3648
4271
|
},
|
|
3649
4272
|
children: [
|
|
3650
|
-
/* @__PURE__ */
|
|
3651
|
-
|
|
4273
|
+
/* @__PURE__ */ jsxs26(
|
|
4274
|
+
Box32,
|
|
3652
4275
|
{
|
|
3653
4276
|
sx: {
|
|
3654
4277
|
alignItems: "center",
|
|
3655
4278
|
display: "flex",
|
|
3656
|
-
gap:
|
|
3657
|
-
paddingInline:
|
|
3658
|
-
paddingBlock:
|
|
3659
|
-
borderBottom: `1px solid ${
|
|
4279
|
+
gap: tokens39.spacing.sm,
|
|
4280
|
+
paddingInline: tokens39.spacing.base,
|
|
4281
|
+
paddingBlock: tokens39.spacing.base,
|
|
4282
|
+
borderBottom: `1px solid ${tokens39.colors.background}`
|
|
3660
4283
|
},
|
|
3661
4284
|
children: [
|
|
3662
|
-
/* @__PURE__ */
|
|
3663
|
-
/* @__PURE__ */
|
|
3664
|
-
|
|
4285
|
+
/* @__PURE__ */ jsx44(VAZIBadge, { size: "small" }),
|
|
4286
|
+
/* @__PURE__ */ jsx44(
|
|
4287
|
+
Typography22,
|
|
3665
4288
|
{
|
|
3666
4289
|
sx: {
|
|
3667
|
-
color:
|
|
4290
|
+
color: tokens39.colors.textPrimary,
|
|
3668
4291
|
flex: 1,
|
|
3669
|
-
fontSize:
|
|
3670
|
-
fontWeight:
|
|
3671
|
-
lineHeight:
|
|
4292
|
+
fontSize: tokens39.typography.fontSizes.base,
|
|
4293
|
+
fontWeight: tokens39.typography.fontWeights.bold,
|
|
4294
|
+
lineHeight: tokens39.typography.lineHeights.snug,
|
|
3672
4295
|
overflow: "hidden",
|
|
3673
4296
|
textOverflow: "ellipsis",
|
|
3674
4297
|
whiteSpace: "nowrap"
|
|
@@ -3679,42 +4302,42 @@ function VAZIOutfitCard({
|
|
|
3679
4302
|
]
|
|
3680
4303
|
}
|
|
3681
4304
|
),
|
|
3682
|
-
/* @__PURE__ */
|
|
3683
|
-
|
|
4305
|
+
/* @__PURE__ */ jsx44(
|
|
4306
|
+
Box32,
|
|
3684
4307
|
{
|
|
3685
4308
|
sx: {
|
|
3686
4309
|
display: "flex",
|
|
3687
|
-
gap:
|
|
4310
|
+
gap: tokens39.spacing.sm,
|
|
3688
4311
|
overflowX: "auto",
|
|
3689
|
-
padding:
|
|
3690
|
-
backgroundColor:
|
|
4312
|
+
padding: tokens39.spacing.base,
|
|
4313
|
+
backgroundColor: tokens39.colors.background,
|
|
3691
4314
|
scrollbarWidth: "none",
|
|
3692
4315
|
msOverflowStyle: "none",
|
|
3693
4316
|
"&::-webkit-scrollbar": {
|
|
3694
4317
|
display: "none"
|
|
3695
4318
|
}
|
|
3696
4319
|
},
|
|
3697
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3698
|
-
|
|
4320
|
+
children: items.map((item) => /* @__PURE__ */ jsxs26(
|
|
4321
|
+
Box32,
|
|
3699
4322
|
{
|
|
3700
4323
|
sx: {
|
|
3701
4324
|
flexShrink: 0,
|
|
3702
4325
|
width: "88px"
|
|
3703
4326
|
},
|
|
3704
4327
|
children: [
|
|
3705
|
-
/* @__PURE__ */
|
|
3706
|
-
|
|
4328
|
+
/* @__PURE__ */ jsx44(
|
|
4329
|
+
Box32,
|
|
3707
4330
|
{
|
|
3708
4331
|
sx: {
|
|
3709
4332
|
aspectRatio: "3 / 4",
|
|
3710
|
-
borderRadius:
|
|
4333
|
+
borderRadius: tokens39.radius.sm,
|
|
3711
4334
|
overflow: "hidden",
|
|
3712
4335
|
width: "100%",
|
|
3713
|
-
backgroundColor:
|
|
3714
|
-
border: `1px solid ${
|
|
4336
|
+
backgroundColor: tokens39.colors.surface,
|
|
4337
|
+
border: `1px solid ${tokens39.colors.divider}`
|
|
3715
4338
|
},
|
|
3716
|
-
children: /* @__PURE__ */
|
|
3717
|
-
|
|
4339
|
+
children: /* @__PURE__ */ jsx44(
|
|
4340
|
+
Box32,
|
|
3718
4341
|
{
|
|
3719
4342
|
component: "img",
|
|
3720
4343
|
src: item.imageUrl,
|
|
@@ -3730,16 +4353,16 @@ function VAZIOutfitCard({
|
|
|
3730
4353
|
)
|
|
3731
4354
|
}
|
|
3732
4355
|
),
|
|
3733
|
-
/* @__PURE__ */
|
|
3734
|
-
|
|
4356
|
+
/* @__PURE__ */ jsx44(
|
|
4357
|
+
Typography22,
|
|
3735
4358
|
{
|
|
3736
4359
|
sx: {
|
|
3737
|
-
color:
|
|
4360
|
+
color: tokens39.colors.textSecondary,
|
|
3738
4361
|
fontSize: 10,
|
|
3739
|
-
fontWeight:
|
|
4362
|
+
fontWeight: tokens39.typography.fontWeights.semibold,
|
|
3740
4363
|
textTransform: "uppercase",
|
|
3741
|
-
letterSpacing:
|
|
3742
|
-
marginTop:
|
|
4364
|
+
letterSpacing: tokens39.typography.letterSpacings.wide,
|
|
4365
|
+
marginTop: tokens39.spacing.xs,
|
|
3743
4366
|
overflow: "hidden",
|
|
3744
4367
|
textOverflow: "ellipsis",
|
|
3745
4368
|
whiteSpace: "nowrap",
|
|
@@ -3754,31 +4377,31 @@ function VAZIOutfitCard({
|
|
|
3754
4377
|
))
|
|
3755
4378
|
}
|
|
3756
4379
|
),
|
|
3757
|
-
/* @__PURE__ */
|
|
4380
|
+
/* @__PURE__ */ jsxs26(
|
|
3758
4381
|
CardContent,
|
|
3759
4382
|
{
|
|
3760
4383
|
sx: {
|
|
3761
4384
|
display: "flex",
|
|
3762
4385
|
flexDirection: "column",
|
|
3763
|
-
gap:
|
|
3764
|
-
padding:
|
|
4386
|
+
gap: tokens39.spacing.sm,
|
|
4387
|
+
padding: tokens39.spacing.base,
|
|
3765
4388
|
"&:last-child": {
|
|
3766
|
-
paddingBottom:
|
|
4389
|
+
paddingBottom: tokens39.spacing.base
|
|
3767
4390
|
}
|
|
3768
4391
|
},
|
|
3769
4392
|
children: [
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
|
|
4393
|
+
/* @__PURE__ */ jsxs26(
|
|
4394
|
+
Box32,
|
|
3772
4395
|
{
|
|
3773
4396
|
sx: {
|
|
3774
4397
|
alignItems: "center",
|
|
3775
4398
|
display: "flex",
|
|
3776
|
-
gap:
|
|
4399
|
+
gap: tokens39.spacing.sm,
|
|
3777
4400
|
justifyContent: "space-between"
|
|
3778
4401
|
},
|
|
3779
4402
|
children: [
|
|
3780
|
-
/* @__PURE__ */
|
|
3781
|
-
onBuyAll && /* @__PURE__ */
|
|
4403
|
+
/* @__PURE__ */ jsx44(PriceTag, { priceKes: totalPriceKes, size: "large", color: "earth" }),
|
|
4404
|
+
onBuyAll && /* @__PURE__ */ jsx44(Box32, { sx: { flexShrink: 0 }, children: /* @__PURE__ */ jsx44(
|
|
3782
4405
|
MitumbaPrimaryButton,
|
|
3783
4406
|
{
|
|
3784
4407
|
label: "Buy all",
|
|
@@ -3796,22 +4419,22 @@ function VAZIOutfitCard({
|
|
|
3796
4419
|
]
|
|
3797
4420
|
}
|
|
3798
4421
|
),
|
|
3799
|
-
sellersCount > 1 && /* @__PURE__ */
|
|
3800
|
-
|
|
4422
|
+
sellersCount > 1 && /* @__PURE__ */ jsxs26(
|
|
4423
|
+
Box32,
|
|
3801
4424
|
{
|
|
3802
4425
|
sx: {
|
|
3803
4426
|
display: "flex",
|
|
3804
4427
|
alignItems: "center",
|
|
3805
|
-
gap:
|
|
3806
|
-
mt:
|
|
4428
|
+
gap: tokens39.spacing.xs,
|
|
4429
|
+
mt: tokens39.spacing.xs
|
|
3807
4430
|
},
|
|
3808
4431
|
children: [
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
|
|
4432
|
+
/* @__PURE__ */ jsxs26(
|
|
4433
|
+
Typography22,
|
|
3811
4434
|
{
|
|
3812
4435
|
sx: {
|
|
3813
|
-
color:
|
|
3814
|
-
fontSize:
|
|
4436
|
+
color: tokens39.colors.textSecondary,
|
|
4437
|
+
fontSize: tokens39.typography.fontSizes.sm,
|
|
3815
4438
|
lineHeight: 1
|
|
3816
4439
|
},
|
|
3817
4440
|
children: [
|
|
@@ -3821,26 +4444,26 @@ function VAZIOutfitCard({
|
|
|
3821
4444
|
]
|
|
3822
4445
|
}
|
|
3823
4446
|
),
|
|
3824
|
-
isMultiCity && /* @__PURE__ */
|
|
3825
|
-
|
|
4447
|
+
isMultiCity && /* @__PURE__ */ jsx44(
|
|
4448
|
+
Box32,
|
|
3826
4449
|
{
|
|
3827
4450
|
component: "span",
|
|
3828
4451
|
sx: {
|
|
3829
|
-
fontSize:
|
|
3830
|
-
color:
|
|
4452
|
+
fontSize: tokens39.typography.fontSizes.xs,
|
|
4453
|
+
color: tokens39.colors.textDisabled
|
|
3831
4454
|
},
|
|
3832
4455
|
children: "\u2022"
|
|
3833
4456
|
}
|
|
3834
4457
|
),
|
|
3835
|
-
isMultiCity && /* @__PURE__ */
|
|
3836
|
-
|
|
4458
|
+
isMultiCity && /* @__PURE__ */ jsx44(
|
|
4459
|
+
Typography22,
|
|
3837
4460
|
{
|
|
3838
4461
|
sx: {
|
|
3839
|
-
color:
|
|
3840
|
-
fontSize:
|
|
3841
|
-
fontWeight:
|
|
4462
|
+
color: tokens39.colors.earth,
|
|
4463
|
+
fontSize: tokens39.typography.fontSizes.xs,
|
|
4464
|
+
fontWeight: tokens39.typography.fontWeights.bold,
|
|
3842
4465
|
textTransform: "uppercase",
|
|
3843
|
-
letterSpacing:
|
|
4466
|
+
letterSpacing: tokens39.typography.letterSpacings.wide,
|
|
3844
4467
|
lineHeight: 1
|
|
3845
4468
|
},
|
|
3846
4469
|
children: "Multi-city"
|
|
@@ -3858,78 +4481,78 @@ function VAZIOutfitCard({
|
|
|
3858
4481
|
}
|
|
3859
4482
|
|
|
3860
4483
|
// src/components/vazi/VAZIOutfitCardSkeleton/VAZIOutfitCardSkeleton.tsx
|
|
3861
|
-
import
|
|
4484
|
+
import Box33 from "@mui/material/Box";
|
|
3862
4485
|
import Skeleton from "@mui/material/Skeleton";
|
|
3863
|
-
import { tokens as
|
|
3864
|
-
import { jsx as
|
|
4486
|
+
import { tokens as tokens40 } from "@mitumba/tokens";
|
|
4487
|
+
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3865
4488
|
var SKELETON_IMAGE_KEYS = ["image-1", "image-2", "image-3", "image-4"];
|
|
3866
4489
|
function VAZIOutfitCardSkeleton() {
|
|
3867
|
-
return /* @__PURE__ */
|
|
3868
|
-
|
|
4490
|
+
return /* @__PURE__ */ jsxs27(
|
|
4491
|
+
Box33,
|
|
3869
4492
|
{
|
|
3870
4493
|
sx: {
|
|
3871
|
-
borderRadius:
|
|
3872
|
-
boxShadow:
|
|
4494
|
+
borderRadius: tokens40.radius.lg,
|
|
4495
|
+
boxShadow: tokens40.shadows.card,
|
|
3873
4496
|
display: "flex",
|
|
3874
4497
|
flexDirection: "column",
|
|
3875
4498
|
overflow: "hidden",
|
|
3876
4499
|
width: "100%"
|
|
3877
4500
|
},
|
|
3878
4501
|
children: [
|
|
3879
|
-
/* @__PURE__ */
|
|
3880
|
-
|
|
4502
|
+
/* @__PURE__ */ jsxs27(
|
|
4503
|
+
Box33,
|
|
3881
4504
|
{
|
|
3882
4505
|
sx: {
|
|
3883
4506
|
alignItems: "center",
|
|
3884
4507
|
display: "flex",
|
|
3885
|
-
gap:
|
|
3886
|
-
paddingInline:
|
|
3887
|
-
paddingBlock:
|
|
4508
|
+
gap: tokens40.spacing.sm,
|
|
4509
|
+
paddingInline: tokens40.spacing.base,
|
|
4510
|
+
paddingBlock: tokens40.spacing.base
|
|
3888
4511
|
},
|
|
3889
4512
|
children: [
|
|
3890
|
-
/* @__PURE__ */
|
|
4513
|
+
/* @__PURE__ */ jsx45(
|
|
3891
4514
|
Skeleton,
|
|
3892
4515
|
{
|
|
3893
4516
|
"aria-label": "Loading VAZI label",
|
|
3894
4517
|
variant: "rounded",
|
|
3895
4518
|
sx: {
|
|
3896
|
-
borderRadius:
|
|
3897
|
-
height:
|
|
4519
|
+
borderRadius: tokens40.radius.sm,
|
|
4520
|
+
height: tokens40.spacing.lg,
|
|
3898
4521
|
width: 48
|
|
3899
4522
|
}
|
|
3900
4523
|
}
|
|
3901
4524
|
),
|
|
3902
|
-
/* @__PURE__ */
|
|
4525
|
+
/* @__PURE__ */ jsx45(
|
|
3903
4526
|
Skeleton,
|
|
3904
4527
|
{
|
|
3905
4528
|
"aria-label": "Loading outfit name",
|
|
3906
4529
|
variant: "text",
|
|
3907
4530
|
sx: {
|
|
3908
4531
|
flex: 1,
|
|
3909
|
-
fontSize:
|
|
4532
|
+
fontSize: tokens40.typography.fontSizes.base
|
|
3910
4533
|
}
|
|
3911
4534
|
}
|
|
3912
4535
|
)
|
|
3913
4536
|
]
|
|
3914
4537
|
}
|
|
3915
4538
|
),
|
|
3916
|
-
/* @__PURE__ */
|
|
3917
|
-
|
|
4539
|
+
/* @__PURE__ */ jsx45(
|
|
4540
|
+
Box33,
|
|
3918
4541
|
{
|
|
3919
4542
|
sx: {
|
|
3920
4543
|
display: "flex",
|
|
3921
|
-
gap:
|
|
4544
|
+
gap: tokens40.spacing.sm,
|
|
3922
4545
|
overflowX: "auto",
|
|
3923
|
-
paddingInline:
|
|
3924
|
-
paddingBottom:
|
|
4546
|
+
paddingInline: tokens40.spacing.base,
|
|
4547
|
+
paddingBottom: tokens40.spacing.base,
|
|
3925
4548
|
scrollbarWidth: "none",
|
|
3926
4549
|
msOverflowStyle: "none",
|
|
3927
4550
|
"&::-webkit-scrollbar": {
|
|
3928
4551
|
display: "none"
|
|
3929
4552
|
}
|
|
3930
4553
|
},
|
|
3931
|
-
children: SKELETON_IMAGE_KEYS.map((imgKey) => /* @__PURE__ */
|
|
3932
|
-
|
|
4554
|
+
children: SKELETON_IMAGE_KEYS.map((imgKey) => /* @__PURE__ */ jsxs27(
|
|
4555
|
+
Box33,
|
|
3933
4556
|
{
|
|
3934
4557
|
sx: {
|
|
3935
4558
|
flexShrink: 0,
|
|
@@ -3937,26 +4560,26 @@ function VAZIOutfitCardSkeleton() {
|
|
|
3937
4560
|
minWidth: "88px"
|
|
3938
4561
|
},
|
|
3939
4562
|
children: [
|
|
3940
|
-
/* @__PURE__ */
|
|
4563
|
+
/* @__PURE__ */ jsx45(
|
|
3941
4564
|
Skeleton,
|
|
3942
4565
|
{
|
|
3943
4566
|
"aria-label": `Loading item image ${imgKey.split("-")[1]}`,
|
|
3944
4567
|
variant: "rounded",
|
|
3945
4568
|
sx: {
|
|
3946
4569
|
aspectRatio: "3 / 4",
|
|
3947
|
-
borderRadius:
|
|
4570
|
+
borderRadius: tokens40.radius.md,
|
|
3948
4571
|
width: "100%"
|
|
3949
4572
|
}
|
|
3950
4573
|
}
|
|
3951
4574
|
),
|
|
3952
|
-
/* @__PURE__ */
|
|
4575
|
+
/* @__PURE__ */ jsx45(
|
|
3953
4576
|
Skeleton,
|
|
3954
4577
|
{
|
|
3955
4578
|
"aria-label": `Loading seller name ${imgKey.split("-")[1]}`,
|
|
3956
4579
|
variant: "text",
|
|
3957
4580
|
sx: {
|
|
3958
|
-
fontSize:
|
|
3959
|
-
marginTop:
|
|
4581
|
+
fontSize: tokens40.typography.fontSizes.xs,
|
|
4582
|
+
marginTop: tokens40.spacing.xs,
|
|
3960
4583
|
width: "80%"
|
|
3961
4584
|
}
|
|
3962
4585
|
}
|
|
@@ -3967,45 +4590,45 @@ function VAZIOutfitCardSkeleton() {
|
|
|
3967
4590
|
))
|
|
3968
4591
|
}
|
|
3969
4592
|
),
|
|
3970
|
-
/* @__PURE__ */
|
|
3971
|
-
|
|
4593
|
+
/* @__PURE__ */ jsxs27(
|
|
4594
|
+
Box33,
|
|
3972
4595
|
{
|
|
3973
4596
|
sx: {
|
|
3974
4597
|
display: "flex",
|
|
3975
4598
|
flexDirection: "column",
|
|
3976
|
-
gap:
|
|
3977
|
-
paddingInline:
|
|
3978
|
-
paddingBlock:
|
|
4599
|
+
gap: tokens40.spacing.sm,
|
|
4600
|
+
paddingInline: tokens40.spacing.base,
|
|
4601
|
+
paddingBlock: tokens40.spacing.base
|
|
3979
4602
|
},
|
|
3980
4603
|
children: [
|
|
3981
|
-
/* @__PURE__ */
|
|
3982
|
-
|
|
4604
|
+
/* @__PURE__ */ jsxs27(
|
|
4605
|
+
Box33,
|
|
3983
4606
|
{
|
|
3984
4607
|
sx: {
|
|
3985
4608
|
alignItems: "center",
|
|
3986
4609
|
display: "flex",
|
|
3987
|
-
gap:
|
|
4610
|
+
gap: tokens40.spacing.sm,
|
|
3988
4611
|
justifyContent: "space-between"
|
|
3989
4612
|
},
|
|
3990
4613
|
children: [
|
|
3991
|
-
/* @__PURE__ */
|
|
4614
|
+
/* @__PURE__ */ jsx45(
|
|
3992
4615
|
Skeleton,
|
|
3993
4616
|
{
|
|
3994
4617
|
"aria-label": "Loading total price",
|
|
3995
4618
|
variant: "text",
|
|
3996
4619
|
sx: {
|
|
3997
|
-
fontSize:
|
|
4620
|
+
fontSize: tokens40.typography.fontSizes.lg,
|
|
3998
4621
|
width: "40%"
|
|
3999
4622
|
}
|
|
4000
4623
|
}
|
|
4001
4624
|
),
|
|
4002
|
-
/* @__PURE__ */
|
|
4625
|
+
/* @__PURE__ */ jsx45(
|
|
4003
4626
|
Skeleton,
|
|
4004
4627
|
{
|
|
4005
4628
|
"aria-label": "Loading buy button",
|
|
4006
4629
|
variant: "rounded",
|
|
4007
4630
|
sx: {
|
|
4008
|
-
borderRadius:
|
|
4631
|
+
borderRadius: tokens40.radius.md,
|
|
4009
4632
|
height: "36px",
|
|
4010
4633
|
width: 100
|
|
4011
4634
|
}
|
|
@@ -4014,13 +4637,13 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4014
4637
|
]
|
|
4015
4638
|
}
|
|
4016
4639
|
),
|
|
4017
|
-
/* @__PURE__ */
|
|
4640
|
+
/* @__PURE__ */ jsx45(
|
|
4018
4641
|
Skeleton,
|
|
4019
4642
|
{
|
|
4020
4643
|
"aria-label": "Loading seller info",
|
|
4021
4644
|
variant: "text",
|
|
4022
4645
|
sx: {
|
|
4023
|
-
fontSize:
|
|
4646
|
+
fontSize: tokens40.typography.fontSizes.sm,
|
|
4024
4647
|
width: "60%"
|
|
4025
4648
|
}
|
|
4026
4649
|
}
|
|
@@ -4034,18 +4657,18 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4034
4657
|
}
|
|
4035
4658
|
|
|
4036
4659
|
// src/components/vazi/VAZIFeedSection/VAZIFeedSection.tsx
|
|
4037
|
-
import
|
|
4038
|
-
import { tokens as
|
|
4039
|
-
import { jsx as
|
|
4040
|
-
var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */
|
|
4041
|
-
|
|
4660
|
+
import Box34 from "@mui/material/Box";
|
|
4661
|
+
import { tokens as tokens41 } from "@mitumba/tokens";
|
|
4662
|
+
import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4663
|
+
var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */ jsx46(
|
|
4664
|
+
Box34,
|
|
4042
4665
|
{
|
|
4043
4666
|
sx: {
|
|
4044
4667
|
flexShrink: 0,
|
|
4045
4668
|
width: { xs: "82%", md: "100%" },
|
|
4046
4669
|
maxWidth: { xs: "340px", md: "none" }
|
|
4047
4670
|
},
|
|
4048
|
-
children: /* @__PURE__ */
|
|
4671
|
+
children: /* @__PURE__ */ jsx46(
|
|
4049
4672
|
VAZIOutfitCard,
|
|
4050
4673
|
{
|
|
4051
4674
|
outfitName: outfit.outfitName,
|
|
@@ -4060,80 +4683,80 @@ var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */ jsx
|
|
|
4060
4683
|
},
|
|
4061
4684
|
outfit.outfitName
|
|
4062
4685
|
));
|
|
4063
|
-
var renderSkeletons = () => Array.from({ length: 3 }, (_, skeletonIdx) => /* @__PURE__ */
|
|
4064
|
-
|
|
4686
|
+
var renderSkeletons = () => Array.from({ length: 3 }, (_, skeletonIdx) => /* @__PURE__ */ jsx46(
|
|
4687
|
+
Box34,
|
|
4065
4688
|
{
|
|
4066
4689
|
sx: {
|
|
4067
4690
|
flexShrink: 0,
|
|
4068
4691
|
width: { xs: "82%", md: "100%" },
|
|
4069
4692
|
maxWidth: { xs: "340px", md: "none" }
|
|
4070
4693
|
},
|
|
4071
|
-
children: /* @__PURE__ */
|
|
4694
|
+
children: /* @__PURE__ */ jsx46(VAZIOutfitCardSkeleton, {})
|
|
4072
4695
|
},
|
|
4073
4696
|
`skeleton-${skeletonIdx}`
|
|
4074
4697
|
));
|
|
4075
4698
|
function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
4076
|
-
return /* @__PURE__ */
|
|
4077
|
-
|
|
4699
|
+
return /* @__PURE__ */ jsxs28(
|
|
4700
|
+
Box34,
|
|
4078
4701
|
{
|
|
4079
4702
|
sx: {
|
|
4080
4703
|
display: "flex",
|
|
4081
4704
|
flexDirection: "column",
|
|
4082
|
-
gap:
|
|
4705
|
+
gap: tokens41.spacing.base,
|
|
4083
4706
|
width: "100%"
|
|
4084
4707
|
},
|
|
4085
4708
|
children: [
|
|
4086
|
-
/* @__PURE__ */
|
|
4087
|
-
|
|
4709
|
+
/* @__PURE__ */ jsxs28(
|
|
4710
|
+
Box34,
|
|
4088
4711
|
{
|
|
4089
4712
|
sx: {
|
|
4090
4713
|
alignItems: "center",
|
|
4091
4714
|
display: "flex",
|
|
4092
4715
|
justifyContent: "space-between",
|
|
4093
|
-
paddingInline: { xs:
|
|
4716
|
+
paddingInline: { xs: tokens41.spacing.base, md: 0 }
|
|
4094
4717
|
},
|
|
4095
4718
|
children: [
|
|
4096
|
-
/* @__PURE__ */
|
|
4097
|
-
|
|
4719
|
+
/* @__PURE__ */ jsx46(
|
|
4720
|
+
Box34,
|
|
4098
4721
|
{
|
|
4099
4722
|
component: "h2",
|
|
4100
4723
|
sx: {
|
|
4101
|
-
color:
|
|
4102
|
-
fontFamily:
|
|
4103
|
-
fontSize:
|
|
4104
|
-
fontWeight:
|
|
4105
|
-
lineHeight:
|
|
4724
|
+
color: tokens41.colors.textPrimary,
|
|
4725
|
+
fontFamily: tokens41.typography.fontFamily,
|
|
4726
|
+
fontSize: tokens41.typography.fontSizes.xl,
|
|
4727
|
+
fontWeight: tokens41.typography.fontWeights.bold,
|
|
4728
|
+
lineHeight: tokens41.typography.lineHeights.snug,
|
|
4106
4729
|
margin: 0
|
|
4107
4730
|
},
|
|
4108
4731
|
children: "VAZI Picks"
|
|
4109
4732
|
}
|
|
4110
4733
|
),
|
|
4111
|
-
onSeeAll && /* @__PURE__ */
|
|
4112
|
-
|
|
4734
|
+
onSeeAll && /* @__PURE__ */ jsx46(
|
|
4735
|
+
Box34,
|
|
4113
4736
|
{
|
|
4114
4737
|
component: "button",
|
|
4115
4738
|
onClick: onSeeAll,
|
|
4116
4739
|
sx: {
|
|
4117
4740
|
backgroundColor: "transparent",
|
|
4118
4741
|
border: "none",
|
|
4119
|
-
color:
|
|
4742
|
+
color: tokens41.colors.earth,
|
|
4120
4743
|
cursor: "pointer",
|
|
4121
|
-
fontFamily:
|
|
4122
|
-
fontSize:
|
|
4123
|
-
fontWeight:
|
|
4124
|
-
lineHeight:
|
|
4744
|
+
fontFamily: tokens41.typography.fontFamily,
|
|
4745
|
+
fontSize: tokens41.typography.fontSizes.base,
|
|
4746
|
+
fontWeight: tokens41.typography.fontWeights.semibold,
|
|
4747
|
+
lineHeight: tokens41.typography.lineHeights.normal,
|
|
4125
4748
|
padding: 0,
|
|
4126
4749
|
textDecoration: "none",
|
|
4127
4750
|
transition: "color 200ms ease",
|
|
4128
4751
|
whiteSpace: "nowrap",
|
|
4129
4752
|
"&:hover": {
|
|
4130
|
-
color:
|
|
4753
|
+
color: tokens41.colors.earthDark,
|
|
4131
4754
|
textDecoration: "underline"
|
|
4132
4755
|
},
|
|
4133
4756
|
"&:focus-visible": {
|
|
4134
|
-
outline: `${
|
|
4135
|
-
boxShadow:
|
|
4136
|
-
borderRadius:
|
|
4757
|
+
outline: `${tokens41.spacing.xs}px solid transparent`,
|
|
4758
|
+
boxShadow: tokens41.shadows.focus,
|
|
4759
|
+
borderRadius: tokens41.radius.sm
|
|
4137
4760
|
}
|
|
4138
4761
|
},
|
|
4139
4762
|
children: "See all"
|
|
@@ -4142,16 +4765,16 @@ function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
|
4142
4765
|
]
|
|
4143
4766
|
}
|
|
4144
4767
|
),
|
|
4145
|
-
/* @__PURE__ */
|
|
4146
|
-
|
|
4768
|
+
/* @__PURE__ */ jsx46(
|
|
4769
|
+
Box34,
|
|
4147
4770
|
{
|
|
4148
4771
|
sx: {
|
|
4149
4772
|
display: { xs: "flex", md: "grid" },
|
|
4150
4773
|
gridTemplateColumns: { md: "repeat(3, 1fr)" },
|
|
4151
|
-
gap:
|
|
4774
|
+
gap: tokens41.spacing.base,
|
|
4152
4775
|
overflowX: { xs: "auto", md: "visible" },
|
|
4153
|
-
paddingInline: { xs:
|
|
4154
|
-
paddingBottom: { xs:
|
|
4776
|
+
paddingInline: { xs: tokens41.spacing.base, md: 0 },
|
|
4777
|
+
paddingBottom: { xs: tokens41.spacing.sm, md: 0 },
|
|
4155
4778
|
scrollbarWidth: "none",
|
|
4156
4779
|
msOverflowStyle: "none",
|
|
4157
4780
|
"&::-webkit-scrollbar": {
|
|
@@ -4167,23 +4790,23 @@ function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
|
4167
4790
|
}
|
|
4168
4791
|
|
|
4169
4792
|
// src/components/vazi/CompleteThisLookPanel/CompleteThisLookPanel.tsx
|
|
4170
|
-
import
|
|
4171
|
-
import
|
|
4172
|
-
import { tokens as
|
|
4173
|
-
import { jsx as
|
|
4793
|
+
import Box35 from "@mui/material/Box";
|
|
4794
|
+
import Typography23 from "@mui/material/Typography";
|
|
4795
|
+
import { tokens as tokens42 } from "@mitumba/tokens";
|
|
4796
|
+
import { jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4174
4797
|
function CompleteThisLookPanel({ outfits, loading = false }) {
|
|
4175
4798
|
if (!loading && outfits.length === 0) {
|
|
4176
4799
|
return null;
|
|
4177
4800
|
}
|
|
4178
|
-
const renderOutfitCards2 = () => outfits.map((outfit) => /* @__PURE__ */
|
|
4179
|
-
|
|
4801
|
+
const renderOutfitCards2 = () => outfits.map((outfit) => /* @__PURE__ */ jsx47(
|
|
4802
|
+
Box35,
|
|
4180
4803
|
{
|
|
4181
4804
|
sx: {
|
|
4182
4805
|
flexShrink: 0,
|
|
4183
4806
|
width: { xs: "82%", md: "100%" },
|
|
4184
4807
|
maxWidth: { xs: "340px", md: "none" }
|
|
4185
4808
|
},
|
|
4186
|
-
children: /* @__PURE__ */
|
|
4809
|
+
children: /* @__PURE__ */ jsx47(
|
|
4187
4810
|
VAZIOutfitCard,
|
|
4188
4811
|
{
|
|
4189
4812
|
outfitName: outfit.outfitName,
|
|
@@ -4198,51 +4821,51 @@ function CompleteThisLookPanel({ outfits, loading = false }) {
|
|
|
4198
4821
|
},
|
|
4199
4822
|
outfit.outfitName
|
|
4200
4823
|
));
|
|
4201
|
-
const renderSkeletons2 = () => ["skel-0", "skel-1", "skel-2"].map((skelKey) => /* @__PURE__ */
|
|
4202
|
-
|
|
4824
|
+
const renderSkeletons2 = () => ["skel-0", "skel-1", "skel-2"].map((skelKey) => /* @__PURE__ */ jsx47(
|
|
4825
|
+
Box35,
|
|
4203
4826
|
{
|
|
4204
4827
|
sx: {
|
|
4205
4828
|
flexShrink: 0,
|
|
4206
4829
|
width: { xs: "82%", md: "100%" },
|
|
4207
4830
|
maxWidth: { xs: "340px", md: "none" }
|
|
4208
4831
|
},
|
|
4209
|
-
children: /* @__PURE__ */
|
|
4832
|
+
children: /* @__PURE__ */ jsx47(VAZIOutfitCardSkeleton, {})
|
|
4210
4833
|
},
|
|
4211
4834
|
skelKey
|
|
4212
4835
|
));
|
|
4213
|
-
return /* @__PURE__ */
|
|
4214
|
-
|
|
4836
|
+
return /* @__PURE__ */ jsxs29(
|
|
4837
|
+
Box35,
|
|
4215
4838
|
{
|
|
4216
4839
|
sx: {
|
|
4217
4840
|
display: "flex",
|
|
4218
4841
|
flexDirection: "column",
|
|
4219
|
-
gap:
|
|
4842
|
+
gap: tokens42.spacing.base,
|
|
4220
4843
|
width: "100%"
|
|
4221
4844
|
},
|
|
4222
4845
|
children: [
|
|
4223
|
-
/* @__PURE__ */
|
|
4224
|
-
|
|
4846
|
+
/* @__PURE__ */ jsx47(
|
|
4847
|
+
Typography23,
|
|
4225
4848
|
{
|
|
4226
4849
|
component: "h2",
|
|
4227
4850
|
sx: {
|
|
4228
|
-
color:
|
|
4229
|
-
fontSize:
|
|
4230
|
-
fontWeight:
|
|
4231
|
-
lineHeight:
|
|
4851
|
+
color: tokens42.colors.textPrimary,
|
|
4852
|
+
fontSize: tokens42.typography.fontSizes.xl,
|
|
4853
|
+
fontWeight: tokens42.typography.fontWeights.bold,
|
|
4854
|
+
lineHeight: tokens42.typography.lineHeights.snug,
|
|
4232
4855
|
margin: 0
|
|
4233
4856
|
},
|
|
4234
4857
|
children: "Complete this look"
|
|
4235
4858
|
}
|
|
4236
4859
|
),
|
|
4237
|
-
/* @__PURE__ */
|
|
4238
|
-
|
|
4860
|
+
/* @__PURE__ */ jsx47(
|
|
4861
|
+
Box35,
|
|
4239
4862
|
{
|
|
4240
4863
|
sx: {
|
|
4241
4864
|
display: { xs: "flex", md: "grid" },
|
|
4242
4865
|
gridTemplateColumns: { md: "repeat(3, 1fr)" },
|
|
4243
|
-
gap:
|
|
4866
|
+
gap: tokens42.spacing.base,
|
|
4244
4867
|
overflowX: { xs: "auto", md: "visible" },
|
|
4245
|
-
paddingBottom: { xs:
|
|
4868
|
+
paddingBottom: { xs: tokens42.spacing.sm, md: 0 },
|
|
4246
4869
|
scrollbarWidth: "none",
|
|
4247
4870
|
msOverflowStyle: "none",
|
|
4248
4871
|
"&::-webkit-scrollbar": {
|
|
@@ -4263,7 +4886,7 @@ import { ThemeProvider } from "@mui/material/styles";
|
|
|
4263
4886
|
|
|
4264
4887
|
// src/theme/theme.ts
|
|
4265
4888
|
import { createTheme } from "@mui/material/styles";
|
|
4266
|
-
import { tokens as
|
|
4889
|
+
import { tokens as tokens43 } from "@mitumba/tokens";
|
|
4267
4890
|
var transitions = {
|
|
4268
4891
|
standard: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
4269
4892
|
spring: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
@@ -4272,86 +4895,86 @@ var mitumbaTheme = createTheme({
|
|
|
4272
4895
|
// Spacing factor 4px (Mandate)
|
|
4273
4896
|
spacing: (factor) => `${factor * 4}px`,
|
|
4274
4897
|
breakpoints: {
|
|
4275
|
-
values:
|
|
4898
|
+
values: tokens43.breakpoints
|
|
4276
4899
|
},
|
|
4277
4900
|
palette: {
|
|
4278
4901
|
mode: "light",
|
|
4279
4902
|
primary: {
|
|
4280
|
-
main:
|
|
4281
|
-
light:
|
|
4282
|
-
dark:
|
|
4283
|
-
contrastText:
|
|
4903
|
+
main: tokens43.colors.green,
|
|
4904
|
+
light: tokens43.colors.greenLight,
|
|
4905
|
+
dark: tokens43.colors.greenDark,
|
|
4906
|
+
contrastText: tokens43.colors.textOnGreen
|
|
4284
4907
|
},
|
|
4285
4908
|
secondary: {
|
|
4286
|
-
main:
|
|
4287
|
-
light:
|
|
4288
|
-
dark:
|
|
4289
|
-
contrastText:
|
|
4909
|
+
main: tokens43.colors.earth,
|
|
4910
|
+
light: tokens43.colors.earthLight,
|
|
4911
|
+
dark: tokens43.colors.earthDark,
|
|
4912
|
+
contrastText: tokens43.colors.textOnEarth
|
|
4290
4913
|
},
|
|
4291
4914
|
earth: {
|
|
4292
|
-
main:
|
|
4293
|
-
light:
|
|
4294
|
-
dark:
|
|
4295
|
-
contrastText:
|
|
4915
|
+
main: tokens43.colors.earth,
|
|
4916
|
+
light: tokens43.colors.earthLight,
|
|
4917
|
+
dark: tokens43.colors.earthDark,
|
|
4918
|
+
contrastText: tokens43.colors.textOnEarth
|
|
4296
4919
|
},
|
|
4297
4920
|
success: {
|
|
4298
|
-
main:
|
|
4299
|
-
light:
|
|
4300
|
-
dark:
|
|
4301
|
-
contrastText:
|
|
4921
|
+
main: tokens43.colors.success,
|
|
4922
|
+
light: tokens43.colors.successLight,
|
|
4923
|
+
dark: tokens43.colors.successDark,
|
|
4924
|
+
contrastText: tokens43.colors.textOnGreen
|
|
4302
4925
|
},
|
|
4303
4926
|
error: {
|
|
4304
|
-
main:
|
|
4305
|
-
light:
|
|
4306
|
-
dark:
|
|
4307
|
-
contrastText:
|
|
4927
|
+
main: tokens43.colors.error,
|
|
4928
|
+
light: tokens43.colors.errorLight,
|
|
4929
|
+
dark: tokens43.colors.errorDark,
|
|
4930
|
+
contrastText: tokens43.colors.white
|
|
4308
4931
|
},
|
|
4309
4932
|
warning: {
|
|
4310
|
-
main:
|
|
4311
|
-
light:
|
|
4312
|
-
dark:
|
|
4313
|
-
contrastText:
|
|
4933
|
+
main: tokens43.colors.warning,
|
|
4934
|
+
light: tokens43.colors.warningLight,
|
|
4935
|
+
dark: tokens43.colors.warningDark,
|
|
4936
|
+
contrastText: tokens43.colors.textPrimary
|
|
4314
4937
|
},
|
|
4315
4938
|
info: {
|
|
4316
|
-
main:
|
|
4317
|
-
light:
|
|
4318
|
-
dark:
|
|
4319
|
-
contrastText:
|
|
4939
|
+
main: tokens43.colors.info,
|
|
4940
|
+
light: tokens43.colors.infoLight,
|
|
4941
|
+
dark: tokens43.colors.infoDark,
|
|
4942
|
+
contrastText: tokens43.colors.white
|
|
4320
4943
|
},
|
|
4321
4944
|
background: {
|
|
4322
|
-
default:
|
|
4323
|
-
paper:
|
|
4945
|
+
default: tokens43.colors.background,
|
|
4946
|
+
paper: tokens43.colors.surface
|
|
4324
4947
|
},
|
|
4325
|
-
divider:
|
|
4948
|
+
divider: tokens43.colors.divider,
|
|
4326
4949
|
text: {
|
|
4327
|
-
primary:
|
|
4328
|
-
secondary:
|
|
4329
|
-
disabled:
|
|
4950
|
+
primary: tokens43.colors.textPrimary,
|
|
4951
|
+
secondary: tokens43.colors.textSecondary,
|
|
4952
|
+
disabled: tokens43.colors.textDisabled
|
|
4330
4953
|
},
|
|
4331
4954
|
common: {
|
|
4332
|
-
black:
|
|
4333
|
-
white:
|
|
4955
|
+
black: tokens43.colors.textPrimary,
|
|
4956
|
+
white: tokens43.colors.white
|
|
4334
4957
|
}
|
|
4335
4958
|
},
|
|
4336
4959
|
shape: {
|
|
4337
|
-
borderRadius:
|
|
4960
|
+
borderRadius: tokens43.radius.md
|
|
4338
4961
|
// 8px default
|
|
4339
4962
|
},
|
|
4340
4963
|
shadows: [
|
|
4341
4964
|
"none",
|
|
4342
|
-
|
|
4965
|
+
tokens43.shadows.card,
|
|
4343
4966
|
// 1
|
|
4344
|
-
|
|
4967
|
+
tokens43.shadows.elevated,
|
|
4345
4968
|
// 2
|
|
4346
|
-
|
|
4969
|
+
tokens43.shadows.deep,
|
|
4347
4970
|
// 3
|
|
4348
|
-
|
|
4971
|
+
tokens43.shadows.bottomSheet,
|
|
4349
4972
|
// 4
|
|
4350
|
-
|
|
4973
|
+
tokens43.shadows.focus,
|
|
4351
4974
|
// 5
|
|
4352
|
-
|
|
4975
|
+
tokens43.shadows.green,
|
|
4353
4976
|
// 6
|
|
4354
|
-
|
|
4977
|
+
tokens43.shadows.earth,
|
|
4355
4978
|
// 7
|
|
4356
4979
|
"none",
|
|
4357
4980
|
"none",
|
|
@@ -4372,45 +4995,45 @@ var mitumbaTheme = createTheme({
|
|
|
4372
4995
|
"none"
|
|
4373
4996
|
],
|
|
4374
4997
|
typography: {
|
|
4375
|
-
fontFamily:
|
|
4376
|
-
fontWeightRegular:
|
|
4377
|
-
fontWeightMedium:
|
|
4378
|
-
fontWeightBold:
|
|
4998
|
+
fontFamily: tokens43.typography.fontFamily,
|
|
4999
|
+
fontWeightRegular: tokens43.typography.fontWeights.regular,
|
|
5000
|
+
fontWeightMedium: tokens43.typography.fontWeights.medium,
|
|
5001
|
+
fontWeightBold: tokens43.typography.fontWeights.bold,
|
|
4379
5002
|
h1: {
|
|
4380
|
-
fontSize: `${
|
|
4381
|
-
fontWeight:
|
|
5003
|
+
fontSize: `${tokens43.typography.fontSizes.display}px`,
|
|
5004
|
+
fontWeight: tokens43.typography.fontWeights.extrabold,
|
|
4382
5005
|
lineHeight: 1.1
|
|
4383
5006
|
},
|
|
4384
5007
|
h2: {
|
|
4385
|
-
fontSize: `${
|
|
4386
|
-
fontWeight:
|
|
5008
|
+
fontSize: `${tokens43.typography.fontSizes.xxxl}px`,
|
|
5009
|
+
fontWeight: tokens43.typography.fontWeights.bold,
|
|
4387
5010
|
lineHeight: 1.2
|
|
4388
5011
|
},
|
|
4389
5012
|
h3: {
|
|
4390
|
-
fontSize: `${
|
|
4391
|
-
fontWeight:
|
|
5013
|
+
fontSize: `${tokens43.typography.fontSizes.xxl}px`,
|
|
5014
|
+
fontWeight: tokens43.typography.fontWeights.bold,
|
|
4392
5015
|
lineHeight: 1.2
|
|
4393
5016
|
},
|
|
4394
5017
|
h4: {
|
|
4395
|
-
fontSize: `${
|
|
4396
|
-
fontWeight:
|
|
5018
|
+
fontSize: `${tokens43.typography.fontSizes.xl}px`,
|
|
5019
|
+
fontWeight: tokens43.typography.fontWeights.bold,
|
|
4397
5020
|
lineHeight: 1.2
|
|
4398
5021
|
},
|
|
4399
5022
|
body1: {
|
|
4400
|
-
fontSize: `${
|
|
5023
|
+
fontSize: `${tokens43.typography.fontSizes.md}px`,
|
|
4401
5024
|
lineHeight: 1.5
|
|
4402
5025
|
},
|
|
4403
5026
|
body2: {
|
|
4404
|
-
fontSize: `${
|
|
5027
|
+
fontSize: `${tokens43.typography.fontSizes.base}px`,
|
|
4405
5028
|
lineHeight: 1.5
|
|
4406
5029
|
},
|
|
4407
5030
|
button: {
|
|
4408
|
-
fontSize: `${
|
|
5031
|
+
fontSize: `${tokens43.typography.fontSizes.base}px`,
|
|
4409
5032
|
fontWeight: 600,
|
|
4410
5033
|
textTransform: "none"
|
|
4411
5034
|
},
|
|
4412
5035
|
caption: {
|
|
4413
|
-
fontSize: `${
|
|
5036
|
+
fontSize: `${tokens43.typography.fontSizes.sm}px`,
|
|
4414
5037
|
lineHeight: 1.5
|
|
4415
5038
|
}
|
|
4416
5039
|
},
|
|
@@ -4418,9 +5041,9 @@ var mitumbaTheme = createTheme({
|
|
|
4418
5041
|
MuiCssBaseline: {
|
|
4419
5042
|
styleOverrides: {
|
|
4420
5043
|
body: {
|
|
4421
|
-
backgroundColor:
|
|
4422
|
-
color:
|
|
4423
|
-
fontFamily:
|
|
5044
|
+
backgroundColor: tokens43.colors.background,
|
|
5045
|
+
color: tokens43.colors.textPrimary,
|
|
5046
|
+
fontFamily: tokens43.typography.fontFamily,
|
|
4424
5047
|
WebkitFontSmoothing: "antialiased",
|
|
4425
5048
|
MozOsxFontSmoothing: "grayscale"
|
|
4426
5049
|
},
|
|
@@ -4435,7 +5058,7 @@ var mitumbaTheme = createTheme({
|
|
|
4435
5058
|
},
|
|
4436
5059
|
styleOverrides: {
|
|
4437
5060
|
root: {
|
|
4438
|
-
borderRadius: `${
|
|
5061
|
+
borderRadius: `${tokens43.radius.md}px`,
|
|
4439
5062
|
transition: transitions.standard,
|
|
4440
5063
|
fontWeight: 600,
|
|
4441
5064
|
"&:hover": {
|
|
@@ -4445,40 +5068,40 @@ var mitumbaTheme = createTheme({
|
|
|
4445
5068
|
transform: "translateY(0) scale(0.98)"
|
|
4446
5069
|
},
|
|
4447
5070
|
"&.Mui-disabled": {
|
|
4448
|
-
backgroundColor:
|
|
4449
|
-
color:
|
|
4450
|
-
borderColor:
|
|
5071
|
+
backgroundColor: tokens43.colors.divider,
|
|
5072
|
+
color: tokens43.colors.textDisabled,
|
|
5073
|
+
borderColor: tokens43.colors.divider
|
|
4451
5074
|
}
|
|
4452
5075
|
},
|
|
4453
5076
|
containedPrimary: {
|
|
4454
|
-
backgroundColor:
|
|
5077
|
+
backgroundColor: tokens43.colors.green,
|
|
4455
5078
|
"&:hover": {
|
|
4456
|
-
backgroundColor:
|
|
4457
|
-
boxShadow:
|
|
5079
|
+
backgroundColor: tokens43.colors.greenDark,
|
|
5080
|
+
boxShadow: tokens43.shadows.green
|
|
4458
5081
|
}
|
|
4459
5082
|
},
|
|
4460
5083
|
containedSecondary: {
|
|
4461
|
-
backgroundColor:
|
|
5084
|
+
backgroundColor: tokens43.colors.earth,
|
|
4462
5085
|
"&:hover": {
|
|
4463
|
-
backgroundColor:
|
|
4464
|
-
boxShadow:
|
|
5086
|
+
backgroundColor: tokens43.colors.earthDark,
|
|
5087
|
+
boxShadow: tokens43.shadows.earth
|
|
4465
5088
|
}
|
|
4466
5089
|
},
|
|
4467
5090
|
outlinedPrimary: {
|
|
4468
5091
|
borderWidth: "2px !important",
|
|
4469
|
-
borderColor:
|
|
4470
|
-
color:
|
|
5092
|
+
borderColor: tokens43.colors.border,
|
|
5093
|
+
color: tokens43.colors.textPrimary,
|
|
4471
5094
|
"&:hover": {
|
|
4472
|
-
backgroundColor:
|
|
4473
|
-
borderColor:
|
|
4474
|
-
color:
|
|
5095
|
+
backgroundColor: tokens43.colors.background,
|
|
5096
|
+
borderColor: tokens43.colors.green,
|
|
5097
|
+
color: tokens43.colors.green
|
|
4475
5098
|
}
|
|
4476
5099
|
},
|
|
4477
5100
|
textPrimary: {
|
|
4478
|
-
color:
|
|
5101
|
+
color: tokens43.colors.textSecondary,
|
|
4479
5102
|
"&:hover": {
|
|
4480
|
-
backgroundColor:
|
|
4481
|
-
color:
|
|
5103
|
+
backgroundColor: tokens43.colors.background,
|
|
5104
|
+
color: tokens43.colors.textPrimary
|
|
4482
5105
|
}
|
|
4483
5106
|
}
|
|
4484
5107
|
}
|
|
@@ -4486,16 +5109,16 @@ var mitumbaTheme = createTheme({
|
|
|
4486
5109
|
MuiCard: {
|
|
4487
5110
|
styleOverrides: {
|
|
4488
5111
|
root: {
|
|
4489
|
-
borderRadius: `${
|
|
4490
|
-
backgroundColor:
|
|
4491
|
-
boxShadow:
|
|
5112
|
+
borderRadius: `${tokens43.radius.xl}px`,
|
|
5113
|
+
backgroundColor: tokens43.colors.surface,
|
|
5114
|
+
boxShadow: tokens43.shadows.card,
|
|
4492
5115
|
transition: transitions.standard,
|
|
4493
5116
|
border: "1px solid",
|
|
4494
|
-
borderColor:
|
|
5117
|
+
borderColor: tokens43.colors.divider,
|
|
4495
5118
|
"&:hover": {
|
|
4496
5119
|
transform: "translateY(-4px)",
|
|
4497
|
-
boxShadow:
|
|
4498
|
-
borderColor:
|
|
5120
|
+
boxShadow: tokens43.shadows.elevated,
|
|
5121
|
+
borderColor: tokens43.colors.border
|
|
4499
5122
|
}
|
|
4500
5123
|
}
|
|
4501
5124
|
}
|
|
@@ -4503,36 +5126,36 @@ var mitumbaTheme = createTheme({
|
|
|
4503
5126
|
MuiPaper: {
|
|
4504
5127
|
styleOverrides: {
|
|
4505
5128
|
rounded: {
|
|
4506
|
-
borderRadius: `${
|
|
5129
|
+
borderRadius: `${tokens43.radius.xl}px`
|
|
4507
5130
|
},
|
|
4508
5131
|
elevation1: {
|
|
4509
|
-
boxShadow:
|
|
5132
|
+
boxShadow: tokens43.shadows.card
|
|
4510
5133
|
}
|
|
4511
5134
|
}
|
|
4512
5135
|
},
|
|
4513
5136
|
MuiOutlinedInput: {
|
|
4514
5137
|
styleOverrides: {
|
|
4515
5138
|
root: {
|
|
4516
|
-
borderRadius: `${
|
|
4517
|
-
backgroundColor:
|
|
5139
|
+
borderRadius: `${tokens43.radius.md}px`,
|
|
5140
|
+
backgroundColor: tokens43.colors.surface,
|
|
4518
5141
|
transition: transitions.standard,
|
|
4519
5142
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
4520
|
-
borderColor:
|
|
5143
|
+
borderColor: tokens43.colors.border,
|
|
4521
5144
|
borderWidth: "1px",
|
|
4522
5145
|
transition: transitions.standard
|
|
4523
5146
|
},
|
|
4524
5147
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
4525
|
-
borderColor:
|
|
5148
|
+
borderColor: tokens43.colors.textDisabled
|
|
4526
5149
|
},
|
|
4527
5150
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
4528
|
-
borderColor:
|
|
5151
|
+
borderColor: tokens43.colors.green,
|
|
4529
5152
|
borderWidth: "2px"
|
|
4530
5153
|
},
|
|
4531
5154
|
"&.Mui-error .MuiOutlinedInput-notchedOutline": {
|
|
4532
|
-
borderColor:
|
|
5155
|
+
borderColor: tokens43.colors.error
|
|
4533
5156
|
},
|
|
4534
5157
|
"&.Mui-focused": {
|
|
4535
|
-
boxShadow:
|
|
5158
|
+
boxShadow: tokens43.shadows.focus
|
|
4536
5159
|
}
|
|
4537
5160
|
}
|
|
4538
5161
|
}
|
|
@@ -4544,7 +5167,7 @@ var mitumbaTheme = createTheme({
|
|
|
4544
5167
|
cursor: "pointer",
|
|
4545
5168
|
"&:hover": {
|
|
4546
5169
|
transform: "perspective(1000px) rotateY(15deg) rotateX(-5deg) scale(1.1)",
|
|
4547
|
-
boxShadow:
|
|
5170
|
+
boxShadow: tokens43.shadows.elevated
|
|
4548
5171
|
},
|
|
4549
5172
|
"&:active": {
|
|
4550
5173
|
transform: "perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05)"
|
|
@@ -4555,8 +5178,8 @@ var mitumbaTheme = createTheme({
|
|
|
4555
5178
|
MuiDialog: {
|
|
4556
5179
|
styleOverrides: {
|
|
4557
5180
|
paper: {
|
|
4558
|
-
borderRadius: `${
|
|
4559
|
-
boxShadow:
|
|
5181
|
+
borderRadius: `${tokens43.radius.xxxl}px`,
|
|
5182
|
+
boxShadow: tokens43.shadows.bottomSheet,
|
|
4560
5183
|
backgroundImage: "none"
|
|
4561
5184
|
}
|
|
4562
5185
|
}
|
|
@@ -4564,7 +5187,7 @@ var mitumbaTheme = createTheme({
|
|
|
4564
5187
|
MuiAlert: {
|
|
4565
5188
|
styleOverrides: {
|
|
4566
5189
|
root: {
|
|
4567
|
-
borderRadius: `${
|
|
5190
|
+
borderRadius: `${tokens43.radius.lg}px`,
|
|
4568
5191
|
alignItems: "center"
|
|
4569
5192
|
}
|
|
4570
5193
|
}
|
|
@@ -4573,13 +5196,13 @@ var mitumbaTheme = createTheme({
|
|
|
4573
5196
|
});
|
|
4574
5197
|
|
|
4575
5198
|
// src/theme/provider.tsx
|
|
4576
|
-
import { jsx as
|
|
5199
|
+
import { jsx as jsx48, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4577
5200
|
function MitumbaThemeProvider({
|
|
4578
5201
|
children,
|
|
4579
5202
|
disableCssBaseline = false
|
|
4580
5203
|
}) {
|
|
4581
|
-
return /* @__PURE__ */
|
|
4582
|
-
!disableCssBaseline && /* @__PURE__ */
|
|
5204
|
+
return /* @__PURE__ */ jsxs30(ThemeProvider, { theme: mitumbaTheme, children: [
|
|
5205
|
+
!disableCssBaseline && /* @__PURE__ */ jsx48(CssBaseline, {}),
|
|
4583
5206
|
children
|
|
4584
5207
|
] });
|
|
4585
5208
|
}
|
|
@@ -4588,21 +5211,28 @@ export {
|
|
|
4588
5211
|
CompleteThisLookPanel,
|
|
4589
5212
|
ConditionBadge,
|
|
4590
5213
|
DeliveryBadge,
|
|
5214
|
+
EmptyState,
|
|
5215
|
+
ErrorState,
|
|
4591
5216
|
EscrowStatusBanner,
|
|
4592
5217
|
ListingCard,
|
|
4593
5218
|
ListingCardSkeleton,
|
|
4594
5219
|
ListingGrid,
|
|
4595
5220
|
ListingImageGallery,
|
|
4596
5221
|
MitumbaAvatar,
|
|
5222
|
+
MitumbaBanner,
|
|
4597
5223
|
MitumbaBreadcrumb,
|
|
4598
5224
|
MitumbaChip,
|
|
4599
5225
|
MitumbaDivider,
|
|
4600
5226
|
MitumbaGrid,
|
|
5227
|
+
MitumbaModal,
|
|
4601
5228
|
MitumbaPrimaryButton,
|
|
4602
5229
|
MitumbaSelect,
|
|
5230
|
+
MitumbaSkeleton,
|
|
4603
5231
|
MitumbaTextField,
|
|
4604
5232
|
MitumbaThemeProvider,
|
|
5233
|
+
MitumbaToast,
|
|
4605
5234
|
MobileBottomNav,
|
|
5235
|
+
OfflineBanner,
|
|
4606
5236
|
OrderStatusTimeline,
|
|
4607
5237
|
PageContainer,
|
|
4608
5238
|
PriceTag,
|