@mitumba/ui 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +762 -805
- package/dist/index.mjs +812 -855
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1102,6 +1102,60 @@ function MitumbaAvatar({
|
|
|
1102
1102
|
import Box6 from "@mui/material/Box";
|
|
1103
1103
|
import { tokens as tokens6 } from "@mitumba/tokens";
|
|
1104
1104
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1105
|
+
function MitumbaGlass({
|
|
1106
|
+
children,
|
|
1107
|
+
blur = 24,
|
|
1108
|
+
opacity = 0.5,
|
|
1109
|
+
rounding = "large",
|
|
1110
|
+
border = true,
|
|
1111
|
+
role,
|
|
1112
|
+
sx
|
|
1113
|
+
}) {
|
|
1114
|
+
const radiusMap = {
|
|
1115
|
+
rounded: tokens6.radius.md,
|
|
1116
|
+
// 8px
|
|
1117
|
+
large: tokens6.radius.lg,
|
|
1118
|
+
// 16px
|
|
1119
|
+
huge: tokens6.radius.xl,
|
|
1120
|
+
// 24px
|
|
1121
|
+
full: tokens6.radius.full
|
|
1122
|
+
};
|
|
1123
|
+
return /* @__PURE__ */ jsx6(
|
|
1124
|
+
Box6,
|
|
1125
|
+
{
|
|
1126
|
+
role,
|
|
1127
|
+
sx: [
|
|
1128
|
+
{
|
|
1129
|
+
position: "relative",
|
|
1130
|
+
overflow: "hidden",
|
|
1131
|
+
backgroundColor: `rgba(255, 255, 255, ${opacity})`,
|
|
1132
|
+
backdropFilter: `blur(${blur}px) saturate(180%)`,
|
|
1133
|
+
WebkitBackdropFilter: `blur(${blur}px) saturate(180%)`,
|
|
1134
|
+
borderRadius: `${radiusMap[rounding]}px`,
|
|
1135
|
+
// High-end glass border: Ultra-thin, white, low-opacity
|
|
1136
|
+
border: border ? "1px solid rgba(255, 255, 255, 0.4)" : "none",
|
|
1137
|
+
// Multi-layered shadow for realistic floating depth
|
|
1138
|
+
boxShadow: `
|
|
1139
|
+
0 4px 12px 0 rgba(0, 0, 0, 0.05),
|
|
1140
|
+
0 12px 32px 0 rgba(31, 38, 135, 0.1)
|
|
1141
|
+
`,
|
|
1142
|
+
transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1143
|
+
// Subtle light leak / shine effect
|
|
1144
|
+
"&::before": {
|
|
1145
|
+
content: '""',
|
|
1146
|
+
position: "absolute",
|
|
1147
|
+
inset: 0,
|
|
1148
|
+
zIndex: 0,
|
|
1149
|
+
background: "linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,0.1) 100%)",
|
|
1150
|
+
pointerEvents: "none"
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
1154
|
+
],
|
|
1155
|
+
children: /* @__PURE__ */ jsx6(Box6, { sx: { position: "relative", zIndex: 1 }, children })
|
|
1156
|
+
}
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1105
1159
|
|
|
1106
1160
|
// src/components/selection/MitumbaCheckbox/MitumbaCheckbox.tsx
|
|
1107
1161
|
import { useEffect, useRef } from "react";
|
|
@@ -2861,30 +2915,72 @@ function STIScoreChip({
|
|
|
2861
2915
|
|
|
2862
2916
|
// src/components/seller/SellerCard/SellerCard.tsx
|
|
2863
2917
|
import Box24 from "@mui/material/Box";
|
|
2864
|
-
import
|
|
2918
|
+
import Typography17 from "@mui/material/Typography";
|
|
2865
2919
|
import Inventory2OutlinedIcon from "@mui/icons-material/Inventory2Outlined";
|
|
2866
2920
|
import LocationOnOutlinedIcon from "@mui/icons-material/LocationOnOutlined";
|
|
2867
|
-
import { tokens as
|
|
2921
|
+
import { tokens as tokens32 } from "@mitumba/tokens";
|
|
2868
2922
|
|
|
2869
2923
|
// src/components/vazi/VAZIBadge/VAZIBadge.tsx
|
|
2924
|
+
import Typography16 from "@mui/material/Typography";
|
|
2870
2925
|
import AutoAwesomeIcon2 from "@mui/icons-material/AutoAwesome";
|
|
2871
|
-
import {
|
|
2926
|
+
import { tokens as tokens31 } from "@mitumba/tokens";
|
|
2927
|
+
import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2872
2928
|
function VAZIBadge({ size = "small" }) {
|
|
2873
|
-
|
|
2874
|
-
|
|
2929
|
+
const isLarge = size === "medium";
|
|
2930
|
+
return /* @__PURE__ */ jsxs19(
|
|
2931
|
+
MitumbaGlass,
|
|
2875
2932
|
{
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2933
|
+
rounding: "full",
|
|
2934
|
+
blur: 8,
|
|
2935
|
+
opacity: 0.9,
|
|
2936
|
+
sx: {
|
|
2937
|
+
display: "inline-flex",
|
|
2938
|
+
alignItems: "center",
|
|
2939
|
+
gap: 0.8,
|
|
2940
|
+
px: isLarge ? 2 : 1.5,
|
|
2941
|
+
py: 0.6,
|
|
2942
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
2943
|
+
boxShadow: "0 2px 8px rgba(160, 98, 53, 0.15)",
|
|
2944
|
+
border: `1px solid rgba(160, 98, 53, 0.2)`
|
|
2945
|
+
},
|
|
2946
|
+
role: "status",
|
|
2947
|
+
children: [
|
|
2948
|
+
/* @__PURE__ */ jsx31(
|
|
2949
|
+
AutoAwesomeIcon2,
|
|
2950
|
+
{
|
|
2951
|
+
sx: {
|
|
2952
|
+
fontSize: isLarge ? 18 : 14,
|
|
2953
|
+
color: tokens31.colors.earth,
|
|
2954
|
+
animation: "vazi-pulse 3s infinite ease-in-out",
|
|
2955
|
+
"@keyframes vazi-pulse": {
|
|
2956
|
+
"0%, 100%": { transform: "scale(1) rotate(0deg)", opacity: 1 },
|
|
2957
|
+
"50%": { transform: "scale(1.2) rotate(10deg)", opacity: 0.8 }
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
),
|
|
2962
|
+
/* @__PURE__ */ jsx31(
|
|
2963
|
+
Typography16,
|
|
2964
|
+
{
|
|
2965
|
+
sx: {
|
|
2966
|
+
fontSize: isLarge ? 12 : 10,
|
|
2967
|
+
fontWeight: 900,
|
|
2968
|
+
color: tokens31.colors.earth,
|
|
2969
|
+
fontFamily: tokens31.typography.fontFamily,
|
|
2970
|
+
textTransform: "uppercase",
|
|
2971
|
+
letterSpacing: "0.08em",
|
|
2972
|
+
lineHeight: 1
|
|
2973
|
+
},
|
|
2974
|
+
children: "VAZI"
|
|
2975
|
+
}
|
|
2976
|
+
)
|
|
2977
|
+
]
|
|
2882
2978
|
}
|
|
2883
2979
|
);
|
|
2884
2980
|
}
|
|
2885
2981
|
|
|
2886
2982
|
// src/components/seller/SellerCard/SellerCard.tsx
|
|
2887
|
-
import { jsx as jsx32, jsxs as
|
|
2983
|
+
import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2888
2984
|
function SellerCard({
|
|
2889
2985
|
name,
|
|
2890
2986
|
avatarUrl,
|
|
@@ -2894,7 +2990,7 @@ function SellerCard({
|
|
|
2894
2990
|
isVaziFeatured = false,
|
|
2895
2991
|
onTap
|
|
2896
2992
|
}) {
|
|
2897
|
-
return /* @__PURE__ */
|
|
2993
|
+
return /* @__PURE__ */ jsxs20(
|
|
2898
2994
|
Box24,
|
|
2899
2995
|
{
|
|
2900
2996
|
onClick: onTap,
|
|
@@ -2910,75 +3006,75 @@ function SellerCard({
|
|
|
2910
3006
|
sx: {
|
|
2911
3007
|
display: "flex",
|
|
2912
3008
|
alignItems: "center",
|
|
2913
|
-
gap:
|
|
2914
|
-
p:
|
|
2915
|
-
borderRadius:
|
|
2916
|
-
bgcolor:
|
|
2917
|
-
boxShadow:
|
|
2918
|
-
border: `1px solid ${
|
|
3009
|
+
gap: tokens32.spacing.base,
|
|
3010
|
+
p: tokens32.spacing.base,
|
|
3011
|
+
borderRadius: tokens32.radius.lg,
|
|
3012
|
+
bgcolor: tokens32.colors.surface,
|
|
3013
|
+
boxShadow: tokens32.shadows.card,
|
|
3014
|
+
border: `1px solid ${tokens32.colors.divider}`,
|
|
2919
3015
|
cursor: onTap ? "pointer" : "default",
|
|
2920
3016
|
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
2921
3017
|
"&:hover": onTap ? {
|
|
2922
|
-
boxShadow:
|
|
3018
|
+
boxShadow: tokens32.shadows.elevated,
|
|
2923
3019
|
transform: "translateY(-2px)",
|
|
2924
|
-
borderColor:
|
|
3020
|
+
borderColor: tokens32.colors.border
|
|
2925
3021
|
} : void 0,
|
|
2926
3022
|
"&:focus-visible": {
|
|
2927
|
-
outline: `2px solid ${
|
|
2928
|
-
boxShadow:
|
|
3023
|
+
outline: `2px solid ${tokens32.colors.greenLight}`,
|
|
3024
|
+
boxShadow: tokens32.shadows.focus
|
|
2929
3025
|
}
|
|
2930
3026
|
},
|
|
2931
3027
|
children: [
|
|
2932
3028
|
/* @__PURE__ */ jsx32(MitumbaAvatar, { name, imageUrl: avatarUrl, size: "md" }),
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
3029
|
+
/* @__PURE__ */ jsxs20(Box24, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
3030
|
+
/* @__PURE__ */ jsxs20(Box24, { sx: { display: "flex", alignItems: "center", gap: tokens32.spacing.sm }, children: [
|
|
2935
3031
|
/* @__PURE__ */ jsx32(
|
|
2936
|
-
|
|
3032
|
+
Typography17,
|
|
2937
3033
|
{
|
|
2938
3034
|
sx: {
|
|
2939
|
-
fontWeight:
|
|
2940
|
-
fontSize:
|
|
2941
|
-
color:
|
|
3035
|
+
fontWeight: tokens32.typography.fontWeights.bold,
|
|
3036
|
+
fontSize: tokens32.typography.fontSizes.base,
|
|
3037
|
+
color: tokens32.colors.textPrimary,
|
|
2942
3038
|
lineHeight: 1.2,
|
|
2943
3039
|
overflow: "hidden",
|
|
2944
3040
|
textOverflow: "ellipsis",
|
|
2945
3041
|
whiteSpace: "nowrap",
|
|
2946
|
-
fontFamily:
|
|
3042
|
+
fontFamily: tokens32.typography.fontFamily
|
|
2947
3043
|
},
|
|
2948
3044
|
children: name
|
|
2949
3045
|
}
|
|
2950
3046
|
),
|
|
2951
3047
|
isVaziFeatured && /* @__PURE__ */ jsx32(VAZIBadge, { size: "small" })
|
|
2952
3048
|
] }),
|
|
2953
|
-
/* @__PURE__ */
|
|
3049
|
+
/* @__PURE__ */ jsxs20(Box24, { sx: { display: "flex", alignItems: "center", gap: tokens32.spacing.sm, mt: tokens32.spacing.xs }, children: [
|
|
2954
3050
|
/* @__PURE__ */ jsx32(STIScoreChip, { score: stiScore, compact: true }),
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */ jsx32(Inventory2OutlinedIcon, { sx: { fontSize: 14, color:
|
|
3051
|
+
/* @__PURE__ */ jsxs20(Box24, { sx: { display: "flex", alignItems: "center", gap: "4px", opacity: 0.7 }, children: [
|
|
3052
|
+
/* @__PURE__ */ jsx32(Inventory2OutlinedIcon, { sx: { fontSize: 14, color: tokens32.colors.textSecondary } }),
|
|
2957
3053
|
/* @__PURE__ */ jsx32(
|
|
2958
|
-
|
|
3054
|
+
Typography17,
|
|
2959
3055
|
{
|
|
2960
3056
|
sx: {
|
|
2961
|
-
color:
|
|
3057
|
+
color: tokens32.colors.textSecondary,
|
|
2962
3058
|
fontSize: 10,
|
|
2963
|
-
fontWeight:
|
|
3059
|
+
fontWeight: tokens32.typography.fontWeights.semibold,
|
|
2964
3060
|
textTransform: "uppercase",
|
|
2965
|
-
letterSpacing:
|
|
3061
|
+
letterSpacing: tokens32.typography.letterSpacings.wide
|
|
2966
3062
|
},
|
|
2967
3063
|
children: totalListings
|
|
2968
3064
|
}
|
|
2969
3065
|
)
|
|
2970
3066
|
] }),
|
|
2971
|
-
/* @__PURE__ */
|
|
2972
|
-
/* @__PURE__ */ jsx32(LocationOnOutlinedIcon, { sx: { fontSize: 14, color:
|
|
3067
|
+
/* @__PURE__ */ jsxs20(Box24, { sx: { display: "flex", alignItems: "center", gap: "4px", opacity: 0.7 }, children: [
|
|
3068
|
+
/* @__PURE__ */ jsx32(LocationOnOutlinedIcon, { sx: { fontSize: 14, color: tokens32.colors.textSecondary } }),
|
|
2973
3069
|
/* @__PURE__ */ jsx32(
|
|
2974
|
-
|
|
3070
|
+
Typography17,
|
|
2975
3071
|
{
|
|
2976
3072
|
sx: {
|
|
2977
|
-
color:
|
|
3073
|
+
color: tokens32.colors.textSecondary,
|
|
2978
3074
|
fontSize: 10,
|
|
2979
|
-
fontWeight:
|
|
3075
|
+
fontWeight: tokens32.typography.fontWeights.semibold,
|
|
2980
3076
|
textTransform: "uppercase",
|
|
2981
|
-
letterSpacing:
|
|
3077
|
+
letterSpacing: tokens32.typography.letterSpacings.wide
|
|
2982
3078
|
},
|
|
2983
3079
|
children: city
|
|
2984
3080
|
}
|
|
@@ -2993,12 +3089,12 @@ function SellerCard({
|
|
|
2993
3089
|
|
|
2994
3090
|
// src/components/seller/STIBreakdownPanel/STIBreakdownPanel.tsx
|
|
2995
3091
|
import Box25 from "@mui/material/Box";
|
|
2996
|
-
import
|
|
3092
|
+
import Typography18 from "@mui/material/Typography";
|
|
2997
3093
|
import LinearProgress2 from "@mui/material/LinearProgress";
|
|
2998
3094
|
import AddOutlinedIcon from "@mui/icons-material/AddOutlined";
|
|
2999
3095
|
import RemoveOutlinedIcon from "@mui/icons-material/RemoveOutlined";
|
|
3000
|
-
import { tokens as
|
|
3001
|
-
import { jsx as jsx33, jsxs as
|
|
3096
|
+
import { tokens as tokens33 } from "@mitumba/tokens";
|
|
3097
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3002
3098
|
function formatPercent(value) {
|
|
3003
3099
|
return `${Math.round(value * 100)}%`;
|
|
3004
3100
|
}
|
|
@@ -3016,33 +3112,33 @@ function STIBreakdownPanel({
|
|
|
3016
3112
|
{ label: "Avg Response Time", display: `${avgResponseHours}h` },
|
|
3017
3113
|
{ label: "Days Active", display: `${daysActive}` }
|
|
3018
3114
|
];
|
|
3019
|
-
return /* @__PURE__ */
|
|
3115
|
+
return /* @__PURE__ */ jsxs21(
|
|
3020
3116
|
Box25,
|
|
3021
3117
|
{
|
|
3022
3118
|
sx: {
|
|
3023
|
-
p:
|
|
3024
|
-
borderRadius:
|
|
3025
|
-
bgcolor:
|
|
3026
|
-
boxShadow:
|
|
3027
|
-
border: `1px solid ${
|
|
3119
|
+
p: tokens33.spacing.base,
|
|
3120
|
+
borderRadius: tokens33.radius.lg,
|
|
3121
|
+
bgcolor: tokens33.colors.surface,
|
|
3122
|
+
boxShadow: tokens33.shadows.card,
|
|
3123
|
+
border: `1px solid ${tokens33.colors.divider}`
|
|
3028
3124
|
},
|
|
3029
3125
|
children: [
|
|
3030
|
-
/* @__PURE__ */ jsx33(Box25, { sx: { display: "flex", alignItems: "center", gap:
|
|
3031
|
-
/* @__PURE__ */ jsx33(Box25, { component: "section", "aria-label": "Score factors", sx: { mb:
|
|
3032
|
-
/* @__PURE__ */
|
|
3126
|
+
/* @__PURE__ */ jsx33(Box25, { sx: { display: "flex", alignItems: "center", gap: tokens33.spacing.base, mb: tokens33.spacing.lg }, children: /* @__PURE__ */ jsx33(STIScoreChip, { score }) }),
|
|
3127
|
+
/* @__PURE__ */ jsx33(Box25, { component: "section", "aria-label": "Score factors", sx: { mb: tokens33.spacing.lg }, children: factors.map((factor) => /* @__PURE__ */ jsxs21(Box25, { sx: { mb: tokens33.spacing.md }, children: [
|
|
3128
|
+
/* @__PURE__ */ jsxs21(Box25, { sx: { display: "flex", justifyContent: "space-between", mb: tokens33.spacing.xs }, children: [
|
|
3033
3129
|
/* @__PURE__ */ jsx33(
|
|
3034
|
-
|
|
3130
|
+
Typography18,
|
|
3035
3131
|
{
|
|
3036
3132
|
variant: "body2",
|
|
3037
|
-
sx: { color:
|
|
3133
|
+
sx: { color: tokens33.colors.textSecondary, fontSize: tokens33.typography.fontSizes.sm },
|
|
3038
3134
|
children: factor.label
|
|
3039
3135
|
}
|
|
3040
3136
|
),
|
|
3041
3137
|
/* @__PURE__ */ jsx33(
|
|
3042
|
-
|
|
3138
|
+
Typography18,
|
|
3043
3139
|
{
|
|
3044
3140
|
variant: "body2",
|
|
3045
|
-
sx: { fontWeight:
|
|
3141
|
+
sx: { fontWeight: tokens33.typography.fontWeights.semibold, fontSize: tokens33.typography.fontSizes.sm },
|
|
3046
3142
|
children: factor.display
|
|
3047
3143
|
}
|
|
3048
3144
|
)
|
|
@@ -3053,66 +3149,66 @@ function STIBreakdownPanel({
|
|
|
3053
3149
|
variant: "determinate",
|
|
3054
3150
|
value: factor.value * 100,
|
|
3055
3151
|
sx: {
|
|
3056
|
-
height:
|
|
3057
|
-
borderRadius:
|
|
3058
|
-
bgcolor:
|
|
3152
|
+
height: tokens33.spacing.sm,
|
|
3153
|
+
borderRadius: tokens33.radius.full,
|
|
3154
|
+
bgcolor: tokens33.colors.background,
|
|
3059
3155
|
"& .MuiLinearProgress-bar": {
|
|
3060
|
-
bgcolor:
|
|
3061
|
-
borderRadius:
|
|
3156
|
+
bgcolor: tokens33.colors.green,
|
|
3157
|
+
borderRadius: tokens33.radius.full
|
|
3062
3158
|
}
|
|
3063
3159
|
},
|
|
3064
3160
|
"aria-label": `${factor.label} progress`
|
|
3065
3161
|
}
|
|
3066
3162
|
)
|
|
3067
3163
|
] }, factor.label)) }),
|
|
3068
|
-
recentEvents.length > 0 && /* @__PURE__ */
|
|
3164
|
+
recentEvents.length > 0 && /* @__PURE__ */ jsxs21(Box25, { component: "section", "aria-label": "Recent STI events", children: [
|
|
3069
3165
|
/* @__PURE__ */ jsx33(
|
|
3070
|
-
|
|
3166
|
+
Typography18,
|
|
3071
3167
|
{
|
|
3072
3168
|
variant: "body2",
|
|
3073
3169
|
sx: {
|
|
3074
|
-
fontWeight:
|
|
3075
|
-
fontSize:
|
|
3076
|
-
color:
|
|
3077
|
-
mb:
|
|
3170
|
+
fontWeight: tokens33.typography.fontWeights.semibold,
|
|
3171
|
+
fontSize: tokens33.typography.fontSizes.sm,
|
|
3172
|
+
color: tokens33.colors.textPrimary,
|
|
3173
|
+
mb: tokens33.spacing.sm
|
|
3078
3174
|
},
|
|
3079
3175
|
children: "Recent Events"
|
|
3080
3176
|
}
|
|
3081
3177
|
),
|
|
3082
|
-
recentEvents.map((event) => /* @__PURE__ */
|
|
3178
|
+
recentEvents.map((event) => /* @__PURE__ */ jsxs21(
|
|
3083
3179
|
Box25,
|
|
3084
3180
|
{
|
|
3085
3181
|
sx: {
|
|
3086
3182
|
display: "flex",
|
|
3087
3183
|
alignItems: "flex-start",
|
|
3088
|
-
gap:
|
|
3089
|
-
py:
|
|
3090
|
-
borderBottom: `1px solid ${
|
|
3184
|
+
gap: tokens33.spacing.sm,
|
|
3185
|
+
py: tokens33.spacing.sm,
|
|
3186
|
+
borderBottom: `1px solid ${tokens33.colors.divider}`
|
|
3091
3187
|
},
|
|
3092
3188
|
children: [
|
|
3093
|
-
event.type === "positive" ? /* @__PURE__ */ jsx33(AddOutlinedIcon, { sx: { fontSize: 16, color:
|
|
3094
|
-
/* @__PURE__ */
|
|
3095
|
-
/* @__PURE__ */
|
|
3189
|
+
event.type === "positive" ? /* @__PURE__ */ jsx33(AddOutlinedIcon, { sx: { fontSize: 16, color: tokens33.colors.success, mt: tokens33.spacing.xs } }) : /* @__PURE__ */ jsx33(RemoveOutlinedIcon, { sx: { fontSize: 16, color: tokens33.colors.error, mt: tokens33.spacing.xs } }),
|
|
3190
|
+
/* @__PURE__ */ jsxs21(Box25, { sx: { flex: 1 }, children: [
|
|
3191
|
+
/* @__PURE__ */ jsxs21(Box25, { sx: { display: "flex", justifyContent: "space-between" }, children: [
|
|
3096
3192
|
/* @__PURE__ */ jsx33(
|
|
3097
|
-
|
|
3193
|
+
Typography18,
|
|
3098
3194
|
{
|
|
3099
3195
|
variant: "body2",
|
|
3100
3196
|
sx: {
|
|
3101
|
-
fontSize:
|
|
3102
|
-
color:
|
|
3103
|
-
fontWeight:
|
|
3197
|
+
fontSize: tokens33.typography.fontSizes.sm,
|
|
3198
|
+
color: tokens33.colors.textPrimary,
|
|
3199
|
+
fontWeight: tokens33.typography.fontWeights.medium
|
|
3104
3200
|
},
|
|
3105
3201
|
children: event.reason
|
|
3106
3202
|
}
|
|
3107
3203
|
),
|
|
3108
|
-
/* @__PURE__ */
|
|
3109
|
-
|
|
3204
|
+
/* @__PURE__ */ jsxs21(
|
|
3205
|
+
Typography18,
|
|
3110
3206
|
{
|
|
3111
3207
|
variant: "caption",
|
|
3112
3208
|
sx: {
|
|
3113
|
-
fontSize:
|
|
3114
|
-
fontWeight:
|
|
3115
|
-
color: event.type === "positive" ?
|
|
3209
|
+
fontSize: tokens33.typography.fontSizes.xs,
|
|
3210
|
+
fontWeight: tokens33.typography.fontWeights.bold,
|
|
3211
|
+
color: event.type === "positive" ? tokens33.colors.success : tokens33.colors.error
|
|
3116
3212
|
},
|
|
3117
3213
|
children: [
|
|
3118
3214
|
event.type === "positive" ? "+" : "",
|
|
@@ -3121,7 +3217,7 @@ function STIBreakdownPanel({
|
|
|
3121
3217
|
}
|
|
3122
3218
|
)
|
|
3123
3219
|
] }),
|
|
3124
|
-
/* @__PURE__ */ jsx33(
|
|
3220
|
+
/* @__PURE__ */ jsx33(Typography18, { variant: "caption", sx: { fontSize: tokens33.typography.fontSizes.xs, color: tokens33.colors.textSecondary }, children: event.timestamp })
|
|
3125
3221
|
] })
|
|
3126
3222
|
]
|
|
3127
3223
|
},
|
|
@@ -3136,14 +3232,14 @@ function STIBreakdownPanel({
|
|
|
3136
3232
|
// src/components/listing/ListingCard/ListingCard.tsx
|
|
3137
3233
|
import { useState as useState7 } from "react";
|
|
3138
3234
|
import Box26 from "@mui/material/Box";
|
|
3139
|
-
import
|
|
3235
|
+
import Typography19 from "@mui/material/Typography";
|
|
3140
3236
|
import Stack4 from "@mui/material/Stack";
|
|
3141
3237
|
import IconButton6 from "@mui/material/IconButton";
|
|
3142
3238
|
import FavoriteIcon from "@mui/icons-material/Favorite";
|
|
3143
3239
|
import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorder";
|
|
3144
3240
|
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
|
|
3145
|
-
import { tokens as
|
|
3146
|
-
import { jsx as jsx34, jsxs as
|
|
3241
|
+
import { tokens as tokens34 } from "@mitumba/tokens";
|
|
3242
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3147
3243
|
function ListingCard({
|
|
3148
3244
|
images,
|
|
3149
3245
|
title,
|
|
@@ -3168,15 +3264,15 @@ function ListingCard({
|
|
|
3168
3264
|
e.stopPropagation();
|
|
3169
3265
|
onLikeClick?.(e);
|
|
3170
3266
|
};
|
|
3171
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsxs22(
|
|
3172
3268
|
Box26,
|
|
3173
3269
|
{
|
|
3174
3270
|
onClick,
|
|
3175
3271
|
sx: [
|
|
3176
3272
|
{
|
|
3177
3273
|
width: "100%",
|
|
3178
|
-
backgroundColor:
|
|
3179
|
-
borderRadius: `${
|
|
3274
|
+
backgroundColor: tokens34.colors.surface,
|
|
3275
|
+
borderRadius: `${tokens34.radius.lg}px`,
|
|
3180
3276
|
// Standardized to 16px (Serious)
|
|
3181
3277
|
overflow: "hidden",
|
|
3182
3278
|
// High-end layered shadow, no clunky borders
|
|
@@ -3189,13 +3285,13 @@ function ListingCard({
|
|
|
3189
3285
|
position: "relative",
|
|
3190
3286
|
"&:hover": {
|
|
3191
3287
|
transform: "translateY(-6px)",
|
|
3192
|
-
boxShadow:
|
|
3288
|
+
boxShadow: tokens34.shadows.deep
|
|
3193
3289
|
}
|
|
3194
3290
|
},
|
|
3195
3291
|
...Array.isArray(sx) ? sx : [sx]
|
|
3196
3292
|
],
|
|
3197
3293
|
children: [
|
|
3198
|
-
/* @__PURE__ */
|
|
3294
|
+
/* @__PURE__ */ jsxs22(Box26, { sx: { position: "relative", width: "100%", pt: "100%", backgroundColor: tokens34.colors.background }, children: [
|
|
3199
3295
|
/* @__PURE__ */ jsx34(
|
|
3200
3296
|
Box26,
|
|
3201
3297
|
{
|
|
@@ -3224,13 +3320,13 @@ function ListingCard({
|
|
|
3224
3320
|
backdropFilter: "blur(4px)",
|
|
3225
3321
|
px: 1.5,
|
|
3226
3322
|
py: 0.5,
|
|
3227
|
-
borderRadius:
|
|
3323
|
+
borderRadius: tokens34.radius.full,
|
|
3228
3324
|
fontSize: 10,
|
|
3229
3325
|
fontWeight: 800,
|
|
3230
|
-
color:
|
|
3231
|
-
fontFamily:
|
|
3326
|
+
color: tokens34.colors.textPrimary,
|
|
3327
|
+
fontFamily: tokens34.typography.fontFamily,
|
|
3232
3328
|
textTransform: "uppercase",
|
|
3233
|
-
boxShadow:
|
|
3329
|
+
boxShadow: tokens34.shadows.card,
|
|
3234
3330
|
zIndex: 2
|
|
3235
3331
|
},
|
|
3236
3332
|
children: badge
|
|
@@ -3245,12 +3341,12 @@ function ListingCard({
|
|
|
3245
3341
|
right: 12,
|
|
3246
3342
|
width: 32,
|
|
3247
3343
|
height: 32,
|
|
3248
|
-
backgroundColor:
|
|
3344
|
+
backgroundColor: tokens34.colors.white,
|
|
3249
3345
|
borderRadius: "50%",
|
|
3250
3346
|
display: "flex",
|
|
3251
3347
|
alignItems: "center",
|
|
3252
3348
|
justifyContent: "center",
|
|
3253
|
-
boxShadow:
|
|
3349
|
+
boxShadow: tokens34.shadows.card,
|
|
3254
3350
|
p: 0.5,
|
|
3255
3351
|
zIndex: 2,
|
|
3256
3352
|
"& img": { width: "100%", height: "100%", objectFit: "contain" }
|
|
@@ -3268,10 +3364,10 @@ function ListingCard({
|
|
|
3268
3364
|
right: 12,
|
|
3269
3365
|
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
3270
3366
|
backdropFilter: "blur(4px)",
|
|
3271
|
-
boxShadow:
|
|
3272
|
-
color: isLiked ?
|
|
3367
|
+
boxShadow: tokens34.shadows.card,
|
|
3368
|
+
color: isLiked ? tokens34.colors.error : tokens34.colors.textSecondary,
|
|
3273
3369
|
zIndex: 2,
|
|
3274
|
-
"&:hover": { backgroundColor:
|
|
3370
|
+
"&:hover": { backgroundColor: tokens34.colors.white, transform: "scale(1.1)" }
|
|
3275
3371
|
},
|
|
3276
3372
|
children: isLiked ? /* @__PURE__ */ jsx34(FavoriteIcon, { sx: { fontSize: 18 } }) : /* @__PURE__ */ jsx34(FavoriteBorderIcon, { sx: { fontSize: 18 } })
|
|
3277
3373
|
}
|
|
@@ -3298,8 +3394,8 @@ function ListingCard({
|
|
|
3298
3394
|
sx: {
|
|
3299
3395
|
width: activeImage === i ? 12 : 6,
|
|
3300
3396
|
height: 6,
|
|
3301
|
-
borderRadius:
|
|
3302
|
-
backgroundColor:
|
|
3397
|
+
borderRadius: tokens34.radius.full,
|
|
3398
|
+
backgroundColor: tokens34.colors.white,
|
|
3303
3399
|
opacity: activeImage === i ? 1 : 0.5,
|
|
3304
3400
|
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
3305
3401
|
cursor: "pointer",
|
|
@@ -3311,16 +3407,16 @@ function ListingCard({
|
|
|
3311
3407
|
}
|
|
3312
3408
|
)
|
|
3313
3409
|
] }),
|
|
3314
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsxs22(Box26, { sx: { p: 2.5 }, children: [
|
|
3315
3411
|
" ",
|
|
3316
3412
|
/* @__PURE__ */ jsx34(
|
|
3317
|
-
|
|
3413
|
+
Typography19,
|
|
3318
3414
|
{
|
|
3319
3415
|
sx: {
|
|
3320
|
-
fontSize:
|
|
3416
|
+
fontSize: tokens34.typography.fontSizes.base,
|
|
3321
3417
|
fontWeight: 800,
|
|
3322
|
-
color:
|
|
3323
|
-
fontFamily:
|
|
3418
|
+
color: tokens34.colors.textPrimary,
|
|
3419
|
+
fontFamily: tokens34.typography.fontFamily,
|
|
3324
3420
|
lineHeight: 1.2,
|
|
3325
3421
|
mb: 0.5,
|
|
3326
3422
|
whiteSpace: "nowrap",
|
|
@@ -3330,13 +3426,13 @@ function ListingCard({
|
|
|
3330
3426
|
children: title
|
|
3331
3427
|
}
|
|
3332
3428
|
),
|
|
3333
|
-
(brand || size) && /* @__PURE__ */
|
|
3334
|
-
|
|
3429
|
+
(brand || size) && /* @__PURE__ */ jsxs22(
|
|
3430
|
+
Typography19,
|
|
3335
3431
|
{
|
|
3336
3432
|
sx: {
|
|
3337
|
-
fontSize:
|
|
3338
|
-
color:
|
|
3339
|
-
fontFamily:
|
|
3433
|
+
fontSize: tokens34.typography.fontSizes.xs,
|
|
3434
|
+
color: tokens34.colors.textSecondary,
|
|
3435
|
+
fontFamily: tokens34.typography.fontFamily,
|
|
3340
3436
|
fontWeight: 600,
|
|
3341
3437
|
mb: 2
|
|
3342
3438
|
},
|
|
@@ -3347,34 +3443,34 @@ function ListingCard({
|
|
|
3347
3443
|
]
|
|
3348
3444
|
}
|
|
3349
3445
|
),
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
/* @__PURE__ */
|
|
3446
|
+
/* @__PURE__ */ jsxs22(Stack4, { direction: "row", alignItems: "center", justifyContent: "space-between", spacing: 2, children: [
|
|
3447
|
+
/* @__PURE__ */ jsxs22(
|
|
3352
3448
|
Box26,
|
|
3353
3449
|
{
|
|
3354
3450
|
sx: {
|
|
3355
|
-
backgroundColor:
|
|
3451
|
+
backgroundColor: tokens34.colors.background,
|
|
3356
3452
|
px: 1.5,
|
|
3357
3453
|
py: 0.8,
|
|
3358
|
-
borderRadius:
|
|
3359
|
-
fontSize:
|
|
3454
|
+
borderRadius: tokens34.radius.full,
|
|
3455
|
+
fontSize: tokens34.typography.fontSizes.base,
|
|
3360
3456
|
fontWeight: 800,
|
|
3361
|
-
color:
|
|
3362
|
-
fontFamily:
|
|
3457
|
+
color: tokens34.colors.textPrimary,
|
|
3458
|
+
fontFamily: tokens34.typography.fontFamily,
|
|
3363
3459
|
display: "flex",
|
|
3364
3460
|
alignItems: "baseline",
|
|
3365
3461
|
gap: 0.5
|
|
3366
3462
|
},
|
|
3367
3463
|
children: [
|
|
3368
|
-
/* @__PURE__ */ jsx34(
|
|
3464
|
+
/* @__PURE__ */ jsx34(Typography19, { component: "span", sx: { fontSize: 10, fontWeight: 900 }, children: "KES" }),
|
|
3369
3465
|
price.toLocaleString(),
|
|
3370
3466
|
originalPrice && /* @__PURE__ */ jsx34(
|
|
3371
|
-
|
|
3467
|
+
Typography19,
|
|
3372
3468
|
{
|
|
3373
3469
|
component: "span",
|
|
3374
3470
|
sx: {
|
|
3375
3471
|
ml: 0.5,
|
|
3376
3472
|
fontSize: 10,
|
|
3377
|
-
color:
|
|
3473
|
+
color: tokens34.colors.textDisabled,
|
|
3378
3474
|
textDecoration: "line-through",
|
|
3379
3475
|
fontWeight: 600
|
|
3380
3476
|
},
|
|
@@ -3394,7 +3490,7 @@ function ListingCard({
|
|
|
3394
3490
|
icon: /* @__PURE__ */ jsx34(ArrowOutwardIcon, { sx: { fontSize: 16 } }),
|
|
3395
3491
|
iconPosition: "right",
|
|
3396
3492
|
sx: {
|
|
3397
|
-
borderRadius:
|
|
3493
|
+
borderRadius: tokens34.radius.full,
|
|
3398
3494
|
px: 2.5,
|
|
3399
3495
|
height: 32,
|
|
3400
3496
|
// Forced small height for density
|
|
@@ -3412,16 +3508,16 @@ function ListingCard({
|
|
|
3412
3508
|
|
|
3413
3509
|
// src/components/listing/ListingCardSkeleton/ListingCardSkeleton.tsx
|
|
3414
3510
|
import Box27 from "@mui/material/Box";
|
|
3415
|
-
import { tokens as
|
|
3416
|
-
import { jsx as jsx35, jsxs as
|
|
3511
|
+
import { tokens as tokens35 } from "@mitumba/tokens";
|
|
3512
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3417
3513
|
function ListingCardSkeleton() {
|
|
3418
|
-
return /* @__PURE__ */
|
|
3514
|
+
return /* @__PURE__ */ jsxs23(
|
|
3419
3515
|
Box27,
|
|
3420
3516
|
{
|
|
3421
3517
|
sx: {
|
|
3422
3518
|
width: "100%",
|
|
3423
|
-
backgroundColor:
|
|
3424
|
-
borderRadius: `${
|
|
3519
|
+
backgroundColor: tokens35.colors.surface,
|
|
3520
|
+
borderRadius: `${tokens35.radius.lg}px`,
|
|
3425
3521
|
// 16px (Serious Standard)
|
|
3426
3522
|
overflow: "hidden",
|
|
3427
3523
|
boxShadow: `
|
|
@@ -3437,7 +3533,7 @@ function ListingCardSkeleton() {
|
|
|
3437
3533
|
sx: { position: "absolute", inset: 0, height: "100%", width: "100%" }
|
|
3438
3534
|
}
|
|
3439
3535
|
) }),
|
|
3440
|
-
/* @__PURE__ */
|
|
3536
|
+
/* @__PURE__ */ jsxs23(Box27, { sx: { p: 2.5 }, children: [
|
|
3441
3537
|
/* @__PURE__ */ jsx35(
|
|
3442
3538
|
MitumbaSkeleton,
|
|
3443
3539
|
{
|
|
@@ -3456,7 +3552,7 @@ function ListingCardSkeleton() {
|
|
|
3456
3552
|
sx: { mb: 3, borderRadius: 1 }
|
|
3457
3553
|
}
|
|
3458
3554
|
),
|
|
3459
|
-
/* @__PURE__ */
|
|
3555
|
+
/* @__PURE__ */ jsxs23(Box27, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
3460
3556
|
/* @__PURE__ */ jsx35(
|
|
3461
3557
|
MitumbaSkeleton,
|
|
3462
3558
|
{
|
|
@@ -3515,8 +3611,8 @@ function ListingGrid({
|
|
|
3515
3611
|
// src/components/listing/ListingImageGallery/ListingImageGallery.tsx
|
|
3516
3612
|
import { useState as useState8, useCallback as useCallback2, useEffect as useEffect4 } from "react";
|
|
3517
3613
|
import Box29 from "@mui/material/Box";
|
|
3518
|
-
import { tokens as
|
|
3519
|
-
import { jsx as jsx37, jsxs as
|
|
3614
|
+
import { tokens as tokens36 } from "@mitumba/tokens";
|
|
3615
|
+
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3520
3616
|
function ListingImageGallery({ images, title }) {
|
|
3521
3617
|
const [activeIndex, setActiveIndex] = useState8(0);
|
|
3522
3618
|
const goTo = useCallback2(
|
|
@@ -3549,26 +3645,26 @@ function ListingImageGallery({ images, title }) {
|
|
|
3549
3645
|
sx: {
|
|
3550
3646
|
alignItems: "center",
|
|
3551
3647
|
aspectRatio: "1 / 1",
|
|
3552
|
-
backgroundColor:
|
|
3553
|
-
borderRadius: `${
|
|
3554
|
-
color:
|
|
3648
|
+
backgroundColor: tokens36.colors.background,
|
|
3649
|
+
borderRadius: `${tokens36.radius.lg}px`,
|
|
3650
|
+
color: tokens36.colors.textSecondary,
|
|
3555
3651
|
display: "flex",
|
|
3556
|
-
fontSize:
|
|
3652
|
+
fontSize: tokens36.typography.fontSizes.base,
|
|
3557
3653
|
justifyContent: "center",
|
|
3558
3654
|
width: "100%",
|
|
3559
|
-
border: `1px dashed ${
|
|
3655
|
+
border: `1px dashed ${tokens36.colors.divider}`
|
|
3560
3656
|
},
|
|
3561
3657
|
children: "No images available"
|
|
3562
3658
|
}
|
|
3563
3659
|
);
|
|
3564
3660
|
}
|
|
3565
|
-
return /* @__PURE__ */
|
|
3661
|
+
return /* @__PURE__ */ jsxs24(
|
|
3566
3662
|
Box29,
|
|
3567
3663
|
{
|
|
3568
3664
|
sx: {
|
|
3569
3665
|
display: "flex",
|
|
3570
3666
|
flexDirection: "column",
|
|
3571
|
-
gap:
|
|
3667
|
+
gap: tokens36.spacing.base,
|
|
3572
3668
|
width: "100%"
|
|
3573
3669
|
},
|
|
3574
3670
|
children: [
|
|
@@ -3577,11 +3673,11 @@ function ListingImageGallery({ images, title }) {
|
|
|
3577
3673
|
{
|
|
3578
3674
|
sx: {
|
|
3579
3675
|
aspectRatio: "1 / 1",
|
|
3580
|
-
borderRadius: `${
|
|
3676
|
+
borderRadius: `${tokens36.radius.lg}px`,
|
|
3581
3677
|
overflow: "hidden",
|
|
3582
3678
|
position: "relative",
|
|
3583
3679
|
width: "100%",
|
|
3584
|
-
backgroundColor:
|
|
3680
|
+
backgroundColor: tokens36.colors.background,
|
|
3585
3681
|
boxShadow: `
|
|
3586
3682
|
0 2px 4px 0 rgba(0, 0, 0, 0.05),
|
|
3587
3683
|
0 8px 16px -4px rgba(0, 0, 0, 0.1)
|
|
@@ -3629,8 +3725,8 @@ function ListingImageGallery({ images, title }) {
|
|
|
3629
3725
|
role: "button",
|
|
3630
3726
|
tabIndex: 0,
|
|
3631
3727
|
sx: {
|
|
3632
|
-
border: index === activeIndex ? `2px solid ${
|
|
3633
|
-
borderRadius: `${
|
|
3728
|
+
border: index === activeIndex ? `2px solid ${tokens36.colors.green}` : `2px solid transparent`,
|
|
3729
|
+
borderRadius: `${tokens36.radius.md}px`,
|
|
3634
3730
|
cursor: "pointer",
|
|
3635
3731
|
flexShrink: 0,
|
|
3636
3732
|
height: 56,
|
|
@@ -3645,7 +3741,7 @@ function ListingImageGallery({ images, title }) {
|
|
|
3645
3741
|
},
|
|
3646
3742
|
"&:focus-visible": {
|
|
3647
3743
|
outline: "none",
|
|
3648
|
-
boxShadow:
|
|
3744
|
+
boxShadow: tokens36.shadows.focus
|
|
3649
3745
|
}
|
|
3650
3746
|
},
|
|
3651
3747
|
"aria-label": `View image ${index + 1} of ${images.length}`,
|
|
@@ -3696,33 +3792,33 @@ function ConditionBadge({ grade, showLabel = false }) {
|
|
|
3696
3792
|
}
|
|
3697
3793
|
|
|
3698
3794
|
// src/components/commerce/PriceTag/PriceTag.tsx
|
|
3699
|
-
import
|
|
3700
|
-
import { tokens as
|
|
3795
|
+
import Typography20 from "@mui/material/Typography";
|
|
3796
|
+
import { tokens as tokens37 } from "@mitumba/tokens";
|
|
3701
3797
|
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3702
3798
|
function PriceTag({ priceKes, size = "medium", color = "default", strikethrough = false }) {
|
|
3703
3799
|
const formattedNumber = new Intl.NumberFormat("en-KE").format(priceKes);
|
|
3704
3800
|
const formatted = `KES ${formattedNumber}`;
|
|
3705
3801
|
const sizeStyles = {
|
|
3706
3802
|
small: {
|
|
3707
|
-
fontSize:
|
|
3708
|
-
fontWeight:
|
|
3803
|
+
fontSize: tokens37.typography.fontSizes.sm,
|
|
3804
|
+
fontWeight: tokens37.typography.fontWeights.semibold
|
|
3709
3805
|
},
|
|
3710
3806
|
medium: {
|
|
3711
|
-
fontSize:
|
|
3712
|
-
fontWeight:
|
|
3807
|
+
fontSize: tokens37.typography.fontSizes.base,
|
|
3808
|
+
fontWeight: tokens37.typography.fontWeights.bold
|
|
3713
3809
|
},
|
|
3714
3810
|
large: {
|
|
3715
|
-
fontSize:
|
|
3716
|
-
fontWeight:
|
|
3811
|
+
fontSize: tokens37.typography.fontSizes.xl,
|
|
3812
|
+
fontWeight: tokens37.typography.fontWeights.extrabold
|
|
3717
3813
|
}
|
|
3718
3814
|
};
|
|
3719
3815
|
const colorMap = {
|
|
3720
|
-
green:
|
|
3721
|
-
earth:
|
|
3722
|
-
default:
|
|
3816
|
+
green: tokens37.colors.green,
|
|
3817
|
+
earth: tokens37.colors.earth,
|
|
3818
|
+
default: tokens37.colors.textPrimary
|
|
3723
3819
|
};
|
|
3724
3820
|
return /* @__PURE__ */ jsx39(
|
|
3725
|
-
|
|
3821
|
+
Typography20,
|
|
3726
3822
|
{
|
|
3727
3823
|
component: "span",
|
|
3728
3824
|
sx: {
|
|
@@ -3760,12 +3856,12 @@ function DeliveryBadge({ type, estimatedDays }) {
|
|
|
3760
3856
|
|
|
3761
3857
|
// src/components/commerce/CartItem/CartItem.tsx
|
|
3762
3858
|
import Box30 from "@mui/material/Box";
|
|
3763
|
-
import
|
|
3859
|
+
import Typography21 from "@mui/material/Typography";
|
|
3764
3860
|
import IconButton7 from "@mui/material/IconButton";
|
|
3765
3861
|
import CloseIcon4 from "@mui/icons-material/Close";
|
|
3766
3862
|
import Stack5 from "@mui/material/Stack";
|
|
3767
|
-
import { tokens as
|
|
3768
|
-
import { jsx as jsx41, jsxs as
|
|
3863
|
+
import { tokens as tokens38 } from "@mitumba/tokens";
|
|
3864
|
+
import { jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3769
3865
|
function CartItem({
|
|
3770
3866
|
imageUrl,
|
|
3771
3867
|
title,
|
|
@@ -3779,15 +3875,15 @@ function CartItem({
|
|
|
3779
3875
|
onSizeChange,
|
|
3780
3876
|
sx
|
|
3781
3877
|
}) {
|
|
3782
|
-
return /* @__PURE__ */
|
|
3878
|
+
return /* @__PURE__ */ jsxs25(
|
|
3783
3879
|
Box30,
|
|
3784
3880
|
{
|
|
3785
3881
|
sx: [
|
|
3786
3882
|
{
|
|
3787
3883
|
display: "flex",
|
|
3788
3884
|
width: "100%",
|
|
3789
|
-
backgroundColor:
|
|
3790
|
-
borderRadius: `${
|
|
3885
|
+
backgroundColor: tokens38.colors.surface,
|
|
3886
|
+
borderRadius: `${tokens38.radius.lg}px`,
|
|
3791
3887
|
// 16px (Serious Standard)
|
|
3792
3888
|
p: { xs: 2, md: 3 },
|
|
3793
3889
|
boxShadow: `
|
|
@@ -3796,10 +3892,10 @@ function CartItem({
|
|
|
3796
3892
|
`,
|
|
3797
3893
|
transition: "all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
3798
3894
|
position: "relative",
|
|
3799
|
-
border: `1px solid ${
|
|
3895
|
+
border: `1px solid ${tokens38.colors.divider}`,
|
|
3800
3896
|
"&:hover": {
|
|
3801
3897
|
transform: "translateY(-4px)",
|
|
3802
|
-
boxShadow:
|
|
3898
|
+
boxShadow: tokens38.shadows.deep
|
|
3803
3899
|
}
|
|
3804
3900
|
},
|
|
3805
3901
|
...Array.isArray(sx) ? sx : [sx]
|
|
@@ -3811,9 +3907,9 @@ function CartItem({
|
|
|
3811
3907
|
sx: {
|
|
3812
3908
|
width: { xs: 80, sm: 120, md: 140 },
|
|
3813
3909
|
height: { xs: 80, sm: 120, md: 140 },
|
|
3814
|
-
borderRadius: `${
|
|
3910
|
+
borderRadius: `${tokens38.radius.md}px`,
|
|
3815
3911
|
overflow: "hidden",
|
|
3816
|
-
backgroundColor:
|
|
3912
|
+
backgroundColor: tokens38.colors.background,
|
|
3817
3913
|
flexShrink: 0
|
|
3818
3914
|
},
|
|
3819
3915
|
children: /* @__PURE__ */ jsx41(
|
|
@@ -3827,7 +3923,7 @@ function CartItem({
|
|
|
3827
3923
|
)
|
|
3828
3924
|
}
|
|
3829
3925
|
),
|
|
3830
|
-
/* @__PURE__ */
|
|
3926
|
+
/* @__PURE__ */ jsxs25(
|
|
3831
3927
|
Box30,
|
|
3832
3928
|
{
|
|
3833
3929
|
sx: {
|
|
@@ -3840,15 +3936,15 @@ function CartItem({
|
|
|
3840
3936
|
gap: { xs: 2, lg: 4 }
|
|
3841
3937
|
},
|
|
3842
3938
|
children: [
|
|
3843
|
-
/* @__PURE__ */
|
|
3939
|
+
/* @__PURE__ */ jsxs25(Box30, { sx: { flex: 1.5 }, children: [
|
|
3844
3940
|
/* @__PURE__ */ jsx41(
|
|
3845
|
-
|
|
3941
|
+
Typography21,
|
|
3846
3942
|
{
|
|
3847
3943
|
sx: {
|
|
3848
|
-
fontSize:
|
|
3944
|
+
fontSize: tokens38.typography.fontSizes.lg,
|
|
3849
3945
|
fontWeight: 900,
|
|
3850
|
-
color:
|
|
3851
|
-
fontFamily:
|
|
3946
|
+
color: tokens38.colors.textPrimary,
|
|
3947
|
+
fontFamily: tokens38.typography.fontFamily,
|
|
3852
3948
|
textTransform: "uppercase",
|
|
3853
3949
|
lineHeight: 1.1,
|
|
3854
3950
|
mb: 0.5
|
|
@@ -3857,12 +3953,12 @@ function CartItem({
|
|
|
3857
3953
|
}
|
|
3858
3954
|
),
|
|
3859
3955
|
subtitle && /* @__PURE__ */ jsx41(
|
|
3860
|
-
|
|
3956
|
+
Typography21,
|
|
3861
3957
|
{
|
|
3862
3958
|
variant: "caption",
|
|
3863
3959
|
sx: {
|
|
3864
3960
|
display: "block",
|
|
3865
|
-
color:
|
|
3961
|
+
color: tokens38.colors.textSecondary,
|
|
3866
3962
|
fontWeight: 700,
|
|
3867
3963
|
textTransform: "uppercase",
|
|
3868
3964
|
fontSize: 10
|
|
@@ -3871,12 +3967,12 @@ function CartItem({
|
|
|
3871
3967
|
}
|
|
3872
3968
|
),
|
|
3873
3969
|
/* @__PURE__ */ jsx41(
|
|
3874
|
-
|
|
3970
|
+
Typography21,
|
|
3875
3971
|
{
|
|
3876
3972
|
variant: "caption",
|
|
3877
3973
|
sx: {
|
|
3878
3974
|
display: "block",
|
|
3879
|
-
color:
|
|
3975
|
+
color: tokens38.colors.green,
|
|
3880
3976
|
fontWeight: 800,
|
|
3881
3977
|
fontSize: 9,
|
|
3882
3978
|
mt: 1,
|
|
@@ -3887,9 +3983,9 @@ function CartItem({
|
|
|
3887
3983
|
}
|
|
3888
3984
|
)
|
|
3889
3985
|
] }),
|
|
3890
|
-
/* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */ jsx41(
|
|
3986
|
+
/* @__PURE__ */ jsxs25(Stack5, { direction: "row", spacing: { xs: 2, sm: 4, md: 6 }, alignItems: "center", sx: { width: { xs: "100%", lg: "auto" } }, children: [
|
|
3987
|
+
/* @__PURE__ */ jsxs25(Box30, { sx: { width: 80 }, children: [
|
|
3988
|
+
/* @__PURE__ */ jsx41(Typography21, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: tokens38.colors.textDisabled, fontSize: 10 }, children: "SIZE" }),
|
|
3893
3989
|
/* @__PURE__ */ jsx41(
|
|
3894
3990
|
MitumbaSelect,
|
|
3895
3991
|
{
|
|
@@ -3902,8 +3998,8 @@ function CartItem({
|
|
|
3902
3998
|
}
|
|
3903
3999
|
)
|
|
3904
4000
|
] }),
|
|
3905
|
-
/* @__PURE__ */
|
|
3906
|
-
/* @__PURE__ */ jsx41(
|
|
4001
|
+
/* @__PURE__ */ jsxs25(Box30, { sx: { width: 80 }, children: [
|
|
4002
|
+
/* @__PURE__ */ jsx41(Typography21, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: tokens38.colors.textDisabled, fontSize: 10 }, children: "QUANTITY" }),
|
|
3907
4003
|
/* @__PURE__ */ jsx41(
|
|
3908
4004
|
MitumbaSelect,
|
|
3909
4005
|
{
|
|
@@ -3916,9 +4012,9 @@ function CartItem({
|
|
|
3916
4012
|
}
|
|
3917
4013
|
)
|
|
3918
4014
|
] }),
|
|
3919
|
-
/* @__PURE__ */
|
|
3920
|
-
/* @__PURE__ */ jsx41(
|
|
3921
|
-
/* @__PURE__ */
|
|
4015
|
+
/* @__PURE__ */ jsxs25(Box30, { sx: { textAlign: "right", minWidth: 100 }, children: [
|
|
4016
|
+
/* @__PURE__ */ jsx41(Typography21, { variant: "caption", sx: { display: "block", mb: 1.5, fontWeight: 700, color: tokens38.colors.textDisabled, fontSize: 10 }, children: "PRICE" }),
|
|
4017
|
+
/* @__PURE__ */ jsxs25(Typography21, { sx: { fontWeight: 900, color: tokens38.colors.textPrimary, fontSize: tokens38.typography.fontSizes.base, fontFamily: tokens38.typography.fontFamily }, children: [
|
|
3922
4018
|
"KES ",
|
|
3923
4019
|
priceKes.toLocaleString()
|
|
3924
4020
|
] })
|
|
@@ -3935,10 +4031,10 @@ function CartItem({
|
|
|
3935
4031
|
position: "absolute",
|
|
3936
4032
|
top: 8,
|
|
3937
4033
|
right: 8,
|
|
3938
|
-
color:
|
|
4034
|
+
color: tokens38.colors.textDisabled,
|
|
3939
4035
|
"&:hover": {
|
|
3940
|
-
color:
|
|
3941
|
-
backgroundColor:
|
|
4036
|
+
color: tokens38.colors.error,
|
|
4037
|
+
backgroundColor: tokens38.colors.errorLight,
|
|
3942
4038
|
transform: "rotate(90deg)"
|
|
3943
4039
|
},
|
|
3944
4040
|
transition: "all 0.3s ease"
|
|
@@ -3954,11 +4050,11 @@ function CartItem({
|
|
|
3954
4050
|
|
|
3955
4051
|
// src/components/commerce/OrderStatusTimeline/OrderStatusTimeline.tsx
|
|
3956
4052
|
import Box31 from "@mui/material/Box";
|
|
3957
|
-
import
|
|
4053
|
+
import Typography22 from "@mui/material/Typography";
|
|
3958
4054
|
import CheckCircleOutlinedIcon from "@mui/icons-material/CheckCircleOutlined";
|
|
3959
4055
|
import RadioButtonUncheckedOutlinedIcon from "@mui/icons-material/RadioButtonUncheckedOutlined";
|
|
3960
|
-
import { tokens as
|
|
3961
|
-
import { jsx as jsx42, jsxs as
|
|
4056
|
+
import { tokens as tokens39 } from "@mitumba/tokens";
|
|
4057
|
+
import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3962
4058
|
var ORDER_STATUS_ORDER = [
|
|
3963
4059
|
"CREATED",
|
|
3964
4060
|
"PAYMENT_PENDING",
|
|
@@ -3983,26 +4079,26 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
3983
4079
|
const currentIndex = ORDER_STATUS_ORDER.indexOf(currentStatus);
|
|
3984
4080
|
const lastEvent = events.length > 0 ? events[events.length - 1] : null;
|
|
3985
4081
|
const currentNote = lastEvent?.note;
|
|
3986
|
-
return /* @__PURE__ */
|
|
4082
|
+
return /* @__PURE__ */ jsxs26(
|
|
3987
4083
|
Box31,
|
|
3988
4084
|
{
|
|
3989
4085
|
sx: {
|
|
3990
|
-
p:
|
|
3991
|
-
borderRadius:
|
|
3992
|
-
bgcolor:
|
|
3993
|
-
boxShadow:
|
|
3994
|
-
border: `1px solid ${
|
|
4086
|
+
p: tokens39.spacing.base,
|
|
4087
|
+
borderRadius: tokens39.radius.lg,
|
|
4088
|
+
bgcolor: tokens39.colors.surface,
|
|
4089
|
+
boxShadow: tokens39.shadows.card,
|
|
4090
|
+
border: `1px solid ${tokens39.colors.divider}`
|
|
3995
4091
|
},
|
|
3996
4092
|
children: [
|
|
3997
|
-
/* @__PURE__ */
|
|
4093
|
+
/* @__PURE__ */ jsxs26(Box31, { sx: { display: "flex", alignItems: "center", gap: tokens39.spacing.sm, mb: tokens39.spacing.base }, children: [
|
|
3998
4094
|
/* @__PURE__ */ jsx42(
|
|
3999
|
-
|
|
4095
|
+
Typography22,
|
|
4000
4096
|
{
|
|
4001
4097
|
sx: {
|
|
4002
|
-
fontWeight:
|
|
4003
|
-
fontSize:
|
|
4004
|
-
color:
|
|
4005
|
-
fontFamily:
|
|
4098
|
+
fontWeight: tokens39.typography.fontWeights.bold,
|
|
4099
|
+
fontSize: tokens39.typography.fontSizes.md,
|
|
4100
|
+
color: tokens39.colors.textPrimary,
|
|
4101
|
+
fontFamily: tokens39.typography.fontFamily
|
|
4006
4102
|
},
|
|
4007
4103
|
children: "Order Tracking"
|
|
4008
4104
|
}
|
|
@@ -4011,15 +4107,15 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4011
4107
|
Box31,
|
|
4012
4108
|
{
|
|
4013
4109
|
sx: {
|
|
4014
|
-
px:
|
|
4110
|
+
px: tokens39.spacing.sm,
|
|
4015
4111
|
py: "2px",
|
|
4016
|
-
borderRadius:
|
|
4017
|
-
bgcolor:
|
|
4018
|
-
color:
|
|
4112
|
+
borderRadius: tokens39.radius.sm,
|
|
4113
|
+
bgcolor: tokens39.colors.greenLight,
|
|
4114
|
+
color: tokens39.colors.greenDark,
|
|
4019
4115
|
fontSize: 10,
|
|
4020
|
-
fontWeight:
|
|
4116
|
+
fontWeight: tokens39.typography.fontWeights.extrabold,
|
|
4021
4117
|
textTransform: "uppercase",
|
|
4022
|
-
letterSpacing:
|
|
4118
|
+
letterSpacing: tokens39.typography.letterSpacings.wide
|
|
4023
4119
|
},
|
|
4024
4120
|
children: ORDER_STATUS_LABELS[currentStatus]
|
|
4025
4121
|
}
|
|
@@ -4029,19 +4125,19 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4029
4125
|
Box31,
|
|
4030
4126
|
{
|
|
4031
4127
|
sx: {
|
|
4032
|
-
p:
|
|
4033
|
-
borderRadius:
|
|
4034
|
-
bgcolor:
|
|
4035
|
-
borderLeft: `3px solid ${
|
|
4036
|
-
mb:
|
|
4128
|
+
p: tokens39.spacing.sm,
|
|
4129
|
+
borderRadius: tokens39.radius.sm,
|
|
4130
|
+
bgcolor: tokens39.colors.background,
|
|
4131
|
+
borderLeft: `3px solid ${tokens39.colors.info}`,
|
|
4132
|
+
mb: tokens39.spacing.lg
|
|
4037
4133
|
},
|
|
4038
|
-
children: /* @__PURE__ */
|
|
4039
|
-
|
|
4134
|
+
children: /* @__PURE__ */ jsxs26(
|
|
4135
|
+
Typography22,
|
|
4040
4136
|
{
|
|
4041
4137
|
sx: {
|
|
4042
|
-
color:
|
|
4043
|
-
fontSize:
|
|
4044
|
-
fontFamily:
|
|
4138
|
+
color: tokens39.colors.textPrimary,
|
|
4139
|
+
fontSize: tokens39.typography.fontSizes.sm,
|
|
4140
|
+
fontFamily: tokens39.typography.fontFamily,
|
|
4045
4141
|
fontStyle: "italic"
|
|
4046
4142
|
},
|
|
4047
4143
|
children: [
|
|
@@ -4058,18 +4154,18 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4058
4154
|
const isCurrent = status === currentStatus;
|
|
4059
4155
|
const statusEvents = events.filter((e) => e.status === status);
|
|
4060
4156
|
const latestEvent = statusEvents.length > 0 ? statusEvents[statusEvents.length - 1] : null;
|
|
4061
|
-
return /* @__PURE__ */
|
|
4157
|
+
return /* @__PURE__ */ jsxs26(
|
|
4062
4158
|
Box31,
|
|
4063
4159
|
{
|
|
4064
4160
|
component: "li",
|
|
4065
4161
|
sx: {
|
|
4066
4162
|
display: "flex",
|
|
4067
4163
|
alignItems: "flex-start",
|
|
4068
|
-
gap:
|
|
4164
|
+
gap: tokens39.spacing.base,
|
|
4069
4165
|
position: "relative"
|
|
4070
4166
|
},
|
|
4071
4167
|
children: [
|
|
4072
|
-
/* @__PURE__ */
|
|
4168
|
+
/* @__PURE__ */ jsxs26(
|
|
4073
4169
|
Box31,
|
|
4074
4170
|
{
|
|
4075
4171
|
sx: {
|
|
@@ -4089,14 +4185,14 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4089
4185
|
width: "24px",
|
|
4090
4186
|
height: "24px",
|
|
4091
4187
|
zIndex: 1,
|
|
4092
|
-
backgroundColor:
|
|
4188
|
+
backgroundColor: tokens39.colors.surface
|
|
4093
4189
|
},
|
|
4094
4190
|
children: isCompleted ? /* @__PURE__ */ jsx42(
|
|
4095
4191
|
CheckCircleOutlinedIcon,
|
|
4096
4192
|
{
|
|
4097
4193
|
sx: {
|
|
4098
4194
|
fontSize: 20,
|
|
4099
|
-
color: isCurrent ?
|
|
4195
|
+
color: isCurrent ? tokens39.colors.green : tokens39.colors.textDisabled
|
|
4100
4196
|
}
|
|
4101
4197
|
}
|
|
4102
4198
|
) : /* @__PURE__ */ jsx42(
|
|
@@ -4104,7 +4200,7 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4104
4200
|
{
|
|
4105
4201
|
sx: {
|
|
4106
4202
|
fontSize: 18,
|
|
4107
|
-
color:
|
|
4203
|
+
color: tokens39.colors.divider
|
|
4108
4204
|
}
|
|
4109
4205
|
}
|
|
4110
4206
|
)
|
|
@@ -4116,8 +4212,8 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4116
4212
|
sx: {
|
|
4117
4213
|
width: "2px",
|
|
4118
4214
|
flex: 1,
|
|
4119
|
-
minHeight:
|
|
4120
|
-
bgcolor: index < currentIndex ?
|
|
4215
|
+
minHeight: tokens39.spacing.lg,
|
|
4216
|
+
bgcolor: index < currentIndex ? tokens39.colors.green : tokens39.colors.divider,
|
|
4121
4217
|
marginBlock: "2px"
|
|
4122
4218
|
}
|
|
4123
4219
|
}
|
|
@@ -4125,27 +4221,27 @@ function OrderStatusTimeline({ currentStatus, events }) {
|
|
|
4125
4221
|
]
|
|
4126
4222
|
}
|
|
4127
4223
|
),
|
|
4128
|
-
/* @__PURE__ */
|
|
4224
|
+
/* @__PURE__ */ jsxs26(Box31, { sx: { pt: "2px", pb: tokens39.spacing.lg }, children: [
|
|
4129
4225
|
/* @__PURE__ */ jsx42(
|
|
4130
|
-
|
|
4226
|
+
Typography22,
|
|
4131
4227
|
{
|
|
4132
4228
|
sx: {
|
|
4133
|
-
fontWeight: isCurrent ?
|
|
4134
|
-
fontSize:
|
|
4135
|
-
fontFamily:
|
|
4136
|
-
color: isCompleted ?
|
|
4229
|
+
fontWeight: isCurrent ? tokens39.typography.fontWeights.bold : tokens39.typography.fontWeights.medium,
|
|
4230
|
+
fontSize: tokens39.typography.fontSizes.sm,
|
|
4231
|
+
fontFamily: tokens39.typography.fontFamily,
|
|
4232
|
+
color: isCompleted ? tokens39.colors.textPrimary : tokens39.colors.textDisabled,
|
|
4137
4233
|
lineHeight: 1
|
|
4138
4234
|
},
|
|
4139
4235
|
children: ORDER_STATUS_LABELS[status]
|
|
4140
4236
|
}
|
|
4141
4237
|
),
|
|
4142
4238
|
latestEvent && /* @__PURE__ */ jsx42(
|
|
4143
|
-
|
|
4239
|
+
Typography22,
|
|
4144
4240
|
{
|
|
4145
4241
|
sx: {
|
|
4146
|
-
color:
|
|
4242
|
+
color: tokens39.colors.textSecondary,
|
|
4147
4243
|
fontSize: 10,
|
|
4148
|
-
fontFamily:
|
|
4244
|
+
fontFamily: tokens39.typography.fontFamily,
|
|
4149
4245
|
mt: "4px"
|
|
4150
4246
|
},
|
|
4151
4247
|
children: latestEvent.timestamp
|
|
@@ -4217,13 +4313,14 @@ function EscrowStatusBanner({ status, amountKes = 0, hoursRemaining, sx }) {
|
|
|
4217
4313
|
}
|
|
4218
4314
|
|
|
4219
4315
|
// src/components/vazi/VAZIOutfitCard/VAZIOutfitCard.tsx
|
|
4220
|
-
import Box32 from "@mui/material/Box";
|
|
4221
|
-
import Card from "@mui/material/Card";
|
|
4222
|
-
import CardContent from "@mui/material/CardContent";
|
|
4223
|
-
import Typography22 from "@mui/material/Typography";
|
|
4224
|
-
import { tokens as tokens39 } from "@mitumba/tokens";
|
|
4225
4316
|
import { useCallback as useCallback3 } from "react";
|
|
4226
|
-
import
|
|
4317
|
+
import Box32 from "@mui/material/Box";
|
|
4318
|
+
import Typography23 from "@mui/material/Typography";
|
|
4319
|
+
import Stack6 from "@mui/material/Stack";
|
|
4320
|
+
import AutoAwesomeIcon3 from "@mui/icons-material/AutoAwesome";
|
|
4321
|
+
import LocalShippingIcon3 from "@mui/icons-material/LocalShipping";
|
|
4322
|
+
import { tokens as tokens40 } from "@mitumba/tokens";
|
|
4323
|
+
import { Fragment, jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4227
4324
|
function VAZIOutfitCard({
|
|
4228
4325
|
outfitName,
|
|
4229
4326
|
items,
|
|
@@ -4242,240 +4339,212 @@ function VAZIOutfitCard({
|
|
|
4242
4339
|
},
|
|
4243
4340
|
[onTap]
|
|
4244
4341
|
);
|
|
4245
|
-
return /* @__PURE__ */
|
|
4246
|
-
|
|
4342
|
+
return /* @__PURE__ */ jsxs27(
|
|
4343
|
+
Box32,
|
|
4247
4344
|
{
|
|
4248
4345
|
onClick: onTap,
|
|
4249
4346
|
onKeyDown: handleKeyDown,
|
|
4250
4347
|
role: "button",
|
|
4251
4348
|
tabIndex: onTap ? 0 : -1,
|
|
4252
4349
|
sx: {
|
|
4253
|
-
|
|
4254
|
-
|
|
4350
|
+
width: "100%",
|
|
4351
|
+
position: "relative",
|
|
4255
4352
|
cursor: onTap ? "pointer" : "default",
|
|
4256
|
-
|
|
4257
|
-
flexDirection: "column",
|
|
4353
|
+
borderRadius: `${tokens40.radius.lg}px`,
|
|
4258
4354
|
overflow: "hidden",
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
boxShadow: tokens39.shadows.focus
|
|
4355
|
+
backgroundColor: tokens40.colors.surface,
|
|
4356
|
+
boxShadow: `
|
|
4357
|
+
0 4px 12px 0 rgba(0, 0, 0, 0.05),
|
|
4358
|
+
0 12px 32px 0 rgba(31, 38, 135, 0.1)
|
|
4359
|
+
`,
|
|
4360
|
+
transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
4361
|
+
"&:hover": {
|
|
4362
|
+
transform: "translateY(-8px) scale(1.01)",
|
|
4363
|
+
boxShadow: tokens40.shadows.deep,
|
|
4364
|
+
"& .collage-image-2": { transform: "rotate(4deg) translate(8px, -4px)" },
|
|
4365
|
+
"& .collage-image-3": { transform: "rotate(-4deg) translate(-8px, -4px)" }
|
|
4271
4366
|
}
|
|
4272
4367
|
},
|
|
4273
4368
|
children: [
|
|
4274
|
-
/* @__PURE__ */ jsxs26(
|
|
4275
|
-
Box32,
|
|
4276
|
-
{
|
|
4277
|
-
sx: {
|
|
4278
|
-
alignItems: "center",
|
|
4279
|
-
display: "flex",
|
|
4280
|
-
gap: tokens39.spacing.sm,
|
|
4281
|
-
paddingInline: tokens39.spacing.base,
|
|
4282
|
-
paddingBlock: tokens39.spacing.base,
|
|
4283
|
-
borderBottom: `1px solid ${tokens39.colors.background}`
|
|
4284
|
-
},
|
|
4285
|
-
children: [
|
|
4286
|
-
/* @__PURE__ */ jsx44(VAZIBadge, { size: "small" }),
|
|
4287
|
-
/* @__PURE__ */ jsx44(
|
|
4288
|
-
Typography22,
|
|
4289
|
-
{
|
|
4290
|
-
sx: {
|
|
4291
|
-
color: tokens39.colors.textPrimary,
|
|
4292
|
-
flex: 1,
|
|
4293
|
-
fontSize: tokens39.typography.fontSizes.base,
|
|
4294
|
-
fontWeight: tokens39.typography.fontWeights.bold,
|
|
4295
|
-
lineHeight: tokens39.typography.lineHeights.snug,
|
|
4296
|
-
overflow: "hidden",
|
|
4297
|
-
textOverflow: "ellipsis",
|
|
4298
|
-
whiteSpace: "nowrap"
|
|
4299
|
-
},
|
|
4300
|
-
children: outfitName
|
|
4301
|
-
}
|
|
4302
|
-
)
|
|
4303
|
-
]
|
|
4304
|
-
}
|
|
4305
|
-
),
|
|
4306
4369
|
/* @__PURE__ */ jsx44(
|
|
4307
4370
|
Box32,
|
|
4308
4371
|
{
|
|
4309
4372
|
sx: {
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
backgroundColor: tokens39.colors.background,
|
|
4315
|
-
scrollbarWidth: "none",
|
|
4316
|
-
msOverflowStyle: "none",
|
|
4317
|
-
"&::-webkit-scrollbar": {
|
|
4318
|
-
display: "none"
|
|
4319
|
-
}
|
|
4373
|
+
position: "absolute",
|
|
4374
|
+
top: 12,
|
|
4375
|
+
left: 12,
|
|
4376
|
+
zIndex: 10
|
|
4320
4377
|
},
|
|
4321
|
-
children:
|
|
4322
|
-
Box32,
|
|
4323
|
-
{
|
|
4324
|
-
sx: {
|
|
4325
|
-
flexShrink: 0,
|
|
4326
|
-
width: "88px"
|
|
4327
|
-
},
|
|
4328
|
-
children: [
|
|
4329
|
-
/* @__PURE__ */ jsx44(
|
|
4330
|
-
Box32,
|
|
4331
|
-
{
|
|
4332
|
-
sx: {
|
|
4333
|
-
aspectRatio: "3 / 4",
|
|
4334
|
-
borderRadius: tokens39.radius.sm,
|
|
4335
|
-
overflow: "hidden",
|
|
4336
|
-
width: "100%",
|
|
4337
|
-
backgroundColor: tokens39.colors.surface,
|
|
4338
|
-
border: `1px solid ${tokens39.colors.divider}`
|
|
4339
|
-
},
|
|
4340
|
-
children: /* @__PURE__ */ jsx44(
|
|
4341
|
-
Box32,
|
|
4342
|
-
{
|
|
4343
|
-
component: "img",
|
|
4344
|
-
src: item.imageUrl,
|
|
4345
|
-
alt: `${item.garmentType} \u2014 ${item.sellerName}`,
|
|
4346
|
-
loading: "lazy",
|
|
4347
|
-
sx: {
|
|
4348
|
-
display: "block",
|
|
4349
|
-
height: "100%",
|
|
4350
|
-
objectFit: "cover",
|
|
4351
|
-
width: "100%"
|
|
4352
|
-
}
|
|
4353
|
-
}
|
|
4354
|
-
)
|
|
4355
|
-
}
|
|
4356
|
-
),
|
|
4357
|
-
/* @__PURE__ */ jsx44(
|
|
4358
|
-
Typography22,
|
|
4359
|
-
{
|
|
4360
|
-
sx: {
|
|
4361
|
-
color: tokens39.colors.textSecondary,
|
|
4362
|
-
fontSize: 10,
|
|
4363
|
-
fontWeight: tokens39.typography.fontWeights.semibold,
|
|
4364
|
-
textTransform: "uppercase",
|
|
4365
|
-
letterSpacing: tokens39.typography.letterSpacings.wide,
|
|
4366
|
-
marginTop: tokens39.spacing.xs,
|
|
4367
|
-
overflow: "hidden",
|
|
4368
|
-
textOverflow: "ellipsis",
|
|
4369
|
-
whiteSpace: "nowrap",
|
|
4370
|
-
textAlign: "center"
|
|
4371
|
-
},
|
|
4372
|
-
children: item.sellerName
|
|
4373
|
-
}
|
|
4374
|
-
)
|
|
4375
|
-
]
|
|
4376
|
-
},
|
|
4377
|
-
item.listingId
|
|
4378
|
-
))
|
|
4378
|
+
children: /* @__PURE__ */ jsx44(VAZIBadge, { size: "small" })
|
|
4379
4379
|
}
|
|
4380
4380
|
),
|
|
4381
|
-
/* @__PURE__ */
|
|
4382
|
-
|
|
4381
|
+
/* @__PURE__ */ jsxs27(
|
|
4382
|
+
Box32,
|
|
4383
4383
|
{
|
|
4384
4384
|
sx: {
|
|
4385
|
+
position: "relative",
|
|
4386
|
+
width: "100%",
|
|
4387
|
+
height: 280,
|
|
4388
|
+
backgroundColor: tokens40.colors.background,
|
|
4385
4389
|
display: "flex",
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
paddingBottom: tokens39.spacing.base
|
|
4391
|
-
}
|
|
4390
|
+
alignItems: "center",
|
|
4391
|
+
justifyContent: "center",
|
|
4392
|
+
overflow: "hidden",
|
|
4393
|
+
p: 3
|
|
4392
4394
|
},
|
|
4393
4395
|
children: [
|
|
4394
|
-
/* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ jsx44(
|
|
4395
4397
|
Box32,
|
|
4396
4398
|
{
|
|
4397
4399
|
sx: {
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
}
|
|
4403
|
-
children: [
|
|
4404
|
-
/* @__PURE__ */ jsx44(PriceTag, { priceKes: totalPriceKes, size: "large", color: "earth" }),
|
|
4405
|
-
onBuyAll && /* @__PURE__ */ jsx44(Box32, { sx: { flexShrink: 0 }, children: /* @__PURE__ */ jsx44(
|
|
4406
|
-
MitumbaPrimaryButton,
|
|
4407
|
-
{
|
|
4408
|
-
label: "Buy all",
|
|
4409
|
-
variant: "earth",
|
|
4410
|
-
size: "small",
|
|
4411
|
-
fullWidth: false,
|
|
4412
|
-
onClick: (e) => {
|
|
4413
|
-
if (e && e.stopPropagation) {
|
|
4414
|
-
e.stopPropagation();
|
|
4415
|
-
}
|
|
4416
|
-
onBuyAll();
|
|
4417
|
-
}
|
|
4418
|
-
}
|
|
4419
|
-
) })
|
|
4420
|
-
]
|
|
4400
|
+
position: "absolute",
|
|
4401
|
+
inset: 0,
|
|
4402
|
+
background: "radial-gradient(circle at center, rgba(160, 98, 53, 0.05) 0%, rgba(255,255,255,0) 70%)",
|
|
4403
|
+
pointerEvents: "none"
|
|
4404
|
+
}
|
|
4421
4405
|
}
|
|
4422
4406
|
),
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
}
|
|
4447
|
-
|
|
4448
|
-
|
|
4407
|
+
/* @__PURE__ */ jsx44(Box32, { sx: { position: "relative", width: 140, height: 180 }, children: items.slice(0, 3).map((item, index) => {
|
|
4408
|
+
const isMain = index === 0;
|
|
4409
|
+
let rotation = 0;
|
|
4410
|
+
if (index === 1) rotation = -4;
|
|
4411
|
+
if (index === 2) rotation = 4;
|
|
4412
|
+
let leftOffset = 0;
|
|
4413
|
+
if (index === 1) leftOffset = -12;
|
|
4414
|
+
if (index === 2) leftOffset = 12;
|
|
4415
|
+
return /* @__PURE__ */ jsx44(
|
|
4416
|
+
Box32,
|
|
4417
|
+
{
|
|
4418
|
+
className: `collage-image-${index + 1}`,
|
|
4419
|
+
sx: {
|
|
4420
|
+
position: "absolute",
|
|
4421
|
+
top: isMain ? 0 : 4,
|
|
4422
|
+
left: isMain ? 0 : leftOffset,
|
|
4423
|
+
width: "100%",
|
|
4424
|
+
height: "100%",
|
|
4425
|
+
borderRadius: `${tokens40.radius.md}px`,
|
|
4426
|
+
overflow: "hidden",
|
|
4427
|
+
zIndex: 3 - index,
|
|
4428
|
+
boxShadow: tokens40.shadows.card,
|
|
4429
|
+
border: `2px solid ${tokens40.colors.white}`,
|
|
4430
|
+
transform: `rotate(${rotation}deg)`,
|
|
4431
|
+
transition: "all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
4432
|
+
backgroundColor: tokens40.colors.surface
|
|
4433
|
+
},
|
|
4434
|
+
children: /* @__PURE__ */ jsx44(
|
|
4449
4435
|
Box32,
|
|
4450
4436
|
{
|
|
4451
|
-
component: "
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
},
|
|
4456
|
-
children: "\u2022"
|
|
4457
|
-
}
|
|
4458
|
-
),
|
|
4459
|
-
isMultiCity && /* @__PURE__ */ jsx44(
|
|
4460
|
-
Typography22,
|
|
4461
|
-
{
|
|
4462
|
-
sx: {
|
|
4463
|
-
color: tokens39.colors.earth,
|
|
4464
|
-
fontSize: tokens39.typography.fontSizes.xs,
|
|
4465
|
-
fontWeight: tokens39.typography.fontWeights.bold,
|
|
4466
|
-
textTransform: "uppercase",
|
|
4467
|
-
letterSpacing: tokens39.typography.letterSpacings.wide,
|
|
4468
|
-
lineHeight: 1
|
|
4469
|
-
},
|
|
4470
|
-
children: "Multi-city"
|
|
4437
|
+
component: "img",
|
|
4438
|
+
src: item.imageUrl,
|
|
4439
|
+
alt: item.garmentType,
|
|
4440
|
+
sx: { width: "100%", height: "100%", objectFit: "cover" }
|
|
4471
4441
|
}
|
|
4472
4442
|
)
|
|
4473
|
-
|
|
4443
|
+
},
|
|
4444
|
+
item.listingId
|
|
4445
|
+
);
|
|
4446
|
+
}) }),
|
|
4447
|
+
items.length > 3 && /* @__PURE__ */ jsx44(
|
|
4448
|
+
MitumbaGlass,
|
|
4449
|
+
{
|
|
4450
|
+
rounding: "full",
|
|
4451
|
+
opacity: 0.8,
|
|
4452
|
+
blur: 12,
|
|
4453
|
+
sx: {
|
|
4454
|
+
position: "absolute",
|
|
4455
|
+
bottom: 20,
|
|
4456
|
+
right: 20,
|
|
4457
|
+
px: 1.5,
|
|
4458
|
+
py: 0.5,
|
|
4459
|
+
zIndex: 5
|
|
4460
|
+
},
|
|
4461
|
+
children: /* @__PURE__ */ jsxs27(Typography23, { sx: { fontSize: 10, fontWeight: 900, color: tokens40.colors.earth }, children: [
|
|
4462
|
+
"+",
|
|
4463
|
+
items.length - 3,
|
|
4464
|
+
" MORE"
|
|
4465
|
+
] })
|
|
4474
4466
|
}
|
|
4475
4467
|
)
|
|
4476
4468
|
]
|
|
4477
4469
|
}
|
|
4478
|
-
)
|
|
4470
|
+
),
|
|
4471
|
+
/* @__PURE__ */ jsxs27(Box32, { sx: { p: 2.5 }, children: [
|
|
4472
|
+
/* @__PURE__ */ jsx44(
|
|
4473
|
+
Typography23,
|
|
4474
|
+
{
|
|
4475
|
+
sx: {
|
|
4476
|
+
fontSize: tokens40.typography.fontSizes.lg,
|
|
4477
|
+
fontWeight: 900,
|
|
4478
|
+
color: tokens40.colors.textPrimary,
|
|
4479
|
+
fontFamily: tokens40.typography.fontFamily,
|
|
4480
|
+
lineHeight: 1.1,
|
|
4481
|
+
mb: 1,
|
|
4482
|
+
letterSpacing: "-0.01em"
|
|
4483
|
+
},
|
|
4484
|
+
children: outfitName
|
|
4485
|
+
}
|
|
4486
|
+
),
|
|
4487
|
+
/* @__PURE__ */ jsxs27(Stack6, { direction: "row", spacing: 1, alignItems: "center", sx: { mb: 2.5 }, children: [
|
|
4488
|
+
/* @__PURE__ */ jsxs27(
|
|
4489
|
+
Typography23,
|
|
4490
|
+
{
|
|
4491
|
+
sx: {
|
|
4492
|
+
fontSize: 11,
|
|
4493
|
+
fontWeight: 700,
|
|
4494
|
+
color: tokens40.colors.textSecondary,
|
|
4495
|
+
textTransform: "uppercase",
|
|
4496
|
+
letterSpacing: "0.05em"
|
|
4497
|
+
},
|
|
4498
|
+
children: [
|
|
4499
|
+
sellersCount,
|
|
4500
|
+
" Sellers"
|
|
4501
|
+
]
|
|
4502
|
+
}
|
|
4503
|
+
),
|
|
4504
|
+
isMultiCity && /* @__PURE__ */ jsxs27(Fragment, { children: [
|
|
4505
|
+
/* @__PURE__ */ jsx44(Box32, { sx: { width: 4, height: 4, borderRadius: "50%", bgcolor: tokens40.colors.divider } }),
|
|
4506
|
+
/* @__PURE__ */ jsxs27(Stack6, { direction: "row", spacing: 0.5, alignItems: "center", children: [
|
|
4507
|
+
/* @__PURE__ */ jsx44(LocalShippingIcon3, { sx: { fontSize: 14, color: tokens40.colors.earth } }),
|
|
4508
|
+
/* @__PURE__ */ jsx44(
|
|
4509
|
+
Typography23,
|
|
4510
|
+
{
|
|
4511
|
+
sx: {
|
|
4512
|
+
fontSize: 10,
|
|
4513
|
+
fontWeight: 800,
|
|
4514
|
+
color: tokens40.colors.earth,
|
|
4515
|
+
textTransform: "uppercase"
|
|
4516
|
+
},
|
|
4517
|
+
children: "Multi-City"
|
|
4518
|
+
}
|
|
4519
|
+
)
|
|
4520
|
+
] })
|
|
4521
|
+
] })
|
|
4522
|
+
] }),
|
|
4523
|
+
/* @__PURE__ */ jsxs27(Stack6, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
4524
|
+
/* @__PURE__ */ jsxs27(Box32, { children: [
|
|
4525
|
+
/* @__PURE__ */ jsx44(Typography23, { sx: { fontSize: 10, fontWeight: 800, color: tokens40.colors.textDisabled, textTransform: "uppercase", mb: 0.2 }, children: "Total Look" }),
|
|
4526
|
+
/* @__PURE__ */ jsxs27(Typography23, { sx: { fontSize: tokens40.typography.fontSizes.xl, fontWeight: 900, color: tokens40.colors.textPrimary, fontFamily: tokens40.typography.fontFamily }, children: [
|
|
4527
|
+
"KES ",
|
|
4528
|
+
totalPriceKes.toLocaleString()
|
|
4529
|
+
] })
|
|
4530
|
+
] }),
|
|
4531
|
+
onBuyAll && /* @__PURE__ */ jsx44(
|
|
4532
|
+
MitumbaPrimaryButton,
|
|
4533
|
+
{
|
|
4534
|
+
label: "Buy entire look",
|
|
4535
|
+
variant: "earth",
|
|
4536
|
+
size: "small",
|
|
4537
|
+
icon: /* @__PURE__ */ jsx44(AutoAwesomeIcon3, { sx: { fontSize: 16 } }),
|
|
4538
|
+
iconPosition: "right",
|
|
4539
|
+
onClick: (e) => {
|
|
4540
|
+
e.stopPropagation();
|
|
4541
|
+
onBuyAll();
|
|
4542
|
+
},
|
|
4543
|
+
sx: { borderRadius: tokens40.radius.full, height: 36, px: 3 }
|
|
4544
|
+
}
|
|
4545
|
+
)
|
|
4546
|
+
] })
|
|
4547
|
+
] })
|
|
4479
4548
|
]
|
|
4480
4549
|
}
|
|
4481
4550
|
);
|
|
@@ -4483,175 +4552,99 @@ function VAZIOutfitCard({
|
|
|
4483
4552
|
|
|
4484
4553
|
// src/components/vazi/VAZIOutfitCardSkeleton/VAZIOutfitCardSkeleton.tsx
|
|
4485
4554
|
import Box33 from "@mui/material/Box";
|
|
4486
|
-
import
|
|
4487
|
-
import {
|
|
4488
|
-
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4489
|
-
var SKELETON_IMAGE_KEYS = ["image-1", "image-2", "image-3", "image-4"];
|
|
4555
|
+
import { tokens as tokens41 } from "@mitumba/tokens";
|
|
4556
|
+
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4490
4557
|
function VAZIOutfitCardSkeleton() {
|
|
4491
|
-
return /* @__PURE__ */
|
|
4558
|
+
return /* @__PURE__ */ jsxs28(
|
|
4492
4559
|
Box33,
|
|
4493
4560
|
{
|
|
4494
4561
|
sx: {
|
|
4495
|
-
borderRadius:
|
|
4496
|
-
boxShadow: tokens40.shadows.card,
|
|
4497
|
-
display: "flex",
|
|
4498
|
-
flexDirection: "column",
|
|
4562
|
+
borderRadius: `${tokens41.radius.lg}px`,
|
|
4499
4563
|
overflow: "hidden",
|
|
4564
|
+
backgroundColor: tokens41.colors.surface,
|
|
4565
|
+
boxShadow: tokens41.shadows.card,
|
|
4500
4566
|
width: "100%"
|
|
4501
4567
|
},
|
|
4502
4568
|
children: [
|
|
4503
|
-
/* @__PURE__ */
|
|
4569
|
+
/* @__PURE__ */ jsx45(
|
|
4504
4570
|
Box33,
|
|
4505
4571
|
{
|
|
4506
4572
|
sx: {
|
|
4507
|
-
|
|
4573
|
+
height: 280,
|
|
4574
|
+
backgroundColor: tokens41.colors.background,
|
|
4508
4575
|
display: "flex",
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4576
|
+
alignItems: "center",
|
|
4577
|
+
justifyContent: "center",
|
|
4578
|
+
position: "relative"
|
|
4512
4579
|
},
|
|
4513
|
-
children: [
|
|
4580
|
+
children: /* @__PURE__ */ jsxs28(Box33, { sx: { position: "relative", width: 140, height: 180 }, children: [
|
|
4514
4581
|
/* @__PURE__ */ jsx45(
|
|
4515
|
-
|
|
4582
|
+
MitumbaSkeleton,
|
|
4516
4583
|
{
|
|
4517
|
-
|
|
4518
|
-
variant: "rounded",
|
|
4584
|
+
variant: "rectangular",
|
|
4519
4585
|
sx: {
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4586
|
+
position: "absolute",
|
|
4587
|
+
inset: 0,
|
|
4588
|
+
borderRadius: 2,
|
|
4589
|
+
border: `2px solid ${tokens41.colors.white}`
|
|
4523
4590
|
}
|
|
4524
4591
|
}
|
|
4525
4592
|
),
|
|
4526
4593
|
/* @__PURE__ */ jsx45(
|
|
4527
|
-
|
|
4594
|
+
MitumbaSkeleton,
|
|
4528
4595
|
{
|
|
4529
|
-
|
|
4530
|
-
variant: "text",
|
|
4596
|
+
variant: "rectangular",
|
|
4531
4597
|
sx: {
|
|
4532
|
-
|
|
4533
|
-
|
|
4598
|
+
position: "absolute",
|
|
4599
|
+
top: 4,
|
|
4600
|
+
left: -12,
|
|
4601
|
+
width: "100%",
|
|
4602
|
+
height: "100%",
|
|
4603
|
+
borderRadius: 2,
|
|
4604
|
+
zIndex: -1,
|
|
4605
|
+
transform: "rotate(-4deg)",
|
|
4606
|
+
opacity: 0.5
|
|
4534
4607
|
}
|
|
4535
4608
|
}
|
|
4536
4609
|
)
|
|
4537
|
-
]
|
|
4610
|
+
] })
|
|
4538
4611
|
}
|
|
4539
4612
|
),
|
|
4540
|
-
/* @__PURE__ */
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4613
|
+
/* @__PURE__ */ jsxs28(Box33, { sx: { p: 2.5 }, children: [
|
|
4614
|
+
/* @__PURE__ */ jsx45(
|
|
4615
|
+
MitumbaSkeleton,
|
|
4616
|
+
{
|
|
4617
|
+
variant: "rectangular",
|
|
4618
|
+
width: "70%",
|
|
4619
|
+
height: 24,
|
|
4620
|
+
sx: { mb: 1, borderRadius: 1 }
|
|
4621
|
+
}
|
|
4622
|
+
),
|
|
4623
|
+
/* @__PURE__ */ jsx45(
|
|
4624
|
+
MitumbaSkeleton,
|
|
4625
|
+
{
|
|
4626
|
+
variant: "rectangular",
|
|
4627
|
+
width: "40%",
|
|
4628
|
+
height: 12,
|
|
4629
|
+
sx: { mb: 3, borderRadius: 1 }
|
|
4630
|
+
}
|
|
4631
|
+
),
|
|
4632
|
+
/* @__PURE__ */ jsxs28(Box33, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4633
|
+
/* @__PURE__ */ jsxs28(Box33, { children: [
|
|
4634
|
+
/* @__PURE__ */ jsx45(MitumbaSkeleton, { variant: "rectangular", width: 60, height: 10, sx: { mb: 0.5, borderRadius: 0.5 } }),
|
|
4635
|
+
/* @__PURE__ */ jsx45(MitumbaSkeleton, { variant: "rectangular", width: 100, height: 28, sx: { borderRadius: 0.5 } })
|
|
4636
|
+
] }),
|
|
4637
|
+
/* @__PURE__ */ jsx45(
|
|
4638
|
+
MitumbaSkeleton,
|
|
4557
4639
|
{
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
{
|
|
4567
|
-
"aria-label": `Loading item image ${imgKey.split("-")[1]}`,
|
|
4568
|
-
variant: "rounded",
|
|
4569
|
-
sx: {
|
|
4570
|
-
aspectRatio: "3 / 4",
|
|
4571
|
-
borderRadius: tokens40.radius.md,
|
|
4572
|
-
width: "100%"
|
|
4573
|
-
}
|
|
4574
|
-
}
|
|
4575
|
-
),
|
|
4576
|
-
/* @__PURE__ */ jsx45(
|
|
4577
|
-
Skeleton,
|
|
4578
|
-
{
|
|
4579
|
-
"aria-label": `Loading seller name ${imgKey.split("-")[1]}`,
|
|
4580
|
-
variant: "text",
|
|
4581
|
-
sx: {
|
|
4582
|
-
fontSize: tokens40.typography.fontSizes.xs,
|
|
4583
|
-
marginTop: tokens40.spacing.xs,
|
|
4584
|
-
width: "80%"
|
|
4585
|
-
}
|
|
4586
|
-
}
|
|
4587
|
-
)
|
|
4588
|
-
]
|
|
4589
|
-
},
|
|
4590
|
-
imgKey
|
|
4591
|
-
))
|
|
4592
|
-
}
|
|
4593
|
-
),
|
|
4594
|
-
/* @__PURE__ */ jsxs27(
|
|
4595
|
-
Box33,
|
|
4596
|
-
{
|
|
4597
|
-
sx: {
|
|
4598
|
-
display: "flex",
|
|
4599
|
-
flexDirection: "column",
|
|
4600
|
-
gap: tokens40.spacing.sm,
|
|
4601
|
-
paddingInline: tokens40.spacing.base,
|
|
4602
|
-
paddingBlock: tokens40.spacing.base
|
|
4603
|
-
},
|
|
4604
|
-
children: [
|
|
4605
|
-
/* @__PURE__ */ jsxs27(
|
|
4606
|
-
Box33,
|
|
4607
|
-
{
|
|
4608
|
-
sx: {
|
|
4609
|
-
alignItems: "center",
|
|
4610
|
-
display: "flex",
|
|
4611
|
-
gap: tokens40.spacing.sm,
|
|
4612
|
-
justifyContent: "space-between"
|
|
4613
|
-
},
|
|
4614
|
-
children: [
|
|
4615
|
-
/* @__PURE__ */ jsx45(
|
|
4616
|
-
Skeleton,
|
|
4617
|
-
{
|
|
4618
|
-
"aria-label": "Loading total price",
|
|
4619
|
-
variant: "text",
|
|
4620
|
-
sx: {
|
|
4621
|
-
fontSize: tokens40.typography.fontSizes.lg,
|
|
4622
|
-
width: "40%"
|
|
4623
|
-
}
|
|
4624
|
-
}
|
|
4625
|
-
),
|
|
4626
|
-
/* @__PURE__ */ jsx45(
|
|
4627
|
-
Skeleton,
|
|
4628
|
-
{
|
|
4629
|
-
"aria-label": "Loading buy button",
|
|
4630
|
-
variant: "rounded",
|
|
4631
|
-
sx: {
|
|
4632
|
-
borderRadius: tokens40.radius.md,
|
|
4633
|
-
height: "36px",
|
|
4634
|
-
width: 100
|
|
4635
|
-
}
|
|
4636
|
-
}
|
|
4637
|
-
)
|
|
4638
|
-
]
|
|
4639
|
-
}
|
|
4640
|
-
),
|
|
4641
|
-
/* @__PURE__ */ jsx45(
|
|
4642
|
-
Skeleton,
|
|
4643
|
-
{
|
|
4644
|
-
"aria-label": "Loading seller info",
|
|
4645
|
-
variant: "text",
|
|
4646
|
-
sx: {
|
|
4647
|
-
fontSize: tokens40.typography.fontSizes.sm,
|
|
4648
|
-
width: "60%"
|
|
4649
|
-
}
|
|
4650
|
-
}
|
|
4651
|
-
)
|
|
4652
|
-
]
|
|
4653
|
-
}
|
|
4654
|
-
)
|
|
4640
|
+
variant: "rounded",
|
|
4641
|
+
width: 120,
|
|
4642
|
+
height: 36,
|
|
4643
|
+
sx: { borderRadius: 100 }
|
|
4644
|
+
}
|
|
4645
|
+
)
|
|
4646
|
+
] })
|
|
4647
|
+
] })
|
|
4655
4648
|
]
|
|
4656
4649
|
}
|
|
4657
4650
|
);
|
|
@@ -4659,132 +4652,115 @@ function VAZIOutfitCardSkeleton() {
|
|
|
4659
4652
|
|
|
4660
4653
|
// src/components/vazi/VAZIFeedSection/VAZIFeedSection.tsx
|
|
4661
4654
|
import Box34 from "@mui/material/Box";
|
|
4662
|
-
import
|
|
4663
|
-
import
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
flexShrink: 0,
|
|
4669
|
-
width: { xs: "82%", md: "100%" },
|
|
4670
|
-
maxWidth: { xs: "340px", md: "none" }
|
|
4671
|
-
},
|
|
4672
|
-
children: /* @__PURE__ */ jsx46(
|
|
4673
|
-
VAZIOutfitCard,
|
|
4674
|
-
{
|
|
4675
|
-
outfitName: outfit.outfitName,
|
|
4676
|
-
items: outfit.items,
|
|
4677
|
-
totalPriceKes: outfit.totalPriceKes,
|
|
4678
|
-
sellersCount: outfit.sellersCount,
|
|
4679
|
-
isMultiCity: outfit.isMultiCity,
|
|
4680
|
-
onTap: outfit.onTap,
|
|
4681
|
-
onBuyAll: outfit.onBuyAll
|
|
4682
|
-
}
|
|
4683
|
-
)
|
|
4684
|
-
},
|
|
4685
|
-
outfit.outfitName
|
|
4686
|
-
));
|
|
4687
|
-
var renderSkeletons = () => Array.from({ length: 3 }, (_, skeletonIdx) => /* @__PURE__ */ jsx46(
|
|
4688
|
-
Box34,
|
|
4689
|
-
{
|
|
4690
|
-
sx: {
|
|
4691
|
-
flexShrink: 0,
|
|
4692
|
-
width: { xs: "82%", md: "100%" },
|
|
4693
|
-
maxWidth: { xs: "340px", md: "none" }
|
|
4694
|
-
},
|
|
4695
|
-
children: /* @__PURE__ */ jsx46(VAZIOutfitCardSkeleton, {})
|
|
4696
|
-
},
|
|
4697
|
-
`skeleton-${skeletonIdx}`
|
|
4698
|
-
));
|
|
4655
|
+
import Typography24 from "@mui/material/Typography";
|
|
4656
|
+
import Stack7 from "@mui/material/Stack";
|
|
4657
|
+
import AutoAwesomeIcon4 from "@mui/icons-material/AutoAwesome";
|
|
4658
|
+
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
|
|
4659
|
+
import { tokens as tokens42 } from "@mitumba/tokens";
|
|
4660
|
+
import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4699
4661
|
function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
4700
|
-
return /* @__PURE__ */
|
|
4662
|
+
return /* @__PURE__ */ jsxs29(
|
|
4701
4663
|
Box34,
|
|
4702
4664
|
{
|
|
4703
4665
|
sx: {
|
|
4704
4666
|
display: "flex",
|
|
4705
4667
|
flexDirection: "column",
|
|
4706
|
-
gap:
|
|
4668
|
+
gap: 4,
|
|
4707
4669
|
width: "100%"
|
|
4708
4670
|
},
|
|
4709
4671
|
children: [
|
|
4710
|
-
/* @__PURE__ */
|
|
4672
|
+
/* @__PURE__ */ jsxs29(
|
|
4711
4673
|
Box34,
|
|
4712
4674
|
{
|
|
4713
4675
|
sx: {
|
|
4714
|
-
alignItems: "center",
|
|
4715
4676
|
display: "flex",
|
|
4716
4677
|
justifyContent: "space-between",
|
|
4717
|
-
|
|
4678
|
+
alignItems: "flex-end",
|
|
4679
|
+
paddingInline: { xs: 2, md: 0 }
|
|
4718
4680
|
},
|
|
4719
4681
|
children: [
|
|
4720
|
-
/* @__PURE__ */
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4682
|
+
/* @__PURE__ */ jsxs29(Stack7, { spacing: 1, children: [
|
|
4683
|
+
/* @__PURE__ */ jsxs29(Stack7, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
4684
|
+
/* @__PURE__ */ jsx46(AutoAwesomeIcon4, { sx: { fontSize: 18, color: tokens42.colors.earth } }),
|
|
4685
|
+
/* @__PURE__ */ jsx46(
|
|
4686
|
+
Typography24,
|
|
4687
|
+
{
|
|
4688
|
+
sx: {
|
|
4689
|
+
fontSize: 12,
|
|
4690
|
+
fontWeight: 900,
|
|
4691
|
+
color: tokens42.colors.earth,
|
|
4692
|
+
textTransform: "uppercase",
|
|
4693
|
+
letterSpacing: "0.1em"
|
|
4694
|
+
},
|
|
4695
|
+
children: "AI Curation"
|
|
4696
|
+
}
|
|
4697
|
+
)
|
|
4698
|
+
] }),
|
|
4699
|
+
/* @__PURE__ */ jsx46(
|
|
4700
|
+
Typography24,
|
|
4701
|
+
{
|
|
4702
|
+
component: "h2",
|
|
4703
|
+
sx: {
|
|
4704
|
+
color: tokens42.colors.textPrimary,
|
|
4705
|
+
fontFamily: tokens42.typography.fontFamily,
|
|
4706
|
+
fontSize: tokens42.typography.fontSizes.xxl,
|
|
4707
|
+
fontWeight: 900,
|
|
4708
|
+
lineHeight: 1,
|
|
4709
|
+
margin: 0
|
|
4710
|
+
},
|
|
4711
|
+
children: "VAZI Picks for You"
|
|
4712
|
+
}
|
|
4713
|
+
)
|
|
4714
|
+
] }),
|
|
4715
|
+
onSeeAll && /* @__PURE__ */ jsxs29(
|
|
4736
4716
|
Box34,
|
|
4737
4717
|
{
|
|
4738
|
-
component: "button",
|
|
4739
4718
|
onClick: onSeeAll,
|
|
4740
4719
|
sx: {
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4720
|
+
display: "flex",
|
|
4721
|
+
alignItems: "center",
|
|
4722
|
+
gap: 1,
|
|
4723
|
+
color: tokens42.colors.earth,
|
|
4744
4724
|
cursor: "pointer",
|
|
4745
|
-
|
|
4746
|
-
fontSize: tokens41.typography.fontSizes.base,
|
|
4747
|
-
fontWeight: tokens41.typography.fontWeights.semibold,
|
|
4748
|
-
lineHeight: tokens41.typography.lineHeights.normal,
|
|
4749
|
-
padding: 0,
|
|
4750
|
-
textDecoration: "none",
|
|
4751
|
-
transition: "color 200ms ease",
|
|
4752
|
-
whiteSpace: "nowrap",
|
|
4725
|
+
transition: "all 0.3s ease",
|
|
4753
4726
|
"&:hover": {
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
},
|
|
4757
|
-
"&:focus-visible": {
|
|
4758
|
-
outline: `${tokens41.spacing.xs}px solid transparent`,
|
|
4759
|
-
boxShadow: tokens41.shadows.focus,
|
|
4760
|
-
borderRadius: tokens41.radius.sm
|
|
4727
|
+
gap: 1.5,
|
|
4728
|
+
color: tokens42.colors.earthDark
|
|
4761
4729
|
}
|
|
4762
4730
|
},
|
|
4763
|
-
children:
|
|
4731
|
+
children: [
|
|
4732
|
+
/* @__PURE__ */ jsx46(
|
|
4733
|
+
Typography24,
|
|
4734
|
+
{
|
|
4735
|
+
sx: {
|
|
4736
|
+
fontSize: 12,
|
|
4737
|
+
fontWeight: 900,
|
|
4738
|
+
textTransform: "uppercase",
|
|
4739
|
+
letterSpacing: "0.05em"
|
|
4740
|
+
},
|
|
4741
|
+
children: "Explore All"
|
|
4742
|
+
}
|
|
4743
|
+
),
|
|
4744
|
+
/* @__PURE__ */ jsx46(ArrowForwardIcon, { sx: { fontSize: 16 } })
|
|
4745
|
+
]
|
|
4764
4746
|
}
|
|
4765
4747
|
)
|
|
4766
4748
|
]
|
|
4767
4749
|
}
|
|
4768
4750
|
),
|
|
4769
|
-
/* @__PURE__ */ jsx46(
|
|
4770
|
-
|
|
4751
|
+
/* @__PURE__ */ jsx46(MitumbaGrid, { columns: { xs: 1, sm: 2, md: 3, lg: 3 }, gap: 3, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx46(VAZIOutfitCardSkeleton, {}, `vazi-skeleton-${i + 1}`)) : outfits.map((outfit) => /* @__PURE__ */ jsx46(
|
|
4752
|
+
VAZIOutfitCard,
|
|
4771
4753
|
{
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
display: "none"
|
|
4783
|
-
}
|
|
4784
|
-
},
|
|
4785
|
-
children: loading ? renderSkeletons() : renderOutfitCards(outfits)
|
|
4786
|
-
}
|
|
4787
|
-
)
|
|
4754
|
+
outfitName: outfit.outfitName,
|
|
4755
|
+
items: outfit.items,
|
|
4756
|
+
totalPriceKes: outfit.totalPriceKes,
|
|
4757
|
+
sellersCount: outfit.sellersCount,
|
|
4758
|
+
isMultiCity: outfit.isMultiCity,
|
|
4759
|
+
onTap: outfit.onTap,
|
|
4760
|
+
onBuyAll: outfit.onBuyAll
|
|
4761
|
+
},
|
|
4762
|
+
outfit.outfitName
|
|
4763
|
+
)) })
|
|
4788
4764
|
]
|
|
4789
4765
|
}
|
|
4790
4766
|
);
|
|
@@ -4792,90 +4768,71 @@ function VAZIFeedSection({ outfits, loading = false, onSeeAll }) {
|
|
|
4792
4768
|
|
|
4793
4769
|
// src/components/vazi/CompleteThisLookPanel/CompleteThisLookPanel.tsx
|
|
4794
4770
|
import Box35 from "@mui/material/Box";
|
|
4795
|
-
import
|
|
4796
|
-
import
|
|
4797
|
-
import
|
|
4771
|
+
import Typography25 from "@mui/material/Typography";
|
|
4772
|
+
import Stack8 from "@mui/material/Stack";
|
|
4773
|
+
import AutoAwesomeIcon5 from "@mui/icons-material/AutoAwesome";
|
|
4774
|
+
import { tokens as tokens43 } from "@mitumba/tokens";
|
|
4775
|
+
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4798
4776
|
function CompleteThisLookPanel({ outfits, loading = false }) {
|
|
4799
4777
|
if (!loading && outfits.length === 0) {
|
|
4800
4778
|
return null;
|
|
4801
4779
|
}
|
|
4802
|
-
|
|
4803
|
-
Box35,
|
|
4804
|
-
{
|
|
4805
|
-
sx: {
|
|
4806
|
-
flexShrink: 0,
|
|
4807
|
-
width: { xs: "82%", md: "100%" },
|
|
4808
|
-
maxWidth: { xs: "340px", md: "none" }
|
|
4809
|
-
},
|
|
4810
|
-
children: /* @__PURE__ */ jsx47(
|
|
4811
|
-
VAZIOutfitCard,
|
|
4812
|
-
{
|
|
4813
|
-
outfitName: outfit.outfitName,
|
|
4814
|
-
items: outfit.items,
|
|
4815
|
-
totalPriceKes: outfit.totalPriceKes,
|
|
4816
|
-
sellersCount: outfit.sellersCount,
|
|
4817
|
-
isMultiCity: outfit.isMultiCity,
|
|
4818
|
-
onTap: outfit.onTap,
|
|
4819
|
-
onBuyAll: outfit.onBuyAll
|
|
4820
|
-
}
|
|
4821
|
-
)
|
|
4822
|
-
},
|
|
4823
|
-
outfit.outfitName
|
|
4824
|
-
));
|
|
4825
|
-
const renderSkeletons2 = () => ["skel-0", "skel-1", "skel-2"].map((skelKey) => /* @__PURE__ */ jsx47(
|
|
4826
|
-
Box35,
|
|
4827
|
-
{
|
|
4828
|
-
sx: {
|
|
4829
|
-
flexShrink: 0,
|
|
4830
|
-
width: { xs: "82%", md: "100%" },
|
|
4831
|
-
maxWidth: { xs: "340px", md: "none" }
|
|
4832
|
-
},
|
|
4833
|
-
children: /* @__PURE__ */ jsx47(VAZIOutfitCardSkeleton, {})
|
|
4834
|
-
},
|
|
4835
|
-
skelKey
|
|
4836
|
-
));
|
|
4837
|
-
return /* @__PURE__ */ jsxs29(
|
|
4780
|
+
return /* @__PURE__ */ jsxs30(
|
|
4838
4781
|
Box35,
|
|
4839
4782
|
{
|
|
4840
4783
|
sx: {
|
|
4841
4784
|
display: "flex",
|
|
4842
4785
|
flexDirection: "column",
|
|
4843
|
-
gap:
|
|
4786
|
+
gap: 3,
|
|
4844
4787
|
width: "100%"
|
|
4845
4788
|
},
|
|
4846
4789
|
children: [
|
|
4847
|
-
/* @__PURE__ */
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
/* @__PURE__ */ jsx47(
|
|
4862
|
-
Box35,
|
|
4863
|
-
{
|
|
4864
|
-
sx: {
|
|
4865
|
-
display: { xs: "flex", md: "grid" },
|
|
4866
|
-
gridTemplateColumns: { md: "repeat(3, 1fr)" },
|
|
4867
|
-
gap: tokens42.spacing.base,
|
|
4868
|
-
overflowX: { xs: "auto", md: "visible" },
|
|
4869
|
-
paddingBottom: { xs: tokens42.spacing.sm, md: 0 },
|
|
4870
|
-
scrollbarWidth: "none",
|
|
4871
|
-
msOverflowStyle: "none",
|
|
4872
|
-
"&::-webkit-scrollbar": {
|
|
4873
|
-
display: "none"
|
|
4790
|
+
/* @__PURE__ */ jsxs30(Stack8, { spacing: 1, sx: { paddingInline: { xs: 2, md: 0 } }, children: [
|
|
4791
|
+
/* @__PURE__ */ jsxs30(Stack8, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
4792
|
+
/* @__PURE__ */ jsx47(AutoAwesomeIcon5, { sx: { fontSize: 16, color: tokens43.colors.earth } }),
|
|
4793
|
+
/* @__PURE__ */ jsx47(
|
|
4794
|
+
Typography25,
|
|
4795
|
+
{
|
|
4796
|
+
sx: {
|
|
4797
|
+
fontSize: 11,
|
|
4798
|
+
fontWeight: 900,
|
|
4799
|
+
color: tokens43.colors.earth,
|
|
4800
|
+
textTransform: "uppercase",
|
|
4801
|
+
letterSpacing: "0.08em"
|
|
4802
|
+
},
|
|
4803
|
+
children: "AI Recommendations"
|
|
4874
4804
|
}
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4805
|
+
)
|
|
4806
|
+
] }),
|
|
4807
|
+
/* @__PURE__ */ jsx47(
|
|
4808
|
+
Typography25,
|
|
4809
|
+
{
|
|
4810
|
+
component: "h2",
|
|
4811
|
+
sx: {
|
|
4812
|
+
color: tokens43.colors.textPrimary,
|
|
4813
|
+
fontFamily: tokens43.typography.fontFamily,
|
|
4814
|
+
fontSize: tokens43.typography.fontSizes.xl,
|
|
4815
|
+
fontWeight: 900,
|
|
4816
|
+
lineHeight: 1,
|
|
4817
|
+
margin: 0
|
|
4818
|
+
},
|
|
4819
|
+
children: "Complete this look"
|
|
4820
|
+
}
|
|
4821
|
+
)
|
|
4822
|
+
] }),
|
|
4823
|
+
/* @__PURE__ */ jsx47(MitumbaGrid, { columns: { xs: 1, sm: 2, md: 3, lg: 3 }, gap: 3, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx47(VAZIOutfitCardSkeleton, {}, `vazi-skel-${i + 1}`)) : outfits.map((outfit) => /* @__PURE__ */ jsx47(
|
|
4824
|
+
VAZIOutfitCard,
|
|
4825
|
+
{
|
|
4826
|
+
outfitName: outfit.outfitName,
|
|
4827
|
+
items: outfit.items,
|
|
4828
|
+
totalPriceKes: outfit.totalPriceKes,
|
|
4829
|
+
sellersCount: outfit.sellersCount,
|
|
4830
|
+
isMultiCity: outfit.isMultiCity,
|
|
4831
|
+
onTap: outfit.onTap,
|
|
4832
|
+
onBuyAll: outfit.onBuyAll
|
|
4833
|
+
},
|
|
4834
|
+
outfit.outfitName
|
|
4835
|
+
)) })
|
|
4879
4836
|
]
|
|
4880
4837
|
}
|
|
4881
4838
|
);
|
|
@@ -4887,7 +4844,7 @@ import { ThemeProvider } from "@mui/material/styles";
|
|
|
4887
4844
|
|
|
4888
4845
|
// src/theme/theme.ts
|
|
4889
4846
|
import { createTheme } from "@mui/material/styles";
|
|
4890
|
-
import { tokens as
|
|
4847
|
+
import { tokens as tokens44 } from "@mitumba/tokens";
|
|
4891
4848
|
var transitions = {
|
|
4892
4849
|
standard: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
4893
4850
|
spring: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
@@ -4896,86 +4853,86 @@ var mitumbaTheme = createTheme({
|
|
|
4896
4853
|
// Spacing factor 4px (Mandate)
|
|
4897
4854
|
spacing: (factor) => `${factor * 4}px`,
|
|
4898
4855
|
breakpoints: {
|
|
4899
|
-
values:
|
|
4856
|
+
values: tokens44.breakpoints
|
|
4900
4857
|
},
|
|
4901
4858
|
palette: {
|
|
4902
4859
|
mode: "light",
|
|
4903
4860
|
primary: {
|
|
4904
|
-
main:
|
|
4905
|
-
light:
|
|
4906
|
-
dark:
|
|
4907
|
-
contrastText:
|
|
4861
|
+
main: tokens44.colors.green,
|
|
4862
|
+
light: tokens44.colors.greenLight,
|
|
4863
|
+
dark: tokens44.colors.greenDark,
|
|
4864
|
+
contrastText: tokens44.colors.textOnGreen
|
|
4908
4865
|
},
|
|
4909
4866
|
secondary: {
|
|
4910
|
-
main:
|
|
4911
|
-
light:
|
|
4912
|
-
dark:
|
|
4913
|
-
contrastText:
|
|
4867
|
+
main: tokens44.colors.earth,
|
|
4868
|
+
light: tokens44.colors.earthLight,
|
|
4869
|
+
dark: tokens44.colors.earthDark,
|
|
4870
|
+
contrastText: tokens44.colors.textOnEarth
|
|
4914
4871
|
},
|
|
4915
4872
|
earth: {
|
|
4916
|
-
main:
|
|
4917
|
-
light:
|
|
4918
|
-
dark:
|
|
4919
|
-
contrastText:
|
|
4873
|
+
main: tokens44.colors.earth,
|
|
4874
|
+
light: tokens44.colors.earthLight,
|
|
4875
|
+
dark: tokens44.colors.earthDark,
|
|
4876
|
+
contrastText: tokens44.colors.textOnEarth
|
|
4920
4877
|
},
|
|
4921
4878
|
success: {
|
|
4922
|
-
main:
|
|
4923
|
-
light:
|
|
4924
|
-
dark:
|
|
4925
|
-
contrastText:
|
|
4879
|
+
main: tokens44.colors.success,
|
|
4880
|
+
light: tokens44.colors.successLight,
|
|
4881
|
+
dark: tokens44.colors.successDark,
|
|
4882
|
+
contrastText: tokens44.colors.textOnGreen
|
|
4926
4883
|
},
|
|
4927
4884
|
error: {
|
|
4928
|
-
main:
|
|
4929
|
-
light:
|
|
4930
|
-
dark:
|
|
4931
|
-
contrastText:
|
|
4885
|
+
main: tokens44.colors.error,
|
|
4886
|
+
light: tokens44.colors.errorLight,
|
|
4887
|
+
dark: tokens44.colors.errorDark,
|
|
4888
|
+
contrastText: tokens44.colors.white
|
|
4932
4889
|
},
|
|
4933
4890
|
warning: {
|
|
4934
|
-
main:
|
|
4935
|
-
light:
|
|
4936
|
-
dark:
|
|
4937
|
-
contrastText:
|
|
4891
|
+
main: tokens44.colors.warning,
|
|
4892
|
+
light: tokens44.colors.warningLight,
|
|
4893
|
+
dark: tokens44.colors.warningDark,
|
|
4894
|
+
contrastText: tokens44.colors.textPrimary
|
|
4938
4895
|
},
|
|
4939
4896
|
info: {
|
|
4940
|
-
main:
|
|
4941
|
-
light:
|
|
4942
|
-
dark:
|
|
4943
|
-
contrastText:
|
|
4897
|
+
main: tokens44.colors.info,
|
|
4898
|
+
light: tokens44.colors.infoLight,
|
|
4899
|
+
dark: tokens44.colors.infoDark,
|
|
4900
|
+
contrastText: tokens44.colors.white
|
|
4944
4901
|
},
|
|
4945
4902
|
background: {
|
|
4946
|
-
default:
|
|
4947
|
-
paper:
|
|
4903
|
+
default: tokens44.colors.background,
|
|
4904
|
+
paper: tokens44.colors.surface
|
|
4948
4905
|
},
|
|
4949
|
-
divider:
|
|
4906
|
+
divider: tokens44.colors.divider,
|
|
4950
4907
|
text: {
|
|
4951
|
-
primary:
|
|
4952
|
-
secondary:
|
|
4953
|
-
disabled:
|
|
4908
|
+
primary: tokens44.colors.textPrimary,
|
|
4909
|
+
secondary: tokens44.colors.textSecondary,
|
|
4910
|
+
disabled: tokens44.colors.textDisabled
|
|
4954
4911
|
},
|
|
4955
4912
|
common: {
|
|
4956
|
-
black:
|
|
4957
|
-
white:
|
|
4913
|
+
black: tokens44.colors.textPrimary,
|
|
4914
|
+
white: tokens44.colors.white
|
|
4958
4915
|
}
|
|
4959
4916
|
},
|
|
4960
4917
|
shape: {
|
|
4961
|
-
borderRadius:
|
|
4918
|
+
borderRadius: tokens44.radius.md
|
|
4962
4919
|
// 8px default
|
|
4963
4920
|
},
|
|
4964
4921
|
shadows: [
|
|
4965
4922
|
"none",
|
|
4966
|
-
|
|
4923
|
+
tokens44.shadows.card,
|
|
4967
4924
|
// 1
|
|
4968
|
-
|
|
4925
|
+
tokens44.shadows.elevated,
|
|
4969
4926
|
// 2
|
|
4970
|
-
|
|
4927
|
+
tokens44.shadows.deep,
|
|
4971
4928
|
// 3
|
|
4972
|
-
|
|
4929
|
+
tokens44.shadows.bottomSheet,
|
|
4973
4930
|
// 4
|
|
4974
|
-
|
|
4931
|
+
tokens44.shadows.focus,
|
|
4975
4932
|
// 5
|
|
4976
|
-
|
|
4933
|
+
tokens44.shadows.green,
|
|
4977
4934
|
// 6
|
|
4978
|
-
|
|
4935
|
+
tokens44.shadows.earth,
|
|
4979
4936
|
// 7
|
|
4980
4937
|
"none",
|
|
4981
4938
|
"none",
|
|
@@ -4996,45 +4953,45 @@ var mitumbaTheme = createTheme({
|
|
|
4996
4953
|
"none"
|
|
4997
4954
|
],
|
|
4998
4955
|
typography: {
|
|
4999
|
-
fontFamily:
|
|
5000
|
-
fontWeightRegular:
|
|
5001
|
-
fontWeightMedium:
|
|
5002
|
-
fontWeightBold:
|
|
4956
|
+
fontFamily: tokens44.typography.fontFamily,
|
|
4957
|
+
fontWeightRegular: tokens44.typography.fontWeights.regular,
|
|
4958
|
+
fontWeightMedium: tokens44.typography.fontWeights.medium,
|
|
4959
|
+
fontWeightBold: tokens44.typography.fontWeights.bold,
|
|
5003
4960
|
h1: {
|
|
5004
|
-
fontSize: `${
|
|
5005
|
-
fontWeight:
|
|
4961
|
+
fontSize: `${tokens44.typography.fontSizes.display}px`,
|
|
4962
|
+
fontWeight: tokens44.typography.fontWeights.extrabold,
|
|
5006
4963
|
lineHeight: 1.1
|
|
5007
4964
|
},
|
|
5008
4965
|
h2: {
|
|
5009
|
-
fontSize: `${
|
|
5010
|
-
fontWeight:
|
|
4966
|
+
fontSize: `${tokens44.typography.fontSizes.xxxl}px`,
|
|
4967
|
+
fontWeight: tokens44.typography.fontWeights.bold,
|
|
5011
4968
|
lineHeight: 1.2
|
|
5012
4969
|
},
|
|
5013
4970
|
h3: {
|
|
5014
|
-
fontSize: `${
|
|
5015
|
-
fontWeight:
|
|
4971
|
+
fontSize: `${tokens44.typography.fontSizes.xxl}px`,
|
|
4972
|
+
fontWeight: tokens44.typography.fontWeights.bold,
|
|
5016
4973
|
lineHeight: 1.2
|
|
5017
4974
|
},
|
|
5018
4975
|
h4: {
|
|
5019
|
-
fontSize: `${
|
|
5020
|
-
fontWeight:
|
|
4976
|
+
fontSize: `${tokens44.typography.fontSizes.xl}px`,
|
|
4977
|
+
fontWeight: tokens44.typography.fontWeights.bold,
|
|
5021
4978
|
lineHeight: 1.2
|
|
5022
4979
|
},
|
|
5023
4980
|
body1: {
|
|
5024
|
-
fontSize: `${
|
|
4981
|
+
fontSize: `${tokens44.typography.fontSizes.md}px`,
|
|
5025
4982
|
lineHeight: 1.5
|
|
5026
4983
|
},
|
|
5027
4984
|
body2: {
|
|
5028
|
-
fontSize: `${
|
|
4985
|
+
fontSize: `${tokens44.typography.fontSizes.base}px`,
|
|
5029
4986
|
lineHeight: 1.5
|
|
5030
4987
|
},
|
|
5031
4988
|
button: {
|
|
5032
|
-
fontSize: `${
|
|
4989
|
+
fontSize: `${tokens44.typography.fontSizes.base}px`,
|
|
5033
4990
|
fontWeight: 600,
|
|
5034
4991
|
textTransform: "none"
|
|
5035
4992
|
},
|
|
5036
4993
|
caption: {
|
|
5037
|
-
fontSize: `${
|
|
4994
|
+
fontSize: `${tokens44.typography.fontSizes.sm}px`,
|
|
5038
4995
|
lineHeight: 1.5
|
|
5039
4996
|
}
|
|
5040
4997
|
},
|
|
@@ -5042,9 +4999,9 @@ var mitumbaTheme = createTheme({
|
|
|
5042
4999
|
MuiCssBaseline: {
|
|
5043
5000
|
styleOverrides: {
|
|
5044
5001
|
body: {
|
|
5045
|
-
backgroundColor:
|
|
5046
|
-
color:
|
|
5047
|
-
fontFamily:
|
|
5002
|
+
backgroundColor: tokens44.colors.background,
|
|
5003
|
+
color: tokens44.colors.textPrimary,
|
|
5004
|
+
fontFamily: tokens44.typography.fontFamily,
|
|
5048
5005
|
WebkitFontSmoothing: "antialiased",
|
|
5049
5006
|
MozOsxFontSmoothing: "grayscale"
|
|
5050
5007
|
},
|
|
@@ -5059,7 +5016,7 @@ var mitumbaTheme = createTheme({
|
|
|
5059
5016
|
},
|
|
5060
5017
|
styleOverrides: {
|
|
5061
5018
|
root: {
|
|
5062
|
-
borderRadius: `${
|
|
5019
|
+
borderRadius: `${tokens44.radius.md}px`,
|
|
5063
5020
|
transition: transitions.standard,
|
|
5064
5021
|
fontWeight: 600,
|
|
5065
5022
|
"&:hover": {
|
|
@@ -5069,40 +5026,40 @@ var mitumbaTheme = createTheme({
|
|
|
5069
5026
|
transform: "translateY(0) scale(0.98)"
|
|
5070
5027
|
},
|
|
5071
5028
|
"&.Mui-disabled": {
|
|
5072
|
-
backgroundColor:
|
|
5073
|
-
color:
|
|
5074
|
-
borderColor:
|
|
5029
|
+
backgroundColor: tokens44.colors.divider,
|
|
5030
|
+
color: tokens44.colors.textDisabled,
|
|
5031
|
+
borderColor: tokens44.colors.divider
|
|
5075
5032
|
}
|
|
5076
5033
|
},
|
|
5077
5034
|
containedPrimary: {
|
|
5078
|
-
backgroundColor:
|
|
5035
|
+
backgroundColor: tokens44.colors.green,
|
|
5079
5036
|
"&:hover": {
|
|
5080
|
-
backgroundColor:
|
|
5081
|
-
boxShadow:
|
|
5037
|
+
backgroundColor: tokens44.colors.greenDark,
|
|
5038
|
+
boxShadow: tokens44.shadows.green
|
|
5082
5039
|
}
|
|
5083
5040
|
},
|
|
5084
5041
|
containedSecondary: {
|
|
5085
|
-
backgroundColor:
|
|
5042
|
+
backgroundColor: tokens44.colors.earth,
|
|
5086
5043
|
"&:hover": {
|
|
5087
|
-
backgroundColor:
|
|
5088
|
-
boxShadow:
|
|
5044
|
+
backgroundColor: tokens44.colors.earthDark,
|
|
5045
|
+
boxShadow: tokens44.shadows.earth
|
|
5089
5046
|
}
|
|
5090
5047
|
},
|
|
5091
5048
|
outlinedPrimary: {
|
|
5092
5049
|
borderWidth: "2px !important",
|
|
5093
|
-
borderColor:
|
|
5094
|
-
color:
|
|
5050
|
+
borderColor: tokens44.colors.border,
|
|
5051
|
+
color: tokens44.colors.textPrimary,
|
|
5095
5052
|
"&:hover": {
|
|
5096
|
-
backgroundColor:
|
|
5097
|
-
borderColor:
|
|
5098
|
-
color:
|
|
5053
|
+
backgroundColor: tokens44.colors.background,
|
|
5054
|
+
borderColor: tokens44.colors.green,
|
|
5055
|
+
color: tokens44.colors.green
|
|
5099
5056
|
}
|
|
5100
5057
|
},
|
|
5101
5058
|
textPrimary: {
|
|
5102
|
-
color:
|
|
5059
|
+
color: tokens44.colors.textSecondary,
|
|
5103
5060
|
"&:hover": {
|
|
5104
|
-
backgroundColor:
|
|
5105
|
-
color:
|
|
5061
|
+
backgroundColor: tokens44.colors.background,
|
|
5062
|
+
color: tokens44.colors.textPrimary
|
|
5106
5063
|
}
|
|
5107
5064
|
}
|
|
5108
5065
|
}
|
|
@@ -5110,16 +5067,16 @@ var mitumbaTheme = createTheme({
|
|
|
5110
5067
|
MuiCard: {
|
|
5111
5068
|
styleOverrides: {
|
|
5112
5069
|
root: {
|
|
5113
|
-
borderRadius: `${
|
|
5114
|
-
backgroundColor:
|
|
5115
|
-
boxShadow:
|
|
5070
|
+
borderRadius: `${tokens44.radius.xl}px`,
|
|
5071
|
+
backgroundColor: tokens44.colors.surface,
|
|
5072
|
+
boxShadow: tokens44.shadows.card,
|
|
5116
5073
|
transition: transitions.standard,
|
|
5117
5074
|
border: "1px solid",
|
|
5118
|
-
borderColor:
|
|
5075
|
+
borderColor: tokens44.colors.divider,
|
|
5119
5076
|
"&:hover": {
|
|
5120
5077
|
transform: "translateY(-4px)",
|
|
5121
|
-
boxShadow:
|
|
5122
|
-
borderColor:
|
|
5078
|
+
boxShadow: tokens44.shadows.elevated,
|
|
5079
|
+
borderColor: tokens44.colors.border
|
|
5123
5080
|
}
|
|
5124
5081
|
}
|
|
5125
5082
|
}
|
|
@@ -5127,36 +5084,36 @@ var mitumbaTheme = createTheme({
|
|
|
5127
5084
|
MuiPaper: {
|
|
5128
5085
|
styleOverrides: {
|
|
5129
5086
|
rounded: {
|
|
5130
|
-
borderRadius: `${
|
|
5087
|
+
borderRadius: `${tokens44.radius.xl}px`
|
|
5131
5088
|
},
|
|
5132
5089
|
elevation1: {
|
|
5133
|
-
boxShadow:
|
|
5090
|
+
boxShadow: tokens44.shadows.card
|
|
5134
5091
|
}
|
|
5135
5092
|
}
|
|
5136
5093
|
},
|
|
5137
5094
|
MuiOutlinedInput: {
|
|
5138
5095
|
styleOverrides: {
|
|
5139
5096
|
root: {
|
|
5140
|
-
borderRadius: `${
|
|
5141
|
-
backgroundColor:
|
|
5097
|
+
borderRadius: `${tokens44.radius.md}px`,
|
|
5098
|
+
backgroundColor: tokens44.colors.surface,
|
|
5142
5099
|
transition: transitions.standard,
|
|
5143
5100
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
5144
|
-
borderColor:
|
|
5101
|
+
borderColor: tokens44.colors.border,
|
|
5145
5102
|
borderWidth: "1px",
|
|
5146
5103
|
transition: transitions.standard
|
|
5147
5104
|
},
|
|
5148
5105
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
5149
|
-
borderColor:
|
|
5106
|
+
borderColor: tokens44.colors.textDisabled
|
|
5150
5107
|
},
|
|
5151
5108
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
5152
|
-
borderColor:
|
|
5109
|
+
borderColor: tokens44.colors.green,
|
|
5153
5110
|
borderWidth: "2px"
|
|
5154
5111
|
},
|
|
5155
5112
|
"&.Mui-error .MuiOutlinedInput-notchedOutline": {
|
|
5156
|
-
borderColor:
|
|
5113
|
+
borderColor: tokens44.colors.error
|
|
5157
5114
|
},
|
|
5158
5115
|
"&.Mui-focused": {
|
|
5159
|
-
boxShadow:
|
|
5116
|
+
boxShadow: tokens44.shadows.focus
|
|
5160
5117
|
}
|
|
5161
5118
|
}
|
|
5162
5119
|
}
|
|
@@ -5168,7 +5125,7 @@ var mitumbaTheme = createTheme({
|
|
|
5168
5125
|
cursor: "pointer",
|
|
5169
5126
|
"&:hover": {
|
|
5170
5127
|
transform: "perspective(1000px) rotateY(15deg) rotateX(-5deg) scale(1.1)",
|
|
5171
|
-
boxShadow:
|
|
5128
|
+
boxShadow: tokens44.shadows.elevated
|
|
5172
5129
|
},
|
|
5173
5130
|
"&:active": {
|
|
5174
5131
|
transform: "perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05)"
|
|
@@ -5179,8 +5136,8 @@ var mitumbaTheme = createTheme({
|
|
|
5179
5136
|
MuiDialog: {
|
|
5180
5137
|
styleOverrides: {
|
|
5181
5138
|
paper: {
|
|
5182
|
-
borderRadius: `${
|
|
5183
|
-
boxShadow:
|
|
5139
|
+
borderRadius: `${tokens44.radius.xxxl}px`,
|
|
5140
|
+
boxShadow: tokens44.shadows.bottomSheet,
|
|
5184
5141
|
backgroundImage: "none"
|
|
5185
5142
|
}
|
|
5186
5143
|
}
|
|
@@ -5188,7 +5145,7 @@ var mitumbaTheme = createTheme({
|
|
|
5188
5145
|
MuiAlert: {
|
|
5189
5146
|
styleOverrides: {
|
|
5190
5147
|
root: {
|
|
5191
|
-
borderRadius: `${
|
|
5148
|
+
borderRadius: `${tokens44.radius.lg}px`,
|
|
5192
5149
|
alignItems: "center"
|
|
5193
5150
|
}
|
|
5194
5151
|
}
|
|
@@ -5197,12 +5154,12 @@ var mitumbaTheme = createTheme({
|
|
|
5197
5154
|
});
|
|
5198
5155
|
|
|
5199
5156
|
// src/theme/provider.tsx
|
|
5200
|
-
import { jsx as jsx48, jsxs as
|
|
5157
|
+
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5201
5158
|
function MitumbaThemeProvider({
|
|
5202
5159
|
children,
|
|
5203
5160
|
disableCssBaseline = false
|
|
5204
5161
|
}) {
|
|
5205
|
-
return /* @__PURE__ */
|
|
5162
|
+
return /* @__PURE__ */ jsxs31(ThemeProvider, { theme: mitumbaTheme, children: [
|
|
5206
5163
|
!disableCssBaseline && /* @__PURE__ */ jsx48(CssBaseline, {}),
|
|
5207
5164
|
children
|
|
5208
5165
|
] });
|