@mitumba/ui 0.1.1

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.js ADDED
@@ -0,0 +1,4687 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ CartItem: () => CartItem,
34
+ CompleteThisLookPanel: () => CompleteThisLookPanel,
35
+ ConditionBadge: () => ConditionBadge,
36
+ DeliveryBadge: () => DeliveryBadge,
37
+ EscrowStatusBanner: () => EscrowStatusBanner,
38
+ ListingCard: () => ListingCard,
39
+ ListingCardSkeleton: () => ListingCardSkeleton,
40
+ ListingGrid: () => ListingGrid,
41
+ ListingImageGallery: () => ListingImageGallery,
42
+ MitumbaAvatar: () => MitumbaAvatar,
43
+ MitumbaBreadcrumb: () => MitumbaBreadcrumb,
44
+ MitumbaChip: () => MitumbaChip,
45
+ MitumbaDivider: () => MitumbaDivider,
46
+ MitumbaGrid: () => MitumbaGrid,
47
+ MitumbaPrimaryButton: () => MitumbaPrimaryButton,
48
+ MitumbaSelect: () => MitumbaSelect,
49
+ MitumbaTextField: () => MitumbaTextField,
50
+ MitumbaThemeProvider: () => MitumbaThemeProvider,
51
+ MobileBottomNav: () => MobileBottomNav,
52
+ OrderStatusTimeline: () => OrderStatusTimeline,
53
+ PageContainer: () => PageContainer,
54
+ PriceTag: () => PriceTag,
55
+ STIBreakdownPanel: () => STIBreakdownPanel,
56
+ STIScoreChip: () => STIScoreChip,
57
+ SectionHeader: () => SectionHeader,
58
+ SellerCard: () => SellerCard,
59
+ TopNav: () => TopNav,
60
+ VAZIBadge: () => VAZIBadge,
61
+ VAZIFeedSection: () => VAZIFeedSection,
62
+ VAZIOutfitCard: () => VAZIOutfitCard,
63
+ VAZIOutfitCardSkeleton: () => VAZIOutfitCardSkeleton,
64
+ mitumbaTheme: () => mitumbaTheme
65
+ });
66
+ module.exports = __toCommonJS(index_exports);
67
+
68
+ // src/components/foundation/MitumbaPrimaryButton/MitumbaPrimaryButton.tsx
69
+ var import_Button = __toESM(require("@mui/material/Button"));
70
+ var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
71
+ var import_Box = __toESM(require("@mui/material/Box"));
72
+ var import_tokens = require("@mitumba/tokens");
73
+ var import_jsx_runtime = require("react/jsx-runtime");
74
+ function MitumbaPrimaryButton({
75
+ label,
76
+ onClick,
77
+ loading = false,
78
+ disabled = false,
79
+ icon,
80
+ iconPosition = "left",
81
+ fullWidth = false,
82
+ size = "medium",
83
+ variant = "primary",
84
+ sx
85
+ }) {
86
+ const isDisabled = disabled || loading;
87
+ const isIconOnly = !label && !!icon;
88
+ const sizeConfig = {
89
+ small: { height: 32, px: 4, fontSize: import_tokens.tokens.typography.fontSizes.sm },
90
+ medium: { height: 42, px: 6, fontSize: import_tokens.tokens.typography.fontSizes.base },
91
+ large: { height: 52, px: 8, fontSize: import_tokens.tokens.typography.fontSizes.md }
92
+ };
93
+ const currentSize = sizeConfig[size];
94
+ const muiVariantMap = {
95
+ primary: "contained",
96
+ secondary: "contained",
97
+ earth: "contained",
98
+ success: "contained",
99
+ error: "contained",
100
+ outline: "outlined",
101
+ ghost: "text"
102
+ };
103
+ const muiColorMap = {
104
+ primary: "primary",
105
+ secondary: "secondary",
106
+ earth: "secondary",
107
+ success: "success",
108
+ error: "error",
109
+ outline: "primary",
110
+ ghost: "inherit"
111
+ };
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
113
+ import_Button.default,
114
+ {
115
+ variant: muiVariantMap[variant],
116
+ color: muiColorMap[variant],
117
+ disabled: isDisabled,
118
+ fullWidth,
119
+ onClick,
120
+ "aria-busy": loading || void 0,
121
+ disableElevation: true,
122
+ sx: [
123
+ {
124
+ height: currentSize.height,
125
+ minWidth: isIconOnly ? currentSize.height : "auto",
126
+ paddingInline: isIconOnly ? 0 : (theme) => theme.spacing(currentSize.px),
127
+ borderRadius: import_tokens.tokens.radius.md,
128
+ fontSize: currentSize.fontSize,
129
+ fontWeight: 600,
130
+ fontFamily: import_tokens.tokens.typography.fontFamily,
131
+ textTransform: "none",
132
+ position: "relative",
133
+ overflow: "hidden",
134
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
135
+ // Inherited from benchmark
136
+ "&:hover": {
137
+ transform: "translateY(-2px) scale(1.02)"
138
+ },
139
+ "&:active": {
140
+ transform: "translateY(0) scale(0.98)"
141
+ }
142
+ },
143
+ ...Array.isArray(sx) ? sx : [sx]
144
+ ],
145
+ children: [
146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
147
+ import_Box.default,
148
+ {
149
+ sx: {
150
+ display: "flex",
151
+ alignItems: "center",
152
+ justifyContent: "center",
153
+ gap: import_tokens.tokens.spacing.sm,
154
+ opacity: loading ? 0 : 1,
155
+ transform: loading ? "scale(0.9)" : "scale(1)",
156
+ transition: "all 0.2s ease",
157
+ width: "100%",
158
+ flexDirection: iconPosition === "left" ? "row" : "row-reverse"
159
+ },
160
+ children: [
161
+ icon,
162
+ label
163
+ ]
164
+ }
165
+ ),
166
+ loading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
167
+ import_Box.default,
168
+ {
169
+ sx: {
170
+ position: "absolute",
171
+ inset: 0,
172
+ display: "flex",
173
+ alignItems: "center",
174
+ justifyContent: "center",
175
+ color: "inherit"
176
+ },
177
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
178
+ import_CircularProgress.default,
179
+ {
180
+ size: currentSize.height * 0.4,
181
+ color: "inherit",
182
+ "aria-label": `${label || "Button"} loading`
183
+ }
184
+ )
185
+ }
186
+ )
187
+ ]
188
+ }
189
+ );
190
+ }
191
+
192
+ // src/components/foundation/MitumbaTextField/MitumbaTextField.tsx
193
+ var import_react = __toESM(require("react"));
194
+ var import_TextField = __toESM(require("@mui/material/TextField"));
195
+ var import_Box2 = __toESM(require("@mui/material/Box"));
196
+ var import_Typography = __toESM(require("@mui/material/Typography"));
197
+ var import_InputAdornment = __toESM(require("@mui/material/InputAdornment"));
198
+ var import_IconButton = __toESM(require("@mui/material/IconButton"));
199
+ var import_CheckCircle = __toESM(require("@mui/icons-material/CheckCircle"));
200
+ var import_Error = __toESM(require("@mui/icons-material/Error"));
201
+ var import_Warning = __toESM(require("@mui/icons-material/Warning"));
202
+ var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
203
+ var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
204
+ var import_tokens2 = require("@mitumba/tokens");
205
+ var import_jsx_runtime2 = require("react/jsx-runtime");
206
+ function MitumbaTextField({
207
+ label,
208
+ hint,
209
+ value,
210
+ onChange,
211
+ helperText,
212
+ error,
213
+ size = "medium",
214
+ rounding = "rounded",
215
+ status,
216
+ prefix,
217
+ suffix,
218
+ endButton,
219
+ type = "text",
220
+ disabled = false,
221
+ multiline = false,
222
+ rows = 4,
223
+ readOnly = false,
224
+ sx
225
+ }) {
226
+ const id = (0, import_react.useId)();
227
+ const [showPassword, setShowPassword] = (0, import_react.useState)(false);
228
+ const currentStatus = error ? "error" : status;
229
+ const sizeConfig = {
230
+ small: { height: 32, fontSize: import_tokens2.tokens.typography.fontSizes.sm, iconSize: 18 },
231
+ medium: { height: 42, fontSize: import_tokens2.tokens.typography.fontSizes.base, iconSize: 20 },
232
+ large: { height: 52, fontSize: import_tokens2.tokens.typography.fontSizes.md, iconSize: 24 }
233
+ };
234
+ const radiusMap = {
235
+ pill: import_tokens2.tokens.radius.full,
236
+ rounded: import_tokens2.tokens.radius.md
237
+ };
238
+ const currentSize = sizeConfig[size];
239
+ const borderRadius = radiusMap[rounding];
240
+ const statusConfig = {
241
+ success: { color: import_tokens2.tokens.colors.success, icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_CheckCircle.default, {}) },
242
+ error: { color: import_tokens2.tokens.colors.error, icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Error.default, {}) },
243
+ warning: { color: import_tokens2.tokens.colors.warning, icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Warning.default, {}) }
244
+ };
245
+ const activeStatus = currentStatus ? statusConfig[currentStatus] : null;
246
+ let inputType = type;
247
+ if (type === "password") {
248
+ inputType = showPassword ? "text" : "password";
249
+ }
250
+ const handleTogglePassword = () => setShowPassword((prev) => !prev);
251
+ const renderEndAdornment = () => {
252
+ if (!suffix && !activeStatus && type !== "password") return null;
253
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_InputAdornment.default, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_Box2.default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
254
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Box2.default, { sx: { color: import_tokens2.tokens.colors.textSecondary, display: "flex" }, children: import_react.default.isValidElement(suffix) ? import_react.default.cloneElement(suffix, { sx: { fontSize: currentSize.iconSize } }) : suffix }),
255
+ type === "password" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
256
+ import_IconButton.default,
257
+ {
258
+ onClick: handleTogglePassword,
259
+ edge: "end",
260
+ size: "small",
261
+ sx: { color: import_tokens2.tokens.colors.textSecondary, p: 0.5 },
262
+ children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_VisibilityOff.default, { sx: { fontSize: currentSize.iconSize } }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Visibility.default, { sx: { fontSize: currentSize.iconSize } })
263
+ }
264
+ ),
265
+ activeStatus && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Box2.default, { sx: { color: activeStatus.color, display: "flex" }, children: import_react.default.cloneElement(activeStatus.icon, { sx: { fontSize: currentSize.iconSize } }) })
266
+ ] }) });
267
+ };
268
+ const fieldStyles = [
269
+ {
270
+ "& .MuiOutlinedInput-root": {
271
+ height: multiline ? "auto" : currentSize.height,
272
+ borderRadius: `${borderRadius}px`,
273
+ bgcolor: import_tokens2.tokens.colors.surface,
274
+ fontSize: currentSize.fontSize,
275
+ fontWeight: 600,
276
+ fontFamily: import_tokens2.tokens.typography.fontFamily,
277
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
278
+ // Issue Fix: Square corners if integrated button is present
279
+ ...endButton && {
280
+ borderTopRightRadius: 0,
281
+ borderBottomRightRadius: 0
282
+ },
283
+ "& .MuiOutlinedInput-notchedOutline": {
284
+ borderColor: currentStatus ? statusConfig[currentStatus].color : import_tokens2.tokens.colors.divider,
285
+ borderWidth: currentStatus ? "2px" : "1px",
286
+ transition: "inherit"
287
+ },
288
+ "&:hover .MuiOutlinedInput-notchedOutline": {
289
+ borderColor: currentStatus ? statusConfig[currentStatus].color : import_tokens2.tokens.colors.textDisabled
290
+ },
291
+ "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
292
+ borderColor: currentStatus ? statusConfig[currentStatus].color : import_tokens2.tokens.colors.green,
293
+ borderWidth: "2px"
294
+ },
295
+ "&.Mui-focused": {
296
+ boxShadow: currentStatus ? "none" : import_tokens2.tokens.shadows.focus
297
+ },
298
+ "&.Mui-disabled": {
299
+ bgcolor: import_tokens2.tokens.colors.background,
300
+ "& .MuiOutlinedInput-notchedOutline": {
301
+ borderColor: import_tokens2.tokens.colors.divider
302
+ }
303
+ }
304
+ },
305
+ "& .MuiInputBase-input": {
306
+ py: 0,
307
+ height: "100%",
308
+ "&::placeholder": {
309
+ color: import_tokens2.tokens.colors.textDisabled,
310
+ opacity: 1
311
+ }
312
+ },
313
+ "& .MuiInputBase-inputMultiline": {
314
+ py: 1.5
315
+ }
316
+ },
317
+ ...Array.isArray(sx) ? sx : [sx]
318
+ ];
319
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_Box2.default, { sx: { width: "100%" }, children: [
320
+ label && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
321
+ import_Typography.default,
322
+ {
323
+ variant: "caption",
324
+ component: "label",
325
+ htmlFor: id,
326
+ sx: {
327
+ mb: 0.5,
328
+ display: "block",
329
+ fontWeight: 700,
330
+ color: currentStatus ? statusConfig[currentStatus].color : import_tokens2.tokens.colors.textSecondary,
331
+ textTransform: "uppercase",
332
+ letterSpacing: "0.05em",
333
+ fontFamily: import_tokens2.tokens.typography.fontFamily,
334
+ ml: rounding === "pill" ? 2 : 1
335
+ },
336
+ children: label
337
+ }
338
+ ),
339
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_Box2.default, { sx: { display: "flex", width: "100%", alignItems: "flex-start" }, children: [
340
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
341
+ import_TextField.default,
342
+ {
343
+ id,
344
+ placeholder: hint,
345
+ value,
346
+ onChange: (e) => onChange(e.target.value),
347
+ type: inputType,
348
+ disabled,
349
+ multiline,
350
+ rows: multiline ? rows : void 0,
351
+ fullWidth: true,
352
+ error: currentStatus === "error",
353
+ slotProps: {
354
+ input: {
355
+ readOnly,
356
+ startAdornment: prefix && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_InputAdornment.default, { position: "start", sx: { color: import_tokens2.tokens.colors.textSecondary, ml: rounding === "pill" ? 1 : 0 }, children: import_react.default.isValidElement(prefix) ? import_react.default.cloneElement(prefix, { sx: { fontSize: currentSize.iconSize } }) : prefix }),
357
+ endAdornment: renderEndAdornment()
358
+ }
359
+ },
360
+ sx: fieldStyles
361
+ }
362
+ ),
363
+ endButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
364
+ import_Box2.default,
365
+ {
366
+ sx: {
367
+ height: currentSize.height,
368
+ display: "flex",
369
+ // Inject styles to the button to make it integrated
370
+ "& > button": {
371
+ height: "100% !important",
372
+ borderTopLeftRadius: "0 !important",
373
+ borderBottomLeftRadius: "0 !important",
374
+ borderLeft: "none !important",
375
+ // If the input has a 2px focused border, we might need a small overlap or adjustment
376
+ ml: "-1px",
377
+ borderRadius: rounding === "pill" ? `0 ${import_tokens2.tokens.radius.full}px ${import_tokens2.tokens.radius.full}px 0` : `0 ${import_tokens2.tokens.radius.md}px ${import_tokens2.tokens.radius.md}px 0`
378
+ }
379
+ },
380
+ children: endButton
381
+ }
382
+ )
383
+ ] }),
384
+ (helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
385
+ import_Typography.default,
386
+ {
387
+ variant: "caption",
388
+ sx: {
389
+ mt: 0.5,
390
+ ml: rounding === "pill" ? 2 : 1,
391
+ display: "block",
392
+ fontWeight: 600,
393
+ color: currentStatus ? statusConfig[currentStatus].color : import_tokens2.tokens.colors.textSecondary,
394
+ fontFamily: import_tokens2.tokens.typography.fontFamily
395
+ },
396
+ children: error || helperText
397
+ }
398
+ )
399
+ ] });
400
+ }
401
+
402
+ // src/components/foundation/MitumbaSelect/MitumbaSelect.tsx
403
+ var import_react2 = __toESM(require("react"));
404
+ var import_MenuItem = __toESM(require("@mui/material/MenuItem"));
405
+ var import_Select = __toESM(require("@mui/material/Select"));
406
+ var import_InputLabel = __toESM(require("@mui/material/InputLabel"));
407
+ var import_FormControl = __toESM(require("@mui/material/FormControl"));
408
+ var import_FormHelperText = __toESM(require("@mui/material/FormHelperText"));
409
+ var import_ListSubheader = __toESM(require("@mui/material/ListSubheader"));
410
+ var import_Box3 = __toESM(require("@mui/material/Box"));
411
+ var import_Typography2 = __toESM(require("@mui/material/Typography"));
412
+ var import_InputAdornment2 = __toESM(require("@mui/material/InputAdornment"));
413
+ var import_TextField2 = __toESM(require("@mui/material/TextField"));
414
+ var import_Checkbox = __toESM(require("@mui/material/Checkbox"));
415
+ var import_Check = __toESM(require("@mui/icons-material/Check"));
416
+ var import_Search = __toESM(require("@mui/icons-material/Search"));
417
+ var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArrowDown"));
418
+ var import_tokens3 = require("@mitumba/tokens");
419
+ var import_jsx_runtime3 = require("react/jsx-runtime");
420
+ function MitumbaSelect({
421
+ value,
422
+ name,
423
+ label,
424
+ placeholder,
425
+ options,
426
+ onChange,
427
+ size = "medium",
428
+ rounding = "rounded",
429
+ multiple = false,
430
+ loading = false,
431
+ error,
432
+ disabled = false,
433
+ showSearch = false,
434
+ inverted = false,
435
+ startIcon,
436
+ displayValue,
437
+ sx
438
+ }) {
439
+ const [searchTerm, setSearchIcon] = (0, import_react2.useState)("");
440
+ const labelId = (0, import_react2.useMemo)(() => `select-label-${label?.replace(/\s+/g, "-").toLowerCase() || Math.random().toString(36).substr(2, 9)}`, [label]);
441
+ const sizeConfig = {
442
+ small: { height: 32, fontSize: import_tokens3.tokens.typography.fontSizes.sm, iconSize: 16 },
443
+ medium: { height: 42, fontSize: import_tokens3.tokens.typography.fontSizes.base, iconSize: 20 },
444
+ large: { height: 52, fontSize: import_tokens3.tokens.typography.fontSizes.md, iconSize: 24 }
445
+ };
446
+ const radiusMap = {
447
+ pill: import_tokens3.tokens.radius.full,
448
+ rounded: import_tokens3.tokens.radius.md,
449
+ square: import_tokens3.tokens.radius.xs
450
+ };
451
+ const currentSize = sizeConfig[size];
452
+ const borderRadius = radiusMap[rounding];
453
+ const menuBorderRadius = import_tokens3.tokens.radius.md;
454
+ const filteredOptions = (0, import_react2.useMemo)(() => {
455
+ if (!showSearch || !searchTerm) return options;
456
+ return options.filter(
457
+ (opt) => opt.label.toLowerCase().includes(searchTerm.toLowerCase()) || opt.subtitle?.toLowerCase().includes(searchTerm.toLowerCase())
458
+ );
459
+ }, [options, searchTerm, showSearch]);
460
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_FormControl.default, { fullWidth: true, error: !!error, disabled: disabled || loading, children: [
461
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
462
+ import_InputLabel.default,
463
+ {
464
+ id: labelId,
465
+ shrink: true,
466
+ sx: {
467
+ position: "relative",
468
+ transform: "none",
469
+ mb: 0.5,
470
+ ml: rounding === "pill" ? 2 : 1,
471
+ fontSize: import_tokens3.tokens.typography.fontSizes.xs,
472
+ fontWeight: 700,
473
+ color: error ? `${import_tokens3.tokens.colors.error} !important` : `${import_tokens3.tokens.colors.textSecondary} !important`,
474
+ textTransform: "uppercase",
475
+ letterSpacing: "0.05em",
476
+ fontFamily: import_tokens3.tokens.typography.fontFamily
477
+ },
478
+ children: label
479
+ }
480
+ ),
481
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
482
+ import_Select.default,
483
+ {
484
+ labelId,
485
+ id: name,
486
+ name,
487
+ multiple,
488
+ value,
489
+ onChange: (e) => onChange(e.target.value),
490
+ displayEmpty: true,
491
+ IconComponent: import_KeyboardArrowDown.default,
492
+ renderValue: (selected) => {
493
+ if (displayValue) return displayValue;
494
+ if (selected === "" || Array.isArray(selected) && selected.length === 0) {
495
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Typography2.default, { sx: { color: import_tokens3.tokens.colors.textDisabled, fontSize: "inherit" }, children: placeholder || "Select option" });
496
+ }
497
+ if (multiple && Array.isArray(selected)) {
498
+ return `Selected ${selected.length} items`;
499
+ }
500
+ const selectedOpt = options.find((opt) => opt.value === selected);
501
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_Box3.default, { sx: { display: "flex", alignItems: "center", gap: 1.5 }, children: [
502
+ selectedOpt?.icon,
503
+ selectedOpt?.label || selected
504
+ ] });
505
+ },
506
+ MenuProps: {
507
+ PaperProps: {
508
+ sx: {
509
+ mt: 1,
510
+ borderRadius: `${menuBorderRadius}px`,
511
+ boxShadow: import_tokens3.tokens.shadows.deep,
512
+ border: `1px solid ${import_tokens3.tokens.colors.divider}`,
513
+ bgcolor: inverted ? import_tokens3.tokens.colors.textPrimary : import_tokens3.tokens.colors.surface,
514
+ color: inverted ? import_tokens3.tokens.colors.white : import_tokens3.tokens.colors.textPrimary,
515
+ overflow: "hidden",
516
+ // Ensure no overflow from subheaders
517
+ "& .MuiMenuItem-root": {
518
+ py: 1.5,
519
+ px: 2,
520
+ transition: "all 0.2s ease",
521
+ "&:hover": {
522
+ bgcolor: inverted ? "rgba(255,255,255,0.1)" : import_tokens3.tokens.colors.background
523
+ },
524
+ "&.Mui-selected": {
525
+ bgcolor: inverted ? "rgba(255,255,255,0.15)" : `${import_tokens3.tokens.colors.green}15`,
526
+ color: inverted ? import_tokens3.tokens.colors.white : import_tokens3.tokens.colors.green,
527
+ fontWeight: 700,
528
+ "&:hover": {
529
+ bgcolor: inverted ? "rgba(255,255,255,0.2)" : `${import_tokens3.tokens.colors.green}25`
530
+ }
531
+ }
532
+ }
533
+ }
534
+ }
535
+ },
536
+ sx: [
537
+ {
538
+ height: currentSize.height,
539
+ borderRadius: `${borderRadius}px`,
540
+ bgcolor: import_tokens3.tokens.colors.surface,
541
+ fontFamily: import_tokens3.tokens.typography.fontFamily,
542
+ fontSize: currentSize.fontSize,
543
+ fontWeight: 600,
544
+ "& .MuiOutlinedInput-notchedOutline": {
545
+ borderColor: import_tokens3.tokens.colors.divider,
546
+ borderWidth: "1px",
547
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
548
+ },
549
+ "&:hover .MuiOutlinedInput-notchedOutline": {
550
+ borderColor: import_tokens3.tokens.colors.textDisabled
551
+ },
552
+ "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
553
+ borderColor: import_tokens3.tokens.colors.green,
554
+ borderWidth: "2px"
555
+ },
556
+ "& .MuiSelect-select": {
557
+ display: "flex",
558
+ alignItems: "center",
559
+ pl: startIcon ? 0 : 2
560
+ },
561
+ "& .MuiSelect-icon": {
562
+ color: import_tokens3.tokens.colors.textSecondary,
563
+ right: 12,
564
+ transition: "transform 0.3s ease"
565
+ },
566
+ "&.Mui-focused .MuiSelect-icon": {
567
+ transform: "rotate(180deg)",
568
+ color: import_tokens3.tokens.colors.green
569
+ }
570
+ },
571
+ ...Array.isArray(sx) ? sx : [sx]
572
+ ],
573
+ startAdornment: startIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_InputAdornment2.default, { position: "start", sx: { ml: 1.5, color: import_tokens3.tokens.colors.textSecondary }, children: import_react2.default.cloneElement(startIcon, { sx: { fontSize: currentSize.iconSize } }) }),
574
+ children: [
575
+ showSearch && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Box3.default, { sx: { px: 2, py: 1, position: "sticky", top: 0, bgcolor: "inherit", zIndex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
576
+ import_TextField2.default,
577
+ {
578
+ size: "small",
579
+ fullWidth: true,
580
+ placeholder: "Search...",
581
+ value: searchTerm,
582
+ onChange: (e) => setSearchIcon(e.target.value),
583
+ onClick: (e) => e.stopPropagation(),
584
+ onKeyDown: (e) => e.stopPropagation(),
585
+ InputProps: {
586
+ startAdornment: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_InputAdornment2.default, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Search.default, { sx: { fontSize: 18, color: import_tokens3.tokens.colors.textDisabled } }) }),
587
+ sx: { borderRadius: `${menuBorderRadius / 2}px`, bgcolor: "rgba(0,0,0,0.03)" }
588
+ }
589
+ }
590
+ ) }),
591
+ filteredOptions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_MenuItem.default, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Typography2.default, { variant: "body2", color: "text.secondary", children: "No options found" }) }),
592
+ (() => {
593
+ let lastGroup = "";
594
+ const elements = [];
595
+ filteredOptions.forEach((option) => {
596
+ if (option.group && option.group !== lastGroup) {
597
+ elements.push(
598
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
599
+ import_ListSubheader.default,
600
+ {
601
+ sx: {
602
+ bgcolor: "transparent",
603
+ color: import_tokens3.tokens.colors.textSecondary,
604
+ fontWeight: 800,
605
+ fontSize: 10,
606
+ textTransform: "uppercase",
607
+ letterSpacing: "0.1em",
608
+ lineHeight: "32px",
609
+ fontFamily: import_tokens3.tokens.typography.fontFamily
610
+ },
611
+ children: option.group
612
+ },
613
+ `group-${option.group}`
614
+ )
615
+ );
616
+ lastGroup = option.group;
617
+ }
618
+ elements.push(
619
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
620
+ import_MenuItem.default,
621
+ {
622
+ value: option.value,
623
+ disabled: option.disabled,
624
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_Box3.default, { sx: { display: "flex", alignItems: "center", width: "100%", gap: 2 }, children: [
625
+ multiple && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
626
+ import_Checkbox.default,
627
+ {
628
+ checked: Array.isArray(value) && value.includes(option.value),
629
+ size: "small",
630
+ sx: { p: 0 }
631
+ }
632
+ ),
633
+ option.icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Box3.default, { sx: { display: "flex", color: import_tokens3.tokens.colors.textSecondary }, children: import_react2.default.cloneElement(option.icon, { sx: { fontSize: 20 } }) }),
634
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_Box3.default, { sx: { flexGrow: 1, display: "flex", flexDirection: "column" }, children: [
635
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Typography2.default, { variant: "body2", sx: { fontWeight: "inherit", color: "inherit" }, children: option.label }),
636
+ option.subtitle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Typography2.default, { variant: "caption", sx: { color: "text.secondary", fontWeight: 400 }, children: option.subtitle })
637
+ ] }),
638
+ !multiple && value === option.value && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Check.default, { sx: { fontSize: 18, color: import_tokens3.tokens.colors.green } })
639
+ ] })
640
+ },
641
+ option.value
642
+ )
643
+ );
644
+ });
645
+ return elements;
646
+ })()
647
+ ]
648
+ }
649
+ ),
650
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_FormHelperText.default, { sx: { ml: 1, fontWeight: 600 }, children: error })
651
+ ] });
652
+ }
653
+
654
+ // src/components/foundation/MitumbaChip/MitumbaChip.tsx
655
+ var import_react3 = require("react");
656
+ var import_Chip = __toESM(require("@mui/material/Chip"));
657
+ var import_Box4 = __toESM(require("@mui/material/Box"));
658
+ var import_Typography3 = __toESM(require("@mui/material/Typography"));
659
+ var import_Circle = __toESM(require("@mui/icons-material/Circle"));
660
+ var import_tokens4 = require("@mitumba/tokens");
661
+ var import_jsx_runtime4 = require("react/jsx-runtime");
662
+ function MitumbaChip({
663
+ label,
664
+ onClick,
665
+ onDelete,
666
+ selected,
667
+ disabled = false,
668
+ icon,
669
+ avatar,
670
+ badge,
671
+ variant = "outline",
672
+ status = "default",
673
+ rounding = "rounded",
674
+ size = "medium",
675
+ color: propColor,
676
+ sx
677
+ }) {
678
+ const isClickable = !!onClick || !!onDelete;
679
+ const statusConfig = (0, import_react3.useMemo)(() => {
680
+ const config = {
681
+ default: { color: import_tokens4.tokens.colors.textSecondary, bgColor: "transparent", borderColor: import_tokens4.tokens.colors.divider },
682
+ active: { color: import_tokens4.tokens.colors.info, bgColor: `${import_tokens4.tokens.colors.info}10`, borderColor: import_tokens4.tokens.colors.info, icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Circle.default, { sx: { fontSize: 6 } }) },
683
+ incomplete: { color: import_tokens4.tokens.colors.warning, bgColor: `${import_tokens4.tokens.colors.warning}10`, borderColor: import_tokens4.tokens.colors.warning },
684
+ danger: { color: import_tokens4.tokens.colors.error, bgColor: `${import_tokens4.tokens.colors.error}10`, borderColor: import_tokens4.tokens.colors.error },
685
+ success: { color: import_tokens4.tokens.colors.green, bgColor: `${import_tokens4.tokens.colors.green}10`, borderColor: import_tokens4.tokens.colors.green },
686
+ common: { color: import_tokens4.tokens.colors.textPrimary, bgColor: "transparent", borderColor: import_tokens4.tokens.colors.divider },
687
+ special: { color: import_tokens4.tokens.colors.white, bgColor: import_tokens4.tokens.colors.earth, borderColor: "transparent" }
688
+ };
689
+ return config[status];
690
+ }, [status]);
691
+ const activeColor = propColor ? import_tokens4.tokens.colors[propColor] || propColor : statusConfig.color;
692
+ let activeBg = "transparent";
693
+ if (variant === "solid") {
694
+ activeBg = activeColor;
695
+ } else if (variant === "soft") {
696
+ activeBg = `${activeColor}15`;
697
+ }
698
+ if (selected) {
699
+ activeBg = activeColor;
700
+ }
701
+ let activeBorder = "transparent";
702
+ if (variant === "outline" && !selected) {
703
+ activeBorder = propColor ? activeColor : statusConfig.borderColor;
704
+ }
705
+ let borderRadius = `${import_tokens4.tokens.radius.md}px`;
706
+ if (rounding === "pill") {
707
+ borderRadius = import_tokens4.tokens.radius.full;
708
+ } else if (rounding === "square") {
709
+ borderRadius = `${import_tokens4.tokens.radius.xs}px`;
710
+ }
711
+ const styles = (0, import_react3.useMemo)(() => ({
712
+ height: size === "small" ? 22 : 28,
713
+ borderRadius,
714
+ backgroundColor: activeBg,
715
+ color: variant === "solid" || selected ? import_tokens4.tokens.colors.white : activeColor,
716
+ border: activeBorder !== "transparent" ? `1.5px solid ${activeBorder}` : "none",
717
+ transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
718
+ fontFamily: import_tokens4.tokens.typography.fontFamily,
719
+ fontWeight: 800,
720
+ textTransform: "uppercase",
721
+ letterSpacing: "0.02em",
722
+ "& .MuiChip-label": {
723
+ px: 1.2,
724
+ fontSize: size === "small" ? 9 : 10
725
+ },
726
+ "&:hover": isClickable && !disabled ? {
727
+ transform: "translateY(-1px)",
728
+ boxShadow: import_tokens4.tokens.shadows.card,
729
+ backgroundColor: variant === "solid" || selected ? activeColor : `${activeColor}20`
730
+ } : {},
731
+ "&:active": isClickable && !disabled ? {
732
+ transform: "scale(0.96)"
733
+ } : {},
734
+ "& .MuiChip-deleteIcon": {
735
+ fontSize: 14,
736
+ color: "inherit",
737
+ opacity: 0.7,
738
+ "&:hover": { opacity: 1 }
739
+ },
740
+ "& .MuiChip-icon": {
741
+ marginLeft: "6px !important",
742
+ marginRight: "-4px !important",
743
+ color: "inherit"
744
+ }
745
+ }), [size, borderRadius, variant, selected, activeBg, activeColor, activeBorder, isClickable, disabled]);
746
+ const displayIcon = icon || statusConfig.icon;
747
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
748
+ import_Chip.default,
749
+ {
750
+ label: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_Box4.default, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
751
+ label,
752
+ badge !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Typography3.default, { variant: "caption", sx: { fontSize: 9, fontWeight: 900, ml: 0.5, opacity: 0.8 }, children: badge })
753
+ ] }),
754
+ onClick,
755
+ onDelete,
756
+ disabled,
757
+ icon: displayIcon,
758
+ avatar,
759
+ sx: [styles, ...Array.isArray(sx) ? sx : [sx]],
760
+ role: isClickable ? "button" : "status"
761
+ }
762
+ );
763
+ }
764
+
765
+ // src/components/foundation/MitumbaAvatar/MitumbaAvatar.tsx
766
+ var import_react4 = __toESM(require("react"));
767
+ var import_Avatar = __toESM(require("@mui/material/Avatar"));
768
+ var import_Box5 = __toESM(require("@mui/material/Box"));
769
+ var import_Typography4 = __toESM(require("@mui/material/Typography"));
770
+ var import_Person = __toESM(require("@mui/icons-material/Person"));
771
+ var import_Check2 = __toESM(require("@mui/icons-material/Check"));
772
+ var import_Add = __toESM(require("@mui/icons-material/Add"));
773
+ var import_tokens5 = require("@mitumba/tokens");
774
+ var import_jsx_runtime5 = require("react/jsx-runtime");
775
+ var sizeMap = {
776
+ xs: 24,
777
+ sm: 32,
778
+ md: 44,
779
+ lg: 64,
780
+ xl: 80
781
+ };
782
+ var fontSizeMap = {
783
+ xs: 10,
784
+ sm: 12,
785
+ md: 16,
786
+ lg: 20,
787
+ xl: 24
788
+ };
789
+ function MitumbaAvatar({
790
+ name,
791
+ imageUrl,
792
+ size = "md",
793
+ badge,
794
+ status,
795
+ actionIcon,
796
+ notificationCount,
797
+ notificationColor,
798
+ subtitle,
799
+ textAlignment,
800
+ hasNewEvent,
801
+ progress,
802
+ selected,
803
+ isStacked,
804
+ isCTA,
805
+ overflowCount,
806
+ onClick
807
+ }) {
808
+ const dimension = sizeMap[size];
809
+ const initials = (0, import_react4.useMemo)(() => {
810
+ if (!name) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Person.default, { sx: { fontSize: dimension * 0.6 } });
811
+ const words = name.trim().split(/\s+/);
812
+ if (words.length === 1 && words[0]) return words[0].slice(0, 2).toUpperCase();
813
+ if (words.length >= 2) return (words[0][0] + words[1][0]).toUpperCase();
814
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Person.default, { sx: { fontSize: dimension * 0.6 } });
815
+ }, [name, dimension]);
816
+ const renderAvatarCircle = () => {
817
+ if (isCTA) {
818
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
819
+ import_Avatar.default,
820
+ {
821
+ sx: {
822
+ width: dimension,
823
+ height: dimension,
824
+ bgcolor: import_tokens5.tokens.colors.background,
825
+ color: import_tokens5.tokens.colors.textSecondary,
826
+ border: `2px dashed ${import_tokens5.tokens.colors.border}`,
827
+ cursor: "pointer",
828
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
829
+ "&:hover": {
830
+ bgcolor: import_tokens5.tokens.colors.greenLight,
831
+ borderColor: import_tokens5.tokens.colors.green,
832
+ color: import_tokens5.tokens.colors.green
833
+ }
834
+ },
835
+ children: actionIcon || /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Add.default, {})
836
+ }
837
+ );
838
+ }
839
+ if (overflowCount !== void 0) {
840
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
841
+ import_Avatar.default,
842
+ {
843
+ sx: {
844
+ width: dimension,
845
+ height: dimension,
846
+ bgcolor: import_tokens5.tokens.colors.divider,
847
+ color: import_tokens5.tokens.colors.textPrimary,
848
+ fontSize: fontSizeMap[size],
849
+ fontWeight: "bold",
850
+ border: `2px solid ${import_tokens5.tokens.colors.surface}`
851
+ },
852
+ children: [
853
+ "+",
854
+ overflowCount
855
+ ]
856
+ }
857
+ );
858
+ }
859
+ const hasBorderDecorator = hasNewEvent || progress !== void 0;
860
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Box5.default, { sx: { position: "relative", width: dimension, height: dimension, display: "flex", alignItems: "center", justifyContent: "center" }, children: [
861
+ hasBorderDecorator && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
862
+ import_Box5.default,
863
+ {
864
+ component: "svg",
865
+ viewBox: "0 0 100 100",
866
+ sx: {
867
+ position: "absolute",
868
+ // Absolute mathematical centering via translate
869
+ width: dimension + 12,
870
+ height: dimension + 12,
871
+ top: "50%",
872
+ left: "50%",
873
+ transform: "translate(-50%, -50%) rotate(-90deg)",
874
+ zIndex: 0,
875
+ pointerEvents: "none",
876
+ overflow: "visible"
877
+ },
878
+ children: [
879
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "50", cy: "50", r: "44", fill: "none", stroke: import_tokens5.tokens.colors.divider, strokeWidth: "2", opacity: "0.2" }),
880
+ progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
881
+ import_Box5.default,
882
+ {
883
+ component: "circle",
884
+ cx: "50",
885
+ cy: "50",
886
+ r: "44",
887
+ fill: "none",
888
+ stroke: import_tokens5.tokens.colors.green,
889
+ strokeWidth: "3",
890
+ strokeDasharray: "276",
891
+ strokeLinecap: "round",
892
+ sx: {
893
+ transition: "stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1)",
894
+ strokeDashoffset: 276 - 276 * progress / 100,
895
+ transformOrigin: "center",
896
+ animation: "anime-progress 2.5s ease-out forwards",
897
+ "@keyframes anime-progress": {
898
+ "0%": { strokeDasharray: "2 15" },
899
+ "60%": { strokeDasharray: "15 10" },
900
+ "100%": { strokeDasharray: "276" }
901
+ // Segment length controlled by dashoffset
902
+ }
903
+ }
904
+ }
905
+ ),
906
+ hasNewEvent && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
907
+ import_Box5.default,
908
+ {
909
+ component: "circle",
910
+ cx: "50",
911
+ cy: "50",
912
+ r: "44",
913
+ fill: "none",
914
+ stroke: import_tokens5.tokens.colors.green,
915
+ strokeWidth: "3",
916
+ strokeLinecap: "round",
917
+ sx: {
918
+ transformOrigin: "center",
919
+ animation: "event-spin 3s linear infinite, event-solidify 2s ease-in-out forwards",
920
+ "@keyframes event-spin": {
921
+ "0%": { transform: "rotate(0deg)" },
922
+ "100%": { transform: "rotate(360deg)" }
923
+ },
924
+ "@keyframes event-solidify": {
925
+ "0%": { strokeDasharray: "5 25" },
926
+ "70%": { strokeDasharray: "60 10" },
927
+ "100%": { strokeDasharray: "276" }
928
+ }
929
+ }
930
+ }
931
+ )
932
+ ]
933
+ }
934
+ ),
935
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
936
+ import_Avatar.default,
937
+ {
938
+ alt: name,
939
+ src: imageUrl,
940
+ sx: {
941
+ width: "100%",
942
+ height: "100%",
943
+ fontSize: fontSizeMap[size],
944
+ fontFamily: import_tokens5.tokens.typography.fontFamily,
945
+ fontWeight: import_tokens5.tokens.typography.fontWeights.extrabold,
946
+ bgcolor: imageUrl ? "transparent" : import_tokens5.tokens.colors.green,
947
+ color: import_tokens5.tokens.colors.textOnGreen,
948
+ border: selected ? `2px solid ${import_tokens5.tokens.colors.green}` : `1px solid ${import_tokens5.tokens.colors.divider}`,
949
+ boxShadow: import_tokens5.tokens.shadows.card,
950
+ transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
951
+ zIndex: 1,
952
+ ...isStacked && {
953
+ border: `2px solid ${import_tokens5.tokens.colors.surface}`
954
+ }
955
+ },
956
+ children: !imageUrl && initials
957
+ }
958
+ ),
959
+ selected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
960
+ import_Box5.default,
961
+ {
962
+ sx: {
963
+ position: "absolute",
964
+ bottom: -2,
965
+ right: -2,
966
+ width: Math.max(16, dimension * 0.35),
967
+ height: Math.max(16, dimension * 0.35),
968
+ bgcolor: import_tokens5.tokens.colors.green,
969
+ borderRadius: import_tokens5.tokens.radius.full,
970
+ display: "flex",
971
+ alignItems: "center",
972
+ justifyContent: "center",
973
+ color: import_tokens5.tokens.colors.white,
974
+ boxShadow: import_tokens5.tokens.shadows.deep,
975
+ border: `2px solid ${import_tokens5.tokens.colors.surface}`,
976
+ zIndex: 3,
977
+ transform: "translateZ(25px)"
978
+ },
979
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Check2.default, { sx: { fontSize: "70%" } })
980
+ }
981
+ ),
982
+ notificationCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
983
+ import_Box5.default,
984
+ {
985
+ sx: {
986
+ position: "absolute",
987
+ top: -2,
988
+ right: -2,
989
+ minWidth: 18,
990
+ height: 18,
991
+ bgcolor: notificationColor || import_tokens5.tokens.colors.error,
992
+ borderRadius: import_tokens5.tokens.radius.full,
993
+ color: import_tokens5.tokens.colors.white,
994
+ display: "flex",
995
+ alignItems: "center",
996
+ justifyContent: "center",
997
+ fontSize: 10,
998
+ fontWeight: "bold",
999
+ border: `2px solid ${import_tokens5.tokens.colors.surface}`,
1000
+ zIndex: 2,
1001
+ px: 0.5,
1002
+ transform: "translateZ(20px)"
1003
+ },
1004
+ children: notificationCount
1005
+ }
1006
+ ),
1007
+ status && !actionIcon && !selected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1008
+ import_Box5.default,
1009
+ {
1010
+ sx: {
1011
+ position: "absolute",
1012
+ bottom: 2,
1013
+ right: 2,
1014
+ width: dimension * 0.25,
1015
+ height: dimension * 0.25,
1016
+ minWidth: 10,
1017
+ minHeight: 10,
1018
+ bgcolor: status === "online" ? import_tokens5.tokens.colors.success : import_tokens5.tokens.colors.textDisabled,
1019
+ borderRadius: import_tokens5.tokens.radius.full,
1020
+ border: `2px solid ${import_tokens5.tokens.colors.surface}`,
1021
+ zIndex: 2,
1022
+ transform: "translateZ(15px)"
1023
+ }
1024
+ }
1025
+ ),
1026
+ actionIcon && !selected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1027
+ import_Box5.default,
1028
+ {
1029
+ sx: {
1030
+ position: "absolute",
1031
+ bottom: -2,
1032
+ right: -2,
1033
+ width: dimension * 0.4,
1034
+ height: dimension * 0.4,
1035
+ minWidth: 24,
1036
+ minHeight: 24,
1037
+ bgcolor: import_tokens5.tokens.colors.surface,
1038
+ borderRadius: import_tokens5.tokens.radius.full,
1039
+ color: import_tokens5.tokens.colors.textPrimary,
1040
+ display: "flex",
1041
+ alignItems: "center",
1042
+ justifyContent: "center",
1043
+ border: `1px solid ${import_tokens5.tokens.colors.divider}`,
1044
+ boxShadow: import_tokens5.tokens.shadows.card,
1045
+ zIndex: 2,
1046
+ transform: "translateZ(20px)",
1047
+ transition: "all 0.2s ease",
1048
+ "&:hover": {
1049
+ bgcolor: import_tokens5.tokens.colors.background,
1050
+ color: import_tokens5.tokens.colors.green,
1051
+ transform: "translateZ(25px) scale(1.1)"
1052
+ }
1053
+ },
1054
+ children: import_react4.default.cloneElement(actionIcon, { sx: { fontSize: dimension * 0.2 } })
1055
+ }
1056
+ ),
1057
+ badge && !selected && !actionIcon && !status && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1058
+ import_Box5.default,
1059
+ {
1060
+ sx: {
1061
+ position: "absolute",
1062
+ bottom: -2,
1063
+ right: -2,
1064
+ width: dimension * 0.4,
1065
+ height: dimension * 0.4,
1066
+ minWidth: 20,
1067
+ minHeight: 20,
1068
+ bgcolor: import_tokens5.tokens.colors.surface,
1069
+ borderRadius: import_tokens5.tokens.radius.full,
1070
+ color: import_tokens5.tokens.colors.textPrimary,
1071
+ display: "flex",
1072
+ alignItems: "center",
1073
+ justifyContent: "center",
1074
+ border: `1px solid ${import_tokens5.tokens.colors.divider}`,
1075
+ boxShadow: import_tokens5.tokens.shadows.card,
1076
+ zIndex: 2,
1077
+ transform: "translateZ(20px)"
1078
+ },
1079
+ children: badge
1080
+ }
1081
+ )
1082
+ ] });
1083
+ };
1084
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1085
+ import_Box5.default,
1086
+ {
1087
+ onClick,
1088
+ sx: {
1089
+ display: "inline-flex",
1090
+ flexDirection: textAlignment === "bottom" ? "column" : "row",
1091
+ alignItems: "center",
1092
+ gap: import_tokens5.tokens.spacing.xxs,
1093
+ cursor: onClick ? "pointer" : "default",
1094
+ perspective: "1000px",
1095
+ "&:hover .avatar-main": {
1096
+ transform: "rotateY(15deg) rotateX(-5deg) scale(1.1)",
1097
+ filter: "brightness(1.05)"
1098
+ },
1099
+ "&:active .avatar-main": {
1100
+ transform: "scale(1.02)"
1101
+ }
1102
+ },
1103
+ children: [
1104
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1105
+ import_Box5.default,
1106
+ {
1107
+ className: "avatar-main",
1108
+ sx: {
1109
+ position: "relative",
1110
+ width: dimension,
1111
+ height: dimension,
1112
+ display: "flex",
1113
+ alignItems: "center",
1114
+ justifyContent: "center",
1115
+ transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
1116
+ transformStyle: "preserve-3d"
1117
+ },
1118
+ children: renderAvatarCircle()
1119
+ }
1120
+ ),
1121
+ (name || subtitle || progress !== void 0) && textAlignment && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1122
+ import_Box5.default,
1123
+ {
1124
+ sx: {
1125
+ textAlign: textAlignment === "bottom" ? "center" : "left",
1126
+ // Tightened vertical/horizontal gap
1127
+ display: "flex",
1128
+ flexDirection: "column",
1129
+ justifyContent: "center"
1130
+ },
1131
+ children: [
1132
+ name && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1133
+ import_Typography4.default,
1134
+ {
1135
+ sx: {
1136
+ fontWeight: import_tokens5.tokens.typography.fontWeights.bold,
1137
+ fontSize: import_tokens5.tokens.typography.fontSizes.base,
1138
+ color: import_tokens5.tokens.colors.textPrimary,
1139
+ lineHeight: 1.1,
1140
+ fontFamily: import_tokens5.tokens.typography.fontFamily,
1141
+ whiteSpace: "nowrap"
1142
+ },
1143
+ children: name
1144
+ }
1145
+ ),
1146
+ (subtitle || progress !== void 0 && textAlignment === "bottom") && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1147
+ import_Typography4.default,
1148
+ {
1149
+ sx: {
1150
+ fontSize: import_tokens5.tokens.typography.fontSizes.sm,
1151
+ color: status === "online" && textAlignment === "side" ? import_tokens5.tokens.colors.success : import_tokens5.tokens.colors.textSecondary,
1152
+ fontWeight: status === "online" ? "bold" : "normal",
1153
+ mt: "1px",
1154
+ fontFamily: import_tokens5.tokens.typography.fontFamily,
1155
+ whiteSpace: "nowrap"
1156
+ },
1157
+ children: progress !== void 0 && textAlignment === "bottom" ? `${progress}% complete` : subtitle
1158
+ }
1159
+ )
1160
+ ]
1161
+ }
1162
+ )
1163
+ ]
1164
+ }
1165
+ );
1166
+ }
1167
+
1168
+ // src/components/foundation/MitumbaGlass/MitumbaGlass.tsx
1169
+ var import_Box6 = __toESM(require("@mui/material/Box"));
1170
+ var import_tokens6 = require("@mitumba/tokens");
1171
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1172
+
1173
+ // src/components/selection/MitumbaCheckbox/MitumbaCheckbox.tsx
1174
+ var import_react5 = require("react");
1175
+ var import_Checkbox2 = __toESM(require("@mui/material/Checkbox"));
1176
+ var import_FormControlLabel = __toESM(require("@mui/material/FormControlLabel"));
1177
+ var import_tokens7 = require("@mitumba/tokens");
1178
+ var import_CheckBox = __toESM(require("@mui/icons-material/CheckBox"));
1179
+ var import_CheckBoxOutlineBlank = __toESM(require("@mui/icons-material/CheckBoxOutlineBlank"));
1180
+ var import_IndeterminateCheckBox = __toESM(require("@mui/icons-material/IndeterminateCheckBox"));
1181
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1182
+
1183
+ // src/components/selection/MitumbaRadio/MitumbaRadio.tsx
1184
+ var import_Radio = __toESM(require("@mui/material/Radio"));
1185
+ var import_FormControlLabel2 = __toESM(require("@mui/material/FormControlLabel"));
1186
+ var import_tokens8 = require("@mitumba/tokens");
1187
+ var import_RadioButtonUnchecked = __toESM(require("@mui/icons-material/RadioButtonUnchecked"));
1188
+ var import_RadioButtonChecked = __toESM(require("@mui/icons-material/RadioButtonChecked"));
1189
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1190
+
1191
+ // src/components/selection/MitumbaSwitch/MitumbaSwitch.tsx
1192
+ var import_Switch = __toESM(require("@mui/material/Switch"));
1193
+ var import_FormControlLabel3 = __toESM(require("@mui/material/FormControlLabel"));
1194
+ var import_tokens9 = require("@mitumba/tokens");
1195
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1196
+
1197
+ // src/components/selection/MitumbaSlider/MitumbaSlider.tsx
1198
+ var import_Slider = __toESM(require("@mui/material/Slider"));
1199
+ var import_Box7 = __toESM(require("@mui/material/Box"));
1200
+ var import_Typography5 = __toESM(require("@mui/material/Typography"));
1201
+ var import_tokens10 = require("@mitumba/tokens");
1202
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1203
+
1204
+ // src/components/selection/MitumbaDatePicker/MitumbaDatePicker.tsx
1205
+ var import_react6 = require("react");
1206
+ var import_Popover = __toESM(require("@mui/material/Popover"));
1207
+ var import_Box8 = __toESM(require("@mui/material/Box"));
1208
+ var import_Typography6 = __toESM(require("@mui/material/Typography"));
1209
+ var import_IconButton2 = __toESM(require("@mui/material/IconButton"));
1210
+ var import_CalendarToday = __toESM(require("@mui/icons-material/CalendarToday"));
1211
+ var import_ChevronLeft = __toESM(require("@mui/icons-material/ChevronLeft"));
1212
+ var import_ChevronRight = __toESM(require("@mui/icons-material/ChevronRight"));
1213
+ var import_tokens11 = require("@mitumba/tokens");
1214
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1215
+
1216
+ // src/components/layout/PageContainer/PageContainer.tsx
1217
+ var import_Box9 = __toESM(require("@mui/material/Box"));
1218
+ var import_tokens12 = require("@mitumba/tokens");
1219
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1220
+ var maxWidthValues = {
1221
+ sm: 640,
1222
+ md: 900,
1223
+ lg: 1280,
1224
+ xl: 1536
1225
+ };
1226
+ function PageContainer({
1227
+ children,
1228
+ maxWidth = "lg",
1229
+ noPadding = false
1230
+ }) {
1231
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1232
+ import_Box9.default,
1233
+ {
1234
+ sx: {
1235
+ mx: "auto",
1236
+ maxWidth: maxWidthValues[maxWidth],
1237
+ px: noPadding ? 0 : {
1238
+ xs: import_tokens12.tokens.spacing.base,
1239
+ md: import_tokens12.tokens.spacing.lg,
1240
+ lg: import_tokens12.tokens.spacing.xl
1241
+ },
1242
+ width: "100%"
1243
+ },
1244
+ children
1245
+ }
1246
+ );
1247
+ }
1248
+
1249
+ // src/components/layout/SectionHeader/SectionHeader.tsx
1250
+ var import_Box10 = __toESM(require("@mui/material/Box"));
1251
+ var import_Typography7 = __toESM(require("@mui/material/Typography"));
1252
+ var import_tokens13 = require("@mitumba/tokens");
1253
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1254
+ function SectionHeader({
1255
+ title,
1256
+ subtitle,
1257
+ overline,
1258
+ action,
1259
+ align = "left",
1260
+ variant = "standard",
1261
+ sx,
1262
+ actionLabel,
1263
+ onAction
1264
+ }) {
1265
+ const isCentered = align === "center";
1266
+ const isLarge = variant === "large";
1267
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1268
+ import_Box10.default,
1269
+ {
1270
+ sx: [
1271
+ {
1272
+ width: "100%",
1273
+ display: "flex",
1274
+ flexDirection: isCentered ? "column" : "row",
1275
+ alignItems: isCentered ? "center" : "flex-end",
1276
+ justifyContent: isCentered ? "center" : "space-between",
1277
+ textAlign: isCentered ? "center" : "left",
1278
+ gap: import_tokens13.tokens.spacing.base,
1279
+ mb: isLarge ? import_tokens13.tokens.spacing.xxxl : import_tokens13.tokens.spacing.xxl
1280
+ },
1281
+ ...Array.isArray(sx) ? sx : [sx]
1282
+ ],
1283
+ children: [
1284
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_Box10.default, { sx: { flex: 1 }, children: [
1285
+ overline && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1286
+ import_Typography7.default,
1287
+ {
1288
+ variant: "caption",
1289
+ sx: {
1290
+ display: "block",
1291
+ fontWeight: 800,
1292
+ color: import_tokens13.tokens.colors.green,
1293
+ textTransform: "uppercase",
1294
+ letterSpacing: "0.1em",
1295
+ fontFamily: import_tokens13.tokens.typography.fontFamily,
1296
+ mb: 0.5
1297
+ },
1298
+ children: overline
1299
+ }
1300
+ ),
1301
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1302
+ import_Typography7.default,
1303
+ {
1304
+ component: "h2",
1305
+ sx: {
1306
+ color: import_tokens13.tokens.colors.textPrimary,
1307
+ fontSize: isLarge ? import_tokens13.tokens.typography.fontSizes.display : import_tokens13.tokens.typography.fontSizes.xxl,
1308
+ fontWeight: 900,
1309
+ lineHeight: 1.1,
1310
+ fontFamily: import_tokens13.tokens.typography.fontFamily,
1311
+ letterSpacing: "-0.02em"
1312
+ },
1313
+ children: title
1314
+ }
1315
+ ),
1316
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1317
+ import_Typography7.default,
1318
+ {
1319
+ sx: {
1320
+ color: import_tokens13.tokens.colors.textSecondary,
1321
+ fontSize: isLarge ? import_tokens13.tokens.typography.fontSizes.md : import_tokens13.tokens.typography.fontSizes.base,
1322
+ mt: 1,
1323
+ fontFamily: import_tokens13.tokens.typography.fontFamily,
1324
+ maxWidth: 560,
1325
+ marginInline: isCentered ? "auto" : "unset",
1326
+ lineHeight: 1.4
1327
+ },
1328
+ children: subtitle
1329
+ }
1330
+ )
1331
+ ] }),
1332
+ (action || actionLabel) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Box10.default, { sx: { flexShrink: 0, mb: isCentered ? 0 : 0.5 }, children: action || /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1333
+ MitumbaPrimaryButton,
1334
+ {
1335
+ label: actionLabel,
1336
+ onClick: onAction || (() => {
1337
+ }),
1338
+ variant: "ghost",
1339
+ size: "small",
1340
+ fullWidth: false
1341
+ }
1342
+ ) })
1343
+ ]
1344
+ }
1345
+ );
1346
+ }
1347
+
1348
+ // src/components/layout/MitumbaDivider/MitumbaDivider.tsx
1349
+ var import_Box11 = __toESM(require("@mui/material/Box"));
1350
+ var import_tokens14 = require("@mitumba/tokens");
1351
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1352
+ function MitumbaDivider() {
1353
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1354
+ import_Box11.default,
1355
+ {
1356
+ component: "hr",
1357
+ sx: {
1358
+ backgroundColor: import_tokens14.tokens.colors.divider,
1359
+ border: "none",
1360
+ height: "1px",
1361
+ marginBlock: 0,
1362
+ width: "100%"
1363
+ }
1364
+ }
1365
+ );
1366
+ }
1367
+
1368
+ // src/components/layout/MitumbaGrid/MitumbaGrid.tsx
1369
+ var import_Box12 = __toESM(require("@mui/material/Box"));
1370
+ var import_tokens15 = require("@mitumba/tokens");
1371
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1372
+ function MitumbaGrid({
1373
+ children,
1374
+ columns = { xs: 4, sm: 8, md: 8, lg: 12 },
1375
+ gap,
1376
+ sx
1377
+ }) {
1378
+ const defaultGap = {
1379
+ xs: import_tokens15.tokens.spacing.base,
1380
+ // 12px
1381
+ sm: import_tokens15.tokens.spacing.base,
1382
+ // 12px
1383
+ md: import_tokens15.tokens.spacing.lg,
1384
+ // 16px
1385
+ lg: import_tokens15.tokens.spacing.lg
1386
+ // 16px
1387
+ };
1388
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1389
+ import_Box12.default,
1390
+ {
1391
+ sx: [
1392
+ {
1393
+ display: "grid",
1394
+ width: "100%",
1395
+ gap: gap || defaultGap,
1396
+ gridTemplateColumns: {
1397
+ xs: `repeat(${columns.xs}, 1fr)`,
1398
+ sm: `repeat(${columns.sm}, 1fr)`,
1399
+ md: `repeat(${columns.md}, 1fr)`,
1400
+ lg: `repeat(${columns.lg}, 1fr)`
1401
+ }
1402
+ },
1403
+ ...Array.isArray(sx) ? sx : [sx]
1404
+ ],
1405
+ children
1406
+ }
1407
+ );
1408
+ }
1409
+
1410
+ // src/components/navigation/MitumbaBreadcrumb/MitumbaBreadcrumb.tsx
1411
+ var import_Breadcrumbs = __toESM(require("@mui/material/Breadcrumbs"));
1412
+ var import_Link = __toESM(require("@mui/material/Link"));
1413
+ var import_Typography8 = __toESM(require("@mui/material/Typography"));
1414
+ var import_tokens16 = require("@mitumba/tokens");
1415
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1416
+ function MitumbaBreadcrumb({ items }) {
1417
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1418
+ import_Breadcrumbs.default,
1419
+ {
1420
+ separator: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1421
+ import_Typography8.default,
1422
+ {
1423
+ sx: {
1424
+ color: import_tokens16.tokens.colors.divider,
1425
+ mx: 0.5,
1426
+ fontWeight: 400,
1427
+ fontSize: 16,
1428
+ fontFamily: import_tokens16.tokens.typography.fontFamily
1429
+ },
1430
+ children: "/"
1431
+ }
1432
+ ),
1433
+ sx: {
1434
+ "& .MuiBreadcrumbs-ol": {
1435
+ flexWrap: "nowrap"
1436
+ }
1437
+ },
1438
+ children: items.map((item, index) => {
1439
+ const isLast = index === items.length - 1;
1440
+ if (isLast) {
1441
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1442
+ import_Typography8.default,
1443
+ {
1444
+ sx: {
1445
+ color: import_tokens16.tokens.colors.textPrimary,
1446
+ fontSize: import_tokens16.tokens.typography.fontSizes.sm,
1447
+ fontWeight: 800,
1448
+ fontFamily: import_tokens16.tokens.typography.fontFamily,
1449
+ whiteSpace: "nowrap"
1450
+ },
1451
+ children: item.label
1452
+ },
1453
+ item.label
1454
+ );
1455
+ }
1456
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1457
+ import_Link.default,
1458
+ {
1459
+ href: item.href || "#",
1460
+ sx: {
1461
+ color: import_tokens16.tokens.colors.textSecondary,
1462
+ fontSize: import_tokens16.tokens.typography.fontSizes.sm,
1463
+ fontWeight: 600,
1464
+ fontFamily: import_tokens16.tokens.typography.fontFamily,
1465
+ textDecoration: "none",
1466
+ transition: "all 0.2s ease",
1467
+ whiteSpace: "nowrap",
1468
+ "&:hover": {
1469
+ color: import_tokens16.tokens.colors.green,
1470
+ transform: "translateY(-1px)"
1471
+ }
1472
+ },
1473
+ children: item.label
1474
+ },
1475
+ item.label
1476
+ );
1477
+ })
1478
+ }
1479
+ );
1480
+ }
1481
+
1482
+ // src/components/navigation/MobileBottomNav/MobileBottomNav.tsx
1483
+ var import_Box13 = __toESM(require("@mui/material/Box"));
1484
+ var import_Typography9 = __toESM(require("@mui/material/Typography"));
1485
+ var import_Home = __toESM(require("@mui/icons-material/Home"));
1486
+ var import_Search2 = __toESM(require("@mui/icons-material/Search"));
1487
+ var import_LocalMall = __toESM(require("@mui/icons-material/LocalMall"));
1488
+ var import_Person2 = __toESM(require("@mui/icons-material/Person"));
1489
+ var import_AutoAwesome = __toESM(require("@mui/icons-material/AutoAwesome"));
1490
+ var import_tokens17 = require("@mitumba/tokens");
1491
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1492
+ var DEFAULT_ITEMS = [
1493
+ { id: "home", label: "Home", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Home.default, {}) },
1494
+ { id: "search", label: "Search", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Search2.default, {}) },
1495
+ { id: "vazi", label: "VAZI", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_AutoAwesome.default, {}) },
1496
+ { id: "orders", label: "Orders", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_LocalMall.default, {}) },
1497
+ { id: "profile", label: "Profile", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Person2.default, {}) }
1498
+ ];
1499
+ function MobileBottomNav({
1500
+ activeTab,
1501
+ onTabChange,
1502
+ variant = "m3",
1503
+ items = DEFAULT_ITEMS,
1504
+ sx
1505
+ }) {
1506
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1507
+ import_Box13.default,
1508
+ {
1509
+ sx: [
1510
+ {
1511
+ position: "fixed",
1512
+ bottom: 0,
1513
+ left: 0,
1514
+ right: 0,
1515
+ height: 80,
1516
+ backgroundColor: import_tokens17.tokens.colors.surface,
1517
+ borderTop: `1px solid ${import_tokens17.tokens.colors.divider}`,
1518
+ boxShadow: "0 -4px 12px rgba(0,0,0,0.05)",
1519
+ display: "flex",
1520
+ alignItems: "center",
1521
+ justifyContent: "space-around",
1522
+ px: 2,
1523
+ zIndex: (theme) => theme.zIndex.appBar,
1524
+ paddingBottom: "env(safe-area-inset-bottom)"
1525
+ },
1526
+ ...Array.isArray(sx) ? sx : [sx]
1527
+ ],
1528
+ children: items.map((item) => {
1529
+ const isActive = activeTab === item.id;
1530
+ const getStyles = () => {
1531
+ if (variant === "m3") {
1532
+ return {
1533
+ flexDirection: "column",
1534
+ gap: 0.5,
1535
+ "& .icon-wrapper": {
1536
+ width: 64,
1537
+ height: 32,
1538
+ borderRadius: import_tokens17.tokens.radius.full,
1539
+ backgroundColor: isActive ? `${import_tokens17.tokens.colors.green}20` : "transparent",
1540
+ display: "flex",
1541
+ alignItems: "center",
1542
+ justifyContent: "center",
1543
+ transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
1544
+ color: isActive ? import_tokens17.tokens.colors.green : import_tokens17.tokens.colors.textSecondary
1545
+ },
1546
+ "& .label": {
1547
+ fontSize: 10,
1548
+ fontWeight: isActive ? 800 : 600,
1549
+ color: isActive ? import_tokens17.tokens.colors.green : import_tokens17.tokens.colors.textSecondary
1550
+ }
1551
+ };
1552
+ }
1553
+ if (variant === "expansive") {
1554
+ return {
1555
+ flexDirection: "column",
1556
+ backgroundColor: isActive ? import_tokens17.tokens.colors.green : "transparent",
1557
+ borderRadius: `${import_tokens17.tokens.radius.md}px`,
1558
+ py: 1,
1559
+ px: 2,
1560
+ minWidth: 70,
1561
+ transition: "all 0.3s ease",
1562
+ color: isActive ? import_tokens17.tokens.colors.white : import_tokens17.tokens.colors.textSecondary,
1563
+ "& .icon-wrapper": {
1564
+ fontSize: 24,
1565
+ mb: 0.2
1566
+ },
1567
+ "& .label": {
1568
+ fontSize: 10,
1569
+ fontWeight: 700
1570
+ }
1571
+ };
1572
+ }
1573
+ if (variant === "indicator") {
1574
+ return {
1575
+ flexDirection: "column",
1576
+ position: "relative",
1577
+ color: isActive ? import_tokens17.tokens.colors.green : import_tokens17.tokens.colors.textSecondary,
1578
+ "& .label": {
1579
+ fontSize: 11,
1580
+ fontWeight: 700,
1581
+ mt: 0.5
1582
+ },
1583
+ "&::after": {
1584
+ content: '""',
1585
+ position: "absolute",
1586
+ bottom: -12,
1587
+ left: "25%",
1588
+ width: isActive ? "50%" : 0,
1589
+ height: 3,
1590
+ backgroundColor: import_tokens17.tokens.colors.green,
1591
+ borderRadius: "3px 3px 0 0",
1592
+ transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"
1593
+ }
1594
+ };
1595
+ }
1596
+ if (variant === "pill") {
1597
+ return {
1598
+ flexDirection: "row",
1599
+ gap: 1,
1600
+ px: isActive ? 2 : 1,
1601
+ py: 1,
1602
+ borderRadius: import_tokens17.tokens.radius.full,
1603
+ backgroundColor: isActive ? import_tokens17.tokens.colors.green : "transparent",
1604
+ color: isActive ? import_tokens17.tokens.colors.white : import_tokens17.tokens.colors.textSecondary,
1605
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
1606
+ "& .label": {
1607
+ display: isActive ? "block" : "none",
1608
+ fontSize: 12,
1609
+ fontWeight: 800
1610
+ }
1611
+ };
1612
+ }
1613
+ if (variant === "standalone") {
1614
+ return {
1615
+ flexDirection: "row",
1616
+ gap: 1,
1617
+ px: 2,
1618
+ py: 1.2,
1619
+ borderRadius: import_tokens17.tokens.radius.full,
1620
+ border: isActive ? `1.5px solid ${import_tokens17.tokens.colors.green}` : "1.5px solid transparent",
1621
+ color: isActive ? import_tokens17.tokens.colors.green : import_tokens17.tokens.colors.textSecondary,
1622
+ backgroundColor: isActive ? `${import_tokens17.tokens.colors.green}10` : "transparent",
1623
+ transition: "all 0.3s ease",
1624
+ "& .label": {
1625
+ display: isActive ? "block" : "none",
1626
+ fontSize: 12,
1627
+ fontWeight: 800
1628
+ }
1629
+ };
1630
+ }
1631
+ return {};
1632
+ };
1633
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1634
+ import_Box13.default,
1635
+ {
1636
+ onClick: () => onTabChange(item.id),
1637
+ sx: {
1638
+ cursor: "pointer",
1639
+ display: "flex",
1640
+ alignItems: "center",
1641
+ justifyContent: "center",
1642
+ flex: 1,
1643
+ height: "100%",
1644
+ userSelect: "none",
1645
+ ...getStyles(),
1646
+ "&:active": { transform: "scale(0.92)" }
1647
+ },
1648
+ children: [
1649
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Box13.default, { className: "icon-wrapper", sx: { display: "flex" }, children: isActive && item.activeIcon ? item.activeIcon : item.icon }),
1650
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Typography9.default, { className: "label", sx: { fontFamily: import_tokens17.tokens.typography.fontFamily }, children: item.label })
1651
+ ]
1652
+ },
1653
+ item.id
1654
+ );
1655
+ })
1656
+ }
1657
+ );
1658
+ }
1659
+
1660
+ // src/components/navigation/TopNav/TopNav.tsx
1661
+ var import_AppBar = __toESM(require("@mui/material/AppBar"));
1662
+ var import_Box15 = __toESM(require("@mui/material/Box"));
1663
+ var import_IconButton3 = __toESM(require("@mui/material/IconButton"));
1664
+ var import_Toolbar = __toESM(require("@mui/material/Toolbar"));
1665
+ var import_Typography11 = __toESM(require("@mui/material/Typography"));
1666
+ var import_Stack = __toESM(require("@mui/material/Stack"));
1667
+ var import_Link2 = __toESM(require("@mui/material/Link"));
1668
+ var import_Badge = __toESM(require("@mui/material/Badge"));
1669
+ var import_ShoppingCart = __toESM(require("@mui/icons-material/ShoppingCart"));
1670
+ var import_tokens19 = require("@mitumba/tokens");
1671
+
1672
+ // src/components/forms/MitumbaSearchBar/MitumbaSearchBar.tsx
1673
+ var import_react7 = require("react");
1674
+ var import_Box14 = __toESM(require("@mui/material/Box"));
1675
+ var import_Typography10 = __toESM(require("@mui/material/Typography"));
1676
+ var import_Search3 = __toESM(require("@mui/icons-material/Search"));
1677
+ var import_Close = __toESM(require("@mui/icons-material/Close"));
1678
+ var import_tokens18 = require("@mitumba/tokens");
1679
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1680
+ function MitumbaSearchBar({
1681
+ value,
1682
+ onChange,
1683
+ onSubmit,
1684
+ placeholder = "Search...",
1685
+ suggestions,
1686
+ onSuggestionClick
1687
+ }) {
1688
+ const [isFocused, setIsFocused] = (0, import_react7.useState)(false);
1689
+ const handleKeyDown = (0, import_react7.useCallback)(
1690
+ (e) => {
1691
+ if (e.key === "Enter") {
1692
+ onSubmit(value);
1693
+ }
1694
+ },
1695
+ [value, onSubmit]
1696
+ );
1697
+ const handleClear = (0, import_react7.useCallback)(() => {
1698
+ onChange("");
1699
+ }, [onChange]);
1700
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_Box14.default, { sx: { position: "relative", width: "100%" }, children: [
1701
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1702
+ import_Box14.default,
1703
+ {
1704
+ sx: {
1705
+ display: "flex",
1706
+ alignItems: "center",
1707
+ border: "1px solid",
1708
+ borderColor: isFocused ? import_tokens18.tokens.colors.green : import_tokens18.tokens.colors.border,
1709
+ borderWidth: isFocused ? "2px" : "1px",
1710
+ borderRadius: import_tokens18.tokens.radius.lg,
1711
+ backgroundColor: import_tokens18.tokens.colors.surface,
1712
+ paddingInline: import_tokens18.tokens.spacing.base,
1713
+ paddingBlock: isFocused ? "11px" : "12px",
1714
+ gap: import_tokens18.tokens.spacing.sm,
1715
+ transition: "all 200ms ease",
1716
+ boxShadow: isFocused ? import_tokens18.tokens.shadows.focus : "none",
1717
+ "&:hover": {
1718
+ borderColor: isFocused ? import_tokens18.tokens.colors.green : import_tokens18.tokens.colors.textDisabled
1719
+ }
1720
+ },
1721
+ children: [
1722
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_Search3.default, { sx: { color: import_tokens18.tokens.colors.textSecondary, fontSize: 20 } }),
1723
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1724
+ import_Box14.default,
1725
+ {
1726
+ component: "input",
1727
+ type: "text",
1728
+ value,
1729
+ onChange: (e) => onChange(e.target.value),
1730
+ onKeyDown: handleKeyDown,
1731
+ onFocus: () => setIsFocused(true),
1732
+ onBlur: () => setTimeout(() => setIsFocused(false), 200),
1733
+ placeholder,
1734
+ "aria-label": "Search",
1735
+ sx: {
1736
+ border: "none",
1737
+ outline: "none",
1738
+ backgroundColor: "transparent",
1739
+ fontSize: import_tokens18.tokens.typography.fontSizes.base,
1740
+ fontFamily: import_tokens18.tokens.typography.fontFamily,
1741
+ color: import_tokens18.tokens.colors.textPrimary,
1742
+ width: "100%",
1743
+ height: "24px",
1744
+ "&::placeholder": {
1745
+ color: import_tokens18.tokens.colors.textDisabled,
1746
+ opacity: 1
1747
+ }
1748
+ }
1749
+ }
1750
+ ),
1751
+ value && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1752
+ import_Box14.default,
1753
+ {
1754
+ component: "button",
1755
+ onClick: handleClear,
1756
+ "aria-label": "Clear search",
1757
+ sx: {
1758
+ cursor: "pointer",
1759
+ color: import_tokens18.tokens.colors.textDisabled,
1760
+ display: "flex",
1761
+ alignItems: "center",
1762
+ background: "none",
1763
+ border: "none",
1764
+ padding: 0,
1765
+ transition: "all 200ms ease",
1766
+ "&:hover": {
1767
+ color: import_tokens18.tokens.colors.error
1768
+ },
1769
+ "&:focus-visible": {
1770
+ outline: `2px solid ${import_tokens18.tokens.colors.greenLight}`,
1771
+ borderRadius: import_tokens18.tokens.radius.xs
1772
+ }
1773
+ },
1774
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_Close.default, { sx: { fontSize: 18 } })
1775
+ }
1776
+ )
1777
+ ]
1778
+ }
1779
+ ),
1780
+ isFocused && suggestions && suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1781
+ import_Box14.default,
1782
+ {
1783
+ sx: {
1784
+ position: "absolute",
1785
+ top: "100%",
1786
+ left: 0,
1787
+ right: 0,
1788
+ mt: import_tokens18.tokens.spacing.xs,
1789
+ backgroundColor: import_tokens18.tokens.colors.surface,
1790
+ border: `1px solid ${import_tokens18.tokens.colors.border}`,
1791
+ borderRadius: import_tokens18.tokens.radius.md,
1792
+ boxShadow: import_tokens18.tokens.shadows.elevated,
1793
+ zIndex: 10,
1794
+ overflow: "hidden",
1795
+ animation: "fadeIn 200ms ease",
1796
+ "@keyframes fadeIn": {
1797
+ from: { opacity: 0, transform: "translateY(-10px)" },
1798
+ to: { opacity: 1, transform: "translateY(0)" }
1799
+ }
1800
+ },
1801
+ children: suggestions.map((suggestion) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1802
+ import_Box14.default,
1803
+ {
1804
+ onClick: () => {
1805
+ onSuggestionClick?.(suggestion);
1806
+ setIsFocused(false);
1807
+ },
1808
+ sx: {
1809
+ paddingInline: import_tokens18.tokens.spacing.base,
1810
+ paddingBlock: import_tokens18.tokens.spacing.sm,
1811
+ cursor: "pointer",
1812
+ transition: "background-color 200ms ease",
1813
+ "&:hover": {
1814
+ backgroundColor: import_tokens18.tokens.colors.background
1815
+ }
1816
+ },
1817
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1818
+ import_Typography10.default,
1819
+ {
1820
+ sx: {
1821
+ fontSize: import_tokens18.tokens.typography.fontSizes.base,
1822
+ fontFamily: import_tokens18.tokens.typography.fontFamily,
1823
+ color: import_tokens18.tokens.colors.textPrimary
1824
+ },
1825
+ children: suggestion
1826
+ }
1827
+ )
1828
+ },
1829
+ suggestion
1830
+ ))
1831
+ }
1832
+ )
1833
+ ] });
1834
+ }
1835
+
1836
+ // src/components/navigation/TopNav/TopNav.tsx
1837
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1838
+ function TopNav({
1839
+ announcement,
1840
+ logo,
1841
+ links = [],
1842
+ actions,
1843
+ cta,
1844
+ sticky = true,
1845
+ transparent = false,
1846
+ searchValue = "",
1847
+ onSearchChange,
1848
+ onSearchSubmit,
1849
+ user,
1850
+ isAuthenticated = false,
1851
+ onLogoClick,
1852
+ onAuthClick,
1853
+ onProfileClick,
1854
+ onCartClick,
1855
+ cartCount = 0,
1856
+ sx
1857
+ }) {
1858
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1859
+ import_AppBar.default,
1860
+ {
1861
+ position: sticky ? "sticky" : "static",
1862
+ elevation: 0,
1863
+ sx: [
1864
+ {
1865
+ backgroundColor: transparent ? "transparent" : import_tokens19.tokens.colors.surface,
1866
+ borderBottom: transparent ? "none" : `1px solid ${import_tokens19.tokens.colors.divider}`,
1867
+ color: import_tokens19.tokens.colors.textPrimary,
1868
+ zIndex: (theme) => theme.zIndex.appBar
1869
+ },
1870
+ ...Array.isArray(sx) ? sx : [sx]
1871
+ ],
1872
+ children: [
1873
+ announcement && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1874
+ import_Box15.default,
1875
+ {
1876
+ sx: {
1877
+ backgroundColor: import_tokens19.tokens.colors.green,
1878
+ color: import_tokens19.tokens.colors.white,
1879
+ py: 1,
1880
+ px: 2,
1881
+ textAlign: "center",
1882
+ fontSize: 12,
1883
+ fontWeight: 700,
1884
+ fontFamily: import_tokens19.tokens.typography.fontFamily
1885
+ },
1886
+ children: announcement
1887
+ }
1888
+ ),
1889
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1890
+ import_Toolbar.default,
1891
+ {
1892
+ sx: {
1893
+ justifyContent: "space-between",
1894
+ height: { xs: 64, md: 80 },
1895
+ px: { xs: 2, md: 4, lg: 6 },
1896
+ gap: 4
1897
+ },
1898
+ children: [
1899
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1900
+ import_Box15.default,
1901
+ {
1902
+ onClick: onLogoClick,
1903
+ sx: { cursor: "pointer", display: "flex", alignItems: "center" },
1904
+ children: logo || /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1905
+ import_Typography11.default,
1906
+ {
1907
+ variant: "h6",
1908
+ sx: {
1909
+ fontWeight: 900,
1910
+ color: import_tokens19.tokens.colors.green,
1911
+ letterSpacing: "-0.02em",
1912
+ fontFamily: import_tokens19.tokens.typography.fontFamily
1913
+ },
1914
+ children: "MITUMBA"
1915
+ }
1916
+ )
1917
+ }
1918
+ ),
1919
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1920
+ import_Stack.default,
1921
+ {
1922
+ direction: "row",
1923
+ spacing: 4,
1924
+ sx: { display: { xs: "none", md: "flex" }, flexGrow: 1, justifyContent: "center" },
1925
+ children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1926
+ import_Link2.default,
1927
+ {
1928
+ href: link.href,
1929
+ sx: {
1930
+ color: link.active ? import_tokens19.tokens.colors.green : import_tokens19.tokens.colors.textSecondary,
1931
+ textDecoration: "none",
1932
+ fontWeight: 700,
1933
+ fontSize: 14,
1934
+ fontFamily: import_tokens19.tokens.typography.fontFamily,
1935
+ transition: "all 0.2s ease",
1936
+ "&:hover": {
1937
+ color: import_tokens19.tokens.colors.green,
1938
+ transform: "translateY(-1px)"
1939
+ }
1940
+ },
1941
+ children: link.label
1942
+ },
1943
+ link.label
1944
+ ))
1945
+ }
1946
+ ),
1947
+ onSearchSubmit && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Box15.default, { sx: { display: { xs: "none", lg: "block" }, width: 300 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1948
+ MitumbaSearchBar,
1949
+ {
1950
+ value: searchValue,
1951
+ onChange: onSearchChange || (() => {
1952
+ }),
1953
+ onSubmit: onSearchSubmit,
1954
+ placeholder: "Search listings..."
1955
+ }
1956
+ ) }),
1957
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_Stack.default, { direction: "row", spacing: 1, alignItems: "center", children: [
1958
+ actions,
1959
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_IconButton3.default, { onClick: onCartClick, sx: { color: import_tokens19.tokens.colors.textPrimary }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Badge.default, { badgeContent: cartCount, color: "error", sx: { "& .MuiBadge-badge": { fontWeight: 800, fontSize: 10 } }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ShoppingCart.default, {}) }) }),
1960
+ isAuthenticated && user ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Box15.default, { onClick: onProfileClick, sx: { cursor: "pointer", transition: "transform 0.2s ease", "&:hover": { transform: "scale(1.05)" } }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MitumbaAvatar, { name: user.name, size: "sm", imageUrl: user.avatarUrl }) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1961
+ MitumbaPrimaryButton,
1962
+ {
1963
+ label: "Sign In",
1964
+ variant: "ghost",
1965
+ onClick: onAuthClick || (() => {
1966
+ }),
1967
+ size: "small",
1968
+ sx: { fontWeight: 800 }
1969
+ }
1970
+ ),
1971
+ cta && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Box15.default, { sx: { display: { xs: "none", sm: "block" } }, children: cta })
1972
+ ] })
1973
+ ]
1974
+ }
1975
+ )
1976
+ ]
1977
+ }
1978
+ );
1979
+ }
1980
+
1981
+ // src/components/navigation/MitumbaTabs/MitumbaTabs.tsx
1982
+ var import_Tabs = __toESM(require("@mui/material/Tabs"));
1983
+ var import_Tab = __toESM(require("@mui/material/Tab"));
1984
+ var import_Box16 = __toESM(require("@mui/material/Box"));
1985
+ var import_tokens20 = require("@mitumba/tokens");
1986
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1987
+
1988
+ // src/components/navigation/MitumbaPagination/MitumbaPagination.tsx
1989
+ var import_Pagination = __toESM(require("@mui/material/Pagination"));
1990
+ var import_PaginationItem = __toESM(require("@mui/material/PaginationItem"));
1991
+ var import_Stack2 = __toESM(require("@mui/material/Stack"));
1992
+ var import_ChevronLeft2 = __toESM(require("@mui/icons-material/ChevronLeft"));
1993
+ var import_ChevronRight2 = __toESM(require("@mui/icons-material/ChevronRight"));
1994
+ var import_tokens21 = require("@mitumba/tokens");
1995
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1996
+
1997
+ // src/components/navigation/MitumbaStepper/MitumbaStepper.tsx
1998
+ var import_Stepper = __toESM(require("@mui/material/Stepper"));
1999
+ var import_Step = __toESM(require("@mui/material/Step"));
2000
+ var import_StepLabel = __toESM(require("@mui/material/StepLabel"));
2001
+ var import_StepConnector = __toESM(require("@mui/material/StepConnector"));
2002
+ var import_styles = require("@mui/material/styles");
2003
+ var import_Box17 = __toESM(require("@mui/material/Box"));
2004
+ var import_Typography12 = __toESM(require("@mui/material/Typography"));
2005
+ var import_Check3 = __toESM(require("@mui/icons-material/Check"));
2006
+ var import_tokens22 = require("@mitumba/tokens");
2007
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2008
+ var MitumbaConnector = (0, import_styles.styled)(import_StepConnector.default)(() => ({
2009
+ [`&.${import_StepConnector.stepConnectorClasses.alternativeLabel}`]: {
2010
+ top: 18
2011
+ },
2012
+ [`&.${import_StepConnector.stepConnectorClasses.active}`]: {
2013
+ [`& .${import_StepConnector.stepConnectorClasses.line}`]: {
2014
+ borderColor: import_tokens22.tokens.colors.green
2015
+ }
2016
+ },
2017
+ [`&.${import_StepConnector.stepConnectorClasses.completed}`]: {
2018
+ [`& .${import_StepConnector.stepConnectorClasses.line}`]: {
2019
+ borderColor: import_tokens22.tokens.colors.green
2020
+ }
2021
+ },
2022
+ [`& .${import_StepConnector.stepConnectorClasses.line}`]: {
2023
+ borderColor: import_tokens22.tokens.colors.divider,
2024
+ borderTopWidth: 2,
2025
+ borderRadius: 1,
2026
+ transition: "all 0.3s ease",
2027
+ borderStyle: "dashed"
2028
+ // Benchmark style for pending
2029
+ },
2030
+ [`&.${import_StepConnector.stepConnectorClasses.completed} .${import_StepConnector.stepConnectorClasses.line}`]: {
2031
+ borderStyle: "solid"
2032
+ // Benchmark style for completed
2033
+ }
2034
+ }));
2035
+
2036
+ // src/components/seller/STIScoreChip/STIScoreChip.tsx
2037
+ var import_Box18 = __toESM(require("@mui/material/Box"));
2038
+ var import_tokens23 = require("@mitumba/tokens");
2039
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2040
+ function getSTIConfig(score) {
2041
+ if (score >= 85) {
2042
+ return { color: import_tokens23.tokens.colors.stiTrusted, label: "Trusted \u2605" };
2043
+ }
2044
+ if (score >= 60) {
2045
+ return { color: import_tokens23.tokens.colors.stiGood, label: "Good" };
2046
+ }
2047
+ if (score >= 40) {
2048
+ return { color: import_tokens23.tokens.colors.stiAtRisk, label: "At risk" };
2049
+ }
2050
+ if (score >= 20) {
2051
+ return { color: import_tokens23.tokens.colors.stiFlagged, label: "Flagged" };
2052
+ }
2053
+ return { color: import_tokens23.tokens.colors.stiSuspended, label: "Suspended" };
2054
+ }
2055
+ function STIScoreChip({
2056
+ score,
2057
+ compact = false,
2058
+ showLabel
2059
+ }) {
2060
+ const clampedScore = Math.min(100, Math.max(0, score));
2061
+ const { color, label } = getSTIConfig(clampedScore);
2062
+ const shouldShowLabel = showLabel ?? !compact;
2063
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2064
+ import_Box18.default,
2065
+ {
2066
+ sx: {
2067
+ display: "inline-flex",
2068
+ alignItems: "center",
2069
+ gap: import_tokens23.tokens.spacing.xs,
2070
+ height: compact ? "24px" : "32px",
2071
+ px: compact ? import_tokens23.tokens.spacing.sm : import_tokens23.tokens.spacing.md,
2072
+ borderRadius: import_tokens23.tokens.radius.full,
2073
+ backgroundColor: `${color}14`,
2074
+ border: `1px solid ${color}40`,
2075
+ width: "fit-content",
2076
+ transition: "all 200ms ease"
2077
+ },
2078
+ "aria-label": `STI Score: ${clampedScore}, ${label}`,
2079
+ children: [
2080
+ shouldShowLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2081
+ import_Box18.default,
2082
+ {
2083
+ component: "span",
2084
+ sx: {
2085
+ color,
2086
+ fontSize: compact ? 10 : import_tokens23.tokens.typography.fontSizes.xs,
2087
+ fontWeight: import_tokens23.tokens.typography.fontWeights.bold,
2088
+ textTransform: "uppercase",
2089
+ letterSpacing: import_tokens23.tokens.typography.letterSpacings.wide,
2090
+ lineHeight: 1
2091
+ },
2092
+ children: label
2093
+ }
2094
+ ),
2095
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2096
+ import_Box18.default,
2097
+ {
2098
+ component: "span",
2099
+ sx: {
2100
+ color,
2101
+ fontSize: compact ? import_tokens23.tokens.typography.fontSizes.xs : import_tokens23.tokens.typography.fontSizes.sm,
2102
+ fontWeight: import_tokens23.tokens.typography.fontWeights.extrabold,
2103
+ lineHeight: 1,
2104
+ minWidth: "1.2em",
2105
+ textAlign: "center",
2106
+ ...shouldShowLabel && {
2107
+ borderLeft: `1px solid ${color}40`,
2108
+ paddingLeft: import_tokens23.tokens.spacing.xs,
2109
+ marginLeft: "2px"
2110
+ }
2111
+ },
2112
+ children: clampedScore
2113
+ }
2114
+ )
2115
+ ]
2116
+ }
2117
+ );
2118
+ }
2119
+
2120
+ // src/components/seller/SellerCard/SellerCard.tsx
2121
+ var import_Box19 = __toESM(require("@mui/material/Box"));
2122
+ var import_Typography13 = __toESM(require("@mui/material/Typography"));
2123
+ var import_Inventory2Outlined = __toESM(require("@mui/icons-material/Inventory2Outlined"));
2124
+ var import_LocationOnOutlined = __toESM(require("@mui/icons-material/LocationOnOutlined"));
2125
+ var import_tokens24 = require("@mitumba/tokens");
2126
+
2127
+ // src/components/vazi/VAZIBadge/VAZIBadge.tsx
2128
+ var import_AutoAwesome2 = __toESM(require("@mui/icons-material/AutoAwesome"));
2129
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2130
+ function VAZIBadge({ size = "small" }) {
2131
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2132
+ MitumbaChip,
2133
+ {
2134
+ label: "VAZI Curation",
2135
+ status: "special",
2136
+ variant: "solid",
2137
+ size,
2138
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_AutoAwesome2.default, {}),
2139
+ color: "purple"
2140
+ }
2141
+ );
2142
+ }
2143
+
2144
+ // src/components/seller/SellerCard/SellerCard.tsx
2145
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2146
+ function SellerCard({
2147
+ name,
2148
+ avatarUrl,
2149
+ city,
2150
+ stiScore,
2151
+ totalListings,
2152
+ isVaziFeatured = false,
2153
+ onTap
2154
+ }) {
2155
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2156
+ import_Box19.default,
2157
+ {
2158
+ onClick: onTap,
2159
+ onKeyDown: (e) => {
2160
+ if (e.key === "Enter" || e.key === " ") {
2161
+ e.preventDefault();
2162
+ onTap?.();
2163
+ }
2164
+ },
2165
+ role: "button",
2166
+ tabIndex: onTap ? 0 : -1,
2167
+ "aria-label": `${name} storefront, ${totalListings} listings`,
2168
+ sx: {
2169
+ display: "flex",
2170
+ alignItems: "center",
2171
+ gap: import_tokens24.tokens.spacing.base,
2172
+ p: import_tokens24.tokens.spacing.base,
2173
+ borderRadius: import_tokens24.tokens.radius.lg,
2174
+ bgcolor: import_tokens24.tokens.colors.surface,
2175
+ boxShadow: import_tokens24.tokens.shadows.card,
2176
+ border: `1px solid ${import_tokens24.tokens.colors.divider}`,
2177
+ cursor: onTap ? "pointer" : "default",
2178
+ transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1)",
2179
+ "&:hover": onTap ? {
2180
+ boxShadow: import_tokens24.tokens.shadows.elevated,
2181
+ transform: "translateY(-2px)",
2182
+ borderColor: import_tokens24.tokens.colors.border
2183
+ } : void 0,
2184
+ "&:focus-visible": {
2185
+ outline: `2px solid ${import_tokens24.tokens.colors.greenLight}`,
2186
+ boxShadow: import_tokens24.tokens.shadows.focus
2187
+ }
2188
+ },
2189
+ children: [
2190
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MitumbaAvatar, { name, imageUrl: avatarUrl, size: "md" }),
2191
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_Box19.default, { sx: { flex: 1, minWidth: 0 }, children: [
2192
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_Box19.default, { sx: { display: "flex", alignItems: "center", gap: import_tokens24.tokens.spacing.sm }, children: [
2193
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2194
+ import_Typography13.default,
2195
+ {
2196
+ sx: {
2197
+ fontWeight: import_tokens24.tokens.typography.fontWeights.bold,
2198
+ fontSize: import_tokens24.tokens.typography.fontSizes.base,
2199
+ color: import_tokens24.tokens.colors.textPrimary,
2200
+ lineHeight: 1.2,
2201
+ overflow: "hidden",
2202
+ textOverflow: "ellipsis",
2203
+ whiteSpace: "nowrap",
2204
+ fontFamily: import_tokens24.tokens.typography.fontFamily
2205
+ },
2206
+ children: name
2207
+ }
2208
+ ),
2209
+ isVaziFeatured && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VAZIBadge, { size: "small" })
2210
+ ] }),
2211
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_Box19.default, { sx: { display: "flex", alignItems: "center", gap: import_tokens24.tokens.spacing.sm, mt: import_tokens24.tokens.spacing.xs }, children: [
2212
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(STIScoreChip, { score: stiScore, compact: true }),
2213
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_Box19.default, { sx: { display: "flex", alignItems: "center", gap: "4px", opacity: 0.7 }, children: [
2214
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_Inventory2Outlined.default, { sx: { fontSize: 14, color: import_tokens24.tokens.colors.textSecondary } }),
2215
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2216
+ import_Typography13.default,
2217
+ {
2218
+ sx: {
2219
+ color: import_tokens24.tokens.colors.textSecondary,
2220
+ fontSize: 10,
2221
+ fontWeight: import_tokens24.tokens.typography.fontWeights.semibold,
2222
+ textTransform: "uppercase",
2223
+ letterSpacing: import_tokens24.tokens.typography.letterSpacings.wide
2224
+ },
2225
+ children: totalListings
2226
+ }
2227
+ )
2228
+ ] }),
2229
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_Box19.default, { sx: { display: "flex", alignItems: "center", gap: "4px", opacity: 0.7 }, children: [
2230
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_LocationOnOutlined.default, { sx: { fontSize: 14, color: import_tokens24.tokens.colors.textSecondary } }),
2231
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2232
+ import_Typography13.default,
2233
+ {
2234
+ sx: {
2235
+ color: import_tokens24.tokens.colors.textSecondary,
2236
+ fontSize: 10,
2237
+ fontWeight: import_tokens24.tokens.typography.fontWeights.semibold,
2238
+ textTransform: "uppercase",
2239
+ letterSpacing: import_tokens24.tokens.typography.letterSpacings.wide
2240
+ },
2241
+ children: city
2242
+ }
2243
+ )
2244
+ ] })
2245
+ ] })
2246
+ ] })
2247
+ ]
2248
+ }
2249
+ );
2250
+ }
2251
+
2252
+ // src/components/seller/STIBreakdownPanel/STIBreakdownPanel.tsx
2253
+ var import_Box20 = __toESM(require("@mui/material/Box"));
2254
+ var import_Typography14 = __toESM(require("@mui/material/Typography"));
2255
+ var import_LinearProgress = __toESM(require("@mui/material/LinearProgress"));
2256
+ var import_AddOutlined = __toESM(require("@mui/icons-material/AddOutlined"));
2257
+ var import_RemoveOutlined = __toESM(require("@mui/icons-material/RemoveOutlined"));
2258
+ var import_tokens25 = require("@mitumba/tokens");
2259
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2260
+ function formatPercent(value) {
2261
+ return `${Math.round(value * 100)}%`;
2262
+ }
2263
+ function STIBreakdownPanel({
2264
+ score,
2265
+ fulfillmentRate,
2266
+ accuracyRate,
2267
+ avgResponseHours,
2268
+ daysActive,
2269
+ recentEvents
2270
+ }) {
2271
+ const factors = [
2272
+ { label: "Fulfillment Rate", value: fulfillmentRate, display: formatPercent(fulfillmentRate) },
2273
+ { label: "Listing Accuracy", value: accuracyRate, display: formatPercent(accuracyRate) },
2274
+ { label: "Avg Response Time", display: `${avgResponseHours}h` },
2275
+ { label: "Days Active", display: `${daysActive}` }
2276
+ ];
2277
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2278
+ import_Box20.default,
2279
+ {
2280
+ sx: {
2281
+ p: import_tokens25.tokens.spacing.base,
2282
+ borderRadius: import_tokens25.tokens.radius.lg,
2283
+ bgcolor: import_tokens25.tokens.colors.surface,
2284
+ boxShadow: import_tokens25.tokens.shadows.card,
2285
+ border: `1px solid ${import_tokens25.tokens.colors.divider}`
2286
+ },
2287
+ children: [
2288
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_Box20.default, { sx: { display: "flex", alignItems: "center", gap: import_tokens25.tokens.spacing.base, mb: import_tokens25.tokens.spacing.lg }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(STIScoreChip, { score }) }),
2289
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_Box20.default, { component: "section", "aria-label": "Score factors", sx: { mb: import_tokens25.tokens.spacing.lg }, children: factors.map((factor) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_Box20.default, { sx: { mb: import_tokens25.tokens.spacing.md }, children: [
2290
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_Box20.default, { sx: { display: "flex", justifyContent: "space-between", mb: import_tokens25.tokens.spacing.xs }, children: [
2291
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2292
+ import_Typography14.default,
2293
+ {
2294
+ variant: "body2",
2295
+ sx: { color: import_tokens25.tokens.colors.textSecondary, fontSize: import_tokens25.tokens.typography.fontSizes.sm },
2296
+ children: factor.label
2297
+ }
2298
+ ),
2299
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2300
+ import_Typography14.default,
2301
+ {
2302
+ variant: "body2",
2303
+ sx: { fontWeight: import_tokens25.tokens.typography.fontWeights.semibold, fontSize: import_tokens25.tokens.typography.fontSizes.sm },
2304
+ children: factor.display
2305
+ }
2306
+ )
2307
+ ] }),
2308
+ factor.value !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2309
+ import_LinearProgress.default,
2310
+ {
2311
+ variant: "determinate",
2312
+ value: factor.value * 100,
2313
+ sx: {
2314
+ height: import_tokens25.tokens.spacing.sm,
2315
+ borderRadius: import_tokens25.tokens.radius.full,
2316
+ bgcolor: import_tokens25.tokens.colors.background,
2317
+ "& .MuiLinearProgress-bar": {
2318
+ bgcolor: import_tokens25.tokens.colors.green,
2319
+ borderRadius: import_tokens25.tokens.radius.full
2320
+ }
2321
+ },
2322
+ "aria-label": `${factor.label} progress`
2323
+ }
2324
+ )
2325
+ ] }, factor.label)) }),
2326
+ recentEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_Box20.default, { component: "section", "aria-label": "Recent STI events", children: [
2327
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2328
+ import_Typography14.default,
2329
+ {
2330
+ variant: "body2",
2331
+ sx: {
2332
+ fontWeight: import_tokens25.tokens.typography.fontWeights.semibold,
2333
+ fontSize: import_tokens25.tokens.typography.fontSizes.sm,
2334
+ color: import_tokens25.tokens.colors.textPrimary,
2335
+ mb: import_tokens25.tokens.spacing.sm
2336
+ },
2337
+ children: "Recent Events"
2338
+ }
2339
+ ),
2340
+ recentEvents.map((event) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2341
+ import_Box20.default,
2342
+ {
2343
+ sx: {
2344
+ display: "flex",
2345
+ alignItems: "flex-start",
2346
+ gap: import_tokens25.tokens.spacing.sm,
2347
+ py: import_tokens25.tokens.spacing.sm,
2348
+ borderBottom: `1px solid ${import_tokens25.tokens.colors.divider}`
2349
+ },
2350
+ children: [
2351
+ event.type === "positive" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_AddOutlined.default, { sx: { fontSize: 16, color: import_tokens25.tokens.colors.success, mt: import_tokens25.tokens.spacing.xs } }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_RemoveOutlined.default, { sx: { fontSize: 16, color: import_tokens25.tokens.colors.error, mt: import_tokens25.tokens.spacing.xs } }),
2352
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_Box20.default, { sx: { flex: 1 }, children: [
2353
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_Box20.default, { sx: { display: "flex", justifyContent: "space-between" }, children: [
2354
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2355
+ import_Typography14.default,
2356
+ {
2357
+ variant: "body2",
2358
+ sx: {
2359
+ fontSize: import_tokens25.tokens.typography.fontSizes.sm,
2360
+ color: import_tokens25.tokens.colors.textPrimary,
2361
+ fontWeight: import_tokens25.tokens.typography.fontWeights.medium
2362
+ },
2363
+ children: event.reason
2364
+ }
2365
+ ),
2366
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2367
+ import_Typography14.default,
2368
+ {
2369
+ variant: "caption",
2370
+ sx: {
2371
+ fontSize: import_tokens25.tokens.typography.fontSizes.xs,
2372
+ fontWeight: import_tokens25.tokens.typography.fontWeights.bold,
2373
+ color: event.type === "positive" ? import_tokens25.tokens.colors.success : import_tokens25.tokens.colors.error
2374
+ },
2375
+ children: [
2376
+ event.type === "positive" ? "+" : "",
2377
+ event.pointsChange
2378
+ ]
2379
+ }
2380
+ )
2381
+ ] }),
2382
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_Typography14.default, { variant: "caption", sx: { fontSize: import_tokens25.tokens.typography.fontSizes.xs, color: import_tokens25.tokens.colors.textSecondary }, children: event.timestamp })
2383
+ ] })
2384
+ ]
2385
+ },
2386
+ `${event.reason}-${event.timestamp}`
2387
+ ))
2388
+ ] })
2389
+ ]
2390
+ }
2391
+ );
2392
+ }
2393
+
2394
+ // src/components/listing/ListingCard/ListingCard.tsx
2395
+ var import_react8 = require("react");
2396
+ var import_Box21 = __toESM(require("@mui/material/Box"));
2397
+ var import_Typography15 = __toESM(require("@mui/material/Typography"));
2398
+ var import_Stack3 = __toESM(require("@mui/material/Stack"));
2399
+ var import_IconButton4 = __toESM(require("@mui/material/IconButton"));
2400
+ var import_Favorite = __toESM(require("@mui/icons-material/Favorite"));
2401
+ var import_FavoriteBorder = __toESM(require("@mui/icons-material/FavoriteBorder"));
2402
+ var import_ArrowOutward = __toESM(require("@mui/icons-material/ArrowOutward"));
2403
+ var import_tokens26 = require("@mitumba/tokens");
2404
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2405
+ function ListingCard({
2406
+ images,
2407
+ title,
2408
+ price,
2409
+ originalPrice,
2410
+ brand,
2411
+ size,
2412
+ badge,
2413
+ brandLogoUrl,
2414
+ onClick,
2415
+ onBuyClick,
2416
+ isLiked = false,
2417
+ onLikeClick,
2418
+ sx
2419
+ }) {
2420
+ const [activeImage, setActiveImage] = (0, import_react8.useState)(0);
2421
+ const handleBuy = (e) => {
2422
+ e.stopPropagation();
2423
+ onBuyClick?.(e);
2424
+ };
2425
+ const handleLike = (e) => {
2426
+ e.stopPropagation();
2427
+ onLikeClick?.(e);
2428
+ };
2429
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2430
+ import_Box21.default,
2431
+ {
2432
+ onClick,
2433
+ sx: [
2434
+ {
2435
+ width: "100%",
2436
+ backgroundColor: import_tokens26.tokens.colors.surface,
2437
+ borderRadius: `${import_tokens26.tokens.radius.lg}px`,
2438
+ // Standardized to 16px (Serious)
2439
+ overflow: "hidden",
2440
+ // High-end layered shadow, no clunky borders
2441
+ boxShadow: `
2442
+ 0 2px 4px 0 rgba(0, 0, 0, 0.05),
2443
+ 0 8px 16px -4px rgba(0, 0, 0, 0.1)
2444
+ `,
2445
+ transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
2446
+ cursor: "pointer",
2447
+ position: "relative",
2448
+ "&:hover": {
2449
+ transform: "translateY(-6px)",
2450
+ boxShadow: import_tokens26.tokens.shadows.deep
2451
+ }
2452
+ },
2453
+ ...Array.isArray(sx) ? sx : [sx]
2454
+ ],
2455
+ children: [
2456
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_Box21.default, { sx: { position: "relative", width: "100%", pt: "100%", backgroundColor: import_tokens26.tokens.colors.background }, children: [
2457
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2458
+ import_Box21.default,
2459
+ {
2460
+ component: "img",
2461
+ src: images[activeImage],
2462
+ alt: title,
2463
+ sx: {
2464
+ position: "absolute",
2465
+ top: 0,
2466
+ left: 0,
2467
+ width: "100%",
2468
+ height: "100%",
2469
+ objectFit: "cover",
2470
+ transition: "opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1)"
2471
+ }
2472
+ }
2473
+ ),
2474
+ badge && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2475
+ import_Box21.default,
2476
+ {
2477
+ sx: {
2478
+ position: "absolute",
2479
+ top: 12,
2480
+ left: 12,
2481
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
2482
+ backdropFilter: "blur(4px)",
2483
+ px: 1.5,
2484
+ py: 0.5,
2485
+ borderRadius: import_tokens26.tokens.radius.full,
2486
+ fontSize: 10,
2487
+ fontWeight: 800,
2488
+ color: import_tokens26.tokens.colors.textPrimary,
2489
+ fontFamily: import_tokens26.tokens.typography.fontFamily,
2490
+ textTransform: "uppercase",
2491
+ boxShadow: import_tokens26.tokens.shadows.card,
2492
+ zIndex: 2
2493
+ },
2494
+ children: badge
2495
+ }
2496
+ ),
2497
+ brandLogoUrl && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2498
+ import_Box21.default,
2499
+ {
2500
+ sx: {
2501
+ position: "absolute",
2502
+ top: 12,
2503
+ right: 12,
2504
+ width: 32,
2505
+ height: 32,
2506
+ backgroundColor: import_tokens26.tokens.colors.white,
2507
+ borderRadius: "50%",
2508
+ display: "flex",
2509
+ alignItems: "center",
2510
+ justifyContent: "center",
2511
+ boxShadow: import_tokens26.tokens.shadows.card,
2512
+ p: 0.5,
2513
+ zIndex: 2,
2514
+ "& img": { width: "100%", height: "100%", objectFit: "contain" }
2515
+ },
2516
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { src: brandLogoUrl, alt: "brand" })
2517
+ }
2518
+ ),
2519
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2520
+ import_IconButton4.default,
2521
+ {
2522
+ onClick: handleLike,
2523
+ sx: {
2524
+ position: "absolute",
2525
+ bottom: 12,
2526
+ right: 12,
2527
+ backgroundColor: "rgba(255, 255, 255, 0.9)",
2528
+ backdropFilter: "blur(4px)",
2529
+ boxShadow: import_tokens26.tokens.shadows.card,
2530
+ color: isLiked ? import_tokens26.tokens.colors.error : import_tokens26.tokens.colors.textSecondary,
2531
+ zIndex: 2,
2532
+ "&:hover": { backgroundColor: import_tokens26.tokens.colors.white, transform: "scale(1.1)" }
2533
+ },
2534
+ children: isLiked ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_Favorite.default, { sx: { fontSize: 18 } }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_FavoriteBorder.default, { sx: { fontSize: 18 } })
2535
+ }
2536
+ ),
2537
+ images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2538
+ import_Stack3.default,
2539
+ {
2540
+ direction: "row",
2541
+ spacing: 0.8,
2542
+ sx: {
2543
+ position: "absolute",
2544
+ bottom: 12,
2545
+ left: "50%",
2546
+ transform: "translateX(-50%)",
2547
+ zIndex: 2
2548
+ },
2549
+ children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2550
+ import_Box21.default,
2551
+ {
2552
+ onClick: (e) => {
2553
+ e.stopPropagation();
2554
+ setActiveImage(i);
2555
+ },
2556
+ sx: {
2557
+ width: activeImage === i ? 12 : 6,
2558
+ height: 6,
2559
+ borderRadius: import_tokens26.tokens.radius.full,
2560
+ backgroundColor: import_tokens26.tokens.colors.white,
2561
+ opacity: activeImage === i ? 1 : 0.5,
2562
+ transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
2563
+ cursor: "pointer",
2564
+ boxShadow: "0 1px 2px rgba(0,0,0,0.1)"
2565
+ }
2566
+ },
2567
+ img
2568
+ ))
2569
+ }
2570
+ )
2571
+ ] }),
2572
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_Box21.default, { sx: { p: 2.5 }, children: [
2573
+ " ",
2574
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2575
+ import_Typography15.default,
2576
+ {
2577
+ sx: {
2578
+ fontSize: import_tokens26.tokens.typography.fontSizes.base,
2579
+ fontWeight: 800,
2580
+ color: import_tokens26.tokens.colors.textPrimary,
2581
+ fontFamily: import_tokens26.tokens.typography.fontFamily,
2582
+ lineHeight: 1.2,
2583
+ mb: 0.5,
2584
+ whiteSpace: "nowrap",
2585
+ overflow: "hidden",
2586
+ textOverflow: "ellipsis"
2587
+ },
2588
+ children: title
2589
+ }
2590
+ ),
2591
+ (brand || size) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2592
+ import_Typography15.default,
2593
+ {
2594
+ sx: {
2595
+ fontSize: import_tokens26.tokens.typography.fontSizes.xs,
2596
+ color: import_tokens26.tokens.colors.textSecondary,
2597
+ fontFamily: import_tokens26.tokens.typography.fontFamily,
2598
+ fontWeight: 600,
2599
+ mb: 2
2600
+ },
2601
+ children: [
2602
+ brand,
2603
+ brand && size ? " \u2022 " : "",
2604
+ size
2605
+ ]
2606
+ }
2607
+ ),
2608
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_Stack3.default, { direction: "row", alignItems: "center", justifyContent: "space-between", spacing: 2, children: [
2609
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2610
+ import_Box21.default,
2611
+ {
2612
+ sx: {
2613
+ backgroundColor: import_tokens26.tokens.colors.background,
2614
+ px: 1.5,
2615
+ py: 0.8,
2616
+ borderRadius: import_tokens26.tokens.radius.full,
2617
+ fontSize: import_tokens26.tokens.typography.fontSizes.base,
2618
+ fontWeight: 800,
2619
+ color: import_tokens26.tokens.colors.textPrimary,
2620
+ fontFamily: import_tokens26.tokens.typography.fontFamily,
2621
+ display: "flex",
2622
+ alignItems: "baseline",
2623
+ gap: 0.5
2624
+ },
2625
+ children: [
2626
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_Typography15.default, { component: "span", sx: { fontSize: 10, fontWeight: 900 }, children: "KES" }),
2627
+ price.toLocaleString(),
2628
+ originalPrice && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2629
+ import_Typography15.default,
2630
+ {
2631
+ component: "span",
2632
+ sx: {
2633
+ ml: 0.5,
2634
+ fontSize: 10,
2635
+ color: import_tokens26.tokens.colors.textDisabled,
2636
+ textDecoration: "line-through",
2637
+ fontWeight: 600
2638
+ },
2639
+ children: originalPrice.toLocaleString()
2640
+ }
2641
+ )
2642
+ ]
2643
+ }
2644
+ ),
2645
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2646
+ MitumbaPrimaryButton,
2647
+ {
2648
+ label: "Buy Now",
2649
+ variant: "primary",
2650
+ size: "small",
2651
+ onClick: handleBuy,
2652
+ icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_ArrowOutward.default, { sx: { fontSize: 16 } }),
2653
+ iconPosition: "right",
2654
+ sx: {
2655
+ borderRadius: import_tokens26.tokens.radius.full,
2656
+ px: 2.5,
2657
+ height: 32,
2658
+ // Forced small height for density
2659
+ fontSize: 11,
2660
+ fontWeight: 900
2661
+ }
2662
+ }
2663
+ )
2664
+ ] })
2665
+ ] })
2666
+ ]
2667
+ }
2668
+ );
2669
+ }
2670
+
2671
+ // src/components/listing/ListingCardSkeleton/ListingCardSkeleton.tsx
2672
+ var import_Box23 = __toESM(require("@mui/material/Box"));
2673
+ var import_tokens28 = require("@mitumba/tokens");
2674
+
2675
+ // src/components/feedback/MitumbaSkeleton/MitumbaSkeleton.tsx
2676
+ var import_Box22 = __toESM(require("@mui/material/Box"));
2677
+ var import_tokens27 = require("@mitumba/tokens");
2678
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2679
+ var variantStyles = {
2680
+ rectangular: { borderRadius: `${import_tokens27.tokens.radius.xxs}px` },
2681
+ rounded: { borderRadius: `${import_tokens27.tokens.radius.md}px` },
2682
+ circular: { borderRadius: "50%" }
2683
+ };
2684
+ function MitumbaSkeleton({
2685
+ width,
2686
+ height,
2687
+ borderRadius,
2688
+ variant = "rounded"
2689
+ }) {
2690
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2691
+ import_Box22.default,
2692
+ {
2693
+ sx: {
2694
+ width,
2695
+ height,
2696
+ position: "relative",
2697
+ overflow: "hidden",
2698
+ borderRadius: borderRadius ? `${borderRadius}px` : variantStyles[variant].borderRadius,
2699
+ backgroundColor: import_tokens27.tokens.colors.background,
2700
+ // Base block
2701
+ "&::before": {
2702
+ content: '""',
2703
+ position: "absolute",
2704
+ inset: 0,
2705
+ backgroundColor: import_tokens27.tokens.colors.divider,
2706
+ opacity: 0.5
2707
+ },
2708
+ // Shimmer wave
2709
+ "&::after": {
2710
+ content: '""',
2711
+ position: "absolute",
2712
+ top: 0,
2713
+ left: 0,
2714
+ right: 0,
2715
+ bottom: 0,
2716
+ background: `linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)`,
2717
+ transform: "translateX(-100%)",
2718
+ animation: "shimmer 2s infinite cubic-bezier(0.4, 0, 0.2, 1)"
2719
+ },
2720
+ "@keyframes shimmer": {
2721
+ "100%": { transform: "translateX(100%)" }
2722
+ }
2723
+ },
2724
+ "aria-label": "Loading content..."
2725
+ }
2726
+ );
2727
+ }
2728
+
2729
+ // src/components/listing/ListingCardSkeleton/ListingCardSkeleton.tsx
2730
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2731
+ function ListingCardSkeleton() {
2732
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2733
+ import_Box23.default,
2734
+ {
2735
+ sx: {
2736
+ width: "100%",
2737
+ backgroundColor: import_tokens28.tokens.colors.surface,
2738
+ borderRadius: `${import_tokens28.tokens.radius.lg}px`,
2739
+ // 16px (Serious Standard)
2740
+ overflow: "hidden",
2741
+ boxShadow: `
2742
+ 0 2px 4px 0 rgba(0, 0, 0, 0.05),
2743
+ 0 8px 16px -4px rgba(0, 0, 0, 0.1)
2744
+ `
2745
+ },
2746
+ children: [
2747
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_Box23.default, { sx: { position: "relative", width: "100%", pt: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2748
+ MitumbaSkeleton,
2749
+ {
2750
+ variant: "rectangular",
2751
+ sx: { position: "absolute", inset: 0, height: "100%", width: "100%" }
2752
+ }
2753
+ ) }),
2754
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_Box23.default, { sx: { p: 2.5 }, children: [
2755
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2756
+ MitumbaSkeleton,
2757
+ {
2758
+ variant: "rectangular",
2759
+ width: "80%",
2760
+ height: 20,
2761
+ sx: { mb: 1, borderRadius: 1 }
2762
+ }
2763
+ ),
2764
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2765
+ MitumbaSkeleton,
2766
+ {
2767
+ variant: "rectangular",
2768
+ width: "40%",
2769
+ height: 12,
2770
+ sx: { mb: 3, borderRadius: 1 }
2771
+ }
2772
+ ),
2773
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_Box23.default, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
2774
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2775
+ MitumbaSkeleton,
2776
+ {
2777
+ variant: "rounded",
2778
+ width: 100,
2779
+ height: 32,
2780
+ sx: { borderRadius: 100 }
2781
+ }
2782
+ ),
2783
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2784
+ MitumbaSkeleton,
2785
+ {
2786
+ variant: "rounded",
2787
+ width: 80,
2788
+ height: 32,
2789
+ sx: { borderRadius: 100 }
2790
+ }
2791
+ )
2792
+ ] })
2793
+ ] })
2794
+ ]
2795
+ }
2796
+ );
2797
+ }
2798
+
2799
+ // src/components/listing/ListingGrid/ListingGrid.tsx
2800
+ var import_Box24 = __toESM(require("@mui/material/Box"));
2801
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2802
+ function ListingGrid({
2803
+ children,
2804
+ columns = { xs: 2, sm: 2, md: 3, lg: 4 },
2805
+ gap,
2806
+ isLoading = false,
2807
+ sx
2808
+ }) {
2809
+ if (isLoading) {
2810
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MitumbaGrid, { columns, gap, sx, children: [...Array(8)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_Box24.default, { sx: { width: "100%", pt: "100%", position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2811
+ MitumbaSkeleton,
2812
+ {
2813
+ variant: "rounded",
2814
+ sx: { position: "absolute", inset: 0, height: "100%", width: "100%", borderRadius: 4 }
2815
+ }
2816
+ ) }, `listing-skeleton-${i + 1}`)) });
2817
+ }
2818
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_Box24.default, { sx: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2819
+ MitumbaGrid,
2820
+ {
2821
+ columns,
2822
+ gap,
2823
+ sx,
2824
+ children
2825
+ }
2826
+ ) });
2827
+ }
2828
+
2829
+ // src/components/listing/ListingImageGallery/ListingImageGallery.tsx
2830
+ var import_react9 = require("react");
2831
+ var import_Box25 = __toESM(require("@mui/material/Box"));
2832
+ var import_tokens29 = require("@mitumba/tokens");
2833
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2834
+ function ListingImageGallery({ images, title }) {
2835
+ const [activeIndex, setActiveIndex] = (0, import_react9.useState)(0);
2836
+ const goTo = (0, import_react9.useCallback)(
2837
+ (index) => {
2838
+ const clamped = Math.max(0, Math.min(images.length - 1, index));
2839
+ setActiveIndex(clamped);
2840
+ },
2841
+ [images.length]
2842
+ );
2843
+ const handleKeyDown = (0, import_react9.useCallback)(
2844
+ (e) => {
2845
+ if (e.key === "ArrowLeft") {
2846
+ goTo(activeIndex - 1);
2847
+ } else if (e.key === "ArrowRight") {
2848
+ goTo(activeIndex + 1);
2849
+ }
2850
+ },
2851
+ [activeIndex, goTo]
2852
+ );
2853
+ (0, import_react9.useEffect)(() => {
2854
+ window.addEventListener("keydown", handleKeyDown);
2855
+ return () => {
2856
+ window.removeEventListener("keydown", handleKeyDown);
2857
+ };
2858
+ }, [handleKeyDown]);
2859
+ if (images.length === 0) {
2860
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2861
+ import_Box25.default,
2862
+ {
2863
+ sx: {
2864
+ alignItems: "center",
2865
+ aspectRatio: "1 / 1",
2866
+ backgroundColor: import_tokens29.tokens.colors.background,
2867
+ borderRadius: `${import_tokens29.tokens.radius.lg}px`,
2868
+ color: import_tokens29.tokens.colors.textSecondary,
2869
+ display: "flex",
2870
+ fontSize: import_tokens29.tokens.typography.fontSizes.base,
2871
+ justifyContent: "center",
2872
+ width: "100%",
2873
+ border: `1px dashed ${import_tokens29.tokens.colors.divider}`
2874
+ },
2875
+ children: "No images available"
2876
+ }
2877
+ );
2878
+ }
2879
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2880
+ import_Box25.default,
2881
+ {
2882
+ sx: {
2883
+ display: "flex",
2884
+ flexDirection: "column",
2885
+ gap: import_tokens29.tokens.spacing.base,
2886
+ width: "100%"
2887
+ },
2888
+ children: [
2889
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2890
+ import_Box25.default,
2891
+ {
2892
+ sx: {
2893
+ aspectRatio: "1 / 1",
2894
+ borderRadius: `${import_tokens29.tokens.radius.lg}px`,
2895
+ overflow: "hidden",
2896
+ position: "relative",
2897
+ width: "100%",
2898
+ backgroundColor: import_tokens29.tokens.colors.background,
2899
+ boxShadow: `
2900
+ 0 2px 4px 0 rgba(0, 0, 0, 0.05),
2901
+ 0 8px 16px -4px rgba(0, 0, 0, 0.1)
2902
+ `
2903
+ },
2904
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2905
+ import_Box25.default,
2906
+ {
2907
+ component: "img",
2908
+ src: images[activeIndex],
2909
+ alt: `${title} \u2014 image ${activeIndex + 1} of ${images.length}`,
2910
+ sx: {
2911
+ display: "block",
2912
+ height: "100%",
2913
+ objectFit: "cover",
2914
+ width: "100%",
2915
+ transition: "opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1)"
2916
+ }
2917
+ }
2918
+ )
2919
+ }
2920
+ ),
2921
+ images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2922
+ import_Box25.default,
2923
+ {
2924
+ sx: {
2925
+ display: "flex",
2926
+ gap: 1.5,
2927
+ overflowX: "auto",
2928
+ paddingBlock: 0.5,
2929
+ "&::-webkit-scrollbar": { display: "none" },
2930
+ msOverflowStyle: "none",
2931
+ scrollbarWidth: "none"
2932
+ },
2933
+ children: images.map((img, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2934
+ import_Box25.default,
2935
+ {
2936
+ onClick: () => goTo(index),
2937
+ onKeyDown: (e) => {
2938
+ if (e.key === "Enter" || e.key === " ") {
2939
+ e.preventDefault();
2940
+ goTo(index);
2941
+ }
2942
+ },
2943
+ role: "button",
2944
+ tabIndex: 0,
2945
+ sx: {
2946
+ border: index === activeIndex ? `2px solid ${import_tokens29.tokens.colors.green}` : `2px solid transparent`,
2947
+ borderRadius: `${import_tokens29.tokens.radius.md}px`,
2948
+ cursor: "pointer",
2949
+ flexShrink: 0,
2950
+ height: 56,
2951
+ overflow: "hidden",
2952
+ opacity: index === activeIndex ? 1 : 0.6,
2953
+ transform: index === activeIndex ? "scale(1.05)" : "scale(1)",
2954
+ transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
2955
+ width: 56,
2956
+ "&:hover": {
2957
+ opacity: 1,
2958
+ transform: "translateY(-2px)"
2959
+ },
2960
+ "&:focus-visible": {
2961
+ outline: "none",
2962
+ boxShadow: import_tokens29.tokens.shadows.focus
2963
+ }
2964
+ },
2965
+ "aria-label": `View image ${index + 1} of ${images.length}`,
2966
+ "aria-pressed": index === activeIndex,
2967
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2968
+ import_Box25.default,
2969
+ {
2970
+ component: "img",
2971
+ src: img,
2972
+ alt: `${title} thumbnail ${index + 1}`,
2973
+ sx: {
2974
+ display: "block",
2975
+ height: "100%",
2976
+ objectFit: "cover",
2977
+ width: "100%"
2978
+ }
2979
+ }
2980
+ )
2981
+ },
2982
+ img
2983
+ ))
2984
+ }
2985
+ )
2986
+ ]
2987
+ }
2988
+ );
2989
+ }
2990
+
2991
+ // src/components/listing/ConditionBadge/ConditionBadge.tsx
2992
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2993
+ function ConditionBadge({ grade, showLabel = false }) {
2994
+ const gradeConfig = {
2995
+ A: { status: "success", label: "Like new" },
2996
+ B: { status: "active", label: "Good" },
2997
+ C: { status: "incomplete", label: "Fair" }
2998
+ };
2999
+ const config = gradeConfig[grade];
3000
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3001
+ MitumbaChip,
3002
+ {
3003
+ label: showLabel ? `${grade} \u2022 ${config.label}` : grade,
3004
+ status: config.status,
3005
+ variant: "solid",
3006
+ size: "small",
3007
+ rounding: "pill"
3008
+ }
3009
+ );
3010
+ }
3011
+
3012
+ // src/components/commerce/PriceTag/PriceTag.tsx
3013
+ var import_Typography16 = __toESM(require("@mui/material/Typography"));
3014
+ var import_tokens30 = require("@mitumba/tokens");
3015
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3016
+ function PriceTag({ priceKes, size = "medium", color = "default", strikethrough = false }) {
3017
+ const formattedNumber = new Intl.NumberFormat("en-KE").format(priceKes);
3018
+ const formatted = `KES ${formattedNumber}`;
3019
+ const sizeStyles = {
3020
+ small: {
3021
+ fontSize: import_tokens30.tokens.typography.fontSizes.sm,
3022
+ fontWeight: import_tokens30.tokens.typography.fontWeights.semibold
3023
+ },
3024
+ medium: {
3025
+ fontSize: import_tokens30.tokens.typography.fontSizes.base,
3026
+ fontWeight: import_tokens30.tokens.typography.fontWeights.bold
3027
+ },
3028
+ large: {
3029
+ fontSize: import_tokens30.tokens.typography.fontSizes.xl,
3030
+ fontWeight: import_tokens30.tokens.typography.fontWeights.extrabold
3031
+ }
3032
+ };
3033
+ const colorMap = {
3034
+ green: import_tokens30.tokens.colors.green,
3035
+ earth: import_tokens30.tokens.colors.earth,
3036
+ default: import_tokens30.tokens.colors.textPrimary
3037
+ };
3038
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3039
+ import_Typography16.default,
3040
+ {
3041
+ component: "span",
3042
+ sx: {
3043
+ ...sizeStyles[size],
3044
+ color: colorMap[color],
3045
+ textDecoration: strikethrough ? "line-through" : "none",
3046
+ opacity: strikethrough ? 0.7 : 1,
3047
+ textDecorationColor: strikethrough ? colorMap[color] : void 0
3048
+ },
3049
+ "aria-label": `Price: ${formatted}`,
3050
+ children: formatted
3051
+ }
3052
+ );
3053
+ }
3054
+
3055
+ // src/components/commerce/DeliveryBadge/DeliveryBadge.tsx
3056
+ var import_LocalShipping = __toESM(require("@mui/icons-material/LocalShipping"));
3057
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3058
+ function DeliveryBadge({ type, estimatedDays }) {
3059
+ const statusMap = {
3060
+ "same-city": "active",
3061
+ "intercity": "common"
3062
+ };
3063
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3064
+ MitumbaChip,
3065
+ {
3066
+ label: estimatedDays || type,
3067
+ status: statusMap[type],
3068
+ variant: "soft",
3069
+ size: "small",
3070
+ icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_LocalShipping.default, {})
3071
+ }
3072
+ );
3073
+ }
3074
+
3075
+ // src/components/commerce/CartItem/CartItem.tsx
3076
+ var import_Box26 = __toESM(require("@mui/material/Box"));
3077
+ var import_Typography17 = __toESM(require("@mui/material/Typography"));
3078
+ var import_IconButton5 = __toESM(require("@mui/material/IconButton"));
3079
+ var import_Close2 = __toESM(require("@mui/icons-material/Close"));
3080
+ var import_Stack4 = __toESM(require("@mui/material/Stack"));
3081
+ var import_tokens31 = require("@mitumba/tokens");
3082
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3083
+ function CartItem({
3084
+ imageUrl,
3085
+ title,
3086
+ subtitle,
3087
+ status = "IN STOCK",
3088
+ priceKes,
3089
+ size = "M",
3090
+ quantity = 1,
3091
+ onRemove,
3092
+ onQuantityChange,
3093
+ onSizeChange,
3094
+ sx
3095
+ }) {
3096
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3097
+ import_Box26.default,
3098
+ {
3099
+ sx: [
3100
+ {
3101
+ display: "flex",
3102
+ width: "100%",
3103
+ backgroundColor: import_tokens31.tokens.colors.surface,
3104
+ borderRadius: `${import_tokens31.tokens.radius.lg}px`,
3105
+ // 16px (Serious Standard)
3106
+ p: { xs: 2, md: 3 },
3107
+ boxShadow: `
3108
+ 0 2px 4px 0 rgba(0, 0, 0, 0.05),
3109
+ 0 8px 16px -4px rgba(0, 0, 0, 0.1)
3110
+ `,
3111
+ transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
3112
+ position: "relative",
3113
+ border: `1px solid ${import_tokens31.tokens.colors.divider}`,
3114
+ "&:hover": {
3115
+ transform: "translateY(-4px)",
3116
+ boxShadow: import_tokens31.tokens.shadows.deep
3117
+ }
3118
+ },
3119
+ ...Array.isArray(sx) ? sx : [sx]
3120
+ ],
3121
+ children: [
3122
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3123
+ import_Box26.default,
3124
+ {
3125
+ sx: {
3126
+ width: { xs: 80, sm: 120, md: 140 },
3127
+ height: { xs: 80, sm: 120, md: 140 },
3128
+ borderRadius: `${import_tokens31.tokens.radius.md}px`,
3129
+ overflow: "hidden",
3130
+ backgroundColor: import_tokens31.tokens.colors.background,
3131
+ flexShrink: 0
3132
+ },
3133
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3134
+ import_Box26.default,
3135
+ {
3136
+ component: "img",
3137
+ src: imageUrl,
3138
+ alt: title,
3139
+ sx: { width: "100%", height: "100%", objectFit: "cover" }
3140
+ }
3141
+ )
3142
+ }
3143
+ ),
3144
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3145
+ import_Box26.default,
3146
+ {
3147
+ sx: {
3148
+ flexGrow: 1,
3149
+ ml: { xs: 2, sm: 3, md: 4 },
3150
+ display: "flex",
3151
+ flexDirection: { xs: "column", lg: "row" },
3152
+ justifyContent: "space-between",
3153
+ alignItems: { xs: "flex-start", lg: "center" },
3154
+ gap: { xs: 2, lg: 4 }
3155
+ },
3156
+ children: [
3157
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_Box26.default, { sx: { flex: 1.5 }, children: [
3158
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3159
+ import_Typography17.default,
3160
+ {
3161
+ sx: {
3162
+ fontSize: import_tokens31.tokens.typography.fontSizes.lg,
3163
+ fontWeight: 900,
3164
+ color: import_tokens31.tokens.colors.textPrimary,
3165
+ fontFamily: import_tokens31.tokens.typography.fontFamily,
3166
+ textTransform: "uppercase",
3167
+ lineHeight: 1.1,
3168
+ mb: 0.5
3169
+ },
3170
+ children: title
3171
+ }
3172
+ ),
3173
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3174
+ import_Typography17.default,
3175
+ {
3176
+ variant: "caption",
3177
+ sx: {
3178
+ display: "block",
3179
+ color: import_tokens31.tokens.colors.textSecondary,
3180
+ fontWeight: 700,
3181
+ textTransform: "uppercase",
3182
+ fontSize: 10
3183
+ },
3184
+ children: subtitle
3185
+ }
3186
+ ),
3187
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3188
+ import_Typography17.default,
3189
+ {
3190
+ variant: "caption",
3191
+ sx: {
3192
+ display: "block",
3193
+ color: import_tokens31.tokens.colors.green,
3194
+ fontWeight: 800,
3195
+ fontSize: 9,
3196
+ mt: 1,
3197
+ textTransform: "uppercase",
3198
+ letterSpacing: "0.05em"
3199
+ },
3200
+ children: status
3201
+ }
3202
+ )
3203
+ ] }),
3204
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_Stack4.default, { direction: "row", spacing: { xs: 2, sm: 4, md: 6 }, alignItems: "center", sx: { width: { xs: "100%", lg: "auto" } }, children: [
3205
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_Box26.default, { sx: { width: 80 }, children: [
3206
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_Typography17.default, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: import_tokens31.tokens.colors.textDisabled, fontSize: 10 }, children: "SIZE" }),
3207
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3208
+ MitumbaSelect,
3209
+ {
3210
+ value: size,
3211
+ size: "small",
3212
+ onChange: (val) => onSizeChange?.(val),
3213
+ options: [{ label: size, value: size }],
3214
+ rounding: "rounded",
3215
+ sx: { minWidth: 60 }
3216
+ }
3217
+ )
3218
+ ] }),
3219
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_Box26.default, { sx: { width: 80 }, children: [
3220
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_Typography17.default, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: import_tokens31.tokens.colors.textDisabled, fontSize: 10 }, children: "QUANTITY" }),
3221
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3222
+ MitumbaSelect,
3223
+ {
3224
+ value: quantity,
3225
+ size: "small",
3226
+ onChange: (val) => onQuantityChange?.(Number(val)),
3227
+ options: [{ label: `${quantity}`, value: quantity }],
3228
+ rounding: "rounded",
3229
+ sx: { minWidth: 60 }
3230
+ }
3231
+ )
3232
+ ] }),
3233
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_Box26.default, { sx: { textAlign: "right", minWidth: 100 }, children: [
3234
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_Typography17.default, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: import_tokens31.tokens.colors.textDisabled, fontSize: 10 }, children: "PRICE" }),
3235
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_Typography17.default, { sx: { fontWeight: 900, color: import_tokens31.tokens.colors.textPrimary, fontSize: import_tokens31.tokens.typography.fontSizes.base, fontFamily: import_tokens31.tokens.typography.fontFamily }, children: [
3236
+ "KES ",
3237
+ priceKes.toLocaleString()
3238
+ ] })
3239
+ ] })
3240
+ ] })
3241
+ ]
3242
+ }
3243
+ ),
3244
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3245
+ import_IconButton5.default,
3246
+ {
3247
+ onClick: onRemove,
3248
+ sx: {
3249
+ position: "absolute",
3250
+ top: 8,
3251
+ right: 8,
3252
+ color: import_tokens31.tokens.colors.textDisabled,
3253
+ "&:hover": {
3254
+ color: import_tokens31.tokens.colors.error,
3255
+ backgroundColor: import_tokens31.tokens.colors.errorLight,
3256
+ transform: "rotate(90deg)"
3257
+ },
3258
+ transition: "all 0.3s ease"
3259
+ },
3260
+ size: "small",
3261
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_Close2.default, { sx: { fontSize: 16 } })
3262
+ }
3263
+ )
3264
+ ]
3265
+ }
3266
+ );
3267
+ }
3268
+
3269
+ // src/components/commerce/OrderStatusTimeline/OrderStatusTimeline.tsx
3270
+ var import_Box27 = __toESM(require("@mui/material/Box"));
3271
+ var import_Typography18 = __toESM(require("@mui/material/Typography"));
3272
+ var import_CheckCircleOutlined = __toESM(require("@mui/icons-material/CheckCircleOutlined"));
3273
+ var import_RadioButtonUncheckedOutlined = __toESM(require("@mui/icons-material/RadioButtonUncheckedOutlined"));
3274
+ var import_tokens32 = require("@mitumba/tokens");
3275
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3276
+ var ORDER_STATUS_ORDER = [
3277
+ "CREATED",
3278
+ "PAYMENT_PENDING",
3279
+ "PAID",
3280
+ "SELLER_CONFIRMED",
3281
+ "SHIPPED",
3282
+ "DELIVERED",
3283
+ "COMPLETED"
3284
+ ];
3285
+ var ORDER_STATUS_LABELS = {
3286
+ CREATED: "Order Created",
3287
+ PAYMENT_PENDING: "Payment Pending",
3288
+ PAID: "Paid",
3289
+ SELLER_CONFIRMED: "Seller Confirmed",
3290
+ SHIPPED: "Shipped",
3291
+ DELIVERED: "Delivered",
3292
+ COMPLETED: "Completed",
3293
+ CANCELLED: "Cancelled",
3294
+ DISPUTED: "Disputed"
3295
+ };
3296
+ function OrderStatusTimeline({ currentStatus, events }) {
3297
+ const currentIndex = ORDER_STATUS_ORDER.indexOf(currentStatus);
3298
+ const lastEvent = events.length > 0 ? events[events.length - 1] : null;
3299
+ const currentNote = lastEvent?.note;
3300
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3301
+ import_Box27.default,
3302
+ {
3303
+ sx: {
3304
+ p: import_tokens32.tokens.spacing.base,
3305
+ borderRadius: import_tokens32.tokens.radius.lg,
3306
+ bgcolor: import_tokens32.tokens.colors.surface,
3307
+ boxShadow: import_tokens32.tokens.shadows.card,
3308
+ border: `1px solid ${import_tokens32.tokens.colors.divider}`
3309
+ },
3310
+ children: [
3311
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_Box27.default, { sx: { display: "flex", alignItems: "center", gap: import_tokens32.tokens.spacing.sm, mb: import_tokens32.tokens.spacing.base }, children: [
3312
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3313
+ import_Typography18.default,
3314
+ {
3315
+ sx: {
3316
+ fontWeight: import_tokens32.tokens.typography.fontWeights.bold,
3317
+ fontSize: import_tokens32.tokens.typography.fontSizes.md,
3318
+ color: import_tokens32.tokens.colors.textPrimary,
3319
+ fontFamily: import_tokens32.tokens.typography.fontFamily
3320
+ },
3321
+ children: "Order Tracking"
3322
+ }
3323
+ ),
3324
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3325
+ import_Box27.default,
3326
+ {
3327
+ sx: {
3328
+ px: import_tokens32.tokens.spacing.sm,
3329
+ py: "2px",
3330
+ borderRadius: import_tokens32.tokens.radius.sm,
3331
+ bgcolor: import_tokens32.tokens.colors.greenLight,
3332
+ color: import_tokens32.tokens.colors.greenDark,
3333
+ fontSize: 10,
3334
+ fontWeight: import_tokens32.tokens.typography.fontWeights.extrabold,
3335
+ textTransform: "uppercase",
3336
+ letterSpacing: import_tokens32.tokens.typography.letterSpacings.wide
3337
+ },
3338
+ children: ORDER_STATUS_LABELS[currentStatus]
3339
+ }
3340
+ )
3341
+ ] }),
3342
+ currentNote && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3343
+ import_Box27.default,
3344
+ {
3345
+ sx: {
3346
+ p: import_tokens32.tokens.spacing.sm,
3347
+ borderRadius: import_tokens32.tokens.radius.sm,
3348
+ bgcolor: import_tokens32.tokens.colors.background,
3349
+ borderLeft: `3px solid ${import_tokens32.tokens.colors.info}`,
3350
+ mb: import_tokens32.tokens.spacing.lg
3351
+ },
3352
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3353
+ import_Typography18.default,
3354
+ {
3355
+ sx: {
3356
+ color: import_tokens32.tokens.colors.textPrimary,
3357
+ fontSize: import_tokens32.tokens.typography.fontSizes.sm,
3358
+ fontFamily: import_tokens32.tokens.typography.fontFamily,
3359
+ fontStyle: "italic"
3360
+ },
3361
+ children: [
3362
+ '"',
3363
+ currentNote,
3364
+ '"'
3365
+ ]
3366
+ }
3367
+ )
3368
+ }
3369
+ ),
3370
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_Box27.default, { component: "ol", sx: { listStyle: "none", p: 0, m: 0 }, children: ORDER_STATUS_ORDER.map((status, index) => {
3371
+ const isCompleted = index <= currentIndex;
3372
+ const isCurrent = status === currentStatus;
3373
+ const statusEvents = events.filter((e) => e.status === status);
3374
+ const latestEvent = statusEvents.length > 0 ? statusEvents[statusEvents.length - 1] : null;
3375
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3376
+ import_Box27.default,
3377
+ {
3378
+ component: "li",
3379
+ sx: {
3380
+ display: "flex",
3381
+ alignItems: "flex-start",
3382
+ gap: import_tokens32.tokens.spacing.base,
3383
+ position: "relative"
3384
+ },
3385
+ children: [
3386
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3387
+ import_Box27.default,
3388
+ {
3389
+ sx: {
3390
+ display: "flex",
3391
+ flexDirection: "column",
3392
+ alignItems: "center",
3393
+ minWidth: "24px"
3394
+ },
3395
+ children: [
3396
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3397
+ import_Box27.default,
3398
+ {
3399
+ sx: {
3400
+ display: "flex",
3401
+ alignItems: "center",
3402
+ justifyContent: "center",
3403
+ width: "24px",
3404
+ height: "24px",
3405
+ zIndex: 1,
3406
+ backgroundColor: import_tokens32.tokens.colors.surface
3407
+ },
3408
+ children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3409
+ import_CheckCircleOutlined.default,
3410
+ {
3411
+ sx: {
3412
+ fontSize: 20,
3413
+ color: isCurrent ? import_tokens32.tokens.colors.green : import_tokens32.tokens.colors.textDisabled
3414
+ }
3415
+ }
3416
+ ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3417
+ import_RadioButtonUncheckedOutlined.default,
3418
+ {
3419
+ sx: {
3420
+ fontSize: 18,
3421
+ color: import_tokens32.tokens.colors.divider
3422
+ }
3423
+ }
3424
+ )
3425
+ }
3426
+ ),
3427
+ index < ORDER_STATUS_ORDER.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3428
+ import_Box27.default,
3429
+ {
3430
+ sx: {
3431
+ width: "2px",
3432
+ flex: 1,
3433
+ minHeight: import_tokens32.tokens.spacing.lg,
3434
+ bgcolor: index < currentIndex ? import_tokens32.tokens.colors.green : import_tokens32.tokens.colors.divider,
3435
+ marginBlock: "2px"
3436
+ }
3437
+ }
3438
+ )
3439
+ ]
3440
+ }
3441
+ ),
3442
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_Box27.default, { sx: { pt: "2px", pb: import_tokens32.tokens.spacing.lg }, children: [
3443
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3444
+ import_Typography18.default,
3445
+ {
3446
+ sx: {
3447
+ fontWeight: isCurrent ? import_tokens32.tokens.typography.fontWeights.bold : import_tokens32.tokens.typography.fontWeights.medium,
3448
+ fontSize: import_tokens32.tokens.typography.fontSizes.sm,
3449
+ fontFamily: import_tokens32.tokens.typography.fontFamily,
3450
+ color: isCompleted ? import_tokens32.tokens.colors.textPrimary : import_tokens32.tokens.colors.textDisabled,
3451
+ lineHeight: 1
3452
+ },
3453
+ children: ORDER_STATUS_LABELS[status]
3454
+ }
3455
+ ),
3456
+ latestEvent && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3457
+ import_Typography18.default,
3458
+ {
3459
+ sx: {
3460
+ color: import_tokens32.tokens.colors.textSecondary,
3461
+ fontSize: 10,
3462
+ fontFamily: import_tokens32.tokens.typography.fontFamily,
3463
+ mt: "4px"
3464
+ },
3465
+ children: latestEvent.timestamp
3466
+ }
3467
+ )
3468
+ ] })
3469
+ ]
3470
+ },
3471
+ status
3472
+ );
3473
+ }) })
3474
+ ]
3475
+ }
3476
+ );
3477
+ }
3478
+
3479
+ // src/components/commerce/EscrowStatusBanner/EscrowStatusBanner.tsx
3480
+ var import_Box28 = __toESM(require("@mui/material/Box"));
3481
+ var import_Typography19 = __toESM(require("@mui/material/Typography"));
3482
+ var import_ShieldOutlined = __toESM(require("@mui/icons-material/ShieldOutlined"));
3483
+ var import_LocalShippingOutlined = __toESM(require("@mui/icons-material/LocalShippingOutlined"));
3484
+ var import_AccessTimeOutlined = __toESM(require("@mui/icons-material/AccessTimeOutlined"));
3485
+ var import_CheckCircleOutlined2 = __toESM(require("@mui/icons-material/CheckCircleOutlined"));
3486
+ var import_WarningAmberOutlined = __toESM(require("@mui/icons-material/WarningAmberOutlined"));
3487
+ var import_tokens33 = require("@mitumba/tokens");
3488
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3489
+ var STATUS_CONFIG = {
3490
+ FUNDED: {
3491
+ label: "Payment in Escrow",
3492
+ message: "Your payment is held securely. The seller will ship your item soon.",
3493
+ icon: import_ShieldOutlined.default,
3494
+ color: import_tokens33.tokens.colors.info,
3495
+ bg: `${import_tokens33.tokens.colors.info}14`
3496
+ },
3497
+ SHIPPED: {
3498
+ label: "Item Shipped",
3499
+ message: "Your item is on the way. Confirm delivery once received.",
3500
+ icon: import_LocalShippingOutlined.default,
3501
+ color: import_tokens33.tokens.colors.green,
3502
+ bg: `${import_tokens33.tokens.colors.green}14`
3503
+ },
3504
+ TIMEOUT_WARNING: {
3505
+ label: "Action Required",
3506
+ message: "Confirm delivery or raise a dispute before time runs out.",
3507
+ icon: import_AccessTimeOutlined.default,
3508
+ color: import_tokens33.tokens.colors.warning,
3509
+ bg: `${import_tokens33.tokens.colors.warning}14`
3510
+ },
3511
+ RELEASED: {
3512
+ label: "Payment Released",
3513
+ message: "Funds have been released to the seller. Transaction complete.",
3514
+ icon: import_CheckCircleOutlined2.default,
3515
+ color: import_tokens33.tokens.colors.success,
3516
+ bg: `${import_tokens33.tokens.colors.success}14`
3517
+ },
3518
+ REFUNDED: {
3519
+ label: "Refunded",
3520
+ message: "Your payment has been refunded to your original payment method.",
3521
+ icon: import_WarningAmberOutlined.default,
3522
+ color: import_tokens33.tokens.colors.error,
3523
+ bg: `${import_tokens33.tokens.colors.error}14`
3524
+ }
3525
+ };
3526
+ function EscrowStatusBanner({
3527
+ status,
3528
+ hoursRemaining,
3529
+ onConfirmDelivery,
3530
+ onRaiseDispute
3531
+ }) {
3532
+ const config = STATUS_CONFIG[status];
3533
+ const Icon = config.icon;
3534
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3535
+ import_Box28.default,
3536
+ {
3537
+ sx: {
3538
+ p: import_tokens33.tokens.spacing.base,
3539
+ borderRadius: import_tokens33.tokens.radius.lg,
3540
+ bgcolor: config.bg,
3541
+ border: `1px solid ${config.color}40`,
3542
+ boxShadow: import_tokens33.tokens.shadows.card
3543
+ },
3544
+ role: "status",
3545
+ "aria-label": `Escrow status: ${config.label}`,
3546
+ children: [
3547
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_Box28.default, { sx: { display: "flex", alignItems: "center", gap: import_tokens33.tokens.spacing.base }, children: [
3548
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3549
+ import_Box28.default,
3550
+ {
3551
+ sx: {
3552
+ display: "flex",
3553
+ alignItems: "center",
3554
+ justifyContent: "center",
3555
+ width: 44,
3556
+ height: 44,
3557
+ borderRadius: import_tokens33.tokens.radius.md,
3558
+ bgcolor: config.color,
3559
+ color: import_tokens33.tokens.colors.white,
3560
+ flexShrink: 0,
3561
+ boxShadow: import_tokens33.tokens.shadows.card
3562
+ },
3563
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { sx: { fontSize: 24 } })
3564
+ }
3565
+ ),
3566
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_Box28.default, { sx: { flex: 1 }, children: [
3567
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3568
+ import_Typography19.default,
3569
+ {
3570
+ sx: {
3571
+ fontWeight: import_tokens33.tokens.typography.fontWeights.bold,
3572
+ fontSize: import_tokens33.tokens.typography.fontSizes.base,
3573
+ color: config.color,
3574
+ lineHeight: 1.2,
3575
+ fontFamily: import_tokens33.tokens.typography.fontFamily
3576
+ },
3577
+ children: config.label
3578
+ }
3579
+ ),
3580
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3581
+ import_Typography19.default,
3582
+ {
3583
+ sx: {
3584
+ fontSize: import_tokens33.tokens.typography.fontSizes.sm,
3585
+ color: import_tokens33.tokens.colors.textPrimary,
3586
+ mt: "2px",
3587
+ fontFamily: import_tokens33.tokens.typography.fontFamily,
3588
+ opacity: 0.8
3589
+ },
3590
+ children: config.message
3591
+ }
3592
+ )
3593
+ ] })
3594
+ ] }),
3595
+ status === "TIMEOUT_WARNING" && hoursRemaining !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3596
+ import_Box28.default,
3597
+ {
3598
+ sx: {
3599
+ mt: import_tokens33.tokens.spacing.base,
3600
+ p: import_tokens33.tokens.spacing.sm,
3601
+ borderRadius: import_tokens33.tokens.radius.sm,
3602
+ bgcolor: import_tokens33.tokens.colors.white,
3603
+ display: "flex",
3604
+ alignItems: "center",
3605
+ gap: import_tokens33.tokens.spacing.sm,
3606
+ border: `1px solid ${import_tokens33.tokens.colors.warning}40`
3607
+ },
3608
+ children: [
3609
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_AccessTimeOutlined.default, { sx: { color: import_tokens33.tokens.colors.warning, fontSize: 18 } }),
3610
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3611
+ import_Typography19.default,
3612
+ {
3613
+ sx: {
3614
+ fontSize: import_tokens33.tokens.typography.fontSizes.sm,
3615
+ fontWeight: import_tokens33.tokens.typography.fontWeights.bold,
3616
+ color: import_tokens33.tokens.colors.warning
3617
+ },
3618
+ children: [
3619
+ hoursRemaining,
3620
+ " hour",
3621
+ hoursRemaining === 1 ? "" : "s",
3622
+ " remaining"
3623
+ ]
3624
+ }
3625
+ )
3626
+ ]
3627
+ }
3628
+ ),
3629
+ (onConfirmDelivery || onRaiseDispute) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_Box28.default, { sx: { display: "flex", gap: import_tokens33.tokens.spacing.sm, mt: import_tokens33.tokens.spacing.base }, children: [
3630
+ onConfirmDelivery && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3631
+ MitumbaPrimaryButton,
3632
+ {
3633
+ label: "Confirm Delivery",
3634
+ onClick: onConfirmDelivery,
3635
+ size: "medium",
3636
+ variant: "primary"
3637
+ }
3638
+ ),
3639
+ onRaiseDispute && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3640
+ MitumbaPrimaryButton,
3641
+ {
3642
+ label: "Raise Dispute",
3643
+ onClick: onRaiseDispute,
3644
+ size: "medium",
3645
+ variant: "ghost",
3646
+ sx: {
3647
+ color: import_tokens33.tokens.colors.error,
3648
+ borderColor: import_tokens33.tokens.colors.error,
3649
+ "&:hover": {
3650
+ bgcolor: import_tokens33.tokens.colors.errorLight,
3651
+ borderColor: import_tokens33.tokens.colors.errorDark
3652
+ }
3653
+ }
3654
+ }
3655
+ )
3656
+ ] })
3657
+ ]
3658
+ }
3659
+ );
3660
+ }
3661
+
3662
+ // src/components/vazi/VAZIOutfitCard/VAZIOutfitCard.tsx
3663
+ var import_Box29 = __toESM(require("@mui/material/Box"));
3664
+ var import_Card = __toESM(require("@mui/material/Card"));
3665
+ var import_CardContent = __toESM(require("@mui/material/CardContent"));
3666
+ var import_Typography20 = __toESM(require("@mui/material/Typography"));
3667
+ var import_tokens34 = require("@mitumba/tokens");
3668
+ var import_react10 = require("react");
3669
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3670
+ function VAZIOutfitCard({
3671
+ outfitName,
3672
+ items,
3673
+ totalPriceKes,
3674
+ sellersCount,
3675
+ isMultiCity = false,
3676
+ onTap,
3677
+ onBuyAll
3678
+ }) {
3679
+ const handleKeyDown = (0, import_react10.useCallback)(
3680
+ (e) => {
3681
+ if (e.key === "Enter" || e.key === " ") {
3682
+ e.preventDefault();
3683
+ onTap?.();
3684
+ }
3685
+ },
3686
+ [onTap]
3687
+ );
3688
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3689
+ import_Card.default,
3690
+ {
3691
+ onClick: onTap,
3692
+ onKeyDown: handleKeyDown,
3693
+ role: "button",
3694
+ tabIndex: onTap ? 0 : -1,
3695
+ sx: {
3696
+ borderRadius: import_tokens34.tokens.radius.lg,
3697
+ boxShadow: import_tokens34.tokens.shadows.card,
3698
+ cursor: onTap ? "pointer" : "default",
3699
+ display: "flex",
3700
+ flexDirection: "column",
3701
+ overflow: "hidden",
3702
+ transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1)",
3703
+ width: "100%",
3704
+ backgroundColor: import_tokens34.tokens.colors.surface,
3705
+ border: `1px solid ${import_tokens34.tokens.colors.divider}`,
3706
+ "&:hover": onTap ? {
3707
+ transform: "translateY(-4px)",
3708
+ boxShadow: import_tokens34.tokens.shadows.elevated,
3709
+ borderColor: import_tokens34.tokens.colors.earthLight
3710
+ } : void 0,
3711
+ "&:focus-visible": {
3712
+ outline: `2px solid ${import_tokens34.tokens.colors.earthLight}`,
3713
+ boxShadow: import_tokens34.tokens.shadows.focus
3714
+ }
3715
+ },
3716
+ children: [
3717
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3718
+ import_Box29.default,
3719
+ {
3720
+ sx: {
3721
+ alignItems: "center",
3722
+ display: "flex",
3723
+ gap: import_tokens34.tokens.spacing.sm,
3724
+ paddingInline: import_tokens34.tokens.spacing.base,
3725
+ paddingBlock: import_tokens34.tokens.spacing.base,
3726
+ borderBottom: `1px solid ${import_tokens34.tokens.colors.background}`
3727
+ },
3728
+ children: [
3729
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(VAZIBadge, { size: "small" }),
3730
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3731
+ import_Typography20.default,
3732
+ {
3733
+ sx: {
3734
+ color: import_tokens34.tokens.colors.textPrimary,
3735
+ flex: 1,
3736
+ fontSize: import_tokens34.tokens.typography.fontSizes.base,
3737
+ fontWeight: import_tokens34.tokens.typography.fontWeights.bold,
3738
+ lineHeight: import_tokens34.tokens.typography.lineHeights.snug,
3739
+ overflow: "hidden",
3740
+ textOverflow: "ellipsis",
3741
+ whiteSpace: "nowrap"
3742
+ },
3743
+ children: outfitName
3744
+ }
3745
+ )
3746
+ ]
3747
+ }
3748
+ ),
3749
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3750
+ import_Box29.default,
3751
+ {
3752
+ sx: {
3753
+ display: "flex",
3754
+ gap: import_tokens34.tokens.spacing.sm,
3755
+ overflowX: "auto",
3756
+ padding: import_tokens34.tokens.spacing.base,
3757
+ backgroundColor: import_tokens34.tokens.colors.background,
3758
+ scrollbarWidth: "none",
3759
+ msOverflowStyle: "none",
3760
+ "&::-webkit-scrollbar": {
3761
+ display: "none"
3762
+ }
3763
+ },
3764
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3765
+ import_Box29.default,
3766
+ {
3767
+ sx: {
3768
+ flexShrink: 0,
3769
+ width: "88px"
3770
+ },
3771
+ children: [
3772
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3773
+ import_Box29.default,
3774
+ {
3775
+ sx: {
3776
+ aspectRatio: "3 / 4",
3777
+ borderRadius: import_tokens34.tokens.radius.sm,
3778
+ overflow: "hidden",
3779
+ width: "100%",
3780
+ backgroundColor: import_tokens34.tokens.colors.surface,
3781
+ border: `1px solid ${import_tokens34.tokens.colors.divider}`
3782
+ },
3783
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3784
+ import_Box29.default,
3785
+ {
3786
+ component: "img",
3787
+ src: item.imageUrl,
3788
+ alt: `${item.garmentType} \u2014 ${item.sellerName}`,
3789
+ loading: "lazy",
3790
+ sx: {
3791
+ display: "block",
3792
+ height: "100%",
3793
+ objectFit: "cover",
3794
+ width: "100%"
3795
+ }
3796
+ }
3797
+ )
3798
+ }
3799
+ ),
3800
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3801
+ import_Typography20.default,
3802
+ {
3803
+ sx: {
3804
+ color: import_tokens34.tokens.colors.textSecondary,
3805
+ fontSize: 10,
3806
+ fontWeight: import_tokens34.tokens.typography.fontWeights.semibold,
3807
+ textTransform: "uppercase",
3808
+ letterSpacing: import_tokens34.tokens.typography.letterSpacings.wide,
3809
+ marginTop: import_tokens34.tokens.spacing.xs,
3810
+ overflow: "hidden",
3811
+ textOverflow: "ellipsis",
3812
+ whiteSpace: "nowrap",
3813
+ textAlign: "center"
3814
+ },
3815
+ children: item.sellerName
3816
+ }
3817
+ )
3818
+ ]
3819
+ },
3820
+ item.listingId
3821
+ ))
3822
+ }
3823
+ ),
3824
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3825
+ import_CardContent.default,
3826
+ {
3827
+ sx: {
3828
+ display: "flex",
3829
+ flexDirection: "column",
3830
+ gap: import_tokens34.tokens.spacing.sm,
3831
+ padding: import_tokens34.tokens.spacing.base,
3832
+ "&:last-child": {
3833
+ paddingBottom: import_tokens34.tokens.spacing.base
3834
+ }
3835
+ },
3836
+ children: [
3837
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3838
+ import_Box29.default,
3839
+ {
3840
+ sx: {
3841
+ alignItems: "center",
3842
+ display: "flex",
3843
+ gap: import_tokens34.tokens.spacing.sm,
3844
+ justifyContent: "space-between"
3845
+ },
3846
+ children: [
3847
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PriceTag, { priceKes: totalPriceKes, size: "large", color: "earth" }),
3848
+ onBuyAll && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_Box29.default, { sx: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3849
+ MitumbaPrimaryButton,
3850
+ {
3851
+ label: "Buy all",
3852
+ variant: "earth",
3853
+ size: "small",
3854
+ fullWidth: false,
3855
+ onClick: (e) => {
3856
+ if (e && e.stopPropagation) {
3857
+ e.stopPropagation();
3858
+ }
3859
+ onBuyAll();
3860
+ }
3861
+ }
3862
+ ) })
3863
+ ]
3864
+ }
3865
+ ),
3866
+ sellersCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3867
+ import_Box29.default,
3868
+ {
3869
+ sx: {
3870
+ display: "flex",
3871
+ alignItems: "center",
3872
+ gap: import_tokens34.tokens.spacing.xs,
3873
+ mt: import_tokens34.tokens.spacing.xs
3874
+ },
3875
+ children: [
3876
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3877
+ import_Typography20.default,
3878
+ {
3879
+ sx: {
3880
+ color: import_tokens34.tokens.colors.textSecondary,
3881
+ fontSize: import_tokens34.tokens.typography.fontSizes.sm,
3882
+ lineHeight: 1
3883
+ },
3884
+ children: [
3885
+ "Ships from ",
3886
+ sellersCount,
3887
+ " sellers"
3888
+ ]
3889
+ }
3890
+ ),
3891
+ isMultiCity && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3892
+ import_Box29.default,
3893
+ {
3894
+ component: "span",
3895
+ sx: {
3896
+ fontSize: import_tokens34.tokens.typography.fontSizes.xs,
3897
+ color: import_tokens34.tokens.colors.textDisabled
3898
+ },
3899
+ children: "\u2022"
3900
+ }
3901
+ ),
3902
+ isMultiCity && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3903
+ import_Typography20.default,
3904
+ {
3905
+ sx: {
3906
+ color: import_tokens34.tokens.colors.earth,
3907
+ fontSize: import_tokens34.tokens.typography.fontSizes.xs,
3908
+ fontWeight: import_tokens34.tokens.typography.fontWeights.bold,
3909
+ textTransform: "uppercase",
3910
+ letterSpacing: import_tokens34.tokens.typography.letterSpacings.wide,
3911
+ lineHeight: 1
3912
+ },
3913
+ children: "Multi-city"
3914
+ }
3915
+ )
3916
+ ]
3917
+ }
3918
+ )
3919
+ ]
3920
+ }
3921
+ )
3922
+ ]
3923
+ }
3924
+ );
3925
+ }
3926
+
3927
+ // src/components/vazi/VAZIOutfitCardSkeleton/VAZIOutfitCardSkeleton.tsx
3928
+ var import_Box30 = __toESM(require("@mui/material/Box"));
3929
+ var import_Skeleton = __toESM(require("@mui/material/Skeleton"));
3930
+ var import_tokens35 = require("@mitumba/tokens");
3931
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3932
+ var SKELETON_IMAGE_KEYS = ["image-1", "image-2", "image-3", "image-4"];
3933
+ function VAZIOutfitCardSkeleton() {
3934
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3935
+ import_Box30.default,
3936
+ {
3937
+ sx: {
3938
+ borderRadius: import_tokens35.tokens.radius.lg,
3939
+ boxShadow: import_tokens35.tokens.shadows.card,
3940
+ display: "flex",
3941
+ flexDirection: "column",
3942
+ overflow: "hidden",
3943
+ width: "100%"
3944
+ },
3945
+ children: [
3946
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3947
+ import_Box30.default,
3948
+ {
3949
+ sx: {
3950
+ alignItems: "center",
3951
+ display: "flex",
3952
+ gap: import_tokens35.tokens.spacing.sm,
3953
+ paddingInline: import_tokens35.tokens.spacing.base,
3954
+ paddingBlock: import_tokens35.tokens.spacing.base
3955
+ },
3956
+ children: [
3957
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3958
+ import_Skeleton.default,
3959
+ {
3960
+ "aria-label": "Loading VAZI label",
3961
+ variant: "rounded",
3962
+ sx: {
3963
+ borderRadius: import_tokens35.tokens.radius.sm,
3964
+ height: import_tokens35.tokens.spacing.lg,
3965
+ width: 48
3966
+ }
3967
+ }
3968
+ ),
3969
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3970
+ import_Skeleton.default,
3971
+ {
3972
+ "aria-label": "Loading outfit name",
3973
+ variant: "text",
3974
+ sx: {
3975
+ flex: 1,
3976
+ fontSize: import_tokens35.tokens.typography.fontSizes.base
3977
+ }
3978
+ }
3979
+ )
3980
+ ]
3981
+ }
3982
+ ),
3983
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3984
+ import_Box30.default,
3985
+ {
3986
+ sx: {
3987
+ display: "flex",
3988
+ gap: import_tokens35.tokens.spacing.sm,
3989
+ overflowX: "auto",
3990
+ paddingInline: import_tokens35.tokens.spacing.base,
3991
+ paddingBottom: import_tokens35.tokens.spacing.base,
3992
+ scrollbarWidth: "none",
3993
+ msOverflowStyle: "none",
3994
+ "&::-webkit-scrollbar": {
3995
+ display: "none"
3996
+ }
3997
+ },
3998
+ children: SKELETON_IMAGE_KEYS.map((imgKey) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3999
+ import_Box30.default,
4000
+ {
4001
+ sx: {
4002
+ flexShrink: 0,
4003
+ width: `${3 / 4 * 100}px`,
4004
+ minWidth: "88px"
4005
+ },
4006
+ children: [
4007
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4008
+ import_Skeleton.default,
4009
+ {
4010
+ "aria-label": `Loading item image ${imgKey.split("-")[1]}`,
4011
+ variant: "rounded",
4012
+ sx: {
4013
+ aspectRatio: "3 / 4",
4014
+ borderRadius: import_tokens35.tokens.radius.md,
4015
+ width: "100%"
4016
+ }
4017
+ }
4018
+ ),
4019
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4020
+ import_Skeleton.default,
4021
+ {
4022
+ "aria-label": `Loading seller name ${imgKey.split("-")[1]}`,
4023
+ variant: "text",
4024
+ sx: {
4025
+ fontSize: import_tokens35.tokens.typography.fontSizes.xs,
4026
+ marginTop: import_tokens35.tokens.spacing.xs,
4027
+ width: "80%"
4028
+ }
4029
+ }
4030
+ )
4031
+ ]
4032
+ },
4033
+ imgKey
4034
+ ))
4035
+ }
4036
+ ),
4037
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4038
+ import_Box30.default,
4039
+ {
4040
+ sx: {
4041
+ display: "flex",
4042
+ flexDirection: "column",
4043
+ gap: import_tokens35.tokens.spacing.sm,
4044
+ paddingInline: import_tokens35.tokens.spacing.base,
4045
+ paddingBlock: import_tokens35.tokens.spacing.base
4046
+ },
4047
+ children: [
4048
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4049
+ import_Box30.default,
4050
+ {
4051
+ sx: {
4052
+ alignItems: "center",
4053
+ display: "flex",
4054
+ gap: import_tokens35.tokens.spacing.sm,
4055
+ justifyContent: "space-between"
4056
+ },
4057
+ children: [
4058
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4059
+ import_Skeleton.default,
4060
+ {
4061
+ "aria-label": "Loading total price",
4062
+ variant: "text",
4063
+ sx: {
4064
+ fontSize: import_tokens35.tokens.typography.fontSizes.lg,
4065
+ width: "40%"
4066
+ }
4067
+ }
4068
+ ),
4069
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4070
+ import_Skeleton.default,
4071
+ {
4072
+ "aria-label": "Loading buy button",
4073
+ variant: "rounded",
4074
+ sx: {
4075
+ borderRadius: import_tokens35.tokens.radius.md,
4076
+ height: "36px",
4077
+ width: 100
4078
+ }
4079
+ }
4080
+ )
4081
+ ]
4082
+ }
4083
+ ),
4084
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4085
+ import_Skeleton.default,
4086
+ {
4087
+ "aria-label": "Loading seller info",
4088
+ variant: "text",
4089
+ sx: {
4090
+ fontSize: import_tokens35.tokens.typography.fontSizes.sm,
4091
+ width: "60%"
4092
+ }
4093
+ }
4094
+ )
4095
+ ]
4096
+ }
4097
+ )
4098
+ ]
4099
+ }
4100
+ );
4101
+ }
4102
+
4103
+ // src/components/vazi/VAZIFeedSection/VAZIFeedSection.tsx
4104
+ var import_Box31 = __toESM(require("@mui/material/Box"));
4105
+ var import_tokens36 = require("@mitumba/tokens");
4106
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4107
+ var renderOutfitCards = (outfits) => outfits.map((outfit) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4108
+ import_Box31.default,
4109
+ {
4110
+ sx: {
4111
+ flexShrink: 0,
4112
+ width: { xs: "82%", md: "100%" },
4113
+ maxWidth: { xs: "340px", md: "none" }
4114
+ },
4115
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4116
+ VAZIOutfitCard,
4117
+ {
4118
+ outfitName: outfit.outfitName,
4119
+ items: outfit.items,
4120
+ totalPriceKes: outfit.totalPriceKes,
4121
+ sellersCount: outfit.sellersCount,
4122
+ isMultiCity: outfit.isMultiCity,
4123
+ onTap: outfit.onTap,
4124
+ onBuyAll: outfit.onBuyAll
4125
+ }
4126
+ )
4127
+ },
4128
+ outfit.outfitName
4129
+ ));
4130
+ var renderSkeletons = () => Array.from({ length: 3 }, (_, skeletonIdx) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4131
+ import_Box31.default,
4132
+ {
4133
+ sx: {
4134
+ flexShrink: 0,
4135
+ width: { xs: "82%", md: "100%" },
4136
+ maxWidth: { xs: "340px", md: "none" }
4137
+ },
4138
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(VAZIOutfitCardSkeleton, {})
4139
+ },
4140
+ `skeleton-${skeletonIdx}`
4141
+ ));
4142
+ function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
4143
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4144
+ import_Box31.default,
4145
+ {
4146
+ sx: {
4147
+ display: "flex",
4148
+ flexDirection: "column",
4149
+ gap: import_tokens36.tokens.spacing.base,
4150
+ width: "100%"
4151
+ },
4152
+ children: [
4153
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4154
+ import_Box31.default,
4155
+ {
4156
+ sx: {
4157
+ alignItems: "center",
4158
+ display: "flex",
4159
+ justifyContent: "space-between",
4160
+ paddingInline: { xs: import_tokens36.tokens.spacing.base, md: 0 }
4161
+ },
4162
+ children: [
4163
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4164
+ import_Box31.default,
4165
+ {
4166
+ component: "h2",
4167
+ sx: {
4168
+ color: import_tokens36.tokens.colors.textPrimary,
4169
+ fontFamily: import_tokens36.tokens.typography.fontFamily,
4170
+ fontSize: import_tokens36.tokens.typography.fontSizes.xl,
4171
+ fontWeight: import_tokens36.tokens.typography.fontWeights.bold,
4172
+ lineHeight: import_tokens36.tokens.typography.lineHeights.snug,
4173
+ margin: 0
4174
+ },
4175
+ children: "VAZI Picks"
4176
+ }
4177
+ ),
4178
+ onSeeAll && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4179
+ import_Box31.default,
4180
+ {
4181
+ component: "button",
4182
+ onClick: onSeeAll,
4183
+ sx: {
4184
+ backgroundColor: "transparent",
4185
+ border: "none",
4186
+ color: import_tokens36.tokens.colors.earth,
4187
+ cursor: "pointer",
4188
+ fontFamily: import_tokens36.tokens.typography.fontFamily,
4189
+ fontSize: import_tokens36.tokens.typography.fontSizes.base,
4190
+ fontWeight: import_tokens36.tokens.typography.fontWeights.semibold,
4191
+ lineHeight: import_tokens36.tokens.typography.lineHeights.normal,
4192
+ padding: 0,
4193
+ textDecoration: "none",
4194
+ transition: "color 200ms ease",
4195
+ whiteSpace: "nowrap",
4196
+ "&:hover": {
4197
+ color: import_tokens36.tokens.colors.earthDark,
4198
+ textDecoration: "underline"
4199
+ },
4200
+ "&:focus-visible": {
4201
+ outline: `${import_tokens36.tokens.spacing.xs}px solid transparent`,
4202
+ boxShadow: import_tokens36.tokens.shadows.focus,
4203
+ borderRadius: import_tokens36.tokens.radius.sm
4204
+ }
4205
+ },
4206
+ children: "See all"
4207
+ }
4208
+ )
4209
+ ]
4210
+ }
4211
+ ),
4212
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4213
+ import_Box31.default,
4214
+ {
4215
+ sx: {
4216
+ display: { xs: "flex", md: "grid" },
4217
+ gridTemplateColumns: { md: "repeat(3, 1fr)" },
4218
+ gap: import_tokens36.tokens.spacing.base,
4219
+ overflowX: { xs: "auto", md: "visible" },
4220
+ paddingInline: { xs: import_tokens36.tokens.spacing.base, md: 0 },
4221
+ paddingBottom: { xs: import_tokens36.tokens.spacing.sm, md: 0 },
4222
+ scrollbarWidth: "none",
4223
+ msOverflowStyle: "none",
4224
+ "&::-webkit-scrollbar": {
4225
+ display: "none"
4226
+ }
4227
+ },
4228
+ children: loading ? renderSkeletons() : renderOutfitCards(outfits)
4229
+ }
4230
+ )
4231
+ ]
4232
+ }
4233
+ );
4234
+ }
4235
+
4236
+ // src/components/vazi/CompleteThisLookPanel/CompleteThisLookPanel.tsx
4237
+ var import_Box32 = __toESM(require("@mui/material/Box"));
4238
+ var import_Typography21 = __toESM(require("@mui/material/Typography"));
4239
+ var import_tokens37 = require("@mitumba/tokens");
4240
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4241
+ function CompleteThisLookPanel({ outfits, loading = false }) {
4242
+ if (!loading && outfits.length === 0) {
4243
+ return null;
4244
+ }
4245
+ const renderOutfitCards2 = () => outfits.map((outfit) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4246
+ import_Box32.default,
4247
+ {
4248
+ sx: {
4249
+ flexShrink: 0,
4250
+ width: { xs: "82%", md: "100%" },
4251
+ maxWidth: { xs: "340px", md: "none" }
4252
+ },
4253
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4254
+ VAZIOutfitCard,
4255
+ {
4256
+ outfitName: outfit.outfitName,
4257
+ items: outfit.items,
4258
+ totalPriceKes: outfit.totalPriceKes,
4259
+ sellersCount: outfit.sellersCount,
4260
+ isMultiCity: outfit.isMultiCity,
4261
+ onTap: outfit.onTap,
4262
+ onBuyAll: outfit.onBuyAll
4263
+ }
4264
+ )
4265
+ },
4266
+ outfit.outfitName
4267
+ ));
4268
+ const renderSkeletons2 = () => ["skel-0", "skel-1", "skel-2"].map((skelKey) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4269
+ import_Box32.default,
4270
+ {
4271
+ sx: {
4272
+ flexShrink: 0,
4273
+ width: { xs: "82%", md: "100%" },
4274
+ maxWidth: { xs: "340px", md: "none" }
4275
+ },
4276
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(VAZIOutfitCardSkeleton, {})
4277
+ },
4278
+ skelKey
4279
+ ));
4280
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
4281
+ import_Box32.default,
4282
+ {
4283
+ sx: {
4284
+ display: "flex",
4285
+ flexDirection: "column",
4286
+ gap: import_tokens37.tokens.spacing.base,
4287
+ width: "100%"
4288
+ },
4289
+ children: [
4290
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4291
+ import_Typography21.default,
4292
+ {
4293
+ component: "h2",
4294
+ sx: {
4295
+ color: import_tokens37.tokens.colors.textPrimary,
4296
+ fontSize: import_tokens37.tokens.typography.fontSizes.xl,
4297
+ fontWeight: import_tokens37.tokens.typography.fontWeights.bold,
4298
+ lineHeight: import_tokens37.tokens.typography.lineHeights.snug,
4299
+ margin: 0
4300
+ },
4301
+ children: "Complete this look"
4302
+ }
4303
+ ),
4304
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4305
+ import_Box32.default,
4306
+ {
4307
+ sx: {
4308
+ display: { xs: "flex", md: "grid" },
4309
+ gridTemplateColumns: { md: "repeat(3, 1fr)" },
4310
+ gap: import_tokens37.tokens.spacing.base,
4311
+ overflowX: { xs: "auto", md: "visible" },
4312
+ paddingBottom: { xs: import_tokens37.tokens.spacing.sm, md: 0 },
4313
+ scrollbarWidth: "none",
4314
+ msOverflowStyle: "none",
4315
+ "&::-webkit-scrollbar": {
4316
+ display: "none"
4317
+ }
4318
+ },
4319
+ children: loading ? renderSkeletons2() : renderOutfitCards2()
4320
+ }
4321
+ )
4322
+ ]
4323
+ }
4324
+ );
4325
+ }
4326
+
4327
+ // src/theme/provider.tsx
4328
+ var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
4329
+ var import_styles3 = require("@mui/material/styles");
4330
+
4331
+ // src/theme/theme.ts
4332
+ var import_styles2 = require("@mui/material/styles");
4333
+ var import_tokens38 = require("@mitumba/tokens");
4334
+ var transitions = {
4335
+ standard: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
4336
+ spring: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)"
4337
+ };
4338
+ var mitumbaTheme = (0, import_styles2.createTheme)({
4339
+ // Spacing factor 4px (Mandate)
4340
+ spacing: (factor) => `${factor * 4}px`,
4341
+ breakpoints: {
4342
+ values: import_tokens38.tokens.breakpoints
4343
+ },
4344
+ palette: {
4345
+ mode: "light",
4346
+ primary: {
4347
+ main: import_tokens38.tokens.colors.green,
4348
+ light: import_tokens38.tokens.colors.greenLight,
4349
+ dark: import_tokens38.tokens.colors.greenDark,
4350
+ contrastText: import_tokens38.tokens.colors.textOnGreen
4351
+ },
4352
+ secondary: {
4353
+ main: import_tokens38.tokens.colors.earth,
4354
+ light: import_tokens38.tokens.colors.earthLight,
4355
+ dark: import_tokens38.tokens.colors.earthDark,
4356
+ contrastText: import_tokens38.tokens.colors.textOnEarth
4357
+ },
4358
+ earth: {
4359
+ main: import_tokens38.tokens.colors.earth,
4360
+ light: import_tokens38.tokens.colors.earthLight,
4361
+ dark: import_tokens38.tokens.colors.earthDark,
4362
+ contrastText: import_tokens38.tokens.colors.textOnEarth
4363
+ },
4364
+ success: {
4365
+ main: import_tokens38.tokens.colors.success,
4366
+ light: import_tokens38.tokens.colors.successLight,
4367
+ dark: import_tokens38.tokens.colors.successDark,
4368
+ contrastText: import_tokens38.tokens.colors.textOnGreen
4369
+ },
4370
+ error: {
4371
+ main: import_tokens38.tokens.colors.error,
4372
+ light: import_tokens38.tokens.colors.errorLight,
4373
+ dark: import_tokens38.tokens.colors.errorDark,
4374
+ contrastText: import_tokens38.tokens.colors.white
4375
+ },
4376
+ warning: {
4377
+ main: import_tokens38.tokens.colors.warning,
4378
+ light: import_tokens38.tokens.colors.warningLight,
4379
+ dark: import_tokens38.tokens.colors.warningDark,
4380
+ contrastText: import_tokens38.tokens.colors.textPrimary
4381
+ },
4382
+ info: {
4383
+ main: import_tokens38.tokens.colors.info,
4384
+ light: import_tokens38.tokens.colors.infoLight,
4385
+ dark: import_tokens38.tokens.colors.infoDark,
4386
+ contrastText: import_tokens38.tokens.colors.white
4387
+ },
4388
+ background: {
4389
+ default: import_tokens38.tokens.colors.background,
4390
+ paper: import_tokens38.tokens.colors.surface
4391
+ },
4392
+ divider: import_tokens38.tokens.colors.divider,
4393
+ text: {
4394
+ primary: import_tokens38.tokens.colors.textPrimary,
4395
+ secondary: import_tokens38.tokens.colors.textSecondary,
4396
+ disabled: import_tokens38.tokens.colors.textDisabled
4397
+ },
4398
+ common: {
4399
+ black: import_tokens38.tokens.colors.textPrimary,
4400
+ white: import_tokens38.tokens.colors.white
4401
+ }
4402
+ },
4403
+ shape: {
4404
+ borderRadius: import_tokens38.tokens.radius.md
4405
+ // 8px default
4406
+ },
4407
+ shadows: [
4408
+ "none",
4409
+ import_tokens38.tokens.shadows.card,
4410
+ // 1
4411
+ import_tokens38.tokens.shadows.elevated,
4412
+ // 2
4413
+ import_tokens38.tokens.shadows.deep,
4414
+ // 3
4415
+ import_tokens38.tokens.shadows.bottomSheet,
4416
+ // 4
4417
+ import_tokens38.tokens.shadows.focus,
4418
+ // 5
4419
+ import_tokens38.tokens.shadows.green,
4420
+ // 6
4421
+ import_tokens38.tokens.shadows.earth,
4422
+ // 7
4423
+ "none",
4424
+ "none",
4425
+ "none",
4426
+ "none",
4427
+ "none",
4428
+ "none",
4429
+ "none",
4430
+ "none",
4431
+ "none",
4432
+ "none",
4433
+ "none",
4434
+ "none",
4435
+ "none",
4436
+ "none",
4437
+ "none",
4438
+ "none",
4439
+ "none"
4440
+ ],
4441
+ typography: {
4442
+ fontFamily: import_tokens38.tokens.typography.fontFamily,
4443
+ fontWeightRegular: import_tokens38.tokens.typography.fontWeights.regular,
4444
+ fontWeightMedium: import_tokens38.tokens.typography.fontWeights.medium,
4445
+ fontWeightBold: import_tokens38.tokens.typography.fontWeights.bold,
4446
+ h1: {
4447
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.display}px`,
4448
+ fontWeight: import_tokens38.tokens.typography.fontWeights.extrabold,
4449
+ lineHeight: 1.1
4450
+ },
4451
+ h2: {
4452
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.xxxl}px`,
4453
+ fontWeight: import_tokens38.tokens.typography.fontWeights.bold,
4454
+ lineHeight: 1.2
4455
+ },
4456
+ h3: {
4457
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.xxl}px`,
4458
+ fontWeight: import_tokens38.tokens.typography.fontWeights.bold,
4459
+ lineHeight: 1.2
4460
+ },
4461
+ h4: {
4462
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.xl}px`,
4463
+ fontWeight: import_tokens38.tokens.typography.fontWeights.bold,
4464
+ lineHeight: 1.2
4465
+ },
4466
+ body1: {
4467
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.md}px`,
4468
+ lineHeight: 1.5
4469
+ },
4470
+ body2: {
4471
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.base}px`,
4472
+ lineHeight: 1.5
4473
+ },
4474
+ button: {
4475
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.base}px`,
4476
+ fontWeight: 600,
4477
+ textTransform: "none"
4478
+ },
4479
+ caption: {
4480
+ fontSize: `${import_tokens38.tokens.typography.fontSizes.sm}px`,
4481
+ lineHeight: 1.5
4482
+ }
4483
+ },
4484
+ components: {
4485
+ MuiCssBaseline: {
4486
+ styleOverrides: {
4487
+ body: {
4488
+ backgroundColor: import_tokens38.tokens.colors.background,
4489
+ color: import_tokens38.tokens.colors.textPrimary,
4490
+ fontFamily: import_tokens38.tokens.typography.fontFamily,
4491
+ WebkitFontSmoothing: "antialiased",
4492
+ MozOsxFontSmoothing: "grayscale"
4493
+ },
4494
+ "*, *::before, *::after": {
4495
+ boxSizing: "border-box"
4496
+ }
4497
+ }
4498
+ },
4499
+ MuiButton: {
4500
+ defaultProps: {
4501
+ disableElevation: true
4502
+ },
4503
+ styleOverrides: {
4504
+ root: {
4505
+ borderRadius: `${import_tokens38.tokens.radius.md}px`,
4506
+ transition: transitions.standard,
4507
+ fontWeight: 600,
4508
+ "&:hover": {
4509
+ transform: "translateY(-2px) scale(1.02)"
4510
+ },
4511
+ "&:active": {
4512
+ transform: "translateY(0) scale(0.98)"
4513
+ },
4514
+ "&.Mui-disabled": {
4515
+ backgroundColor: import_tokens38.tokens.colors.divider,
4516
+ color: import_tokens38.tokens.colors.textDisabled,
4517
+ borderColor: import_tokens38.tokens.colors.divider
4518
+ }
4519
+ },
4520
+ containedPrimary: {
4521
+ backgroundColor: import_tokens38.tokens.colors.green,
4522
+ "&:hover": {
4523
+ backgroundColor: import_tokens38.tokens.colors.greenDark,
4524
+ boxShadow: import_tokens38.tokens.shadows.green
4525
+ }
4526
+ },
4527
+ containedSecondary: {
4528
+ backgroundColor: import_tokens38.tokens.colors.earth,
4529
+ "&:hover": {
4530
+ backgroundColor: import_tokens38.tokens.colors.earthDark,
4531
+ boxShadow: import_tokens38.tokens.shadows.earth
4532
+ }
4533
+ },
4534
+ outlinedPrimary: {
4535
+ borderWidth: "2px !important",
4536
+ borderColor: import_tokens38.tokens.colors.border,
4537
+ color: import_tokens38.tokens.colors.textPrimary,
4538
+ "&:hover": {
4539
+ backgroundColor: import_tokens38.tokens.colors.background,
4540
+ borderColor: import_tokens38.tokens.colors.green,
4541
+ color: import_tokens38.tokens.colors.green
4542
+ }
4543
+ },
4544
+ textPrimary: {
4545
+ color: import_tokens38.tokens.colors.textSecondary,
4546
+ "&:hover": {
4547
+ backgroundColor: import_tokens38.tokens.colors.background,
4548
+ color: import_tokens38.tokens.colors.textPrimary
4549
+ }
4550
+ }
4551
+ }
4552
+ },
4553
+ MuiCard: {
4554
+ styleOverrides: {
4555
+ root: {
4556
+ borderRadius: `${import_tokens38.tokens.radius.xl}px`,
4557
+ backgroundColor: import_tokens38.tokens.colors.surface,
4558
+ boxShadow: import_tokens38.tokens.shadows.card,
4559
+ transition: transitions.standard,
4560
+ border: "1px solid",
4561
+ borderColor: import_tokens38.tokens.colors.divider,
4562
+ "&:hover": {
4563
+ transform: "translateY(-4px)",
4564
+ boxShadow: import_tokens38.tokens.shadows.elevated,
4565
+ borderColor: import_tokens38.tokens.colors.border
4566
+ }
4567
+ }
4568
+ }
4569
+ },
4570
+ MuiPaper: {
4571
+ styleOverrides: {
4572
+ rounded: {
4573
+ borderRadius: `${import_tokens38.tokens.radius.xl}px`
4574
+ },
4575
+ elevation1: {
4576
+ boxShadow: import_tokens38.tokens.shadows.card
4577
+ }
4578
+ }
4579
+ },
4580
+ MuiOutlinedInput: {
4581
+ styleOverrides: {
4582
+ root: {
4583
+ borderRadius: `${import_tokens38.tokens.radius.md}px`,
4584
+ backgroundColor: import_tokens38.tokens.colors.surface,
4585
+ transition: transitions.standard,
4586
+ "& .MuiOutlinedInput-notchedOutline": {
4587
+ borderColor: import_tokens38.tokens.colors.border,
4588
+ borderWidth: "1px",
4589
+ transition: transitions.standard
4590
+ },
4591
+ "&:hover .MuiOutlinedInput-notchedOutline": {
4592
+ borderColor: import_tokens38.tokens.colors.textDisabled
4593
+ },
4594
+ "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
4595
+ borderColor: import_tokens38.tokens.colors.green,
4596
+ borderWidth: "2px"
4597
+ },
4598
+ "&.Mui-error .MuiOutlinedInput-notchedOutline": {
4599
+ borderColor: import_tokens38.tokens.colors.error
4600
+ },
4601
+ "&.Mui-focused": {
4602
+ boxShadow: import_tokens38.tokens.shadows.focus
4603
+ }
4604
+ }
4605
+ }
4606
+ },
4607
+ MuiAvatar: {
4608
+ styleOverrides: {
4609
+ root: {
4610
+ transition: transitions.spring,
4611
+ cursor: "pointer",
4612
+ "&:hover": {
4613
+ transform: "perspective(1000px) rotateY(15deg) rotateX(-5deg) scale(1.1)",
4614
+ boxShadow: import_tokens38.tokens.shadows.elevated
4615
+ },
4616
+ "&:active": {
4617
+ transform: "perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05)"
4618
+ }
4619
+ }
4620
+ }
4621
+ },
4622
+ MuiDialog: {
4623
+ styleOverrides: {
4624
+ paper: {
4625
+ borderRadius: `${import_tokens38.tokens.radius.xxxl}px`,
4626
+ boxShadow: import_tokens38.tokens.shadows.bottomSheet,
4627
+ backgroundImage: "none"
4628
+ }
4629
+ }
4630
+ },
4631
+ MuiAlert: {
4632
+ styleOverrides: {
4633
+ root: {
4634
+ borderRadius: `${import_tokens38.tokens.radius.lg}px`,
4635
+ alignItems: "center"
4636
+ }
4637
+ }
4638
+ }
4639
+ }
4640
+ });
4641
+
4642
+ // src/theme/provider.tsx
4643
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4644
+ function MitumbaThemeProvider({
4645
+ children,
4646
+ disableCssBaseline = false
4647
+ }) {
4648
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_styles3.ThemeProvider, { theme: mitumbaTheme, children: [
4649
+ !disableCssBaseline && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_CssBaseline.default, {}),
4650
+ children
4651
+ ] });
4652
+ }
4653
+ // Annotate the CommonJS export names for ESM import in node:
4654
+ 0 && (module.exports = {
4655
+ CartItem,
4656
+ CompleteThisLookPanel,
4657
+ ConditionBadge,
4658
+ DeliveryBadge,
4659
+ EscrowStatusBanner,
4660
+ ListingCard,
4661
+ ListingCardSkeleton,
4662
+ ListingGrid,
4663
+ ListingImageGallery,
4664
+ MitumbaAvatar,
4665
+ MitumbaBreadcrumb,
4666
+ MitumbaChip,
4667
+ MitumbaDivider,
4668
+ MitumbaGrid,
4669
+ MitumbaPrimaryButton,
4670
+ MitumbaSelect,
4671
+ MitumbaTextField,
4672
+ MitumbaThemeProvider,
4673
+ MobileBottomNav,
4674
+ OrderStatusTimeline,
4675
+ PageContainer,
4676
+ PriceTag,
4677
+ STIBreakdownPanel,
4678
+ STIScoreChip,
4679
+ SectionHeader,
4680
+ SellerCard,
4681
+ TopNav,
4682
+ VAZIBadge,
4683
+ VAZIFeedSection,
4684
+ VAZIOutfitCard,
4685
+ VAZIOutfitCardSkeleton,
4686
+ mitumbaTheme
4687
+ });