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