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