@mitumba/ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +188 -3
- package/dist/index.d.ts +188 -3
- package/dist/index.js +1719 -1082
- package/dist/index.mjs +1706 -1076
- package/package.json +2 -2
package/dist/index.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,66 @@ 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
|
-
color: import_tokens33.tokens.colors.error,
|
|
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, hoursRemaining, sx }) {
|
|
4247
|
+
const config = {
|
|
4248
|
+
FUNDED: {
|
|
4249
|
+
severity: "info",
|
|
4250
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_Security.default, {}),
|
|
4251
|
+
title: "Payment in Escrow",
|
|
4252
|
+
message: `KES ${amountKes.toLocaleString()} is securely held. We'll release it once you confirm delivery.`
|
|
4253
|
+
},
|
|
4254
|
+
SHIPPED: {
|
|
4255
|
+
severity: "info",
|
|
4256
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_LocalShipping2.default, {}),
|
|
4257
|
+
title: "Item Shipped",
|
|
4258
|
+
message: "The seller has dispatched your item. Track your package and confirm receipt to release funds."
|
|
4259
|
+
},
|
|
4260
|
+
TIMEOUT_WARNING: {
|
|
4261
|
+
severity: "warning",
|
|
4262
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_History.default, {}),
|
|
4263
|
+
title: "Action Required",
|
|
4264
|
+
message: `Only ${hoursRemaining || 24} hours left to confirm delivery before funds are automatically released.`
|
|
4265
|
+
},
|
|
4266
|
+
RELEASED: {
|
|
4267
|
+
severity: "success",
|
|
4268
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_AccountBalanceWallet.default, {}),
|
|
4269
|
+
title: "Payment Released",
|
|
4270
|
+
message: `Funds have been successfully transferred to the seller's wallet. Thank you for shopping!`
|
|
4271
|
+
},
|
|
4272
|
+
REFUNDED: {
|
|
4273
|
+
severity: "error",
|
|
4274
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_ErrorOutline2.default, {}),
|
|
4275
|
+
title: "Payment Refunded",
|
|
4276
|
+
message: `The escrow has been cancelled and KES ${amountKes.toLocaleString()} has been returned to your wallet.`
|
|
4277
|
+
}
|
|
4278
|
+
};
|
|
4279
|
+
const { severity, icon, title, message } = config[status];
|
|
4280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4281
|
+
MitumbaBanner,
|
|
3536
4282
|
{
|
|
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
|
-
]
|
|
4283
|
+
severity,
|
|
4284
|
+
icon,
|
|
4285
|
+
title,
|
|
4286
|
+
sx,
|
|
4287
|
+
children: message
|
|
3658
4288
|
}
|
|
3659
4289
|
);
|
|
3660
4290
|
}
|
|
3661
4291
|
|
|
3662
4292
|
// src/components/vazi/VAZIOutfitCard/VAZIOutfitCard.tsx
|
|
3663
|
-
var
|
|
4293
|
+
var import_Box32 = __toESM(require("@mui/material/Box"));
|
|
3664
4294
|
var import_Card = __toESM(require("@mui/material/Card"));
|
|
3665
4295
|
var import_CardContent = __toESM(require("@mui/material/CardContent"));
|
|
3666
|
-
var
|
|
3667
|
-
var
|
|
3668
|
-
var
|
|
3669
|
-
var
|
|
4296
|
+
var import_Typography22 = __toESM(require("@mui/material/Typography"));
|
|
4297
|
+
var import_tokens39 = require("@mitumba/tokens");
|
|
4298
|
+
var import_react14 = require("react");
|
|
4299
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3670
4300
|
function VAZIOutfitCard({
|
|
3671
4301
|
outfitName,
|
|
3672
4302
|
items,
|
|
@@ -3676,7 +4306,7 @@ function VAZIOutfitCard({
|
|
|
3676
4306
|
onTap,
|
|
3677
4307
|
onBuyAll
|
|
3678
4308
|
}) {
|
|
3679
|
-
const handleKeyDown = (0,
|
|
4309
|
+
const handleKeyDown = (0, import_react14.useCallback)(
|
|
3680
4310
|
(e) => {
|
|
3681
4311
|
if (e.key === "Enter" || e.key === " ") {
|
|
3682
4312
|
e.preventDefault();
|
|
@@ -3685,7 +4315,7 @@ function VAZIOutfitCard({
|
|
|
3685
4315
|
},
|
|
3686
4316
|
[onTap]
|
|
3687
4317
|
);
|
|
3688
|
-
return /* @__PURE__ */ (0,
|
|
4318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3689
4319
|
import_Card.default,
|
|
3690
4320
|
{
|
|
3691
4321
|
onClick: onTap,
|
|
@@ -3693,49 +4323,49 @@ function VAZIOutfitCard({
|
|
|
3693
4323
|
role: "button",
|
|
3694
4324
|
tabIndex: onTap ? 0 : -1,
|
|
3695
4325
|
sx: {
|
|
3696
|
-
borderRadius:
|
|
3697
|
-
boxShadow:
|
|
4326
|
+
borderRadius: import_tokens39.tokens.radius.lg,
|
|
4327
|
+
boxShadow: import_tokens39.tokens.shadows.card,
|
|
3698
4328
|
cursor: onTap ? "pointer" : "default",
|
|
3699
4329
|
display: "flex",
|
|
3700
4330
|
flexDirection: "column",
|
|
3701
4331
|
overflow: "hidden",
|
|
3702
4332
|
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3703
4333
|
width: "100%",
|
|
3704
|
-
backgroundColor:
|
|
3705
|
-
border: `1px solid ${
|
|
4334
|
+
backgroundColor: import_tokens39.tokens.colors.surface,
|
|
4335
|
+
border: `1px solid ${import_tokens39.tokens.colors.divider}`,
|
|
3706
4336
|
"&:hover": onTap ? {
|
|
3707
4337
|
transform: "translateY(-4px)",
|
|
3708
|
-
boxShadow:
|
|
3709
|
-
borderColor:
|
|
4338
|
+
boxShadow: import_tokens39.tokens.shadows.elevated,
|
|
4339
|
+
borderColor: import_tokens39.tokens.colors.earthLight
|
|
3710
4340
|
} : void 0,
|
|
3711
4341
|
"&:focus-visible": {
|
|
3712
|
-
outline: `2px solid ${
|
|
3713
|
-
boxShadow:
|
|
4342
|
+
outline: `2px solid ${import_tokens39.tokens.colors.earthLight}`,
|
|
4343
|
+
boxShadow: import_tokens39.tokens.shadows.focus
|
|
3714
4344
|
}
|
|
3715
4345
|
},
|
|
3716
4346
|
children: [
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3718
|
-
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4348
|
+
import_Box32.default,
|
|
3719
4349
|
{
|
|
3720
4350
|
sx: {
|
|
3721
4351
|
alignItems: "center",
|
|
3722
4352
|
display: "flex",
|
|
3723
|
-
gap:
|
|
3724
|
-
paddingInline:
|
|
3725
|
-
paddingBlock:
|
|
3726
|
-
borderBottom: `1px solid ${
|
|
4353
|
+
gap: import_tokens39.tokens.spacing.sm,
|
|
4354
|
+
paddingInline: import_tokens39.tokens.spacing.base,
|
|
4355
|
+
paddingBlock: import_tokens39.tokens.spacing.base,
|
|
4356
|
+
borderBottom: `1px solid ${import_tokens39.tokens.colors.background}`
|
|
3727
4357
|
},
|
|
3728
4358
|
children: [
|
|
3729
|
-
/* @__PURE__ */ (0,
|
|
3730
|
-
/* @__PURE__ */ (0,
|
|
3731
|
-
|
|
4359
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(VAZIBadge, { size: "small" }),
|
|
4360
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4361
|
+
import_Typography22.default,
|
|
3732
4362
|
{
|
|
3733
4363
|
sx: {
|
|
3734
|
-
color:
|
|
4364
|
+
color: import_tokens39.tokens.colors.textPrimary,
|
|
3735
4365
|
flex: 1,
|
|
3736
|
-
fontSize:
|
|
3737
|
-
fontWeight:
|
|
3738
|
-
lineHeight:
|
|
4366
|
+
fontSize: import_tokens39.tokens.typography.fontSizes.base,
|
|
4367
|
+
fontWeight: import_tokens39.tokens.typography.fontWeights.bold,
|
|
4368
|
+
lineHeight: import_tokens39.tokens.typography.lineHeights.snug,
|
|
3739
4369
|
overflow: "hidden",
|
|
3740
4370
|
textOverflow: "ellipsis",
|
|
3741
4371
|
whiteSpace: "nowrap"
|
|
@@ -3746,42 +4376,42 @@ function VAZIOutfitCard({
|
|
|
3746
4376
|
]
|
|
3747
4377
|
}
|
|
3748
4378
|
),
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
3750
|
-
|
|
4379
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4380
|
+
import_Box32.default,
|
|
3751
4381
|
{
|
|
3752
4382
|
sx: {
|
|
3753
4383
|
display: "flex",
|
|
3754
|
-
gap:
|
|
4384
|
+
gap: import_tokens39.tokens.spacing.sm,
|
|
3755
4385
|
overflowX: "auto",
|
|
3756
|
-
padding:
|
|
3757
|
-
backgroundColor:
|
|
4386
|
+
padding: import_tokens39.tokens.spacing.base,
|
|
4387
|
+
backgroundColor: import_tokens39.tokens.colors.background,
|
|
3758
4388
|
scrollbarWidth: "none",
|
|
3759
4389
|
msOverflowStyle: "none",
|
|
3760
4390
|
"&::-webkit-scrollbar": {
|
|
3761
4391
|
display: "none"
|
|
3762
4392
|
}
|
|
3763
4393
|
},
|
|
3764
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
3765
|
-
|
|
4394
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4395
|
+
import_Box32.default,
|
|
3766
4396
|
{
|
|
3767
4397
|
sx: {
|
|
3768
4398
|
flexShrink: 0,
|
|
3769
4399
|
width: "88px"
|
|
3770
4400
|
},
|
|
3771
4401
|
children: [
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3773
|
-
|
|
4402
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4403
|
+
import_Box32.default,
|
|
3774
4404
|
{
|
|
3775
4405
|
sx: {
|
|
3776
4406
|
aspectRatio: "3 / 4",
|
|
3777
|
-
borderRadius:
|
|
4407
|
+
borderRadius: import_tokens39.tokens.radius.sm,
|
|
3778
4408
|
overflow: "hidden",
|
|
3779
4409
|
width: "100%",
|
|
3780
|
-
backgroundColor:
|
|
3781
|
-
border: `1px solid ${
|
|
4410
|
+
backgroundColor: import_tokens39.tokens.colors.surface,
|
|
4411
|
+
border: `1px solid ${import_tokens39.tokens.colors.divider}`
|
|
3782
4412
|
},
|
|
3783
|
-
children: /* @__PURE__ */ (0,
|
|
3784
|
-
|
|
4413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4414
|
+
import_Box32.default,
|
|
3785
4415
|
{
|
|
3786
4416
|
component: "img",
|
|
3787
4417
|
src: item.imageUrl,
|
|
@@ -3797,16 +4427,16 @@ function VAZIOutfitCard({
|
|
|
3797
4427
|
)
|
|
3798
4428
|
}
|
|
3799
4429
|
),
|
|
3800
|
-
/* @__PURE__ */ (0,
|
|
3801
|
-
|
|
4430
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4431
|
+
import_Typography22.default,
|
|
3802
4432
|
{
|
|
3803
4433
|
sx: {
|
|
3804
|
-
color:
|
|
4434
|
+
color: import_tokens39.tokens.colors.textSecondary,
|
|
3805
4435
|
fontSize: 10,
|
|
3806
|
-
fontWeight:
|
|
4436
|
+
fontWeight: import_tokens39.tokens.typography.fontWeights.semibold,
|
|
3807
4437
|
textTransform: "uppercase",
|
|
3808
|
-
letterSpacing:
|
|
3809
|
-
marginTop:
|
|
4438
|
+
letterSpacing: import_tokens39.tokens.typography.letterSpacings.wide,
|
|
4439
|
+
marginTop: import_tokens39.tokens.spacing.xs,
|
|
3810
4440
|
overflow: "hidden",
|
|
3811
4441
|
textOverflow: "ellipsis",
|
|
3812
4442
|
whiteSpace: "nowrap",
|
|
@@ -3821,31 +4451,31 @@ function VAZIOutfitCard({
|
|
|
3821
4451
|
))
|
|
3822
4452
|
}
|
|
3823
4453
|
),
|
|
3824
|
-
/* @__PURE__ */ (0,
|
|
4454
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3825
4455
|
import_CardContent.default,
|
|
3826
4456
|
{
|
|
3827
4457
|
sx: {
|
|
3828
4458
|
display: "flex",
|
|
3829
4459
|
flexDirection: "column",
|
|
3830
|
-
gap:
|
|
3831
|
-
padding:
|
|
4460
|
+
gap: import_tokens39.tokens.spacing.sm,
|
|
4461
|
+
padding: import_tokens39.tokens.spacing.base,
|
|
3832
4462
|
"&:last-child": {
|
|
3833
|
-
paddingBottom:
|
|
4463
|
+
paddingBottom: import_tokens39.tokens.spacing.base
|
|
3834
4464
|
}
|
|
3835
4465
|
},
|
|
3836
4466
|
children: [
|
|
3837
|
-
/* @__PURE__ */ (0,
|
|
3838
|
-
|
|
4467
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4468
|
+
import_Box32.default,
|
|
3839
4469
|
{
|
|
3840
4470
|
sx: {
|
|
3841
4471
|
alignItems: "center",
|
|
3842
4472
|
display: "flex",
|
|
3843
|
-
gap:
|
|
4473
|
+
gap: import_tokens39.tokens.spacing.sm,
|
|
3844
4474
|
justifyContent: "space-between"
|
|
3845
4475
|
},
|
|
3846
4476
|
children: [
|
|
3847
|
-
/* @__PURE__ */ (0,
|
|
3848
|
-
onBuyAll && /* @__PURE__ */ (0,
|
|
4477
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PriceTag, { priceKes: totalPriceKes, size: "large", color: "earth" }),
|
|
4478
|
+
onBuyAll && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Box32.default, { sx: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3849
4479
|
MitumbaPrimaryButton,
|
|
3850
4480
|
{
|
|
3851
4481
|
label: "Buy all",
|
|
@@ -3863,22 +4493,22 @@ function VAZIOutfitCard({
|
|
|
3863
4493
|
]
|
|
3864
4494
|
}
|
|
3865
4495
|
),
|
|
3866
|
-
sellersCount > 1 && /* @__PURE__ */ (0,
|
|
3867
|
-
|
|
4496
|
+
sellersCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4497
|
+
import_Box32.default,
|
|
3868
4498
|
{
|
|
3869
4499
|
sx: {
|
|
3870
4500
|
display: "flex",
|
|
3871
4501
|
alignItems: "center",
|
|
3872
|
-
gap:
|
|
3873
|
-
mt:
|
|
4502
|
+
gap: import_tokens39.tokens.spacing.xs,
|
|
4503
|
+
mt: import_tokens39.tokens.spacing.xs
|
|
3874
4504
|
},
|
|
3875
4505
|
children: [
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3877
|
-
|
|
4506
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4507
|
+
import_Typography22.default,
|
|
3878
4508
|
{
|
|
3879
4509
|
sx: {
|
|
3880
|
-
color:
|
|
3881
|
-
fontSize:
|
|
4510
|
+
color: import_tokens39.tokens.colors.textSecondary,
|
|
4511
|
+
fontSize: import_tokens39.tokens.typography.fontSizes.sm,
|
|
3882
4512
|
lineHeight: 1
|
|
3883
4513
|
},
|
|
3884
4514
|
children: [
|
|
@@ -3888,26 +4518,26 @@ function VAZIOutfitCard({
|
|
|
3888
4518
|
]
|
|
3889
4519
|
}
|
|
3890
4520
|
),
|
|
3891
|
-
isMultiCity && /* @__PURE__ */ (0,
|
|
3892
|
-
|
|
4521
|
+
isMultiCity && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4522
|
+
import_Box32.default,
|
|
3893
4523
|
{
|
|
3894
4524
|
component: "span",
|
|
3895
4525
|
sx: {
|
|
3896
|
-
fontSize:
|
|
3897
|
-
color:
|
|
4526
|
+
fontSize: import_tokens39.tokens.typography.fontSizes.xs,
|
|
4527
|
+
color: import_tokens39.tokens.colors.textDisabled
|
|
3898
4528
|
},
|
|
3899
4529
|
children: "\u2022"
|
|
3900
4530
|
}
|
|
3901
4531
|
),
|
|
3902
|
-
isMultiCity && /* @__PURE__ */ (0,
|
|
3903
|
-
|
|
4532
|
+
isMultiCity && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4533
|
+
import_Typography22.default,
|
|
3904
4534
|
{
|
|
3905
4535
|
sx: {
|
|
3906
|
-
color:
|
|
3907
|
-
fontSize:
|
|
3908
|
-
fontWeight:
|
|
4536
|
+
color: import_tokens39.tokens.colors.earth,
|
|
4537
|
+
fontSize: import_tokens39.tokens.typography.fontSizes.xs,
|
|
4538
|
+
fontWeight: import_tokens39.tokens.typography.fontWeights.bold,
|
|
3909
4539
|
textTransform: "uppercase",
|
|
3910
|
-
letterSpacing:
|
|
4540
|
+
letterSpacing: import_tokens39.tokens.typography.letterSpacings.wide,
|
|
3911
4541
|
lineHeight: 1
|
|
3912
4542
|
},
|
|
3913
4543
|
children: "Multi-city"
|
|
@@ -3925,78 +4555,78 @@ function VAZIOutfitCard({
|
|
|
3925
4555
|
}
|
|
3926
4556
|
|
|
3927
4557
|
// src/components/vazi/VAZIOutfitCardSkeleton/VAZIOutfitCardSkeleton.tsx
|
|
3928
|
-
var
|
|
4558
|
+
var import_Box33 = __toESM(require("@mui/material/Box"));
|
|
3929
4559
|
var import_Skeleton = __toESM(require("@mui/material/Skeleton"));
|
|
3930
|
-
var
|
|
3931
|
-
var
|
|
4560
|
+
var import_tokens40 = require("@mitumba/tokens");
|
|
4561
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3932
4562
|
var SKELETON_IMAGE_KEYS = ["image-1", "image-2", "image-3", "image-4"];
|
|
3933
4563
|
function VAZIOutfitCardSkeleton() {
|
|
3934
|
-
return /* @__PURE__ */ (0,
|
|
3935
|
-
|
|
4564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4565
|
+
import_Box33.default,
|
|
3936
4566
|
{
|
|
3937
4567
|
sx: {
|
|
3938
|
-
borderRadius:
|
|
3939
|
-
boxShadow:
|
|
4568
|
+
borderRadius: import_tokens40.tokens.radius.lg,
|
|
4569
|
+
boxShadow: import_tokens40.tokens.shadows.card,
|
|
3940
4570
|
display: "flex",
|
|
3941
4571
|
flexDirection: "column",
|
|
3942
4572
|
overflow: "hidden",
|
|
3943
4573
|
width: "100%"
|
|
3944
4574
|
},
|
|
3945
4575
|
children: [
|
|
3946
|
-
/* @__PURE__ */ (0,
|
|
3947
|
-
|
|
4576
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4577
|
+
import_Box33.default,
|
|
3948
4578
|
{
|
|
3949
4579
|
sx: {
|
|
3950
4580
|
alignItems: "center",
|
|
3951
4581
|
display: "flex",
|
|
3952
|
-
gap:
|
|
3953
|
-
paddingInline:
|
|
3954
|
-
paddingBlock:
|
|
4582
|
+
gap: import_tokens40.tokens.spacing.sm,
|
|
4583
|
+
paddingInline: import_tokens40.tokens.spacing.base,
|
|
4584
|
+
paddingBlock: import_tokens40.tokens.spacing.base
|
|
3955
4585
|
},
|
|
3956
4586
|
children: [
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
4587
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3958
4588
|
import_Skeleton.default,
|
|
3959
4589
|
{
|
|
3960
4590
|
"aria-label": "Loading VAZI label",
|
|
3961
4591
|
variant: "rounded",
|
|
3962
4592
|
sx: {
|
|
3963
|
-
borderRadius:
|
|
3964
|
-
height:
|
|
4593
|
+
borderRadius: import_tokens40.tokens.radius.sm,
|
|
4594
|
+
height: import_tokens40.tokens.spacing.lg,
|
|
3965
4595
|
width: 48
|
|
3966
4596
|
}
|
|
3967
4597
|
}
|
|
3968
4598
|
),
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
4599
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3970
4600
|
import_Skeleton.default,
|
|
3971
4601
|
{
|
|
3972
4602
|
"aria-label": "Loading outfit name",
|
|
3973
4603
|
variant: "text",
|
|
3974
4604
|
sx: {
|
|
3975
4605
|
flex: 1,
|
|
3976
|
-
fontSize:
|
|
4606
|
+
fontSize: import_tokens40.tokens.typography.fontSizes.base
|
|
3977
4607
|
}
|
|
3978
4608
|
}
|
|
3979
4609
|
)
|
|
3980
4610
|
]
|
|
3981
4611
|
}
|
|
3982
4612
|
),
|
|
3983
|
-
/* @__PURE__ */ (0,
|
|
3984
|
-
|
|
4613
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4614
|
+
import_Box33.default,
|
|
3985
4615
|
{
|
|
3986
4616
|
sx: {
|
|
3987
4617
|
display: "flex",
|
|
3988
|
-
gap:
|
|
4618
|
+
gap: import_tokens40.tokens.spacing.sm,
|
|
3989
4619
|
overflowX: "auto",
|
|
3990
|
-
paddingInline:
|
|
3991
|
-
paddingBottom:
|
|
4620
|
+
paddingInline: import_tokens40.tokens.spacing.base,
|
|
4621
|
+
paddingBottom: import_tokens40.tokens.spacing.base,
|
|
3992
4622
|
scrollbarWidth: "none",
|
|
3993
4623
|
msOverflowStyle: "none",
|
|
3994
4624
|
"&::-webkit-scrollbar": {
|
|
3995
4625
|
display: "none"
|
|
3996
4626
|
}
|
|
3997
4627
|
},
|
|
3998
|
-
children: SKELETON_IMAGE_KEYS.map((imgKey) => /* @__PURE__ */ (0,
|
|
3999
|
-
|
|
4628
|
+
children: SKELETON_IMAGE_KEYS.map((imgKey) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4629
|
+
import_Box33.default,
|
|
4000
4630
|
{
|
|
4001
4631
|
sx: {
|
|
4002
4632
|
flexShrink: 0,
|
|
@@ -4004,26 +4634,26 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4004
4634
|
minWidth: "88px"
|
|
4005
4635
|
},
|
|
4006
4636
|
children: [
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4637
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4008
4638
|
import_Skeleton.default,
|
|
4009
4639
|
{
|
|
4010
4640
|
"aria-label": `Loading item image ${imgKey.split("-")[1]}`,
|
|
4011
4641
|
variant: "rounded",
|
|
4012
4642
|
sx: {
|
|
4013
4643
|
aspectRatio: "3 / 4",
|
|
4014
|
-
borderRadius:
|
|
4644
|
+
borderRadius: import_tokens40.tokens.radius.md,
|
|
4015
4645
|
width: "100%"
|
|
4016
4646
|
}
|
|
4017
4647
|
}
|
|
4018
4648
|
),
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4649
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4020
4650
|
import_Skeleton.default,
|
|
4021
4651
|
{
|
|
4022
4652
|
"aria-label": `Loading seller name ${imgKey.split("-")[1]}`,
|
|
4023
4653
|
variant: "text",
|
|
4024
4654
|
sx: {
|
|
4025
|
-
fontSize:
|
|
4026
|
-
marginTop:
|
|
4655
|
+
fontSize: import_tokens40.tokens.typography.fontSizes.xs,
|
|
4656
|
+
marginTop: import_tokens40.tokens.spacing.xs,
|
|
4027
4657
|
width: "80%"
|
|
4028
4658
|
}
|
|
4029
4659
|
}
|
|
@@ -4034,45 +4664,45 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4034
4664
|
))
|
|
4035
4665
|
}
|
|
4036
4666
|
),
|
|
4037
|
-
/* @__PURE__ */ (0,
|
|
4038
|
-
|
|
4667
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4668
|
+
import_Box33.default,
|
|
4039
4669
|
{
|
|
4040
4670
|
sx: {
|
|
4041
4671
|
display: "flex",
|
|
4042
4672
|
flexDirection: "column",
|
|
4043
|
-
gap:
|
|
4044
|
-
paddingInline:
|
|
4045
|
-
paddingBlock:
|
|
4673
|
+
gap: import_tokens40.tokens.spacing.sm,
|
|
4674
|
+
paddingInline: import_tokens40.tokens.spacing.base,
|
|
4675
|
+
paddingBlock: import_tokens40.tokens.spacing.base
|
|
4046
4676
|
},
|
|
4047
4677
|
children: [
|
|
4048
|
-
/* @__PURE__ */ (0,
|
|
4049
|
-
|
|
4678
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4679
|
+
import_Box33.default,
|
|
4050
4680
|
{
|
|
4051
4681
|
sx: {
|
|
4052
4682
|
alignItems: "center",
|
|
4053
4683
|
display: "flex",
|
|
4054
|
-
gap:
|
|
4684
|
+
gap: import_tokens40.tokens.spacing.sm,
|
|
4055
4685
|
justifyContent: "space-between"
|
|
4056
4686
|
},
|
|
4057
4687
|
children: [
|
|
4058
|
-
/* @__PURE__ */ (0,
|
|
4688
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4059
4689
|
import_Skeleton.default,
|
|
4060
4690
|
{
|
|
4061
4691
|
"aria-label": "Loading total price",
|
|
4062
4692
|
variant: "text",
|
|
4063
4693
|
sx: {
|
|
4064
|
-
fontSize:
|
|
4694
|
+
fontSize: import_tokens40.tokens.typography.fontSizes.lg,
|
|
4065
4695
|
width: "40%"
|
|
4066
4696
|
}
|
|
4067
4697
|
}
|
|
4068
4698
|
),
|
|
4069
|
-
/* @__PURE__ */ (0,
|
|
4699
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4070
4700
|
import_Skeleton.default,
|
|
4071
4701
|
{
|
|
4072
4702
|
"aria-label": "Loading buy button",
|
|
4073
4703
|
variant: "rounded",
|
|
4074
4704
|
sx: {
|
|
4075
|
-
borderRadius:
|
|
4705
|
+
borderRadius: import_tokens40.tokens.radius.md,
|
|
4076
4706
|
height: "36px",
|
|
4077
4707
|
width: 100
|
|
4078
4708
|
}
|
|
@@ -4081,13 +4711,13 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4081
4711
|
]
|
|
4082
4712
|
}
|
|
4083
4713
|
),
|
|
4084
|
-
/* @__PURE__ */ (0,
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4085
4715
|
import_Skeleton.default,
|
|
4086
4716
|
{
|
|
4087
4717
|
"aria-label": "Loading seller info",
|
|
4088
4718
|
variant: "text",
|
|
4089
4719
|
sx: {
|
|
4090
|
-
fontSize:
|
|
4720
|
+
fontSize: import_tokens40.tokens.typography.fontSizes.sm,
|
|
4091
4721
|
width: "60%"
|
|
4092
4722
|
}
|
|
4093
4723
|
}
|
|
@@ -4101,18 +4731,18 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4101
4731
|
}
|
|
4102
4732
|
|
|
4103
4733
|
// src/components/vazi/VAZIFeedSection/VAZIFeedSection.tsx
|
|
4104
|
-
var
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4107
|
-
var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */ (0,
|
|
4108
|
-
|
|
4734
|
+
var import_Box34 = __toESM(require("@mui/material/Box"));
|
|
4735
|
+
var import_tokens41 = require("@mitumba/tokens");
|
|
4736
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4737
|
+
var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4738
|
+
import_Box34.default,
|
|
4109
4739
|
{
|
|
4110
4740
|
sx: {
|
|
4111
4741
|
flexShrink: 0,
|
|
4112
4742
|
width: { xs: "82%", md: "100%" },
|
|
4113
4743
|
maxWidth: { xs: "340px", md: "none" }
|
|
4114
4744
|
},
|
|
4115
|
-
children: /* @__PURE__ */ (0,
|
|
4745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4116
4746
|
VAZIOutfitCard,
|
|
4117
4747
|
{
|
|
4118
4748
|
outfitName: outfit.outfitName,
|
|
@@ -4127,80 +4757,80 @@ var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */ (0,
|
|
|
4127
4757
|
},
|
|
4128
4758
|
outfit.outfitName
|
|
4129
4759
|
));
|
|
4130
|
-
var renderSkeletons = () => Array.from({ length: 3 }, (_, skeletonIdx) => /* @__PURE__ */ (0,
|
|
4131
|
-
|
|
4760
|
+
var renderSkeletons = () => Array.from({ length: 3 }, (_, skeletonIdx) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4761
|
+
import_Box34.default,
|
|
4132
4762
|
{
|
|
4133
4763
|
sx: {
|
|
4134
4764
|
flexShrink: 0,
|
|
4135
4765
|
width: { xs: "82%", md: "100%" },
|
|
4136
4766
|
maxWidth: { xs: "340px", md: "none" }
|
|
4137
4767
|
},
|
|
4138
|
-
children: /* @__PURE__ */ (0,
|
|
4768
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(VAZIOutfitCardSkeleton, {})
|
|
4139
4769
|
},
|
|
4140
4770
|
`skeleton-${skeletonIdx}`
|
|
4141
4771
|
));
|
|
4142
4772
|
function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
4143
|
-
return /* @__PURE__ */ (0,
|
|
4144
|
-
|
|
4773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4774
|
+
import_Box34.default,
|
|
4145
4775
|
{
|
|
4146
4776
|
sx: {
|
|
4147
4777
|
display: "flex",
|
|
4148
4778
|
flexDirection: "column",
|
|
4149
|
-
gap:
|
|
4779
|
+
gap: import_tokens41.tokens.spacing.base,
|
|
4150
4780
|
width: "100%"
|
|
4151
4781
|
},
|
|
4152
4782
|
children: [
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4154
|
-
|
|
4783
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4784
|
+
import_Box34.default,
|
|
4155
4785
|
{
|
|
4156
4786
|
sx: {
|
|
4157
4787
|
alignItems: "center",
|
|
4158
4788
|
display: "flex",
|
|
4159
4789
|
justifyContent: "space-between",
|
|
4160
|
-
paddingInline: { xs:
|
|
4790
|
+
paddingInline: { xs: import_tokens41.tokens.spacing.base, md: 0 }
|
|
4161
4791
|
},
|
|
4162
4792
|
children: [
|
|
4163
|
-
/* @__PURE__ */ (0,
|
|
4164
|
-
|
|
4793
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4794
|
+
import_Box34.default,
|
|
4165
4795
|
{
|
|
4166
4796
|
component: "h2",
|
|
4167
4797
|
sx: {
|
|
4168
|
-
color:
|
|
4169
|
-
fontFamily:
|
|
4170
|
-
fontSize:
|
|
4171
|
-
fontWeight:
|
|
4172
|
-
lineHeight:
|
|
4798
|
+
color: import_tokens41.tokens.colors.textPrimary,
|
|
4799
|
+
fontFamily: import_tokens41.tokens.typography.fontFamily,
|
|
4800
|
+
fontSize: import_tokens41.tokens.typography.fontSizes.xl,
|
|
4801
|
+
fontWeight: import_tokens41.tokens.typography.fontWeights.bold,
|
|
4802
|
+
lineHeight: import_tokens41.tokens.typography.lineHeights.snug,
|
|
4173
4803
|
margin: 0
|
|
4174
4804
|
},
|
|
4175
4805
|
children: "VAZI Picks"
|
|
4176
4806
|
}
|
|
4177
4807
|
),
|
|
4178
|
-
onSeeAll && /* @__PURE__ */ (0,
|
|
4179
|
-
|
|
4808
|
+
onSeeAll && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4809
|
+
import_Box34.default,
|
|
4180
4810
|
{
|
|
4181
4811
|
component: "button",
|
|
4182
4812
|
onClick: onSeeAll,
|
|
4183
4813
|
sx: {
|
|
4184
4814
|
backgroundColor: "transparent",
|
|
4185
4815
|
border: "none",
|
|
4186
|
-
color:
|
|
4816
|
+
color: import_tokens41.tokens.colors.earth,
|
|
4187
4817
|
cursor: "pointer",
|
|
4188
|
-
fontFamily:
|
|
4189
|
-
fontSize:
|
|
4190
|
-
fontWeight:
|
|
4191
|
-
lineHeight:
|
|
4818
|
+
fontFamily: import_tokens41.tokens.typography.fontFamily,
|
|
4819
|
+
fontSize: import_tokens41.tokens.typography.fontSizes.base,
|
|
4820
|
+
fontWeight: import_tokens41.tokens.typography.fontWeights.semibold,
|
|
4821
|
+
lineHeight: import_tokens41.tokens.typography.lineHeights.normal,
|
|
4192
4822
|
padding: 0,
|
|
4193
4823
|
textDecoration: "none",
|
|
4194
4824
|
transition: "color 200ms ease",
|
|
4195
4825
|
whiteSpace: "nowrap",
|
|
4196
4826
|
"&:hover": {
|
|
4197
|
-
color:
|
|
4827
|
+
color: import_tokens41.tokens.colors.earthDark,
|
|
4198
4828
|
textDecoration: "underline"
|
|
4199
4829
|
},
|
|
4200
4830
|
"&:focus-visible": {
|
|
4201
|
-
outline: `${
|
|
4202
|
-
boxShadow:
|
|
4203
|
-
borderRadius:
|
|
4831
|
+
outline: `${import_tokens41.tokens.spacing.xs}px solid transparent`,
|
|
4832
|
+
boxShadow: import_tokens41.tokens.shadows.focus,
|
|
4833
|
+
borderRadius: import_tokens41.tokens.radius.sm
|
|
4204
4834
|
}
|
|
4205
4835
|
},
|
|
4206
4836
|
children: "See all"
|
|
@@ -4209,16 +4839,16 @@ function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
|
4209
4839
|
]
|
|
4210
4840
|
}
|
|
4211
4841
|
),
|
|
4212
|
-
/* @__PURE__ */ (0,
|
|
4213
|
-
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4843
|
+
import_Box34.default,
|
|
4214
4844
|
{
|
|
4215
4845
|
sx: {
|
|
4216
4846
|
display: { xs: "flex", md: "grid" },
|
|
4217
4847
|
gridTemplateColumns: { md: "repeat(3, 1fr)" },
|
|
4218
|
-
gap:
|
|
4848
|
+
gap: import_tokens41.tokens.spacing.base,
|
|
4219
4849
|
overflowX: { xs: "auto", md: "visible" },
|
|
4220
|
-
paddingInline: { xs:
|
|
4221
|
-
paddingBottom: { xs:
|
|
4850
|
+
paddingInline: { xs: import_tokens41.tokens.spacing.base, md: 0 },
|
|
4851
|
+
paddingBottom: { xs: import_tokens41.tokens.spacing.sm, md: 0 },
|
|
4222
4852
|
scrollbarWidth: "none",
|
|
4223
4853
|
msOverflowStyle: "none",
|
|
4224
4854
|
"&::-webkit-scrollbar": {
|
|
@@ -4234,23 +4864,23 @@ function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
|
4234
4864
|
}
|
|
4235
4865
|
|
|
4236
4866
|
// src/components/vazi/CompleteThisLookPanel/CompleteThisLookPanel.tsx
|
|
4237
|
-
var
|
|
4238
|
-
var
|
|
4239
|
-
var
|
|
4240
|
-
var
|
|
4867
|
+
var import_Box35 = __toESM(require("@mui/material/Box"));
|
|
4868
|
+
var import_Typography23 = __toESM(require("@mui/material/Typography"));
|
|
4869
|
+
var import_tokens42 = require("@mitumba/tokens");
|
|
4870
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4241
4871
|
function CompleteThisLookPanel({ outfits, loading = false }) {
|
|
4242
4872
|
if (!loading && outfits.length === 0) {
|
|
4243
4873
|
return null;
|
|
4244
4874
|
}
|
|
4245
|
-
const renderOutfitCards2 = () => outfits.map((outfit) => /* @__PURE__ */ (0,
|
|
4246
|
-
|
|
4875
|
+
const renderOutfitCards2 = () => outfits.map((outfit) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4876
|
+
import_Box35.default,
|
|
4247
4877
|
{
|
|
4248
4878
|
sx: {
|
|
4249
4879
|
flexShrink: 0,
|
|
4250
4880
|
width: { xs: "82%", md: "100%" },
|
|
4251
4881
|
maxWidth: { xs: "340px", md: "none" }
|
|
4252
4882
|
},
|
|
4253
|
-
children: /* @__PURE__ */ (0,
|
|
4883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4254
4884
|
VAZIOutfitCard,
|
|
4255
4885
|
{
|
|
4256
4886
|
outfitName: outfit.outfitName,
|
|
@@ -4265,51 +4895,51 @@ function CompleteThisLookPanel({ outfits, loading = false }) {
|
|
|
4265
4895
|
},
|
|
4266
4896
|
outfit.outfitName
|
|
4267
4897
|
));
|
|
4268
|
-
const renderSkeletons2 = () => ["skel-0", "skel-1", "skel-2"].map((skelKey) => /* @__PURE__ */ (0,
|
|
4269
|
-
|
|
4898
|
+
const renderSkeletons2 = () => ["skel-0", "skel-1", "skel-2"].map((skelKey) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4899
|
+
import_Box35.default,
|
|
4270
4900
|
{
|
|
4271
4901
|
sx: {
|
|
4272
4902
|
flexShrink: 0,
|
|
4273
4903
|
width: { xs: "82%", md: "100%" },
|
|
4274
4904
|
maxWidth: { xs: "340px", md: "none" }
|
|
4275
4905
|
},
|
|
4276
|
-
children: /* @__PURE__ */ (0,
|
|
4906
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(VAZIOutfitCardSkeleton, {})
|
|
4277
4907
|
},
|
|
4278
4908
|
skelKey
|
|
4279
4909
|
));
|
|
4280
|
-
return /* @__PURE__ */ (0,
|
|
4281
|
-
|
|
4910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4911
|
+
import_Box35.default,
|
|
4282
4912
|
{
|
|
4283
4913
|
sx: {
|
|
4284
4914
|
display: "flex",
|
|
4285
4915
|
flexDirection: "column",
|
|
4286
|
-
gap:
|
|
4916
|
+
gap: import_tokens42.tokens.spacing.base,
|
|
4287
4917
|
width: "100%"
|
|
4288
4918
|
},
|
|
4289
4919
|
children: [
|
|
4290
|
-
/* @__PURE__ */ (0,
|
|
4291
|
-
|
|
4920
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4921
|
+
import_Typography23.default,
|
|
4292
4922
|
{
|
|
4293
4923
|
component: "h2",
|
|
4294
4924
|
sx: {
|
|
4295
|
-
color:
|
|
4296
|
-
fontSize:
|
|
4297
|
-
fontWeight:
|
|
4298
|
-
lineHeight:
|
|
4925
|
+
color: import_tokens42.tokens.colors.textPrimary,
|
|
4926
|
+
fontSize: import_tokens42.tokens.typography.fontSizes.xl,
|
|
4927
|
+
fontWeight: import_tokens42.tokens.typography.fontWeights.bold,
|
|
4928
|
+
lineHeight: import_tokens42.tokens.typography.lineHeights.snug,
|
|
4299
4929
|
margin: 0
|
|
4300
4930
|
},
|
|
4301
4931
|
children: "Complete this look"
|
|
4302
4932
|
}
|
|
4303
4933
|
),
|
|
4304
|
-
/* @__PURE__ */ (0,
|
|
4305
|
-
|
|
4934
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4935
|
+
import_Box35.default,
|
|
4306
4936
|
{
|
|
4307
4937
|
sx: {
|
|
4308
4938
|
display: { xs: "flex", md: "grid" },
|
|
4309
4939
|
gridTemplateColumns: { md: "repeat(3, 1fr)" },
|
|
4310
|
-
gap:
|
|
4940
|
+
gap: import_tokens42.tokens.spacing.base,
|
|
4311
4941
|
overflowX: { xs: "auto", md: "visible" },
|
|
4312
|
-
paddingBottom: { xs:
|
|
4942
|
+
paddingBottom: { xs: import_tokens42.tokens.spacing.sm, md: 0 },
|
|
4313
4943
|
scrollbarWidth: "none",
|
|
4314
4944
|
msOverflowStyle: "none",
|
|
4315
4945
|
"&::-webkit-scrollbar": {
|
|
@@ -4330,7 +4960,7 @@ var import_styles3 = require("@mui/material/styles");
|
|
|
4330
4960
|
|
|
4331
4961
|
// src/theme/theme.ts
|
|
4332
4962
|
var import_styles2 = require("@mui/material/styles");
|
|
4333
|
-
var
|
|
4963
|
+
var import_tokens43 = require("@mitumba/tokens");
|
|
4334
4964
|
var transitions = {
|
|
4335
4965
|
standard: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
4336
4966
|
spring: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
@@ -4339,86 +4969,86 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4339
4969
|
// Spacing factor 4px (Mandate)
|
|
4340
4970
|
spacing: (factor) => `${factor * 4}px`,
|
|
4341
4971
|
breakpoints: {
|
|
4342
|
-
values:
|
|
4972
|
+
values: import_tokens43.tokens.breakpoints
|
|
4343
4973
|
},
|
|
4344
4974
|
palette: {
|
|
4345
4975
|
mode: "light",
|
|
4346
4976
|
primary: {
|
|
4347
|
-
main:
|
|
4348
|
-
light:
|
|
4349
|
-
dark:
|
|
4350
|
-
contrastText:
|
|
4977
|
+
main: import_tokens43.tokens.colors.green,
|
|
4978
|
+
light: import_tokens43.tokens.colors.greenLight,
|
|
4979
|
+
dark: import_tokens43.tokens.colors.greenDark,
|
|
4980
|
+
contrastText: import_tokens43.tokens.colors.textOnGreen
|
|
4351
4981
|
},
|
|
4352
4982
|
secondary: {
|
|
4353
|
-
main:
|
|
4354
|
-
light:
|
|
4355
|
-
dark:
|
|
4356
|
-
contrastText:
|
|
4983
|
+
main: import_tokens43.tokens.colors.earth,
|
|
4984
|
+
light: import_tokens43.tokens.colors.earthLight,
|
|
4985
|
+
dark: import_tokens43.tokens.colors.earthDark,
|
|
4986
|
+
contrastText: import_tokens43.tokens.colors.textOnEarth
|
|
4357
4987
|
},
|
|
4358
4988
|
earth: {
|
|
4359
|
-
main:
|
|
4360
|
-
light:
|
|
4361
|
-
dark:
|
|
4362
|
-
contrastText:
|
|
4989
|
+
main: import_tokens43.tokens.colors.earth,
|
|
4990
|
+
light: import_tokens43.tokens.colors.earthLight,
|
|
4991
|
+
dark: import_tokens43.tokens.colors.earthDark,
|
|
4992
|
+
contrastText: import_tokens43.tokens.colors.textOnEarth
|
|
4363
4993
|
},
|
|
4364
4994
|
success: {
|
|
4365
|
-
main:
|
|
4366
|
-
light:
|
|
4367
|
-
dark:
|
|
4368
|
-
contrastText:
|
|
4995
|
+
main: import_tokens43.tokens.colors.success,
|
|
4996
|
+
light: import_tokens43.tokens.colors.successLight,
|
|
4997
|
+
dark: import_tokens43.tokens.colors.successDark,
|
|
4998
|
+
contrastText: import_tokens43.tokens.colors.textOnGreen
|
|
4369
4999
|
},
|
|
4370
5000
|
error: {
|
|
4371
|
-
main:
|
|
4372
|
-
light:
|
|
4373
|
-
dark:
|
|
4374
|
-
contrastText:
|
|
5001
|
+
main: import_tokens43.tokens.colors.error,
|
|
5002
|
+
light: import_tokens43.tokens.colors.errorLight,
|
|
5003
|
+
dark: import_tokens43.tokens.colors.errorDark,
|
|
5004
|
+
contrastText: import_tokens43.tokens.colors.white
|
|
4375
5005
|
},
|
|
4376
5006
|
warning: {
|
|
4377
|
-
main:
|
|
4378
|
-
light:
|
|
4379
|
-
dark:
|
|
4380
|
-
contrastText:
|
|
5007
|
+
main: import_tokens43.tokens.colors.warning,
|
|
5008
|
+
light: import_tokens43.tokens.colors.warningLight,
|
|
5009
|
+
dark: import_tokens43.tokens.colors.warningDark,
|
|
5010
|
+
contrastText: import_tokens43.tokens.colors.textPrimary
|
|
4381
5011
|
},
|
|
4382
5012
|
info: {
|
|
4383
|
-
main:
|
|
4384
|
-
light:
|
|
4385
|
-
dark:
|
|
4386
|
-
contrastText:
|
|
5013
|
+
main: import_tokens43.tokens.colors.info,
|
|
5014
|
+
light: import_tokens43.tokens.colors.infoLight,
|
|
5015
|
+
dark: import_tokens43.tokens.colors.infoDark,
|
|
5016
|
+
contrastText: import_tokens43.tokens.colors.white
|
|
4387
5017
|
},
|
|
4388
5018
|
background: {
|
|
4389
|
-
default:
|
|
4390
|
-
paper:
|
|
5019
|
+
default: import_tokens43.tokens.colors.background,
|
|
5020
|
+
paper: import_tokens43.tokens.colors.surface
|
|
4391
5021
|
},
|
|
4392
|
-
divider:
|
|
5022
|
+
divider: import_tokens43.tokens.colors.divider,
|
|
4393
5023
|
text: {
|
|
4394
|
-
primary:
|
|
4395
|
-
secondary:
|
|
4396
|
-
disabled:
|
|
5024
|
+
primary: import_tokens43.tokens.colors.textPrimary,
|
|
5025
|
+
secondary: import_tokens43.tokens.colors.textSecondary,
|
|
5026
|
+
disabled: import_tokens43.tokens.colors.textDisabled
|
|
4397
5027
|
},
|
|
4398
5028
|
common: {
|
|
4399
|
-
black:
|
|
4400
|
-
white:
|
|
5029
|
+
black: import_tokens43.tokens.colors.textPrimary,
|
|
5030
|
+
white: import_tokens43.tokens.colors.white
|
|
4401
5031
|
}
|
|
4402
5032
|
},
|
|
4403
5033
|
shape: {
|
|
4404
|
-
borderRadius:
|
|
5034
|
+
borderRadius: import_tokens43.tokens.radius.md
|
|
4405
5035
|
// 8px default
|
|
4406
5036
|
},
|
|
4407
5037
|
shadows: [
|
|
4408
5038
|
"none",
|
|
4409
|
-
|
|
5039
|
+
import_tokens43.tokens.shadows.card,
|
|
4410
5040
|
// 1
|
|
4411
|
-
|
|
5041
|
+
import_tokens43.tokens.shadows.elevated,
|
|
4412
5042
|
// 2
|
|
4413
|
-
|
|
5043
|
+
import_tokens43.tokens.shadows.deep,
|
|
4414
5044
|
// 3
|
|
4415
|
-
|
|
5045
|
+
import_tokens43.tokens.shadows.bottomSheet,
|
|
4416
5046
|
// 4
|
|
4417
|
-
|
|
5047
|
+
import_tokens43.tokens.shadows.focus,
|
|
4418
5048
|
// 5
|
|
4419
|
-
|
|
5049
|
+
import_tokens43.tokens.shadows.green,
|
|
4420
5050
|
// 6
|
|
4421
|
-
|
|
5051
|
+
import_tokens43.tokens.shadows.earth,
|
|
4422
5052
|
// 7
|
|
4423
5053
|
"none",
|
|
4424
5054
|
"none",
|
|
@@ -4439,45 +5069,45 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4439
5069
|
"none"
|
|
4440
5070
|
],
|
|
4441
5071
|
typography: {
|
|
4442
|
-
fontFamily:
|
|
4443
|
-
fontWeightRegular:
|
|
4444
|
-
fontWeightMedium:
|
|
4445
|
-
fontWeightBold:
|
|
5072
|
+
fontFamily: import_tokens43.tokens.typography.fontFamily,
|
|
5073
|
+
fontWeightRegular: import_tokens43.tokens.typography.fontWeights.regular,
|
|
5074
|
+
fontWeightMedium: import_tokens43.tokens.typography.fontWeights.medium,
|
|
5075
|
+
fontWeightBold: import_tokens43.tokens.typography.fontWeights.bold,
|
|
4446
5076
|
h1: {
|
|
4447
|
-
fontSize: `${
|
|
4448
|
-
fontWeight:
|
|
5077
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.display}px`,
|
|
5078
|
+
fontWeight: import_tokens43.tokens.typography.fontWeights.extrabold,
|
|
4449
5079
|
lineHeight: 1.1
|
|
4450
5080
|
},
|
|
4451
5081
|
h2: {
|
|
4452
|
-
fontSize: `${
|
|
4453
|
-
fontWeight:
|
|
5082
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.xxxl}px`,
|
|
5083
|
+
fontWeight: import_tokens43.tokens.typography.fontWeights.bold,
|
|
4454
5084
|
lineHeight: 1.2
|
|
4455
5085
|
},
|
|
4456
5086
|
h3: {
|
|
4457
|
-
fontSize: `${
|
|
4458
|
-
fontWeight:
|
|
5087
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.xxl}px`,
|
|
5088
|
+
fontWeight: import_tokens43.tokens.typography.fontWeights.bold,
|
|
4459
5089
|
lineHeight: 1.2
|
|
4460
5090
|
},
|
|
4461
5091
|
h4: {
|
|
4462
|
-
fontSize: `${
|
|
4463
|
-
fontWeight:
|
|
5092
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.xl}px`,
|
|
5093
|
+
fontWeight: import_tokens43.tokens.typography.fontWeights.bold,
|
|
4464
5094
|
lineHeight: 1.2
|
|
4465
5095
|
},
|
|
4466
5096
|
body1: {
|
|
4467
|
-
fontSize: `${
|
|
5097
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.md}px`,
|
|
4468
5098
|
lineHeight: 1.5
|
|
4469
5099
|
},
|
|
4470
5100
|
body2: {
|
|
4471
|
-
fontSize: `${
|
|
5101
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.base}px`,
|
|
4472
5102
|
lineHeight: 1.5
|
|
4473
5103
|
},
|
|
4474
5104
|
button: {
|
|
4475
|
-
fontSize: `${
|
|
5105
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.base}px`,
|
|
4476
5106
|
fontWeight: 600,
|
|
4477
5107
|
textTransform: "none"
|
|
4478
5108
|
},
|
|
4479
5109
|
caption: {
|
|
4480
|
-
fontSize: `${
|
|
5110
|
+
fontSize: `${import_tokens43.tokens.typography.fontSizes.sm}px`,
|
|
4481
5111
|
lineHeight: 1.5
|
|
4482
5112
|
}
|
|
4483
5113
|
},
|
|
@@ -4485,9 +5115,9 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4485
5115
|
MuiCssBaseline: {
|
|
4486
5116
|
styleOverrides: {
|
|
4487
5117
|
body: {
|
|
4488
|
-
backgroundColor:
|
|
4489
|
-
color:
|
|
4490
|
-
fontFamily:
|
|
5118
|
+
backgroundColor: import_tokens43.tokens.colors.background,
|
|
5119
|
+
color: import_tokens43.tokens.colors.textPrimary,
|
|
5120
|
+
fontFamily: import_tokens43.tokens.typography.fontFamily,
|
|
4491
5121
|
WebkitFontSmoothing: "antialiased",
|
|
4492
5122
|
MozOsxFontSmoothing: "grayscale"
|
|
4493
5123
|
},
|
|
@@ -4502,7 +5132,7 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4502
5132
|
},
|
|
4503
5133
|
styleOverrides: {
|
|
4504
5134
|
root: {
|
|
4505
|
-
borderRadius: `${
|
|
5135
|
+
borderRadius: `${import_tokens43.tokens.radius.md}px`,
|
|
4506
5136
|
transition: transitions.standard,
|
|
4507
5137
|
fontWeight: 600,
|
|
4508
5138
|
"&:hover": {
|
|
@@ -4512,40 +5142,40 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4512
5142
|
transform: "translateY(0) scale(0.98)"
|
|
4513
5143
|
},
|
|
4514
5144
|
"&.Mui-disabled": {
|
|
4515
|
-
backgroundColor:
|
|
4516
|
-
color:
|
|
4517
|
-
borderColor:
|
|
5145
|
+
backgroundColor: import_tokens43.tokens.colors.divider,
|
|
5146
|
+
color: import_tokens43.tokens.colors.textDisabled,
|
|
5147
|
+
borderColor: import_tokens43.tokens.colors.divider
|
|
4518
5148
|
}
|
|
4519
5149
|
},
|
|
4520
5150
|
containedPrimary: {
|
|
4521
|
-
backgroundColor:
|
|
5151
|
+
backgroundColor: import_tokens43.tokens.colors.green,
|
|
4522
5152
|
"&:hover": {
|
|
4523
|
-
backgroundColor:
|
|
4524
|
-
boxShadow:
|
|
5153
|
+
backgroundColor: import_tokens43.tokens.colors.greenDark,
|
|
5154
|
+
boxShadow: import_tokens43.tokens.shadows.green
|
|
4525
5155
|
}
|
|
4526
5156
|
},
|
|
4527
5157
|
containedSecondary: {
|
|
4528
|
-
backgroundColor:
|
|
5158
|
+
backgroundColor: import_tokens43.tokens.colors.earth,
|
|
4529
5159
|
"&:hover": {
|
|
4530
|
-
backgroundColor:
|
|
4531
|
-
boxShadow:
|
|
5160
|
+
backgroundColor: import_tokens43.tokens.colors.earthDark,
|
|
5161
|
+
boxShadow: import_tokens43.tokens.shadows.earth
|
|
4532
5162
|
}
|
|
4533
5163
|
},
|
|
4534
5164
|
outlinedPrimary: {
|
|
4535
5165
|
borderWidth: "2px !important",
|
|
4536
|
-
borderColor:
|
|
4537
|
-
color:
|
|
5166
|
+
borderColor: import_tokens43.tokens.colors.border,
|
|
5167
|
+
color: import_tokens43.tokens.colors.textPrimary,
|
|
4538
5168
|
"&:hover": {
|
|
4539
|
-
backgroundColor:
|
|
4540
|
-
borderColor:
|
|
4541
|
-
color:
|
|
5169
|
+
backgroundColor: import_tokens43.tokens.colors.background,
|
|
5170
|
+
borderColor: import_tokens43.tokens.colors.green,
|
|
5171
|
+
color: import_tokens43.tokens.colors.green
|
|
4542
5172
|
}
|
|
4543
5173
|
},
|
|
4544
5174
|
textPrimary: {
|
|
4545
|
-
color:
|
|
5175
|
+
color: import_tokens43.tokens.colors.textSecondary,
|
|
4546
5176
|
"&:hover": {
|
|
4547
|
-
backgroundColor:
|
|
4548
|
-
color:
|
|
5177
|
+
backgroundColor: import_tokens43.tokens.colors.background,
|
|
5178
|
+
color: import_tokens43.tokens.colors.textPrimary
|
|
4549
5179
|
}
|
|
4550
5180
|
}
|
|
4551
5181
|
}
|
|
@@ -4553,16 +5183,16 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4553
5183
|
MuiCard: {
|
|
4554
5184
|
styleOverrides: {
|
|
4555
5185
|
root: {
|
|
4556
|
-
borderRadius: `${
|
|
4557
|
-
backgroundColor:
|
|
4558
|
-
boxShadow:
|
|
5186
|
+
borderRadius: `${import_tokens43.tokens.radius.xl}px`,
|
|
5187
|
+
backgroundColor: import_tokens43.tokens.colors.surface,
|
|
5188
|
+
boxShadow: import_tokens43.tokens.shadows.card,
|
|
4559
5189
|
transition: transitions.standard,
|
|
4560
5190
|
border: "1px solid",
|
|
4561
|
-
borderColor:
|
|
5191
|
+
borderColor: import_tokens43.tokens.colors.divider,
|
|
4562
5192
|
"&:hover": {
|
|
4563
5193
|
transform: "translateY(-4px)",
|
|
4564
|
-
boxShadow:
|
|
4565
|
-
borderColor:
|
|
5194
|
+
boxShadow: import_tokens43.tokens.shadows.elevated,
|
|
5195
|
+
borderColor: import_tokens43.tokens.colors.border
|
|
4566
5196
|
}
|
|
4567
5197
|
}
|
|
4568
5198
|
}
|
|
@@ -4570,36 +5200,36 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4570
5200
|
MuiPaper: {
|
|
4571
5201
|
styleOverrides: {
|
|
4572
5202
|
rounded: {
|
|
4573
|
-
borderRadius: `${
|
|
5203
|
+
borderRadius: `${import_tokens43.tokens.radius.xl}px`
|
|
4574
5204
|
},
|
|
4575
5205
|
elevation1: {
|
|
4576
|
-
boxShadow:
|
|
5206
|
+
boxShadow: import_tokens43.tokens.shadows.card
|
|
4577
5207
|
}
|
|
4578
5208
|
}
|
|
4579
5209
|
},
|
|
4580
5210
|
MuiOutlinedInput: {
|
|
4581
5211
|
styleOverrides: {
|
|
4582
5212
|
root: {
|
|
4583
|
-
borderRadius: `${
|
|
4584
|
-
backgroundColor:
|
|
5213
|
+
borderRadius: `${import_tokens43.tokens.radius.md}px`,
|
|
5214
|
+
backgroundColor: import_tokens43.tokens.colors.surface,
|
|
4585
5215
|
transition: transitions.standard,
|
|
4586
5216
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
4587
|
-
borderColor:
|
|
5217
|
+
borderColor: import_tokens43.tokens.colors.border,
|
|
4588
5218
|
borderWidth: "1px",
|
|
4589
5219
|
transition: transitions.standard
|
|
4590
5220
|
},
|
|
4591
5221
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
4592
|
-
borderColor:
|
|
5222
|
+
borderColor: import_tokens43.tokens.colors.textDisabled
|
|
4593
5223
|
},
|
|
4594
5224
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
4595
|
-
borderColor:
|
|
5225
|
+
borderColor: import_tokens43.tokens.colors.green,
|
|
4596
5226
|
borderWidth: "2px"
|
|
4597
5227
|
},
|
|
4598
5228
|
"&.Mui-error .MuiOutlinedInput-notchedOutline": {
|
|
4599
|
-
borderColor:
|
|
5229
|
+
borderColor: import_tokens43.tokens.colors.error
|
|
4600
5230
|
},
|
|
4601
5231
|
"&.Mui-focused": {
|
|
4602
|
-
boxShadow:
|
|
5232
|
+
boxShadow: import_tokens43.tokens.shadows.focus
|
|
4603
5233
|
}
|
|
4604
5234
|
}
|
|
4605
5235
|
}
|
|
@@ -4611,7 +5241,7 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4611
5241
|
cursor: "pointer",
|
|
4612
5242
|
"&:hover": {
|
|
4613
5243
|
transform: "perspective(1000px) rotateY(15deg) rotateX(-5deg) scale(1.1)",
|
|
4614
|
-
boxShadow:
|
|
5244
|
+
boxShadow: import_tokens43.tokens.shadows.elevated
|
|
4615
5245
|
},
|
|
4616
5246
|
"&:active": {
|
|
4617
5247
|
transform: "perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05)"
|
|
@@ -4622,8 +5252,8 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4622
5252
|
MuiDialog: {
|
|
4623
5253
|
styleOverrides: {
|
|
4624
5254
|
paper: {
|
|
4625
|
-
borderRadius: `${
|
|
4626
|
-
boxShadow:
|
|
5255
|
+
borderRadius: `${import_tokens43.tokens.radius.xxxl}px`,
|
|
5256
|
+
boxShadow: import_tokens43.tokens.shadows.bottomSheet,
|
|
4627
5257
|
backgroundImage: "none"
|
|
4628
5258
|
}
|
|
4629
5259
|
}
|
|
@@ -4631,7 +5261,7 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4631
5261
|
MuiAlert: {
|
|
4632
5262
|
styleOverrides: {
|
|
4633
5263
|
root: {
|
|
4634
|
-
borderRadius: `${
|
|
5264
|
+
borderRadius: `${import_tokens43.tokens.radius.lg}px`,
|
|
4635
5265
|
alignItems: "center"
|
|
4636
5266
|
}
|
|
4637
5267
|
}
|
|
@@ -4640,13 +5270,13 @@ var mitumbaTheme = (0, import_styles2.createTheme)({
|
|
|
4640
5270
|
});
|
|
4641
5271
|
|
|
4642
5272
|
// src/theme/provider.tsx
|
|
4643
|
-
var
|
|
5273
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4644
5274
|
function MitumbaThemeProvider({
|
|
4645
5275
|
children,
|
|
4646
5276
|
disableCssBaseline = false
|
|
4647
5277
|
}) {
|
|
4648
|
-
return /* @__PURE__ */ (0,
|
|
4649
|
-
!disableCssBaseline && /* @__PURE__ */ (0,
|
|
5278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_styles3.ThemeProvider, { theme: mitumbaTheme, children: [
|
|
5279
|
+
!disableCssBaseline && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_CssBaseline.default, {}),
|
|
4650
5280
|
children
|
|
4651
5281
|
] });
|
|
4652
5282
|
}
|
|
@@ -4656,21 +5286,28 @@ function MitumbaThemeProvider({
|
|
|
4656
5286
|
CompleteThisLookPanel,
|
|
4657
5287
|
ConditionBadge,
|
|
4658
5288
|
DeliveryBadge,
|
|
5289
|
+
EmptyState,
|
|
5290
|
+
ErrorState,
|
|
4659
5291
|
EscrowStatusBanner,
|
|
4660
5292
|
ListingCard,
|
|
4661
5293
|
ListingCardSkeleton,
|
|
4662
5294
|
ListingGrid,
|
|
4663
5295
|
ListingImageGallery,
|
|
4664
5296
|
MitumbaAvatar,
|
|
5297
|
+
MitumbaBanner,
|
|
4665
5298
|
MitumbaBreadcrumb,
|
|
4666
5299
|
MitumbaChip,
|
|
4667
5300
|
MitumbaDivider,
|
|
4668
5301
|
MitumbaGrid,
|
|
5302
|
+
MitumbaModal,
|
|
4669
5303
|
MitumbaPrimaryButton,
|
|
4670
5304
|
MitumbaSelect,
|
|
5305
|
+
MitumbaSkeleton,
|
|
4671
5306
|
MitumbaTextField,
|
|
4672
5307
|
MitumbaThemeProvider,
|
|
5308
|
+
MitumbaToast,
|
|
4673
5309
|
MobileBottomNav,
|
|
5310
|
+
OfflineBanner,
|
|
4674
5311
|
OrderStatusTimeline,
|
|
4675
5312
|
PageContainer,
|
|
4676
5313
|
PriceTag,
|