@mitumba/ui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +734 -0
- package/dist/index.d.ts +734 -0
- package/dist/index.js +4687 -0
- package/dist/index.mjs +4619 -0
- package/package.json +42 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
type ButtonVariant = 'primary' | 'secondary' | 'earth' | 'success' | 'error' | 'outline' | 'ghost';
|
|
6
|
+
type ButtonSize = 'small' | 'medium' | 'large';
|
|
7
|
+
type IconPosition = 'left' | 'right';
|
|
8
|
+
interface MitumbaPrimaryButtonProps {
|
|
9
|
+
/** Button text label. If not provided and icon is present, becomes an Icon-Only button. */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Called when the button is clicked. */
|
|
12
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
/** Shows a spinner and prevents clicks while work is in progress. */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
/** Prevents user interaction. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Optional leading or trailing icon. */
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
/** Placement of the icon relative to the label. Defaults to 'left'. */
|
|
20
|
+
iconPosition?: IconPosition;
|
|
21
|
+
/** Whether the button spans the full available width. Defaults to false. */
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
/** Button height/scale. small(32px), medium(42px), large(52px). Defaults to 'medium'. */
|
|
24
|
+
size?: ButtonSize;
|
|
25
|
+
/** Visual treatment. Defaults to 'primary'. */
|
|
26
|
+
variant?: ButtonVariant;
|
|
27
|
+
/** Optional style overrides using MUI sx prop. */
|
|
28
|
+
sx?: SxProps<Theme>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Premium "Living" Button primitive with tactile interaction and precision scaling.
|
|
33
|
+
* Fulfills the 32/42/52 height standard and incorporates benchmark spring physics.
|
|
34
|
+
*/
|
|
35
|
+
declare function MitumbaPrimaryButton({ label, onClick, loading, disabled, icon, iconPosition, fullWidth, size, variant, sx, }: MitumbaPrimaryButtonProps): react_jsx_runtime.JSX.Element;
|
|
36
|
+
|
|
37
|
+
type TextFieldSize = 'small' | 'medium' | 'large';
|
|
38
|
+
type TextFieldStatus = 'success' | 'warning' | 'error';
|
|
39
|
+
type TextFieldRounding = 'pill' | 'rounded';
|
|
40
|
+
interface MitumbaTextFieldProps {
|
|
41
|
+
/** Optional label text displayed above the field. */
|
|
42
|
+
label?: string;
|
|
43
|
+
/** Placeholder text shown when the field is empty. */
|
|
44
|
+
hint: string;
|
|
45
|
+
/** Controlled value of the input. */
|
|
46
|
+
value: string;
|
|
47
|
+
/** Callback fired when the value changes. */
|
|
48
|
+
onChange: (value: string) => void;
|
|
49
|
+
/** Supporting text or error message displayed below the field. */
|
|
50
|
+
helperText?: string;
|
|
51
|
+
/** Error message displayed below the field. If provided, sets status to 'error'. */
|
|
52
|
+
error?: string;
|
|
53
|
+
/** Scale standard matching buttons/select. Defaults to 'medium'. */
|
|
54
|
+
size?: TextFieldSize;
|
|
55
|
+
/** Corner geometry. Defaults to 'rounded'. */
|
|
56
|
+
rounding?: TextFieldRounding;
|
|
57
|
+
/** Validation status treatment. */
|
|
58
|
+
status?: TextFieldStatus;
|
|
59
|
+
/** Leading icon or content. */
|
|
60
|
+
prefix?: ReactNode;
|
|
61
|
+
/** Trailing icon or content. */
|
|
62
|
+
suffix?: ReactNode;
|
|
63
|
+
/** Integrated button at the end of the input. */
|
|
64
|
+
endButton?: ReactNode;
|
|
65
|
+
/** Input type (e.g. "text", "email", "password"). Defaults to "text". */
|
|
66
|
+
type?: string;
|
|
67
|
+
/** Whether the field is disabled. */
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
/** Renders a multi-line textarea instead of a single-line input. */
|
|
70
|
+
multiline?: boolean;
|
|
71
|
+
/** Number of visible rows for a multi-line textarea. Defaults to 4 for multiline. */
|
|
72
|
+
rows?: number;
|
|
73
|
+
/** Whether the field is read-only. */
|
|
74
|
+
readOnly?: boolean;
|
|
75
|
+
/** Optional style overrides. */
|
|
76
|
+
sx?: SxProps<Theme>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Premium "Living" Text Field primitive with precision scaling and tactile states.
|
|
81
|
+
* Fulfills the 32/42/52 height standard and supports seamless integrated buttons.
|
|
82
|
+
*/
|
|
83
|
+
declare function MitumbaTextField({ label, hint, value, onChange, helperText, error, size, rounding, status, prefix, suffix, endButton, type, disabled, multiline, rows, readOnly, sx, }: MitumbaTextFieldProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
|
|
85
|
+
type SelectSize = 'small' | 'medium' | 'large';
|
|
86
|
+
type SelectRounding = 'pill' | 'rounded' | 'square';
|
|
87
|
+
interface MitumbaSelectOption {
|
|
88
|
+
/** Technical value for the option. */
|
|
89
|
+
value: string | number;
|
|
90
|
+
/** Primary display text. */
|
|
91
|
+
label: string;
|
|
92
|
+
/** Secondary supporting text. */
|
|
93
|
+
subtitle?: string;
|
|
94
|
+
/** Leading icon, flag, or avatar. */
|
|
95
|
+
icon?: React.ReactElement;
|
|
96
|
+
/** Optional grouping label. */
|
|
97
|
+
group?: string;
|
|
98
|
+
/** Whether the option is disabled. */
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
}
|
|
101
|
+
interface MitumbaSelectProps {
|
|
102
|
+
/** Selected value(s). */
|
|
103
|
+
value: string | number | (string | number)[];
|
|
104
|
+
/** Technical field name. */
|
|
105
|
+
name?: string;
|
|
106
|
+
/** Label text displayed above or inside the select. */
|
|
107
|
+
label?: string;
|
|
108
|
+
/** Placeholder when no value is selected. */
|
|
109
|
+
placeholder?: string;
|
|
110
|
+
/** Array of selectable options. */
|
|
111
|
+
options: MitumbaSelectOption[];
|
|
112
|
+
/** Called when the selection changes. */
|
|
113
|
+
onChange: (value: string | number | (string | number)[]) => void;
|
|
114
|
+
/** Scale standard matching buttons. Defaults to 'medium'. */
|
|
115
|
+
size?: SelectSize;
|
|
116
|
+
/** Corner geometry. Defaults to 'rounded'. */
|
|
117
|
+
rounding?: SelectRounding;
|
|
118
|
+
/** Whether multiple values can be selected. */
|
|
119
|
+
multiple?: boolean;
|
|
120
|
+
/** Shows a loading indicator. */
|
|
121
|
+
loading?: boolean;
|
|
122
|
+
/** Shows an error state. */
|
|
123
|
+
error?: string;
|
|
124
|
+
/** Prevents user interaction. */
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
/** Support for a search field inside the menu. */
|
|
127
|
+
showSearch?: boolean;
|
|
128
|
+
/** Support for a high-contrast dark menu. */
|
|
129
|
+
inverted?: boolean;
|
|
130
|
+
/** Leading icon for the collapsed state. */
|
|
131
|
+
startIcon?: React.ReactElement;
|
|
132
|
+
/** Manual override for the value display (e.g. "3 items selected"). */
|
|
133
|
+
displayValue?: string;
|
|
134
|
+
/** Optional style overrides. */
|
|
135
|
+
sx?: SxProps<Theme>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Premium "Living" Select primitive with precision scaling and rich menu metadata.
|
|
140
|
+
* Fulfills the 32/42/52 height standard and incorporates benchmark menu physics.
|
|
141
|
+
*/
|
|
142
|
+
declare function MitumbaSelect({ value, name, label, placeholder, options, onChange, size, rounding, multiple, loading, error, disabled, showSearch, inverted, startIcon, displayValue, sx, }: MitumbaSelectProps): react_jsx_runtime.JSX.Element;
|
|
143
|
+
|
|
144
|
+
type ChipVariant = 'solid' | 'outline' | 'soft' | 'ghost';
|
|
145
|
+
type ChipRounding = 'rounded' | 'pill' | 'square';
|
|
146
|
+
type ChipStatus = 'default' | 'active' | 'incomplete' | 'danger' | 'success' | 'common' | 'special';
|
|
147
|
+
interface MitumbaChipProps {
|
|
148
|
+
/** Text label displayed inside the chip. */
|
|
149
|
+
label: string;
|
|
150
|
+
/** Called when the chip is clicked. */
|
|
151
|
+
onClick?: () => void;
|
|
152
|
+
/** Called when the delete icon is clicked. */
|
|
153
|
+
onDelete?: () => void;
|
|
154
|
+
/** Whether the chip is in a selected/active state. */
|
|
155
|
+
selected?: boolean;
|
|
156
|
+
/** Prevents user interaction. */
|
|
157
|
+
disabled?: boolean;
|
|
158
|
+
/** Leading icon or dot. */
|
|
159
|
+
icon?: ReactNode;
|
|
160
|
+
/** Custom avatar element. */
|
|
161
|
+
avatar?: React.ReactElement;
|
|
162
|
+
/** Numeric or text badge appended to the end. */
|
|
163
|
+
badge?: string | number;
|
|
164
|
+
/** Visual treatment. Defaults to 'outline' as per new benchmark. */
|
|
165
|
+
variant?: ChipVariant;
|
|
166
|
+
/** Category archetype for auto-styling. */
|
|
167
|
+
status?: ChipStatus;
|
|
168
|
+
/** Corner geometry. Defaults to 'rounded' (8px). */
|
|
169
|
+
rounding?: ChipRounding;
|
|
170
|
+
/** Size standard. */
|
|
171
|
+
size?: 'small' | 'medium';
|
|
172
|
+
/** Base color theme. */
|
|
173
|
+
color?: 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'earth' | 'purple' | 'blue';
|
|
174
|
+
/** Optional style overrides. */
|
|
175
|
+
sx?: SxProps<Theme>;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Premium "Living" Chip primitive with tactile interaction and precision geometry.
|
|
180
|
+
* Fulfills the "Badges and Chips" design benchmark with systematic status-aware styling.
|
|
181
|
+
*/
|
|
182
|
+
declare function MitumbaChip({ label, onClick, onDelete, selected, disabled, icon, avatar, badge, variant, status, rounding, size, color: propColor, sx, }: MitumbaChipProps): react_jsx_runtime.JSX.Element;
|
|
183
|
+
|
|
184
|
+
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
185
|
+
interface MitumbaAvatarProps {
|
|
186
|
+
/** Display name for initials fallback and meta text. Isaac Stanley -> IS. */
|
|
187
|
+
name?: string;
|
|
188
|
+
/** URL of the profile image. */
|
|
189
|
+
imageUrl?: string;
|
|
190
|
+
/** Size of the avatar. xs(24), sm(32), md(44), lg(64), xl(80). Defaults to 'md'. */
|
|
191
|
+
size?: AvatarSize;
|
|
192
|
+
/** Optional element rendered as a badge on the bottom-right corner. */
|
|
193
|
+
badge?: ReactNode;
|
|
194
|
+
/** Requirement 4: Presence status dot (bottom-right). */
|
|
195
|
+
status?: 'online' | 'offline';
|
|
196
|
+
/** Requirement 2: Action icon overlay (bottom-right). Overrides status if both provided. */
|
|
197
|
+
actionIcon?: ReactNode;
|
|
198
|
+
/** Requirement 3: Numeric/text notification badge (top-right). */
|
|
199
|
+
notificationCount?: number | string;
|
|
200
|
+
/** Custom color for notification badge. Defaults to error red. */
|
|
201
|
+
notificationColor?: string;
|
|
202
|
+
/** Requirement 5 & 6: Alignment of name/subtitle text. */
|
|
203
|
+
textAlignment?: 'side' | 'bottom';
|
|
204
|
+
/** Supporting text for side-alignment metadata. */
|
|
205
|
+
subtitle?: string;
|
|
206
|
+
/** Requirement 7: Trigger the "new event" spinning border animation (dots-to-solid). */
|
|
207
|
+
hasNewEvent?: boolean;
|
|
208
|
+
/** Requirement 8: Value 0-100 for concentric progress stroke (e.g. profile completeness). */
|
|
209
|
+
progress?: number;
|
|
210
|
+
/** Requirement 9: Show selected state with tick icon at bottom-right. */
|
|
211
|
+
selected?: boolean;
|
|
212
|
+
/** Requirement 10: internal prop for stacked styling. */
|
|
213
|
+
isStacked?: boolean;
|
|
214
|
+
/** Requirement 11: internal prop for stacked CTA button. */
|
|
215
|
+
isCTA?: boolean;
|
|
216
|
+
/** Requirement 12: internal prop for numeric overflow circle. */
|
|
217
|
+
overflowCount?: number;
|
|
218
|
+
/** Called when the avatar/content is clicked. */
|
|
219
|
+
onClick?: () => void;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Premium "Living" Avatar primitive with 3D physicality and high-end animations.
|
|
224
|
+
* Fulfills all professional requirements and refinements from Stanley.
|
|
225
|
+
*/
|
|
226
|
+
declare function MitumbaAvatar({ name, imageUrl, size, badge, status, actionIcon, notificationCount, notificationColor, subtitle, textAlignment, hasNewEvent, progress, selected, isStacked, isCTA, overflowCount, onClick, }: MitumbaAvatarProps): react_jsx_runtime.JSX.Element;
|
|
227
|
+
|
|
228
|
+
interface PageContainerProps {
|
|
229
|
+
/** Content rendered inside the container. */
|
|
230
|
+
children: ReactNode;
|
|
231
|
+
/** Maximum width constraint. Defaults to 'lg'. */
|
|
232
|
+
maxWidth?: 'sm' | 'md' | 'lg' | 'xl';
|
|
233
|
+
/** If true, removes horizontal padding. */
|
|
234
|
+
noPadding?: boolean;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare function PageContainer({ children, maxWidth, noPadding, }: PageContainerProps): react_jsx_runtime.JSX.Element;
|
|
238
|
+
|
|
239
|
+
interface SectionHeaderProps {
|
|
240
|
+
/** Main section title. */
|
|
241
|
+
title: string;
|
|
242
|
+
/** Supporting descriptive text. */
|
|
243
|
+
subtitle?: string;
|
|
244
|
+
/** Secondary small label displayed above the title. */
|
|
245
|
+
overline?: string;
|
|
246
|
+
/** Primary action element (e.g., "See All" button). */
|
|
247
|
+
action?: ReactNode;
|
|
248
|
+
/** Horizontal alignment. Defaults to 'left'. */
|
|
249
|
+
align?: 'left' | 'center';
|
|
250
|
+
/** Visual scale. Defaults to 'standard'. */
|
|
251
|
+
variant?: 'standard' | 'large';
|
|
252
|
+
/** Optional style overrides. */
|
|
253
|
+
sx?: SxProps<Theme>;
|
|
254
|
+
/** Legacy props for backward compatibility. */
|
|
255
|
+
actionLabel?: string;
|
|
256
|
+
onAction?: () => void;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Premium "Living" Section Header primitive.
|
|
261
|
+
* Fulfills high-end layout standards with flexible alignment and benchmarked typography.
|
|
262
|
+
*/
|
|
263
|
+
declare function SectionHeader({ title, subtitle, overline, action, align, variant, sx, actionLabel, onAction, }: SectionHeaderProps): react_jsx_runtime.JSX.Element;
|
|
264
|
+
|
|
265
|
+
declare function MitumbaDivider(): react_jsx_runtime.JSX.Element;
|
|
266
|
+
|
|
267
|
+
interface MitumbaGridProps {
|
|
268
|
+
/** Grid cells. */
|
|
269
|
+
children: ReactNode;
|
|
270
|
+
/** Column counts per breakpoint. Defaults to { xs: 4, sm: 8, md: 8, lg: 12 }. */
|
|
271
|
+
columns?: {
|
|
272
|
+
xs: number;
|
|
273
|
+
sm: number;
|
|
274
|
+
md: number;
|
|
275
|
+
lg: number;
|
|
276
|
+
};
|
|
277
|
+
/** Responsive gap between cells. Defaults to benchmark standard (16/20/20). */
|
|
278
|
+
gap?: number | string | object;
|
|
279
|
+
/** Optional style overrides. */
|
|
280
|
+
sx?: SxProps<Theme>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Premium "Living" Grid primitive.
|
|
285
|
+
* Fulfills high-end structural standards with conservative, professional spatial density.
|
|
286
|
+
* Reigned in from the benchmark to avoid 'wild' excessive margins.
|
|
287
|
+
*/
|
|
288
|
+
declare function MitumbaGrid({ children, columns, gap, sx, }: MitumbaGridProps): react_jsx_runtime.JSX.Element;
|
|
289
|
+
|
|
290
|
+
type BreadcrumbItem = {
|
|
291
|
+
/** Display label. */
|
|
292
|
+
label: string;
|
|
293
|
+
/** Optional href. If provided, renders as a link. */
|
|
294
|
+
href?: string;
|
|
295
|
+
};
|
|
296
|
+
interface MitumbaBreadcrumbProps {
|
|
297
|
+
/** Breadcrumb trail items. */
|
|
298
|
+
items: BreadcrumbItem[];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Premium "Living" Breadcrumb primitive.
|
|
303
|
+
* Fulfills high-end hierarchy standards with systematic dividers and tactile hover states.
|
|
304
|
+
*/
|
|
305
|
+
declare function MitumbaBreadcrumb({ items }: MitumbaBreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
306
|
+
|
|
307
|
+
type BottomNavVariant = 'm3' | 'expansive' | 'indicator' | 'pill' | 'standalone';
|
|
308
|
+
interface MobileBottomNavItem {
|
|
309
|
+
id: string;
|
|
310
|
+
label: string;
|
|
311
|
+
icon: ReactNode;
|
|
312
|
+
activeIcon?: ReactNode;
|
|
313
|
+
}
|
|
314
|
+
interface MobileBottomNavProps {
|
|
315
|
+
/** Currently active tab ID. */
|
|
316
|
+
activeTab: string;
|
|
317
|
+
/** Called when a tab is selected. */
|
|
318
|
+
onTabChange: (id: string) => void;
|
|
319
|
+
/** Visual archetype from benchmark. Defaults to 'm3'. */
|
|
320
|
+
variant?: BottomNavVariant;
|
|
321
|
+
/** Array of navigation items. */
|
|
322
|
+
items?: MobileBottomNavItem[];
|
|
323
|
+
/** Optional style overrides. */
|
|
324
|
+
sx?: SxProps<Theme>;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Premium "Living" Mobile Bottom Navigation.
|
|
329
|
+
* Fulfills high-end benchmark standards with 5+ visual archetypes and tactile physics.
|
|
330
|
+
*/
|
|
331
|
+
declare function MobileBottomNav({ activeTab, onTabChange, variant, items, sx, }: MobileBottomNavProps): react_jsx_runtime.JSX.Element;
|
|
332
|
+
|
|
333
|
+
interface TopNavLink {
|
|
334
|
+
label: string;
|
|
335
|
+
href: string;
|
|
336
|
+
active?: boolean;
|
|
337
|
+
}
|
|
338
|
+
interface TopNavProps {
|
|
339
|
+
/** Optional announcement bar content. */
|
|
340
|
+
announcement?: ReactNode;
|
|
341
|
+
/** Main logo element. */
|
|
342
|
+
logo?: ReactNode;
|
|
343
|
+
/** Navigation links. */
|
|
344
|
+
links?: TopNavLink[];
|
|
345
|
+
/** Right-side action elements (Icons, Buttons). */
|
|
346
|
+
actions?: ReactNode;
|
|
347
|
+
/** Main CTA button (e.g., "Start Free Trial"). */
|
|
348
|
+
cta?: ReactNode;
|
|
349
|
+
/** Whether the nav is sticky. Defaults to true. */
|
|
350
|
+
sticky?: boolean;
|
|
351
|
+
/** Whether the background is transparent (until scroll). */
|
|
352
|
+
transparent?: boolean;
|
|
353
|
+
/** Desktop/Tablet search value. */
|
|
354
|
+
searchValue?: string;
|
|
355
|
+
/** Search change handler. */
|
|
356
|
+
onSearchChange?: (value: string) => void;
|
|
357
|
+
/** Search submit handler. */
|
|
358
|
+
onSearchSubmit?: (query: string) => void;
|
|
359
|
+
/** User object for profile display. */
|
|
360
|
+
user?: {
|
|
361
|
+
name: string;
|
|
362
|
+
avatarUrl?: string;
|
|
363
|
+
};
|
|
364
|
+
/** Authentication status. */
|
|
365
|
+
isAuthenticated?: boolean;
|
|
366
|
+
/** Click handlers. */
|
|
367
|
+
onLogoClick?: () => void;
|
|
368
|
+
onAuthClick?: () => void;
|
|
369
|
+
onProfileClick?: () => void;
|
|
370
|
+
onCartClick?: () => void;
|
|
371
|
+
/** Cart item count. */
|
|
372
|
+
cartCount?: number;
|
|
373
|
+
/** Optional style overrides. */
|
|
374
|
+
sx?: SxProps<Theme>;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Premium "Living" TopNav primitive.
|
|
379
|
+
* Fulfills high-end navigation benchmarks with customizable layouts and tactile feedback.
|
|
380
|
+
*/
|
|
381
|
+
declare function TopNav({ announcement, logo, links, actions, cta, sticky, transparent, searchValue, onSearchChange, onSearchSubmit, user, isAuthenticated, onLogoClick, onAuthClick, onProfileClick, onCartClick, cartCount, sx, }: TopNavProps): react_jsx_runtime.JSX.Element;
|
|
382
|
+
|
|
383
|
+
interface STIScoreChipProps {
|
|
384
|
+
/** STI score value from 0 to 100. */
|
|
385
|
+
score: number;
|
|
386
|
+
/** When true, only the score number is shown. When false, label + score are shown. Defaults to false. */
|
|
387
|
+
compact?: boolean;
|
|
388
|
+
/** Whether to show the text label next to the score. Defaults to true when not compact. */
|
|
389
|
+
showLabel?: boolean;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare function STIScoreChip({ score, compact, showLabel, }: STIScoreChipProps): react_jsx_runtime.JSX.Element;
|
|
393
|
+
|
|
394
|
+
interface SellerCardProps {
|
|
395
|
+
/** Unique identifier for the seller. */
|
|
396
|
+
sellerId: string;
|
|
397
|
+
/** Display name of the seller. */
|
|
398
|
+
name: string;
|
|
399
|
+
/** Optional URL of the seller's avatar image. */
|
|
400
|
+
avatarUrl?: string;
|
|
401
|
+
/** City where the seller is based. */
|
|
402
|
+
city: string;
|
|
403
|
+
/** STI score (0–100). */
|
|
404
|
+
stiScore: number;
|
|
405
|
+
/** Total number of listings the seller has. */
|
|
406
|
+
totalListings: number;
|
|
407
|
+
/** Whether this seller is VAZI featured. Defaults to false. */
|
|
408
|
+
isVaziFeatured?: boolean;
|
|
409
|
+
/** Called when the card is tapped/clicked. */
|
|
410
|
+
onTap?: () => void;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
declare function SellerCard({ name, avatarUrl, city, stiScore, totalListings, isVaziFeatured, onTap, }: SellerCardProps): react_jsx_runtime.JSX.Element;
|
|
414
|
+
|
|
415
|
+
interface STIEvent {
|
|
416
|
+
type: 'penalty' | 'positive';
|
|
417
|
+
reason: string;
|
|
418
|
+
pointsChange: number;
|
|
419
|
+
timestamp: string;
|
|
420
|
+
}
|
|
421
|
+
interface STIBreakdownPanelProps {
|
|
422
|
+
/** Overall STI score (0–100). */
|
|
423
|
+
score: number;
|
|
424
|
+
/** Order fulfillment rate as fraction (0–1). */
|
|
425
|
+
fulfillmentRate: number;
|
|
426
|
+
/** Listing accuracy rate as fraction (0–1). */
|
|
427
|
+
accuracyRate: number;
|
|
428
|
+
/** Average response time in hours. */
|
|
429
|
+
avgResponseHours: number;
|
|
430
|
+
/** Number of days the seller has been active. */
|
|
431
|
+
daysActive: number;
|
|
432
|
+
/** Recent STI events affecting score. */
|
|
433
|
+
recentEvents: STIEvent[];
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
declare function STIBreakdownPanel({ score, fulfillmentRate, accuracyRate, avgResponseHours, daysActive, recentEvents, }: STIBreakdownPanelProps): react_jsx_runtime.JSX.Element;
|
|
437
|
+
|
|
438
|
+
interface ListingCardProps {
|
|
439
|
+
/** Array of image URLs for the carousel. */
|
|
440
|
+
images: string[];
|
|
441
|
+
/** Product title. */
|
|
442
|
+
title: string;
|
|
443
|
+
/** Current price. */
|
|
444
|
+
price: number;
|
|
445
|
+
/** Original price for discount display. */
|
|
446
|
+
originalPrice?: number;
|
|
447
|
+
/** Brand or seller name. */
|
|
448
|
+
brand?: string;
|
|
449
|
+
/** Product size metadata. */
|
|
450
|
+
size?: string;
|
|
451
|
+
/** Floating badge text (e.g., "Best Seller"). */
|
|
452
|
+
badge?: string;
|
|
453
|
+
/** URL for the brand logo overlay. */
|
|
454
|
+
brandLogoUrl?: string;
|
|
455
|
+
/** Called when the card is clicked. */
|
|
456
|
+
onClick?: () => void;
|
|
457
|
+
/** Called when the "Buy Now" button is clicked. */
|
|
458
|
+
onBuyClick?: (e: React.MouseEvent) => void;
|
|
459
|
+
/** Whether the user has liked this item. */
|
|
460
|
+
isLiked?: boolean;
|
|
461
|
+
/** Called when the heart icon is clicked. */
|
|
462
|
+
onLikeClick?: (e: React.MouseEvent) => void;
|
|
463
|
+
/** Optional style overrides. */
|
|
464
|
+
sx?: SxProps<Theme>;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Premium "Pinterest-Level" Listing Card primitive.
|
|
469
|
+
* Engineered for absolute geometric harmony and high-fidelity action states.
|
|
470
|
+
* Reigned in for professional visual sanity (Very Serious standard).
|
|
471
|
+
*/
|
|
472
|
+
declare function ListingCard({ images, title, price, originalPrice, brand, size, badge, brandLogoUrl, onClick, onBuyClick, isLiked, onLikeClick, sx, }: ListingCardProps): react_jsx_runtime.JSX.Element;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Premium Listing Card Skeleton.
|
|
476
|
+
* Perfectly mirrors the ListingCard geometry and spatial density.
|
|
477
|
+
*/
|
|
478
|
+
declare function ListingCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
479
|
+
|
|
480
|
+
interface ListingGridProps {
|
|
481
|
+
/** Grid cells containing listing cards or any children. */
|
|
482
|
+
children: ReactNode;
|
|
483
|
+
/** Number of columns per breakpoint. Defaults to 2 mobile, 2 tablet, 3 small desktop, 4 desktop. */
|
|
484
|
+
columns?: {
|
|
485
|
+
xs: number;
|
|
486
|
+
sm: number;
|
|
487
|
+
md: number;
|
|
488
|
+
lg: number;
|
|
489
|
+
};
|
|
490
|
+
/** Gap between grid cells. Defaults to 16. */
|
|
491
|
+
gap?: number | string | object;
|
|
492
|
+
/** Whether the grid is in a loading state. */
|
|
493
|
+
isLoading?: boolean;
|
|
494
|
+
/** Optional style overrides. */
|
|
495
|
+
sx?: SxProps<Theme>;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Specialized Listing Grid for Product Items.
|
|
500
|
+
* Inherits from MitumbaGrid but defaults to e-commerce standard column counts.
|
|
501
|
+
*/
|
|
502
|
+
declare function ListingGrid({ children, columns, gap, isLoading, sx, }: ListingGridProps): react_jsx_runtime.JSX.Element;
|
|
503
|
+
|
|
504
|
+
interface ListingImageGalleryProps {
|
|
505
|
+
/** Array of image URLs for the listing. */
|
|
506
|
+
images: string[];
|
|
507
|
+
/** Descriptive title of the listing — used as alt text prefix for accessibility. */
|
|
508
|
+
title: string;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Premium Listing Image Gallery.
|
|
513
|
+
* Engineered for absolute geometric harmony and high-fidelity transitions.
|
|
514
|
+
* Reigned in for professional visual sanity (Very Serious standard).
|
|
515
|
+
*/
|
|
516
|
+
declare function ListingImageGallery({ images, title }: ListingImageGalleryProps): react_jsx_runtime.JSX.Element;
|
|
517
|
+
|
|
518
|
+
interface ConditionBadgeProps {
|
|
519
|
+
/**
|
|
520
|
+
* Condition grade of the listing item.
|
|
521
|
+
* - A: Like new
|
|
522
|
+
* - B: Good
|
|
523
|
+
* - C: Fair
|
|
524
|
+
*/
|
|
525
|
+
grade: 'A' | 'B' | 'C';
|
|
526
|
+
/**
|
|
527
|
+
* Whether to show the text label along with the grade letter.
|
|
528
|
+
* When false, only the grade letter is shown.
|
|
529
|
+
* @default false
|
|
530
|
+
*/
|
|
531
|
+
showLabel?: boolean;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Premium Listing Condition Badge.
|
|
536
|
+
* Redefined by the benchmarked Chip rules.
|
|
537
|
+
*/
|
|
538
|
+
declare function ConditionBadge({ grade, showLabel }: ConditionBadgeProps): react_jsx_runtime.JSX.Element;
|
|
539
|
+
|
|
540
|
+
interface PriceTagProps {
|
|
541
|
+
/** Price in Kenyan Shillings. */
|
|
542
|
+
priceKes: number;
|
|
543
|
+
/** Visual size of the tag. */
|
|
544
|
+
size?: 'small' | 'medium' | 'large';
|
|
545
|
+
/** Color theme. */
|
|
546
|
+
color?: 'green' | 'earth' | 'default';
|
|
547
|
+
/** Whether to show as strikethrough (e.g. original price). */
|
|
548
|
+
strikethrough?: boolean;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
declare function PriceTag({ priceKes, size, color, strikethrough }: PriceTagProps): react_jsx_runtime.JSX.Element;
|
|
552
|
+
|
|
553
|
+
interface DeliveryBadgeProps {
|
|
554
|
+
/** Type of delivery service. */
|
|
555
|
+
type: 'same-city' | 'intercity';
|
|
556
|
+
/** Estimated delivery time string (e.g., "Today", "3–5 business days"). */
|
|
557
|
+
estimatedDays?: string;
|
|
558
|
+
/** Delivery fee in KES. */
|
|
559
|
+
feeKes?: number;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Premium Delivery Status Badge.
|
|
564
|
+
* Redefined by the benchmarked Chip rules.
|
|
565
|
+
*/
|
|
566
|
+
declare function DeliveryBadge({ type, estimatedDays }: DeliveryBadgeProps): react_jsx_runtime.JSX.Element;
|
|
567
|
+
|
|
568
|
+
interface CartItemProps {
|
|
569
|
+
/** Technical ID of the item. */
|
|
570
|
+
id: string;
|
|
571
|
+
/** URL of the item's image. */
|
|
572
|
+
imageUrl: string;
|
|
573
|
+
/** Primary product title (e.g., ARTICLE 42453). */
|
|
574
|
+
title: string;
|
|
575
|
+
/** Secondary detail (e.g., COLOR GREEN). */
|
|
576
|
+
subtitle?: string;
|
|
577
|
+
/** Availability status (e.g., IN STOCK). */
|
|
578
|
+
status?: string;
|
|
579
|
+
/** Current price in Kenyan Shillings. */
|
|
580
|
+
priceKes: number;
|
|
581
|
+
/** Selected size metadata. */
|
|
582
|
+
size?: string;
|
|
583
|
+
/** Current quantity. */
|
|
584
|
+
quantity?: number;
|
|
585
|
+
/** Called when the item should be removed. */
|
|
586
|
+
onRemove?: () => void;
|
|
587
|
+
/** Called when the quantity is updated. */
|
|
588
|
+
onQuantityChange?: (newQuantity: number) => void;
|
|
589
|
+
/** Called when the size is updated. */
|
|
590
|
+
onSizeChange?: (newSize: string) => void;
|
|
591
|
+
/** Optional style overrides. */
|
|
592
|
+
sx?: SxProps<Theme>;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Premium "Pinterest-Level" Cart Item primitive.
|
|
597
|
+
* Fulfills high-end 'CART 02' benchmark standards with systematic columns and airy spacing.
|
|
598
|
+
*/
|
|
599
|
+
declare function CartItem({ imageUrl, title, subtitle, status, priceKes, size, quantity, onRemove, onQuantityChange, onSizeChange, sx, }: CartItemProps): react_jsx_runtime.JSX.Element;
|
|
600
|
+
|
|
601
|
+
type OrderStatus = 'CREATED' | 'PAYMENT_PENDING' | 'PAID' | 'SELLER_CONFIRMED' | 'SHIPPED' | 'DELIVERED' | 'COMPLETED' | 'CANCELLED' | 'DISPUTED';
|
|
602
|
+
interface OrderEvent {
|
|
603
|
+
status: OrderStatus;
|
|
604
|
+
timestamp: string;
|
|
605
|
+
note?: string;
|
|
606
|
+
}
|
|
607
|
+
interface OrderStatusTimelineProps {
|
|
608
|
+
/** The current order status. */
|
|
609
|
+
currentStatus: OrderStatus;
|
|
610
|
+
/** Array of order event entries. */
|
|
611
|
+
events: OrderEvent[];
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare function OrderStatusTimeline({ currentStatus, events }: OrderStatusTimelineProps): react_jsx_runtime.JSX.Element;
|
|
615
|
+
|
|
616
|
+
type EscrowStatus = 'FUNDED' | 'SHIPPED' | 'TIMEOUT_WARNING' | 'RELEASED' | 'REFUNDED';
|
|
617
|
+
interface EscrowStatusBannerProps {
|
|
618
|
+
/** Current escrow status. */
|
|
619
|
+
status: EscrowStatus;
|
|
620
|
+
/** Hours remaining for timeout warning. */
|
|
621
|
+
hoursRemaining?: number;
|
|
622
|
+
/** Called when the user confirms delivery. */
|
|
623
|
+
onConfirmDelivery?: () => void;
|
|
624
|
+
/** Called when the user raises a dispute. */
|
|
625
|
+
onRaiseDispute?: () => void;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Banner displaying the current escrow/payment status with contextual actions.
|
|
630
|
+
*/
|
|
631
|
+
declare function EscrowStatusBanner({ status, hoursRemaining, onConfirmDelivery, onRaiseDispute, }: EscrowStatusBannerProps): react_jsx_runtime.JSX.Element;
|
|
632
|
+
|
|
633
|
+
interface VAZIOutfitItem {
|
|
634
|
+
/** Unique identifier for the listing. */
|
|
635
|
+
listingId: string;
|
|
636
|
+
/** URL of the item's image. */
|
|
637
|
+
imageUrl: string;
|
|
638
|
+
/** Type of garment in the outfit. */
|
|
639
|
+
garmentType: 'top' | 'bottom' | 'shoes' | 'accessory';
|
|
640
|
+
/** Price in Kenyan Shillings. */
|
|
641
|
+
priceKes: number;
|
|
642
|
+
/** Display name of the seller. */
|
|
643
|
+
sellerName: string;
|
|
644
|
+
}
|
|
645
|
+
interface VAZIOutfitCardProps {
|
|
646
|
+
/** Name of the outfit (e.g. "Weekend Chill"). */
|
|
647
|
+
outfitName: string;
|
|
648
|
+
/** Items that make up the outfit (2–4 items). */
|
|
649
|
+
items: VAZIOutfitItem[];
|
|
650
|
+
/** Total price of all items in Kenyan Shillings. */
|
|
651
|
+
totalPriceKes: number;
|
|
652
|
+
/** Number of unique sellers involved in this outfit. */
|
|
653
|
+
sellersCount: number;
|
|
654
|
+
/** Whether items ship from multiple cities. */
|
|
655
|
+
isMultiCity?: boolean;
|
|
656
|
+
/** Called when the card is tapped or clicked. */
|
|
657
|
+
onTap?: () => void;
|
|
658
|
+
/** Called when the "Buy this look" button is clicked. */
|
|
659
|
+
onBuyAll?: () => void;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
declare function VAZIOutfitCard({ outfitName, items, totalPriceKes, sellersCount, isMultiCity, onTap, onBuyAll, }: VAZIOutfitCardProps): react_jsx_runtime.JSX.Element;
|
|
663
|
+
|
|
664
|
+
declare function VAZIOutfitCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* VAZIOutfitCardSkeleton has no props.
|
|
668
|
+
* Renders an animated skeleton matching VAZIOutfitCard dimensions.
|
|
669
|
+
*/
|
|
670
|
+
interface VAZIOutfitCardSkeletonProps {
|
|
671
|
+
/** Optional test ID for testing hooks. */
|
|
672
|
+
'data-testid'?: string;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
interface VAZIBadgeProps {
|
|
676
|
+
/** Size of the badge. Defaults to 'medium'. */
|
|
677
|
+
size?: 'small' | 'medium';
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Premium VAZI Status Badge.
|
|
682
|
+
* Redefined by the benchmarked Chip rules.
|
|
683
|
+
*/
|
|
684
|
+
declare function VAZIBadge({ size }: VAZIBadgeProps): react_jsx_runtime.JSX.Element;
|
|
685
|
+
|
|
686
|
+
interface VAZIFeedSectionProps {
|
|
687
|
+
/** VAZI outfits to display in the section. */
|
|
688
|
+
outfits: VAZIOutfitCardProps[];
|
|
689
|
+
/** Whether the outfits are still loading. Shows skeleton cards when true. */
|
|
690
|
+
loading?: boolean;
|
|
691
|
+
/** Called when the user presses "See all". */
|
|
692
|
+
onSeeAll?: () => void;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
declare function VAZIFeedSection({ outfits, loading, onSeeAll }: VAZIFeedSectionProps): react_jsx_runtime.JSX.Element;
|
|
696
|
+
|
|
697
|
+
interface CompleteThisLookPanelProps {
|
|
698
|
+
/** VAZI outfit suggestions seeded from the current listing. */
|
|
699
|
+
outfits: VAZIOutfitCardProps[];
|
|
700
|
+
/** Whether the outfits are still loading. Shows skeleton cards when true. */
|
|
701
|
+
loading?: boolean;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
declare function CompleteThisLookPanel({ outfits, loading }: CompleteThisLookPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
705
|
+
|
|
706
|
+
interface MitumbaThemeProviderProps {
|
|
707
|
+
/** Application or story content rendered inside the Mitumba theme. */
|
|
708
|
+
children: ReactNode;
|
|
709
|
+
/** Disable CssBaseline when embedding inside an already-normalized host app. */
|
|
710
|
+
disableCssBaseline?: boolean;
|
|
711
|
+
}
|
|
712
|
+
declare function MitumbaThemeProvider({ children, disableCssBaseline, }: MitumbaThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
713
|
+
|
|
714
|
+
declare module '@mui/material/styles' {
|
|
715
|
+
interface Palette {
|
|
716
|
+
earth: Palette['primary'];
|
|
717
|
+
}
|
|
718
|
+
interface PaletteOptions {
|
|
719
|
+
earth?: PaletteOptions['primary'];
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
declare module '@mui/material/Button' {
|
|
723
|
+
interface ButtonPropsColorOverrides {
|
|
724
|
+
earth: true;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
declare module '@mui/material/Chip' {
|
|
728
|
+
interface ChipPropsColorOverrides {
|
|
729
|
+
earth: true;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
declare const mitumbaTheme: Theme;
|
|
733
|
+
|
|
734
|
+
export { CartItem, type CartItemProps, CompleteThisLookPanel, type CompleteThisLookPanelProps, ConditionBadge, type ConditionBadgeProps, DeliveryBadge, type DeliveryBadgeProps, type EscrowStatus, EscrowStatusBanner, type EscrowStatusBannerProps, ListingCard, type ListingCardProps, ListingCardSkeleton, ListingGrid, type ListingGridProps, ListingImageGallery, type ListingImageGalleryProps, MitumbaAvatar, type MitumbaAvatarProps, MitumbaBreadcrumb, type MitumbaBreadcrumbProps, MitumbaChip, type MitumbaChipProps, MitumbaDivider, MitumbaGrid, type MitumbaGridProps, MitumbaPrimaryButton, type MitumbaPrimaryButtonProps, MitumbaSelect, type MitumbaSelectProps, MitumbaTextField, type MitumbaTextFieldProps, MitumbaThemeProvider, type MitumbaThemeProviderProps, MobileBottomNav, type MobileBottomNavProps, type OrderEvent, type OrderStatus, OrderStatusTimeline, type OrderStatusTimelineProps, PageContainer, type PageContainerProps, PriceTag, type PriceTagProps, STIBreakdownPanel, type STIBreakdownPanelProps, STIScoreChip, type STIScoreChipProps, SectionHeader, type SectionHeaderProps, SellerCard, type SellerCardProps, TopNav, type TopNavProps, VAZIBadge, type VAZIBadgeProps, VAZIFeedSection, type VAZIFeedSectionProps, VAZIOutfitCard, type VAZIOutfitCardProps, VAZIOutfitCardSkeleton, type VAZIOutfitCardSkeletonProps, type VAZIOutfitItem, mitumbaTheme };
|