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