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