@skyfall_ai/bazaar 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/index.css +14863 -0
- package/dist/index.d.mts +4652 -0
- package/dist/index.d.ts +4652 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11879 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +89 -0
- package/src/tokens/bazaar-tokens.css +427 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,4652 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { ElementType } from 'react';
|
|
4
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
5
|
+
import { HTMLAttributes } from 'react';
|
|
6
|
+
import { InputHTMLAttributes } from 'react';
|
|
7
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
8
|
+
import { LabelHTMLAttributes } from 'react';
|
|
9
|
+
import { LegendProps } from 'recharts';
|
|
10
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
11
|
+
import { ReactNode } from 'react';
|
|
12
|
+
import { RefAttributes } from 'react';
|
|
13
|
+
import { SelectHTMLAttributes } from 'react';
|
|
14
|
+
import { SVGProps } from 'react';
|
|
15
|
+
import { TableHTMLAttributes } from 'react';
|
|
16
|
+
import { TdHTMLAttributes } from 'react';
|
|
17
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
18
|
+
import { ThHTMLAttributes } from 'react';
|
|
19
|
+
import { TooltipProps as TooltipProps_2 } from 'recharts';
|
|
20
|
+
|
|
21
|
+
/** Reward accent — Warm Amber. Loyalty, rewards, gold-tier. */
|
|
22
|
+
export declare const accentAmber: {
|
|
23
|
+
readonly 50: "#FBF2DF";
|
|
24
|
+
readonly 100: "#F5E1B6";
|
|
25
|
+
readonly 200: "#EAC079";
|
|
26
|
+
readonly 300: "#D9A046";
|
|
27
|
+
readonly 400: "#B58235";
|
|
28
|
+
readonly 500: "#8C6324";
|
|
29
|
+
readonly 600: "#6C4B1A";
|
|
30
|
+
readonly 700: "#513712";
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** Support accent — Sage. Confirmation, in-stock, eco. */
|
|
34
|
+
export declare const accentMint: {
|
|
35
|
+
readonly 50: "#EAF1EA";
|
|
36
|
+
readonly 100: "#D1DFD3";
|
|
37
|
+
readonly 200: "#A8C1AC";
|
|
38
|
+
readonly 300: "#7BA181";
|
|
39
|
+
readonly 400: "#4A7C59";
|
|
40
|
+
readonly 500: "#3A6547";
|
|
41
|
+
readonly 600: "#2E5237";
|
|
42
|
+
readonly 700: "#22402A";
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare const accentTeal: {
|
|
46
|
+
readonly 50: "#EAF1EA";
|
|
47
|
+
readonly 100: "#D1DFD3";
|
|
48
|
+
readonly 200: "#A8C1AC";
|
|
49
|
+
readonly 300: "#7BA181";
|
|
50
|
+
readonly 400: "#4A7C59";
|
|
51
|
+
readonly 500: "#3A6547";
|
|
52
|
+
readonly 600: "#2E5237";
|
|
53
|
+
readonly 700: "#22402A";
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Accordion — expandable/collapsible content sections.
|
|
58
|
+
*
|
|
59
|
+
* Accessibility:
|
|
60
|
+
* - Button triggers with aria-expanded and aria-controls
|
|
61
|
+
* - Content panels have role="region" and aria-labelledby
|
|
62
|
+
* - Animated expand/collapse with proper height transitions
|
|
63
|
+
* - Supports single or multiple open panels
|
|
64
|
+
*/
|
|
65
|
+
export declare function Accordion({ items, allowMultiple, defaultOpenIds, className }: AccordionProps): JSX_2.Element;
|
|
66
|
+
|
|
67
|
+
export declare interface AccordionItem {
|
|
68
|
+
/** Unique identifier */
|
|
69
|
+
id: string;
|
|
70
|
+
/** Header title */
|
|
71
|
+
title: string;
|
|
72
|
+
/** Panel content */
|
|
73
|
+
content: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare interface AccordionProps {
|
|
77
|
+
/** Accordion items */
|
|
78
|
+
items: AccordionItem[];
|
|
79
|
+
/** Allow multiple panels to be open simultaneously */
|
|
80
|
+
allowMultiple?: boolean;
|
|
81
|
+
/** IDs of panels open by default */
|
|
82
|
+
defaultOpenIds?: string[];
|
|
83
|
+
/** Additional className */
|
|
84
|
+
className?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare interface AccountDashboardSection {
|
|
88
|
+
id: string;
|
|
89
|
+
title: ReactNode;
|
|
90
|
+
actionLabel?: string;
|
|
91
|
+
onAction?: () => void;
|
|
92
|
+
content: ReactNode;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* AccountDashboardTemplate — logged-in account overview shell. Sidebar nav,
|
|
97
|
+
* summary tiles (orders/points/rewards), and stacked content sections.
|
|
98
|
+
*/
|
|
99
|
+
export declare function AccountDashboardTemplate({ header, footer, title, subtitle, sidebar, summary, sections, className, ...rest }: AccountDashboardTemplateProps): JSX_2.Element;
|
|
100
|
+
|
|
101
|
+
export declare interface AccountDashboardTemplateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
102
|
+
header?: ReactNode;
|
|
103
|
+
footer?: ReactNode;
|
|
104
|
+
/** Page heading — e.g., "Hello, Mara". */
|
|
105
|
+
title: ReactNode;
|
|
106
|
+
subtitle?: ReactNode;
|
|
107
|
+
/** Sidebar nav — typically AccountNav. */
|
|
108
|
+
sidebar: ReactNode;
|
|
109
|
+
/** Summary tiles across the top of the content area. */
|
|
110
|
+
summary?: AccountSummaryStat[];
|
|
111
|
+
/** Stacked content sections (Recent orders, Saved addresses, etc.). */
|
|
112
|
+
sections?: AccountDashboardSection[];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* AccountNav — sidebar navigation for the logged-in account area. Vertical
|
|
117
|
+
* list with optional counts + a subdued sign-out affordance.
|
|
118
|
+
*/
|
|
119
|
+
export declare function AccountNav({ name, greeting, items, activeId, signOutLabel, onSignOut, className, ...rest }: AccountNavProps): JSX_2.Element;
|
|
120
|
+
|
|
121
|
+
export declare interface AccountNavItem {
|
|
122
|
+
id: string;
|
|
123
|
+
label: string;
|
|
124
|
+
href?: string;
|
|
125
|
+
onClick?: () => void;
|
|
126
|
+
/** Small count badge (orders, wishlist size). */
|
|
127
|
+
count?: number;
|
|
128
|
+
/** Optional leading icon. */
|
|
129
|
+
icon?: ReactNode;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare interface AccountNavProps extends HTMLAttributes<HTMLElement> {
|
|
133
|
+
/** Customer first name or display label shown in the header. */
|
|
134
|
+
name?: ReactNode;
|
|
135
|
+
greeting?: string;
|
|
136
|
+
items: AccountNavItem[];
|
|
137
|
+
/** Id of the currently-active item. */
|
|
138
|
+
activeId?: string;
|
|
139
|
+
signOutLabel?: string;
|
|
140
|
+
onSignOut?: () => void;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare interface AccountSummaryStat {
|
|
144
|
+
id: string;
|
|
145
|
+
label: string;
|
|
146
|
+
value: ReactNode;
|
|
147
|
+
meta?: ReactNode;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare interface ActiveFilterChip {
|
|
151
|
+
id: string;
|
|
152
|
+
label: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export declare interface Address {
|
|
156
|
+
id?: string;
|
|
157
|
+
name: string;
|
|
158
|
+
line1: string;
|
|
159
|
+
line2?: string;
|
|
160
|
+
city: string;
|
|
161
|
+
region: string;
|
|
162
|
+
postalCode: string;
|
|
163
|
+
country: string;
|
|
164
|
+
phone?: string;
|
|
165
|
+
isDefault?: boolean;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* AddressBook — grid of saved shipping/billing addresses with a "default"
|
|
170
|
+
* badge and per-card edit/remove/set-as-default actions. Includes a dashed
|
|
171
|
+
* "Add address" tile as the final cell.
|
|
172
|
+
*/
|
|
173
|
+
export declare function AddressBook({ addresses, title, onEdit, onRemove, onSetDefault, onAdd, className, ...rest }: AddressBookProps): JSX_2.Element;
|
|
174
|
+
|
|
175
|
+
export declare interface AddressBookProps extends HTMLAttributes<HTMLElement> {
|
|
176
|
+
addresses: Address[];
|
|
177
|
+
title?: string;
|
|
178
|
+
onEdit?: (address: Address) => void;
|
|
179
|
+
onRemove?: (address: Address) => void;
|
|
180
|
+
onSetDefault?: (address: Address) => void;
|
|
181
|
+
onAdd?: () => void;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* AddressForm — shipping / billing address capture with a region-aware
|
|
186
|
+
* grid. Fully controlled; callers own validation.
|
|
187
|
+
*/
|
|
188
|
+
export declare function AddressForm({ value, onChange, errors, title, countries, showSaveToggle, compact, className, ...rest }: AddressFormProps): JSX_2.Element;
|
|
189
|
+
|
|
190
|
+
export declare interface AddressFormProps extends Omit<HTMLAttributes<HTMLFieldSetElement>, 'onChange'> {
|
|
191
|
+
value: Partial<Address>;
|
|
192
|
+
onChange: (next: Partial<Address>) => void;
|
|
193
|
+
/** Field-level errors. */
|
|
194
|
+
errors?: Partial<Record<keyof Address, string>>;
|
|
195
|
+
title?: string;
|
|
196
|
+
/** Country options — pass a string[] of labels or skip for the default. */
|
|
197
|
+
countries?: string[];
|
|
198
|
+
/** Show a "Save this address to my account" toggle below the form. */
|
|
199
|
+
showSaveToggle?: boolean;
|
|
200
|
+
/** Form is embedded inside a step; don't render an outer title. */
|
|
201
|
+
compact?: boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Alert — contextual message banner.
|
|
206
|
+
*
|
|
207
|
+
* Accessibility:
|
|
208
|
+
* - Uses role="alert" for errors/warnings (live region, immediately announced)
|
|
209
|
+
* - Uses role="status" for info/success (polite announcement)
|
|
210
|
+
* - Icon + color + text ensures meaning is communicated multiple ways
|
|
211
|
+
*/
|
|
212
|
+
export declare function Alert({ status, title, action, className, children, ...props }: AlertProps): JSX_2.Element;
|
|
213
|
+
|
|
214
|
+
export declare interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
215
|
+
/** Semantic status */
|
|
216
|
+
status?: 'info' | 'success' | 'warning' | 'error';
|
|
217
|
+
/** Optional title */
|
|
218
|
+
title?: string;
|
|
219
|
+
/** Optional action element (e.g., a close button) */
|
|
220
|
+
action?: ReactNode;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* AnnouncementBar — thin site-wide bar for shipping promises, drops or
|
|
225
|
+
* limited-time promos. Rotates through messages when more than one is
|
|
226
|
+
* supplied.
|
|
227
|
+
*/
|
|
228
|
+
export declare function AnnouncementBar({ messages, dismissible, onDismiss, interval, tone, className, ...rest }: AnnouncementBarProps): JSX_2.Element | null;
|
|
229
|
+
|
|
230
|
+
export declare interface AnnouncementBarProps extends HTMLAttributes<HTMLElement> {
|
|
231
|
+
/** One or many messages — when multiple, they rotate. */
|
|
232
|
+
messages: AnnouncementMessage[];
|
|
233
|
+
/** Dismissible? */
|
|
234
|
+
dismissible?: boolean;
|
|
235
|
+
onDismiss?: () => void;
|
|
236
|
+
/** Rotation interval (ms). Defaults to 4500. Set 0 to disable. */
|
|
237
|
+
interval?: number;
|
|
238
|
+
/** Visual tone. */
|
|
239
|
+
tone?: 'ink' | 'sand' | 'warm';
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export declare interface AnnouncementMessage {
|
|
243
|
+
id: string;
|
|
244
|
+
body: ReactNode;
|
|
245
|
+
/** Optional inline CTA. */
|
|
246
|
+
cta?: {
|
|
247
|
+
label: string;
|
|
248
|
+
onClick?: () => void;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* AppBar — horizontal top navigation bar for application headers.
|
|
254
|
+
*
|
|
255
|
+
* Accessibility:
|
|
256
|
+
* - Uses <header> with <nav> for semantic structure
|
|
257
|
+
* - Navigation items should be provided as links or buttons
|
|
258
|
+
* - Fixed height with clean horizontal layout
|
|
259
|
+
*/
|
|
260
|
+
export declare function AppBar({ logo, children, actions, className, ...props }: AppBarProps): JSX_2.Element;
|
|
261
|
+
|
|
262
|
+
export declare interface AppBarProps extends HTMLAttributes<HTMLElement> {
|
|
263
|
+
/** Logo or brand element */
|
|
264
|
+
logo?: ReactNode;
|
|
265
|
+
/** Navigation items (center/left area) */
|
|
266
|
+
children?: ReactNode;
|
|
267
|
+
/** Action elements on the right (profile, notifications, etc.) */
|
|
268
|
+
actions?: ReactNode;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export declare interface AppliedCoupon {
|
|
272
|
+
code: string;
|
|
273
|
+
/** Display label, e.g. "10% off entire order". */
|
|
274
|
+
label: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Autocomplete — combobox input with filtered suggestions dropdown.
|
|
279
|
+
*
|
|
280
|
+
* Accessibility:
|
|
281
|
+
* - role="combobox" on input with aria-expanded, aria-controls, aria-activedescendant
|
|
282
|
+
* - Dropdown uses role="listbox" with role="option" items
|
|
283
|
+
* - Arrow keys navigate options, Enter selects, Escape closes
|
|
284
|
+
* - Full ARIA combobox pattern per WAI-ARIA 1.2
|
|
285
|
+
*/
|
|
286
|
+
export declare function Autocomplete({ options, value, onChange, onInputChange, placeholder, disabled, error, size, loading, noResultsText, className, }: AutocompleteProps): JSX_2.Element;
|
|
287
|
+
|
|
288
|
+
export declare interface AutocompleteOption {
|
|
289
|
+
value: string;
|
|
290
|
+
label: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export declare interface AutocompleteProps {
|
|
294
|
+
/** Available options */
|
|
295
|
+
options: AutocompleteOption[];
|
|
296
|
+
/** Selected value */
|
|
297
|
+
value?: string;
|
|
298
|
+
/** Change handler — receives the selected value */
|
|
299
|
+
onChange?: (value: string) => void;
|
|
300
|
+
/** Callback when the text input changes */
|
|
301
|
+
onInputChange?: (inputValue: string) => void;
|
|
302
|
+
/** Placeholder text */
|
|
303
|
+
placeholder?: string;
|
|
304
|
+
/** Disabled state */
|
|
305
|
+
disabled?: boolean;
|
|
306
|
+
/** Error state */
|
|
307
|
+
error?: boolean;
|
|
308
|
+
/** Size variant */
|
|
309
|
+
size?: 'sm' | 'md' | 'lg';
|
|
310
|
+
/** Show a loading spinner in the dropdown */
|
|
311
|
+
loading?: boolean;
|
|
312
|
+
/** Text shown when no results match */
|
|
313
|
+
noResultsText?: string;
|
|
314
|
+
/** Additional CSS class */
|
|
315
|
+
className?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Avatar — circular user image with initials fallback and optional status.
|
|
320
|
+
*
|
|
321
|
+
* Accessibility:
|
|
322
|
+
* - Image includes alt text when src is provided
|
|
323
|
+
* - Initials fallback uses aria-label with the full name
|
|
324
|
+
* - Status dot includes a visually-hidden label
|
|
325
|
+
* - Healthcare note: use avatars to identify care team members,
|
|
326
|
+
* patients, and providers in clinical workflows
|
|
327
|
+
*/
|
|
328
|
+
export declare function Avatar({ src, alt, name, size, status, className, ...props }: AvatarProps): JSX_2.Element;
|
|
329
|
+
|
|
330
|
+
export declare interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
331
|
+
/** Image source URL */
|
|
332
|
+
src?: string;
|
|
333
|
+
/** Alt text for the image */
|
|
334
|
+
alt?: string;
|
|
335
|
+
/** Full name used to generate initials fallback */
|
|
336
|
+
name?: string;
|
|
337
|
+
/** Size variant */
|
|
338
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
339
|
+
/** Optional status dot overlay */
|
|
340
|
+
status?: 'active' | 'inactive' | 'busy' | 'away';
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Backdrop — fullscreen overlay primitive.
|
|
345
|
+
*
|
|
346
|
+
* Backdrop provides the scrim layer behind Modal, Drawer, and Dialog.
|
|
347
|
+
* It handles body scroll locking, click-to-dismiss, and fade animation.
|
|
348
|
+
*
|
|
349
|
+
* Accessibility:
|
|
350
|
+
* - aria-hidden="true" — the backdrop itself is not interactive content
|
|
351
|
+
* - Focus management is the responsibility of the surface component (Modal, Drawer)
|
|
352
|
+
* - Body scroll lock prevents background content from scrolling under the overlay
|
|
353
|
+
*/
|
|
354
|
+
export declare function Backdrop({ open, onClick, disableClick, lockScroll, variant, className, children, ...props }: BackdropProps): JSX_2.Element | null;
|
|
355
|
+
|
|
356
|
+
export declare interface BackdropProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
357
|
+
/** Whether the backdrop is visible */
|
|
358
|
+
open: boolean;
|
|
359
|
+
/** Called when the backdrop is clicked */
|
|
360
|
+
onClick?: (e: MouseEvent_2<HTMLDivElement>) => void;
|
|
361
|
+
/** Whether clicking the backdrop should be ignored (e.g. mandatory dialog) */
|
|
362
|
+
disableClick?: boolean;
|
|
363
|
+
/** Whether to lock body scroll while open */
|
|
364
|
+
lockScroll?: boolean;
|
|
365
|
+
/** Visual intensity */
|
|
366
|
+
variant?: 'default' | 'light' | 'opaque';
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export declare type BackInStockChannel = 'email' | 'sms';
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* BackInStockForm — capture form shown on sold-out variants. Supports email
|
|
373
|
+
* and optional SMS capture with a channel toggle.
|
|
374
|
+
*/
|
|
375
|
+
export declare function BackInStockForm({ productName, variantLabel, channels, defaultChannel, submitLabel, note, submitted, successMessage, onSubscribe, className, ...rest }: BackInStockFormProps): JSX_2.Element;
|
|
376
|
+
|
|
377
|
+
export declare interface BackInStockFormProps extends Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit'> {
|
|
378
|
+
productName: ReactNode;
|
|
379
|
+
/** e.g., "Size M / Oat" */
|
|
380
|
+
variantLabel?: ReactNode;
|
|
381
|
+
/** Channels offered. Defaults to email only. */
|
|
382
|
+
channels?: BackInStockChannel[];
|
|
383
|
+
defaultChannel?: BackInStockChannel;
|
|
384
|
+
submitLabel?: string;
|
|
385
|
+
note?: ReactNode;
|
|
386
|
+
submitted?: boolean;
|
|
387
|
+
successMessage?: ReactNode;
|
|
388
|
+
onSubscribe?: (input: {
|
|
389
|
+
channel: BackInStockChannel;
|
|
390
|
+
value: string;
|
|
391
|
+
}) => void;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Badge / StatusChip — small label for status or metadata.
|
|
396
|
+
*
|
|
397
|
+
* Accessibility:
|
|
398
|
+
* - Always include meaningful text content (not color alone)
|
|
399
|
+
* - In healthcare contexts, pair with text like "Active", "Pending",
|
|
400
|
+
* "Critical" rather than relying on color to communicate status
|
|
401
|
+
*/
|
|
402
|
+
export declare function Badge({ status, className, children, ...props }: BadgeProps): JSX_2.Element;
|
|
403
|
+
|
|
404
|
+
export declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
405
|
+
/** Status variant */
|
|
406
|
+
status?: 'neutral' | 'success' | 'warning' | 'error' | 'info';
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Banner — full-width banner for page-level messages.
|
|
411
|
+
*
|
|
412
|
+
* Accessibility:
|
|
413
|
+
* - Uses role="alert" for error/warning (assertive announcement)
|
|
414
|
+
* - Uses role="status" for info/success (polite announcement)
|
|
415
|
+
* - Icon + color + text ensures meaning is communicated multiple ways
|
|
416
|
+
* - Dismiss button has accessible label
|
|
417
|
+
*/
|
|
418
|
+
export declare function Banner({ status, dismissible, onDismiss, action, children, className, ...props }: BannerProps): JSX_2.Element;
|
|
419
|
+
|
|
420
|
+
export declare interface BannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
421
|
+
/** Status variant */
|
|
422
|
+
status?: BannerStatus;
|
|
423
|
+
/** Whether the banner can be dismissed */
|
|
424
|
+
dismissible?: boolean;
|
|
425
|
+
/** Called when dismiss button is clicked */
|
|
426
|
+
onDismiss?: () => void;
|
|
427
|
+
/** Optional action element */
|
|
428
|
+
action?: ReactNode;
|
|
429
|
+
/** Banner content */
|
|
430
|
+
children: ReactNode;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export declare type BannerStatus = 'info' | 'success' | 'warning' | 'error';
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Bazaar BarChart — for categorical comparisons.
|
|
437
|
+
*
|
|
438
|
+
* Set `stacked` for stacked bars, `horizontal` for horizontal layout
|
|
439
|
+
* (better for long category labels).
|
|
440
|
+
*/
|
|
441
|
+
export declare function BarChart<T extends Record<string, unknown>>({ data, xKey, series, height, showLegend, showGrid, stacked, horizontal, valueFormatter, referenceLines, state, ...cardProps }: BarChartProps<T>): JSX_2.Element;
|
|
442
|
+
|
|
443
|
+
export declare interface BarChartProps<T extends Record<string, unknown>> extends Omit<ChartCardProps, 'children'> {
|
|
444
|
+
data: T[];
|
|
445
|
+
xKey: keyof T & string;
|
|
446
|
+
series: ChartSeries<T>[];
|
|
447
|
+
height?: number;
|
|
448
|
+
showLegend?: boolean;
|
|
449
|
+
showGrid?: boolean;
|
|
450
|
+
/** Stack bars (renders as a stacked bar chart) */
|
|
451
|
+
stacked?: boolean;
|
|
452
|
+
/** Render bars horizontally */
|
|
453
|
+
horizontal?: boolean;
|
|
454
|
+
valueFormatter?: ValueFormatter;
|
|
455
|
+
referenceLines?: {
|
|
456
|
+
value: number;
|
|
457
|
+
label?: string;
|
|
458
|
+
}[];
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Token-driven chart theme. Used to style axes, gridlines, tooltips,
|
|
463
|
+
* legends, etc. so every chart in Bazaar feels like part of one system.
|
|
464
|
+
*/
|
|
465
|
+
export declare const bazaarChartTheme: {
|
|
466
|
+
readonly axis: {
|
|
467
|
+
readonly stroke: "var(--bazaar-data-vis-axis)";
|
|
468
|
+
readonly fontSize: 12;
|
|
469
|
+
readonly fontFamily: "var(--bazaar-font-family-sans)";
|
|
470
|
+
readonly tickColor: "var(--bazaar-color-text-muted)";
|
|
471
|
+
};
|
|
472
|
+
readonly grid: {
|
|
473
|
+
readonly stroke: "var(--bazaar-data-vis-gridline)";
|
|
474
|
+
readonly strokeDasharray: "3 3";
|
|
475
|
+
};
|
|
476
|
+
readonly tooltip: {
|
|
477
|
+
readonly background: "var(--bazaar-color-surface-overlay)";
|
|
478
|
+
readonly border: "var(--bazaar-color-border-default)";
|
|
479
|
+
readonly text: "var(--bazaar-color-text-primary)";
|
|
480
|
+
readonly muted: "var(--bazaar-color-text-secondary)";
|
|
481
|
+
};
|
|
482
|
+
readonly reference: {
|
|
483
|
+
readonly stroke: "var(--bazaar-color-text-muted)";
|
|
484
|
+
readonly strokeDasharray: "4 4";
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* The Bazaar chart series palette. Order is intentional — earlier colors
|
|
490
|
+
* are used first so simple charts always pull from the most credible,
|
|
491
|
+
* brand-aligned hues before moving into supporting accents.
|
|
492
|
+
*/
|
|
493
|
+
export declare const bazaarSeriesPalette: readonly ["var(--bazaar-data-vis-1)", "var(--bazaar-data-vis-2)", "var(--bazaar-data-vis-3)", "var(--bazaar-data-vis-4)", "var(--bazaar-data-vis-5)"];
|
|
494
|
+
|
|
495
|
+
/** Border aliases */
|
|
496
|
+
export declare const border: {
|
|
497
|
+
readonly default: "#D9D2C1";
|
|
498
|
+
readonly strong: "#B8AE97";
|
|
499
|
+
readonly inverse: "#2E2A23";
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
export declare const borderStyle: {
|
|
503
|
+
readonly default: "solid";
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
export declare const borderWidth: {
|
|
507
|
+
readonly none: "0";
|
|
508
|
+
readonly hairline: "1px";
|
|
509
|
+
readonly medium: "2px";
|
|
510
|
+
readonly strong: "3px";
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
export declare interface BrandPillar {
|
|
514
|
+
id: string;
|
|
515
|
+
title: string;
|
|
516
|
+
body?: ReactNode;
|
|
517
|
+
/** Optional small icon or glyph (ReactNode). */
|
|
518
|
+
icon?: ReactNode;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/** Brand primary palette — Warm Ink. Near-black scale used for text,
|
|
522
|
+
* primary CTA surfaces, and high-emphasis elevation. */
|
|
523
|
+
export declare const brandPrimary: {
|
|
524
|
+
readonly 50: "#F5F3EE";
|
|
525
|
+
readonly 100: "#E5E1D5";
|
|
526
|
+
readonly 200: "#C6BFAC";
|
|
527
|
+
readonly 300: "#8A816B";
|
|
528
|
+
readonly 400: "#5E5749";
|
|
529
|
+
readonly 500: "#433D32";
|
|
530
|
+
readonly 600: "#2E2A23";
|
|
531
|
+
readonly 700: "#1F1C17";
|
|
532
|
+
readonly 800: "#161310";
|
|
533
|
+
readonly 900: "#0E0B09";
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
/** Brand secondary palette — Terracotta / Clay. Accent color, reserved
|
|
537
|
+
* for sale badges, promo surfaces, and editorial highlights. */
|
|
538
|
+
export declare const brandSecondary: {
|
|
539
|
+
readonly 50: "#FBEEE4";
|
|
540
|
+
readonly 100: "#F6D9C5";
|
|
541
|
+
readonly 200: "#ECB690";
|
|
542
|
+
readonly 300: "#DF9662";
|
|
543
|
+
readonly 400: "#C96C3E";
|
|
544
|
+
readonly 500: "#AB5428";
|
|
545
|
+
readonly 600: "#873F1C";
|
|
546
|
+
readonly 700: "#662E13";
|
|
547
|
+
readonly 800: "#4A2110";
|
|
548
|
+
readonly 900: "#2E160A";
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* BrandStory — the "about" module. Usually placed on the homepage mid-way
|
|
553
|
+
* or on a dedicated About page. Combines a short manifesto, a hero image,
|
|
554
|
+
* a pull-quote and the brand's core pillars.
|
|
555
|
+
*/
|
|
556
|
+
export declare function BrandStory({ eyebrow, headline, body, image, pillars, pullQuote, cta, className, ...rest }: BrandStoryProps): JSX_2.Element;
|
|
557
|
+
|
|
558
|
+
export declare interface BrandStoryProps extends HTMLAttributes<HTMLElement> {
|
|
559
|
+
eyebrow?: string;
|
|
560
|
+
headline: string;
|
|
561
|
+
/** Paragraphs of body copy. */
|
|
562
|
+
body?: ReactNode;
|
|
563
|
+
image?: {
|
|
564
|
+
src?: string;
|
|
565
|
+
alt: string;
|
|
566
|
+
seed?: string;
|
|
567
|
+
};
|
|
568
|
+
/** 2–4 short pillars summarising what the brand stands for. */
|
|
569
|
+
pillars?: BrandPillar[];
|
|
570
|
+
/** Pull-quote rendered between body and pillars. */
|
|
571
|
+
pullQuote?: {
|
|
572
|
+
text: string;
|
|
573
|
+
attribution?: string;
|
|
574
|
+
};
|
|
575
|
+
cta?: {
|
|
576
|
+
label: string;
|
|
577
|
+
onClick?: () => void;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export declare interface BreadcrumbItem {
|
|
582
|
+
/** Display label */
|
|
583
|
+
label: string;
|
|
584
|
+
/** Optional URL for link items */
|
|
585
|
+
href?: string;
|
|
586
|
+
/** Optional click handler */
|
|
587
|
+
onClick?: () => void;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Breadcrumbs — navigational aid showing the current location within a hierarchy.
|
|
592
|
+
*
|
|
593
|
+
* Accessibility:
|
|
594
|
+
* - Wrapped in <nav> with aria-label="Breadcrumb"
|
|
595
|
+
* - Uses semantic <ol>/<li> list structure
|
|
596
|
+
* - Last item has aria-current="page" to indicate current location
|
|
597
|
+
* - Separator is aria-hidden so screen readers skip it
|
|
598
|
+
*/
|
|
599
|
+
export declare function Breadcrumbs({ items, separator, className }: BreadcrumbsProps): JSX_2.Element;
|
|
600
|
+
|
|
601
|
+
export declare interface BreadcrumbsProps {
|
|
602
|
+
/** Breadcrumb path items */
|
|
603
|
+
items: BreadcrumbItem[];
|
|
604
|
+
/** Separator between items */
|
|
605
|
+
separator?: ReactNode;
|
|
606
|
+
/** Additional className */
|
|
607
|
+
className?: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export declare interface BundleItem {
|
|
611
|
+
product: Product;
|
|
612
|
+
/** If true, user cannot deselect this item (the anchor product). */
|
|
613
|
+
required?: boolean;
|
|
614
|
+
/** Start selected (default true). */
|
|
615
|
+
defaultSelected?: boolean;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* BundleModule — "frequently bought together" / outfit-builder block.
|
|
620
|
+
*
|
|
621
|
+
* Renders media tiles joined by plus glyphs, each with a checkbox-style
|
|
622
|
+
* toggle, and a summarised bundle price with discount relative to the sum
|
|
623
|
+
* of individual prices.
|
|
624
|
+
*/
|
|
625
|
+
export declare function BundleModule({ title, items, discountPercent, bundlePrice, onAddBundle, ctaLabel, className, ...rest }: BundleModuleProps): JSX_2.Element;
|
|
626
|
+
|
|
627
|
+
export declare interface BundleModuleProps extends HTMLAttributes<HTMLDivElement> {
|
|
628
|
+
title?: string;
|
|
629
|
+
items: BundleItem[];
|
|
630
|
+
/** Percent discount applied to the bundle total (e.g. 10 for 10% off). */
|
|
631
|
+
discountPercent?: number;
|
|
632
|
+
/** Fixed amount bundled price — overrides discountPercent. */
|
|
633
|
+
bundlePrice?: Money;
|
|
634
|
+
onAddBundle?: (selected: Product[]) => void;
|
|
635
|
+
ctaLabel?: string;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Button — primary interactive element.
|
|
640
|
+
*
|
|
641
|
+
* Accessibility:
|
|
642
|
+
* - Uses native <button> for keyboard and screen reader support
|
|
643
|
+
* - aria-disabled used during loading to maintain focusability
|
|
644
|
+
* - aria-busy signals loading state to assistive technology
|
|
645
|
+
* - Minimum 44px touch target on md/lg sizes
|
|
646
|
+
*/
|
|
647
|
+
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* ButtonGroup — layout wrapper for grouping related buttons.
|
|
651
|
+
*
|
|
652
|
+
* Renders multiple Button children in a connected or spaced row/column.
|
|
653
|
+
* When connected, adjacent buttons share borders for a toolbar appearance.
|
|
654
|
+
*
|
|
655
|
+
* Accessibility:
|
|
656
|
+
* - Uses role="group" with optional aria-label for grouping context
|
|
657
|
+
* - Individual buttons retain their own keyboard navigation
|
|
658
|
+
*/
|
|
659
|
+
export declare function ButtonGroup({ orientation, size, connected, className, children, ...props }: ButtonGroupProps): JSX_2.Element;
|
|
660
|
+
|
|
661
|
+
export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
662
|
+
/** Layout direction */
|
|
663
|
+
orientation?: 'horizontal' | 'vertical';
|
|
664
|
+
/** Size applied to all child buttons */
|
|
665
|
+
size?: 'sm' | 'md' | 'lg';
|
|
666
|
+
/** Whether buttons should share borders (connected style) */
|
|
667
|
+
connected?: boolean;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
671
|
+
/** Visual variant */
|
|
672
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
673
|
+
/** Size of the button */
|
|
674
|
+
size?: 'sm' | 'md' | 'lg';
|
|
675
|
+
/** Full width */
|
|
676
|
+
fullWidth?: boolean;
|
|
677
|
+
/** Loading state — disables interaction and shows spinner */
|
|
678
|
+
loading?: boolean;
|
|
679
|
+
/** Icon before the label */
|
|
680
|
+
iconLeft?: ReactNode;
|
|
681
|
+
/** Icon after the label */
|
|
682
|
+
iconRight?: ReactNode;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export declare interface CampaignCTA {
|
|
686
|
+
label: string;
|
|
687
|
+
onClick?: () => void;
|
|
688
|
+
/** Renders as an outline-style button. Default is solid. */
|
|
689
|
+
variant?: 'primary' | 'secondary';
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* CampaignHero — headline/CTA banner for the homepage or a collection
|
|
694
|
+
* landing. Three layouts: overlay (copy on top of imagery), split-left
|
|
695
|
+
* (copy on left, image on right), split-right (inverse).
|
|
696
|
+
*/
|
|
697
|
+
export declare function CampaignHero({ eyebrow, headline, body, ctas, image, variant, scrim, height, tone, className, ...rest }: CampaignHeroProps): JSX_2.Element;
|
|
698
|
+
|
|
699
|
+
export declare interface CampaignHeroProps extends HTMLAttributes<HTMLElement> {
|
|
700
|
+
eyebrow?: string;
|
|
701
|
+
headline: string;
|
|
702
|
+
body?: ReactNode;
|
|
703
|
+
/** Primary + optional secondary CTA. */
|
|
704
|
+
ctas?: CampaignCTA[];
|
|
705
|
+
/** Background image seed/alt (uses MediaPlaceholder when src is absent). */
|
|
706
|
+
image?: {
|
|
707
|
+
src?: string;
|
|
708
|
+
alt: string;
|
|
709
|
+
seed?: string;
|
|
710
|
+
};
|
|
711
|
+
/** Placement of copy relative to the image. Defaults to 'overlay'. */
|
|
712
|
+
variant?: 'overlay' | 'split-left' | 'split-right';
|
|
713
|
+
/** Overlay scrim opacity for readability in 'overlay' mode (0..1). */
|
|
714
|
+
scrim?: number;
|
|
715
|
+
/** Shorter/taller crop. */
|
|
716
|
+
height?: 'short' | 'medium' | 'tall';
|
|
717
|
+
/** Eyebrow color tone — 'dark' for over light imagery. */
|
|
718
|
+
tone?: 'light' | 'dark';
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Card — surface container for grouping related content.
|
|
723
|
+
*
|
|
724
|
+
* Composes: Paper
|
|
725
|
+
*
|
|
726
|
+
* Card is a constrained Paper preset with two elevation levels and
|
|
727
|
+
* opinionated padding. Use Paper directly when you need full control
|
|
728
|
+
* over surface, elevation, and radius.
|
|
729
|
+
*
|
|
730
|
+
* Accessibility:
|
|
731
|
+
* - Uses semantic HTML; add role="region" + aria-label when card
|
|
732
|
+
* represents a distinct content section
|
|
733
|
+
* - Border provides separation independent of shadow (not shadow alone)
|
|
734
|
+
*/
|
|
735
|
+
export declare function Card({ elevation, padding, className, children, ...props }: CardProps): JSX_2.Element;
|
|
736
|
+
|
|
737
|
+
export declare interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
738
|
+
/** Elevation level */
|
|
739
|
+
elevation?: 'flat' | 'raised';
|
|
740
|
+
/** Padding size */
|
|
741
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* CartDrawer — off-canvas container for MiniCart or custom cart views.
|
|
746
|
+
*
|
|
747
|
+
* Adds a scrim, close affordance, and Escape-to-close. Focus management
|
|
748
|
+
* is the caller's responsibility — pair with your app's focus trap.
|
|
749
|
+
*/
|
|
750
|
+
export declare function CartDrawer({ open, onClose, title, side, width, children, className, ...rest }: CartDrawerProps): JSX_2.Element | null;
|
|
751
|
+
|
|
752
|
+
export declare interface CartDrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
753
|
+
open: boolean;
|
|
754
|
+
onClose: () => void;
|
|
755
|
+
/** Drawer title — defaults to "Your bag". */
|
|
756
|
+
title?: string;
|
|
757
|
+
/** Side of the viewport to pin to. */
|
|
758
|
+
side?: 'right' | 'left';
|
|
759
|
+
/** Drawer width — CSS dimension. */
|
|
760
|
+
width?: string;
|
|
761
|
+
children?: ReactNode;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export declare interface CartLine {
|
|
765
|
+
id: string;
|
|
766
|
+
productId: string;
|
|
767
|
+
variantId?: string;
|
|
768
|
+
title: string;
|
|
769
|
+
brand?: string;
|
|
770
|
+
image?: ProductImage;
|
|
771
|
+
price: Money;
|
|
772
|
+
compareAtPrice?: Money;
|
|
773
|
+
quantity: number;
|
|
774
|
+
options?: CartLineOption[];
|
|
775
|
+
savedForLater?: boolean;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* CartLineItem — thumbnail + title + option summary + quantity stepper +
|
|
780
|
+
* line total. The visual backbone of MiniCart, CartPage and order summaries.
|
|
781
|
+
*/
|
|
782
|
+
export declare function CartLineItem({ line, onQuantityChange, onRemove, onSaveForLater, density, hidePrice, readOnlyQuantity, className, ...rest }: CartLineItemProps): JSX_2.Element;
|
|
783
|
+
|
|
784
|
+
export declare interface CartLineItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
785
|
+
line: CartLine;
|
|
786
|
+
onQuantityChange?: (line: CartLine, next: number) => void;
|
|
787
|
+
onRemove?: (line: CartLine) => void;
|
|
788
|
+
onSaveForLater?: (line: CartLine) => void;
|
|
789
|
+
/** Compact density for mini-cart / drawer. */
|
|
790
|
+
density?: 'default' | 'compact';
|
|
791
|
+
/** Hide per-line price column (used when rendering in a price-free summary). */
|
|
792
|
+
hidePrice?: boolean;
|
|
793
|
+
/** Disable quantity changes (e.g. saved-for-later). */
|
|
794
|
+
readOnlyQuantity?: boolean;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export declare interface CartLineOption {
|
|
798
|
+
name: string;
|
|
799
|
+
value: string;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* CartPage — full-width layout for the /cart route. Two-column on desktop
|
|
804
|
+
* (lines + summary rail), stacked on mobile. Renders a friendly empty
|
|
805
|
+
* state when no lines are present.
|
|
806
|
+
*/
|
|
807
|
+
export declare function CartPage({ lines, title, sidebar, below, emptyCta, onEmptyCta, onQuantityChange, onRemove, onSaveForLater, className, ...rest }: CartPageProps): JSX_2.Element;
|
|
808
|
+
|
|
809
|
+
export declare interface CartPageProps extends HTMLAttributes<HTMLDivElement> {
|
|
810
|
+
lines: CartLine[];
|
|
811
|
+
title?: string;
|
|
812
|
+
/** Right-rail slot — typically a CartSummary. */
|
|
813
|
+
sidebar: ReactNode;
|
|
814
|
+
/** Content shown below the lines, above the footer — saved-for-later, cross-sells. */
|
|
815
|
+
below?: ReactNode;
|
|
816
|
+
/** Empty-state CTA. */
|
|
817
|
+
emptyCta?: string;
|
|
818
|
+
onEmptyCta?: () => void;
|
|
819
|
+
onQuantityChange?: (line: CartLine, next: number) => void;
|
|
820
|
+
onRemove?: (line: CartLine) => void;
|
|
821
|
+
onSaveForLater?: (line: CartLine) => void;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* CartSummary — subtotal, adjustments (shipping, taxes, discounts) and
|
|
826
|
+
* total, plus optional slots for promos, reassurance and the primary CTA.
|
|
827
|
+
*/
|
|
828
|
+
export declare function CartSummary({ subtotal, lines, total, totalLabel, children, ctaSlot, density, className, ...rest }: CartSummaryProps): JSX_2.Element;
|
|
829
|
+
|
|
830
|
+
export declare interface CartSummaryLine {
|
|
831
|
+
id: string;
|
|
832
|
+
label: string;
|
|
833
|
+
value: Money | string;
|
|
834
|
+
/** Render as a discount (green + negative sign). */
|
|
835
|
+
tone?: 'default' | 'discount' | 'muted';
|
|
836
|
+
/** Small helper text below the value, e.g. "Calculated at checkout". */
|
|
837
|
+
note?: string;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
export declare interface CartSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
841
|
+
subtotal: Money;
|
|
842
|
+
/** Ordered list of adjustment lines between subtotal and total. */
|
|
843
|
+
lines?: CartSummaryLine[];
|
|
844
|
+
total: Money;
|
|
845
|
+
totalLabel?: string;
|
|
846
|
+
/** Slot for FreeShippingMeter, CouponField, terms copy, etc. */
|
|
847
|
+
children?: ReactNode;
|
|
848
|
+
/** Primary CTA slot (e.g. "Checkout" button). */
|
|
849
|
+
ctaSlot?: ReactNode;
|
|
850
|
+
/** Compact density for drawer / mini-cart use. */
|
|
851
|
+
density?: 'default' | 'compact';
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* ChartCard — the unifying shell for every Bazaar chart component.
|
|
856
|
+
*
|
|
857
|
+
* Provides a consistent header (title, subtitle, headline metric, trend chip,
|
|
858
|
+
* actions), body slot, footer slot, and built-in loading / empty / error states.
|
|
859
|
+
*
|
|
860
|
+
* Every chart component in Bazaar composes this card so the system feels
|
|
861
|
+
* cohesive and developers get visual states for free.
|
|
862
|
+
*/
|
|
863
|
+
export declare function ChartCard({ title, subtitle, metric, trend, actions, footer, density, state, emptyState, loadingState, errorState, ariaLabel, className, children, ...props }: ChartCardProps): JSX_2.Element;
|
|
864
|
+
|
|
865
|
+
export declare interface ChartCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
866
|
+
/** Card title (e.g. "30-day patient adherence") */
|
|
867
|
+
title?: ReactNode;
|
|
868
|
+
/** Optional subtitle / explanation */
|
|
869
|
+
subtitle?: ReactNode;
|
|
870
|
+
/** Headline metric displayed prominently in the header */
|
|
871
|
+
metric?: ReactNode;
|
|
872
|
+
/** Trend chip beside the metric (use the Bazaar Badge or any node) */
|
|
873
|
+
trend?: ReactNode;
|
|
874
|
+
/** Optional actions (filters, export, etc.) rendered in the header */
|
|
875
|
+
actions?: ReactNode;
|
|
876
|
+
/** Footer content rendered below the chart body */
|
|
877
|
+
footer?: ReactNode;
|
|
878
|
+
/** Visual padding density */
|
|
879
|
+
density?: 'comfortable' | 'compact';
|
|
880
|
+
/** Render state — controls whether children, loader, empty, or error renders */
|
|
881
|
+
state?: ChartCardState;
|
|
882
|
+
/** Custom empty-state node */
|
|
883
|
+
emptyState?: ReactNode;
|
|
884
|
+
/** Custom loading-state node */
|
|
885
|
+
loadingState?: ReactNode;
|
|
886
|
+
/** Custom error-state node */
|
|
887
|
+
errorState?: ReactNode;
|
|
888
|
+
/** Optional aria-label for the chart region */
|
|
889
|
+
ariaLabel?: string;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export declare type ChartCardState = 'ready' | 'loading' | 'empty' | 'error';
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Bazaar-styled chart legend. Pass to Recharts via:
|
|
896
|
+
* <Legend content={<ChartLegend />} />
|
|
897
|
+
*/
|
|
898
|
+
export declare function ChartLegend({ payload }: LegendProps): JSX_2.Element | null;
|
|
899
|
+
|
|
900
|
+
export declare type ChartSeries<T = Record<string, unknown>> = {
|
|
901
|
+
/** Property key on the data row that holds the series value */
|
|
902
|
+
dataKey: keyof T & string;
|
|
903
|
+
/** Display label for tooltip / legend */
|
|
904
|
+
label?: string;
|
|
905
|
+
/** Optional explicit color (defaults to Bazaar palette) */
|
|
906
|
+
color?: string;
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Bazaar-styled tooltip used by every chart in the system.
|
|
911
|
+
*
|
|
912
|
+
* Pass directly to Recharts `<Tooltip content={<ChartTooltip />} />`.
|
|
913
|
+
*/
|
|
914
|
+
export declare function ChartTooltip({ active, payload, label, valueFormatter, labelFormatter, }: ChartTooltipProps): JSX_2.Element | null;
|
|
915
|
+
|
|
916
|
+
export declare interface ChartTooltipProps extends TooltipProps_2<number, string> {
|
|
917
|
+
/** Optional formatter for displayed values */
|
|
918
|
+
valueFormatter?: ValueFormatter;
|
|
919
|
+
/** Optional formatter for the tooltip label (e.g. axis category) */
|
|
920
|
+
labelFormatter?: (label: string) => string;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Checkbox — boolean toggle with label.
|
|
925
|
+
*
|
|
926
|
+
* Accessibility:
|
|
927
|
+
* - Uses native <input type="checkbox"> for full keyboard/screen reader support
|
|
928
|
+
* - Checkmark is CSS-only, no JS required for visual state
|
|
929
|
+
* - Label is clickable and linked to input
|
|
930
|
+
* - 44px minimum touch target maintained via padding
|
|
931
|
+
*/
|
|
932
|
+
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* CheckboxGroup — group of checkboxes with fieldset/legend for accessibility.
|
|
936
|
+
*
|
|
937
|
+
* Accessibility:
|
|
938
|
+
* - Uses <fieldset> and <legend> for semantic grouping
|
|
939
|
+
* - Error message linked via role="alert"
|
|
940
|
+
* - Each checkbox is individually focusable
|
|
941
|
+
*/
|
|
942
|
+
export declare function CheckboxGroup({ label, name, options, value, onChange, error, orientation, disabled, className, }: CheckboxGroupProps): JSX_2.Element;
|
|
943
|
+
|
|
944
|
+
export declare interface CheckboxGroupOption {
|
|
945
|
+
value: string;
|
|
946
|
+
label: string;
|
|
947
|
+
disabled?: boolean;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
export declare interface CheckboxGroupProps {
|
|
951
|
+
/** Group label rendered as fieldset legend */
|
|
952
|
+
label: string;
|
|
953
|
+
/** Shared name attribute for all checkboxes */
|
|
954
|
+
name: string;
|
|
955
|
+
/** Array of checkbox options */
|
|
956
|
+
options: CheckboxGroupOption[];
|
|
957
|
+
/** Currently selected values */
|
|
958
|
+
value?: string[];
|
|
959
|
+
/** Change handler — receives updated array of selected values */
|
|
960
|
+
onChange?: (value: string[]) => void;
|
|
961
|
+
/** Error message */
|
|
962
|
+
error?: string;
|
|
963
|
+
/** Layout direction */
|
|
964
|
+
orientation?: 'vertical' | 'horizontal';
|
|
965
|
+
/** Disabled state for all checkboxes */
|
|
966
|
+
disabled?: boolean;
|
|
967
|
+
/** Additional CSS class */
|
|
968
|
+
className?: string;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
972
|
+
/** Label text displayed next to the checkbox */
|
|
973
|
+
label?: string;
|
|
974
|
+
/** Error state */
|
|
975
|
+
error?: boolean;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* CheckoutContactStep — email capture and optional marketing opt-in.
|
|
980
|
+
*
|
|
981
|
+
* Fully controlled; validation is caller's responsibility — surface errors
|
|
982
|
+
* via `emailError`.
|
|
983
|
+
*/
|
|
984
|
+
export declare function CheckoutContactStep({ value, onChange, emailError, title, signInSlot, className, ...rest }: CheckoutContactStepProps): JSX_2.Element;
|
|
985
|
+
|
|
986
|
+
export declare interface CheckoutContactStepProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
987
|
+
value: CheckoutContactValue;
|
|
988
|
+
onChange: (next: CheckoutContactValue) => void;
|
|
989
|
+
/** Validation error for the email field. */
|
|
990
|
+
emailError?: string;
|
|
991
|
+
title?: string;
|
|
992
|
+
/** Slot for "Already have an account? Sign in" link. */
|
|
993
|
+
signInSlot?: React.ReactNode;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
export declare interface CheckoutContactValue {
|
|
997
|
+
email: string;
|
|
998
|
+
marketingOptIn?: boolean;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* CheckoutOrderSummary — the right-rail (or collapsible on mobile) recap of
|
|
1003
|
+
* the order during checkout. Combines line items with CartSummary math.
|
|
1004
|
+
*/
|
|
1005
|
+
export declare function CheckoutOrderSummary({ lines, subtotal, adjustments, total, defaultOpen, topSlot, footerSlot, className, ...rest }: CheckoutOrderSummaryProps): JSX_2.Element;
|
|
1006
|
+
|
|
1007
|
+
export declare interface CheckoutOrderSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
1008
|
+
lines: CartLine[];
|
|
1009
|
+
subtotal: Money;
|
|
1010
|
+
adjustments?: CartSummaryLine[];
|
|
1011
|
+
total: Money;
|
|
1012
|
+
/** Start with the line-item list expanded (default false on desktop, true on mobile). */
|
|
1013
|
+
defaultOpen?: boolean;
|
|
1014
|
+
/** Slot above totals — e.g. CouponField. */
|
|
1015
|
+
topSlot?: ReactNode;
|
|
1016
|
+
/** Slot below the totals — terms, reassurance, etc. */
|
|
1017
|
+
footerSlot?: ReactNode;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* CheckoutShell — minimal, distraction-free layout for the checkout funnel.
|
|
1022
|
+
*
|
|
1023
|
+
* Strips global nav, pins the brand at top-left, optionally centers a
|
|
1024
|
+
* CheckoutStepper, and renders a two-column grid (form + order summary)
|
|
1025
|
+
* that stacks on mobile.
|
|
1026
|
+
*/
|
|
1027
|
+
export declare function CheckoutShell({ brand, stepperSlot, children, sidebar, footerSlot, className, ...rest }: CheckoutShellProps): JSX_2.Element;
|
|
1028
|
+
|
|
1029
|
+
export declare interface CheckoutShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
1030
|
+
/** Brand slot — logo or wordmark. */
|
|
1031
|
+
brand: ReactNode;
|
|
1032
|
+
/** CheckoutStepper instance, rendered centered below the brand on desktop. */
|
|
1033
|
+
stepperSlot?: ReactNode;
|
|
1034
|
+
/** Main step form. */
|
|
1035
|
+
children: ReactNode;
|
|
1036
|
+
/** Right-rail order summary. */
|
|
1037
|
+
sidebar?: ReactNode;
|
|
1038
|
+
/** Footer slot — small-print links, trust seal, etc. */
|
|
1039
|
+
footerSlot?: ReactNode;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export declare interface CheckoutStep {
|
|
1043
|
+
id: string;
|
|
1044
|
+
label: string;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* CheckoutStepper — numbered progress indicator for multi-step checkout.
|
|
1049
|
+
*
|
|
1050
|
+
* Collapses to a compact "Step 2 of 4" label on narrow viewports.
|
|
1051
|
+
*/
|
|
1052
|
+
export declare function CheckoutStepper({ steps, currentStepId, onStepClick, className, ...rest }: CheckoutStepperProps): JSX_2.Element;
|
|
1053
|
+
|
|
1054
|
+
export declare interface CheckoutStepperProps extends HTMLAttributes<HTMLElement> {
|
|
1055
|
+
steps: CheckoutStep[];
|
|
1056
|
+
currentStepId: string;
|
|
1057
|
+
/** Allow clicking a completed step to jump back. */
|
|
1058
|
+
onStepClick?: (step: CheckoutStep) => void;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Chip — compact interactive element for tags, filters, and selections.
|
|
1063
|
+
*
|
|
1064
|
+
* Distinct from Badge: Chip is interactive (clickable, deletable) and
|
|
1065
|
+
* larger; Badge is a read-only status label.
|
|
1066
|
+
*
|
|
1067
|
+
* Accessibility:
|
|
1068
|
+
* - Clickable chips render with role="button" and tabIndex
|
|
1069
|
+
* - Delete button has an accessible aria-label
|
|
1070
|
+
* - Disabled state applies aria-disabled
|
|
1071
|
+
* - Healthcare note: useful for allergy tags, condition labels,
|
|
1072
|
+
* insurance plan tags, filter selections
|
|
1073
|
+
*/
|
|
1074
|
+
export declare const Chip: ForwardRefExoticComponent<ChipProps & RefAttributes<HTMLSpanElement>>;
|
|
1075
|
+
|
|
1076
|
+
export declare interface ChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onClick'> {
|
|
1077
|
+
/** Visual color variant */
|
|
1078
|
+
color?: 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
1079
|
+
/** Size */
|
|
1080
|
+
size?: 'sm' | 'md';
|
|
1081
|
+
/** Chip style */
|
|
1082
|
+
variant?: 'filled' | 'outlined';
|
|
1083
|
+
/** Icon or avatar slot (leading) */
|
|
1084
|
+
icon?: ReactNode;
|
|
1085
|
+
/** Whether the chip is clickable */
|
|
1086
|
+
onClick?: (e: MouseEvent_2<HTMLSpanElement>) => void;
|
|
1087
|
+
/** Show a delete/dismiss button */
|
|
1088
|
+
onDelete?: (e: MouseEvent_2<HTMLButtonElement>) => void;
|
|
1089
|
+
/** Disabled state */
|
|
1090
|
+
disabled?: boolean;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/** Merge CSS module class names, filtering out falsy values */
|
|
1094
|
+
export declare function cn(...classes: (string | false | null | undefined)[]): string;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* CollapsiblePanel — a single collapsible section with animated expand/collapse.
|
|
1098
|
+
*
|
|
1099
|
+
* Accessibility:
|
|
1100
|
+
* - Button trigger with aria-expanded
|
|
1101
|
+
* - Content region with aria-labelledby linking to the trigger
|
|
1102
|
+
* - Chevron icon rotates on expand/collapse
|
|
1103
|
+
* - Supports both controlled and uncontrolled modes
|
|
1104
|
+
*/
|
|
1105
|
+
export declare function CollapsiblePanel({ title, defaultOpen, open: controlledOpen, onToggle, children, className, }: CollapsiblePanelProps): JSX_2.Element;
|
|
1106
|
+
|
|
1107
|
+
export declare interface CollapsiblePanelProps {
|
|
1108
|
+
/** Panel title */
|
|
1109
|
+
title: string;
|
|
1110
|
+
/** Whether panel is open by default (uncontrolled) */
|
|
1111
|
+
defaultOpen?: boolean;
|
|
1112
|
+
/** Controlled open state */
|
|
1113
|
+
open?: boolean;
|
|
1114
|
+
/** Callback when open state changes */
|
|
1115
|
+
onToggle?: (open: boolean) => void;
|
|
1116
|
+
/** Panel content */
|
|
1117
|
+
children: ReactNode;
|
|
1118
|
+
/** Additional className */
|
|
1119
|
+
className?: string;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export declare function CollectionHero({ title, description, eyebrow, imageSrc, imageAlt, imageSeed, tone, actions, className, ...rest }: CollectionHeroProps): JSX_2.Element;
|
|
1123
|
+
|
|
1124
|
+
export declare interface CollectionHeroProps extends HTMLAttributes<HTMLElement> {
|
|
1125
|
+
title: string;
|
|
1126
|
+
description?: string;
|
|
1127
|
+
eyebrow?: string;
|
|
1128
|
+
/** Image src — falls back to MediaPlaceholder gradient if omitted. */
|
|
1129
|
+
imageSrc?: string;
|
|
1130
|
+
imageAlt?: string;
|
|
1131
|
+
imageSeed?: string;
|
|
1132
|
+
/** Layout tone. "overlay" = image behind content; "side" = 2-column. */
|
|
1133
|
+
tone?: 'overlay' | 'side';
|
|
1134
|
+
/** CTA slot — usually 1–2 Buttons. */
|
|
1135
|
+
actions?: ReactNode;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* CollectionPageTemplate — product-listing-page shell. Composes header,
|
|
1140
|
+
* breadcrumbs, collection hero, a toolbar (sort + active filter chips),
|
|
1141
|
+
* a sticky left-rail FilterPanel, and a results column.
|
|
1142
|
+
*/
|
|
1143
|
+
export declare function CollectionPageTemplate({ header, footer, breadcrumbs, hero, toolbarLeft, toolbarRight, filters, results, pagination, className, ...rest }: CollectionPageTemplateProps): JSX_2.Element;
|
|
1144
|
+
|
|
1145
|
+
export declare interface CollectionPageTemplateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'results'> {
|
|
1146
|
+
header?: ReactNode;
|
|
1147
|
+
footer?: ReactNode;
|
|
1148
|
+
breadcrumbs?: ReactNode;
|
|
1149
|
+
/** Hero / banner above the listing — CollectionHero is a natural fit. */
|
|
1150
|
+
hero?: ReactNode;
|
|
1151
|
+
/** Toolbar row — typically SearchResultsHeader on the left + SortMenu on the right. */
|
|
1152
|
+
toolbarLeft?: ReactNode;
|
|
1153
|
+
toolbarRight?: ReactNode;
|
|
1154
|
+
/** Left-rail filters (FilterPanel). */
|
|
1155
|
+
filters?: ReactNode;
|
|
1156
|
+
/** Main results column — typically a ProductGrid. */
|
|
1157
|
+
results: ReactNode;
|
|
1158
|
+
/** Optional pagination/load-more row below the grid. */
|
|
1159
|
+
pagination?: ReactNode;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* ColorPicker — color selection input with swatch palette and native picker.
|
|
1164
|
+
*
|
|
1165
|
+
* Provides a swatch grid for quick selection plus a native `<input type="color">`
|
|
1166
|
+
* fallback for custom colors.
|
|
1167
|
+
*
|
|
1168
|
+
* Accessibility:
|
|
1169
|
+
* - Swatch buttons have aria-label with hex value
|
|
1170
|
+
* - Selected swatch indicated with aria-pressed
|
|
1171
|
+
* - Native color input provides full keyboard + assistive tech support
|
|
1172
|
+
*/
|
|
1173
|
+
export declare const ColorPicker: ForwardRefExoticComponent<ColorPickerProps & RefAttributes<HTMLDivElement>>;
|
|
1174
|
+
|
|
1175
|
+
export declare interface ColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1176
|
+
/** Current color value (hex) */
|
|
1177
|
+
value?: string;
|
|
1178
|
+
/** Called when color changes */
|
|
1179
|
+
onChange?: (color: string) => void;
|
|
1180
|
+
/** Predefined color swatches */
|
|
1181
|
+
swatches?: string[];
|
|
1182
|
+
/** Label */
|
|
1183
|
+
label?: string;
|
|
1184
|
+
/** Disabled state */
|
|
1185
|
+
disabled?: boolean;
|
|
1186
|
+
/** Size variant */
|
|
1187
|
+
size?: 'sm' | 'md';
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export declare interface CommandItem {
|
|
1191
|
+
/** Unique identifier */
|
|
1192
|
+
id: string;
|
|
1193
|
+
/** Display label */
|
|
1194
|
+
label: string;
|
|
1195
|
+
/** Optional description shown below the label */
|
|
1196
|
+
description?: string;
|
|
1197
|
+
/** Leading icon */
|
|
1198
|
+
icon?: ReactNode;
|
|
1199
|
+
/** Group/category name */
|
|
1200
|
+
group?: string;
|
|
1201
|
+
/** Keyboard shortcut hint */
|
|
1202
|
+
shortcut?: string;
|
|
1203
|
+
/** Whether the item is disabled */
|
|
1204
|
+
disabled?: boolean;
|
|
1205
|
+
/** Custom search keywords (in addition to label) */
|
|
1206
|
+
keywords?: string[];
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* CommandPalette — keyboard-driven command search dialog (Cmd+K pattern).
|
|
1211
|
+
*
|
|
1212
|
+
* Renders a modal search input with filterable command list,
|
|
1213
|
+
* grouped results, keyboard navigation, and shortcut hints.
|
|
1214
|
+
*
|
|
1215
|
+
* Accessibility:
|
|
1216
|
+
* - Uses combobox + listbox ARIA pattern
|
|
1217
|
+
* - Arrow keys navigate items, Enter selects
|
|
1218
|
+
* - Escape closes the palette
|
|
1219
|
+
* - Focus is trapped within the dialog
|
|
1220
|
+
* - aria-activedescendant tracks highlighted item
|
|
1221
|
+
*/
|
|
1222
|
+
export declare const CommandPalette: ForwardRefExoticComponent<CommandPaletteProps & RefAttributes<HTMLDivElement>>;
|
|
1223
|
+
|
|
1224
|
+
export declare interface CommandPaletteProps {
|
|
1225
|
+
/** Whether the palette is open */
|
|
1226
|
+
open: boolean;
|
|
1227
|
+
/** Called when the palette should close */
|
|
1228
|
+
onClose: () => void;
|
|
1229
|
+
/** Available commands */
|
|
1230
|
+
items: CommandItem[];
|
|
1231
|
+
/** Called when a command is selected */
|
|
1232
|
+
onSelect: (item: CommandItem) => void;
|
|
1233
|
+
/** Placeholder text for the search input */
|
|
1234
|
+
placeholder?: string;
|
|
1235
|
+
/** Empty state message */
|
|
1236
|
+
emptyMessage?: string;
|
|
1237
|
+
/** Additional className for the overlay */
|
|
1238
|
+
className?: string;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Container — max-width content wrapper with responsive padding.
|
|
1243
|
+
*
|
|
1244
|
+
* Provides consistent horizontal padding and a constrained max-width
|
|
1245
|
+
* for page-level content sections.
|
|
1246
|
+
*
|
|
1247
|
+
* Accessibility:
|
|
1248
|
+
* - Purely presentational — no ARIA roles needed
|
|
1249
|
+
* - Use semantic HTML elements via the `as` prop (e.g., main, section)
|
|
1250
|
+
*/
|
|
1251
|
+
export declare const Container: ForwardRefExoticComponent<ContainerProps & RefAttributes<HTMLDivElement>>;
|
|
1252
|
+
|
|
1253
|
+
export declare const container: {
|
|
1254
|
+
readonly max: "1280px";
|
|
1255
|
+
readonly reading: "720px";
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
export declare interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
1259
|
+
/** Max-width preset */
|
|
1260
|
+
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
1261
|
+
/** Horizontal padding */
|
|
1262
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
1263
|
+
/** Center the container horizontally */
|
|
1264
|
+
centered?: boolean;
|
|
1265
|
+
/** Render as a different HTML element */
|
|
1266
|
+
as?: ElementType;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
export declare const controlSize: {
|
|
1270
|
+
readonly sm: "32px";
|
|
1271
|
+
readonly md: "40px";
|
|
1272
|
+
readonly lg: "48px";
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* CouponField — promo/discount code entry with applied-code chips.
|
|
1277
|
+
*
|
|
1278
|
+
* Controlled error message for async validation. Pair with `collapsible`
|
|
1279
|
+
* to tuck the input behind a disclosure link on slimmer summary panels.
|
|
1280
|
+
*/
|
|
1281
|
+
export declare function CouponField({ applied, onApply, onRemove, error, placeholder, collapsible, className, ...rest }: CouponFieldProps): JSX_2.Element;
|
|
1282
|
+
|
|
1283
|
+
export declare interface CouponFieldProps extends Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit'> {
|
|
1284
|
+
applied?: AppliedCoupon[];
|
|
1285
|
+
onApply?: (code: string) => void | Promise<void>;
|
|
1286
|
+
onRemove?: (code: string) => void;
|
|
1287
|
+
/** Error state set by the caller after failed validation. */
|
|
1288
|
+
error?: string;
|
|
1289
|
+
placeholder?: string;
|
|
1290
|
+
/** Render as a collapsed "Have a code?" link initially. */
|
|
1291
|
+
collapsible?: boolean;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* CrossSellStrip — compact "You might also like" row used inline in a cart
|
|
1296
|
+
* or drawer. Each item exposes a one-tap add action (no variant pickers).
|
|
1297
|
+
*/
|
|
1298
|
+
export declare function CrossSellStrip({ title, products, onAdd, onSelectProduct, className, ...rest }: CrossSellStripProps): JSX_2.Element | null;
|
|
1299
|
+
|
|
1300
|
+
export declare interface CrossSellStripProps extends HTMLAttributes<HTMLElement> {
|
|
1301
|
+
title?: string;
|
|
1302
|
+
products: Product[];
|
|
1303
|
+
onAdd?: (product: Product) => void;
|
|
1304
|
+
onSelectProduct?: (product: Product) => void;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Shared commerce primitives for Skyfall Bazaar.
|
|
1309
|
+
* Kept intentionally small — the kit is presentational, callers map their
|
|
1310
|
+
* own domain objects into these shapes at the boundary.
|
|
1311
|
+
*/
|
|
1312
|
+
export declare type CurrencyCode = 'USD' | 'EUR' | 'GBP' | 'CAD' | 'AUD' | 'JPY' | string;
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* DataGrid — composable data grid built on Table primitives.
|
|
1316
|
+
*
|
|
1317
|
+
* Accessibility:
|
|
1318
|
+
* - Built on semantic Table components (table/thead/tbody/tr/th/td)
|
|
1319
|
+
* - Sortable columns use aria-sort
|
|
1320
|
+
* - Selection checkboxes include accessible labels
|
|
1321
|
+
* - Loading state announced via aria-busy
|
|
1322
|
+
* - Healthcare note: designed for patient lists, lab results,
|
|
1323
|
+
* appointment schedules, and other clinical data views
|
|
1324
|
+
*/
|
|
1325
|
+
export declare function DataGrid<T extends Record<string, unknown>>({ columns, data, selectable, onSelectionChange, selectedRows, sortColumn, sortDirection, onSort, loading, emptyMessage, density, stickyHeader, striped, onRowClick, className, ...props }: DataGridProps<T>): JSX_2.Element;
|
|
1326
|
+
|
|
1327
|
+
export declare interface DataGridColumn<T = Record<string, unknown>> {
|
|
1328
|
+
/** Unique key for the column, used as the data accessor */
|
|
1329
|
+
key: string;
|
|
1330
|
+
/** Column header label */
|
|
1331
|
+
header: ReactNode;
|
|
1332
|
+
/** Custom render function for cell content */
|
|
1333
|
+
render?: (value: unknown, row: T, rowIndex: number) => ReactNode;
|
|
1334
|
+
/** Whether this column is sortable */
|
|
1335
|
+
sortable?: boolean;
|
|
1336
|
+
/** Column width (CSS value) */
|
|
1337
|
+
width?: string | number;
|
|
1338
|
+
/** Text alignment */
|
|
1339
|
+
align?: 'left' | 'center' | 'right';
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
export declare interface DataGridProps<T = Record<string, unknown>> extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
1343
|
+
/** Column definitions */
|
|
1344
|
+
columns: DataGridColumn<T>[];
|
|
1345
|
+
/** Data array */
|
|
1346
|
+
data: T[];
|
|
1347
|
+
/** Enable row selection with checkboxes */
|
|
1348
|
+
selectable?: boolean;
|
|
1349
|
+
/** Callback when selection changes, receives array of selected row indices */
|
|
1350
|
+
onSelectionChange?: (selectedIndices: number[]) => void;
|
|
1351
|
+
/** Currently selected row indices (controlled) */
|
|
1352
|
+
selectedRows?: number[];
|
|
1353
|
+
/** Current sort column key */
|
|
1354
|
+
sortColumn?: string;
|
|
1355
|
+
/** Current sort direction */
|
|
1356
|
+
sortDirection?: SortDirection;
|
|
1357
|
+
/** Callback when a sortable column header is clicked */
|
|
1358
|
+
onSort?: (column: string, direction: SortDirection) => void;
|
|
1359
|
+
/** Show loading skeleton */
|
|
1360
|
+
loading?: boolean;
|
|
1361
|
+
/** Message shown when data is empty */
|
|
1362
|
+
emptyMessage?: string;
|
|
1363
|
+
/** Row density */
|
|
1364
|
+
density?: 'default' | 'compact' | 'comfortable';
|
|
1365
|
+
/** Sticky header */
|
|
1366
|
+
stickyHeader?: boolean;
|
|
1367
|
+
/** Striped rows */
|
|
1368
|
+
striped?: boolean;
|
|
1369
|
+
/** Callback when a row is clicked */
|
|
1370
|
+
onRowClick?: (row: T, index: number) => void;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
/** Data visualization — warm commerce palette (account/admin charts). */
|
|
1374
|
+
export declare const dataVis: {
|
|
1375
|
+
readonly 1: "#1F1C17";
|
|
1376
|
+
readonly 2: "#C96C3E";
|
|
1377
|
+
readonly 3: "#4A7C59";
|
|
1378
|
+
readonly 4: "#B58235";
|
|
1379
|
+
readonly 5: "#8A816B";
|
|
1380
|
+
readonly gridline: "#ECE7DC";
|
|
1381
|
+
readonly axis: "#8A816B";
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* DatePicker — styled native date input for consistent appearance.
|
|
1386
|
+
*
|
|
1387
|
+
* Accessibility:
|
|
1388
|
+
* - Uses native input[type="date"] for built-in AT support
|
|
1389
|
+
* - Date picker popup provided by the browser
|
|
1390
|
+
* - aria-invalid signals error state
|
|
1391
|
+
* - Consistent sizing with other Bazaar form controls
|
|
1392
|
+
*/
|
|
1393
|
+
export declare const DatePicker: ForwardRefExoticComponent<DatePickerProps & RefAttributes<HTMLInputElement>>;
|
|
1394
|
+
|
|
1395
|
+
export declare interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
1396
|
+
/** Size variant */
|
|
1397
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1398
|
+
/** Error state */
|
|
1399
|
+
error?: boolean;
|
|
1400
|
+
/** Full width */
|
|
1401
|
+
fullWidth?: boolean;
|
|
1402
|
+
/** Minimum date (ISO format YYYY-MM-DD) */
|
|
1403
|
+
min?: string;
|
|
1404
|
+
/** Maximum date (ISO format YYYY-MM-DD) */
|
|
1405
|
+
max?: string;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Convenience preset — spread `DEFAULT_TRUST_BADGES` into `items` to get
|
|
1410
|
+
* Shipping, Returns, Secure, Sustainability, Packaging out of the box.
|
|
1411
|
+
*/
|
|
1412
|
+
export declare const DEFAULT_TRUST_BADGES: TrustBadgeItem[];
|
|
1413
|
+
|
|
1414
|
+
/** Default number formatter — locale-aware, with sensible compact behavior */
|
|
1415
|
+
export declare const defaultValueFormatter: ValueFormatter;
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* DeliveryEstimate — ZIP-based delivery promise block, shown on PDPs and
|
|
1419
|
+
* in the cart. Leads with "Get it by {date}" and supports a "change
|
|
1420
|
+
* location" affordance when already personalized.
|
|
1421
|
+
*/
|
|
1422
|
+
export declare function DeliveryEstimate({ destination, arrivesBy, orderByAt, carrier, shippingTier, note, onChangeLocation, changeLocationLabel, className, ...rest }: DeliveryEstimateProps): JSX_2.Element;
|
|
1423
|
+
|
|
1424
|
+
export declare interface DeliveryEstimateProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
1425
|
+
/** Destination description (e.g., "Brooklyn, NY 11222"). Leave blank to show the CTA. */
|
|
1426
|
+
destination?: string;
|
|
1427
|
+
/** ISO date of the soonest eligible delivery. */
|
|
1428
|
+
arrivesBy?: string;
|
|
1429
|
+
/** ISO cutoff for same-day processing — e.g. "2026-04-15T15:00:00". */
|
|
1430
|
+
orderByAt?: string;
|
|
1431
|
+
/** Shipping carrier (e.g., "UPS Ground"). */
|
|
1432
|
+
carrier?: string;
|
|
1433
|
+
/** Eligible shipping tier. */
|
|
1434
|
+
shippingTier?: 'standard' | 'express' | 'overnight';
|
|
1435
|
+
/** Additional promise copy, e.g. "Free over $75". */
|
|
1436
|
+
note?: ReactNode;
|
|
1437
|
+
/** Called when the user wants to change the ZIP/location. */
|
|
1438
|
+
onChangeLocation?: () => void;
|
|
1439
|
+
changeLocationLabel?: string;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* DescriptionList — semantic key-value display using dl/dt/dd.
|
|
1444
|
+
*
|
|
1445
|
+
* Accessibility:
|
|
1446
|
+
* - Uses <dl>, <dt>, <dd> semantic HTML
|
|
1447
|
+
* - Screen readers will announce terms and definitions
|
|
1448
|
+
* - Healthcare note: ideal for patient demographics, encounter details,
|
|
1449
|
+
* and insurance information panels
|
|
1450
|
+
*/
|
|
1451
|
+
export declare function DescriptionList({ items, layout, columns, className, style, ...props }: DescriptionListProps): JSX_2.Element;
|
|
1452
|
+
|
|
1453
|
+
export declare interface DescriptionListItem {
|
|
1454
|
+
/** Label / term */
|
|
1455
|
+
label: ReactNode;
|
|
1456
|
+
/** Value / description */
|
|
1457
|
+
value: ReactNode;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
export declare interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
1461
|
+
/** Array of label-value pairs */
|
|
1462
|
+
items: DescriptionListItem[];
|
|
1463
|
+
/** Layout mode */
|
|
1464
|
+
layout?: 'vertical' | 'horizontal' | 'grid';
|
|
1465
|
+
/** Number of columns for grid layout */
|
|
1466
|
+
columns?: number;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Dialog — confirmation dialog built on native <dialog>.
|
|
1471
|
+
*
|
|
1472
|
+
* Accessibility:
|
|
1473
|
+
* - Uses native <dialog> for built-in focus trapping and Escape handling
|
|
1474
|
+
* - aria-labelledby links to the title
|
|
1475
|
+
* - aria-describedby links to the message
|
|
1476
|
+
* - Focus moves to cancel button on open (safe default)
|
|
1477
|
+
* - Escape key closes the dialog
|
|
1478
|
+
* - Backdrop click cancels
|
|
1479
|
+
*/
|
|
1480
|
+
export declare function Dialog({ open, onConfirm, onCancel, title, message, confirmLabel, cancelLabel, variant, loading, className, }: DialogProps): JSX_2.Element;
|
|
1481
|
+
|
|
1482
|
+
export declare interface DialogProps {
|
|
1483
|
+
/** Whether the dialog is open */
|
|
1484
|
+
open: boolean;
|
|
1485
|
+
/** Called when the user confirms */
|
|
1486
|
+
onConfirm: () => void;
|
|
1487
|
+
/** Called when the user cancels */
|
|
1488
|
+
onCancel: () => void;
|
|
1489
|
+
/** Dialog title */
|
|
1490
|
+
title: string;
|
|
1491
|
+
/** Message or content */
|
|
1492
|
+
message: string | ReactNode;
|
|
1493
|
+
/** Confirm button label */
|
|
1494
|
+
confirmLabel?: string;
|
|
1495
|
+
/** Cancel button label */
|
|
1496
|
+
cancelLabel?: string;
|
|
1497
|
+
/** Visual variant */
|
|
1498
|
+
variant?: 'default' | 'danger';
|
|
1499
|
+
/** Show loading state on confirm button */
|
|
1500
|
+
loading?: boolean;
|
|
1501
|
+
/** Additional class name */
|
|
1502
|
+
className?: string;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* Divider — horizontal rule for visual separation.
|
|
1507
|
+
*
|
|
1508
|
+
* Accessibility:
|
|
1509
|
+
* - Uses semantic <hr> which conveys a thematic break
|
|
1510
|
+
* - role="separator" is implicit for <hr>
|
|
1511
|
+
*/
|
|
1512
|
+
export declare function Divider({ spacing, className, ...props }: DividerProps): JSX_2.Element;
|
|
1513
|
+
|
|
1514
|
+
export declare interface DividerProps extends HTMLAttributes<HTMLHRElement> {
|
|
1515
|
+
/** Spacing above and below */
|
|
1516
|
+
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Drawer — side panel overlay for detail views and forms.
|
|
1521
|
+
*
|
|
1522
|
+
* Accessibility:
|
|
1523
|
+
* - Uses native <dialog> element for focus trapping
|
|
1524
|
+
* - Escape key closes the drawer
|
|
1525
|
+
* - aria-labelledby links to the title
|
|
1526
|
+
* - Scrim click closes the drawer
|
|
1527
|
+
* - Healthcare note: use drawers for patient detail views, order entry,
|
|
1528
|
+
* and contextual forms that don't require full-page navigation
|
|
1529
|
+
*/
|
|
1530
|
+
export declare function Drawer({ open, onClose, title, size, position, footer, className, children, }: DrawerProps): JSX_2.Element;
|
|
1531
|
+
|
|
1532
|
+
export declare interface DrawerProps {
|
|
1533
|
+
/** Additional className */
|
|
1534
|
+
className?: string;
|
|
1535
|
+
/** Whether the drawer is visible */
|
|
1536
|
+
open: boolean;
|
|
1537
|
+
/** Called when the drawer should close */
|
|
1538
|
+
onClose: () => void;
|
|
1539
|
+
/** Drawer title */
|
|
1540
|
+
title: ReactNode;
|
|
1541
|
+
/** Width preset */
|
|
1542
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1543
|
+
/** Which side the drawer slides from */
|
|
1544
|
+
position?: 'left' | 'right';
|
|
1545
|
+
/** Footer actions */
|
|
1546
|
+
footer?: ReactNode;
|
|
1547
|
+
/** Drawer body content */
|
|
1548
|
+
children?: ReactNode;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
export declare const duration: {
|
|
1552
|
+
readonly fast: "120ms";
|
|
1553
|
+
readonly base: "180ms";
|
|
1554
|
+
readonly slow: "240ms";
|
|
1555
|
+
};
|
|
1556
|
+
|
|
1557
|
+
export declare const easing: {
|
|
1558
|
+
readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
|
|
1559
|
+
readonly emphasized: "cubic-bezier(0.2, 0, 0, 1)";
|
|
1560
|
+
readonly exit: "cubic-bezier(0.4, 0, 1, 1)";
|
|
1561
|
+
};
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* EditorialProductStory — long-form editorial layout with a sticky product
|
|
1565
|
+
* rail that shadows the story. Alternates image-left / image-right beats.
|
|
1566
|
+
*/
|
|
1567
|
+
export declare function EditorialProductStory({ eyebrow, headline, intro, beats, product, onBuy, buyLabel, className, ...rest }: EditorialProductStoryProps): JSX_2.Element;
|
|
1568
|
+
|
|
1569
|
+
export declare interface EditorialProductStoryBeat {
|
|
1570
|
+
id: string;
|
|
1571
|
+
image: {
|
|
1572
|
+
src?: string;
|
|
1573
|
+
alt: string;
|
|
1574
|
+
seed?: string;
|
|
1575
|
+
};
|
|
1576
|
+
heading?: string;
|
|
1577
|
+
body?: ReactNode;
|
|
1578
|
+
caption?: string;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
export declare interface EditorialProductStoryProps extends HTMLAttributes<HTMLElement> {
|
|
1582
|
+
eyebrow?: string;
|
|
1583
|
+
headline: string;
|
|
1584
|
+
intro?: ReactNode;
|
|
1585
|
+
beats: EditorialProductStoryBeat[];
|
|
1586
|
+
/** Product the story is about — pinned to the sticky side-rail. */
|
|
1587
|
+
product: Product;
|
|
1588
|
+
onBuy?: (product: Product) => void;
|
|
1589
|
+
buyLabel?: string;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* EmptyState — centered placeholder for empty tables, lists, or views.
|
|
1594
|
+
*
|
|
1595
|
+
* Accessibility:
|
|
1596
|
+
* - Uses semantic heading and paragraph elements
|
|
1597
|
+
* - Healthcare note: provide clear, actionable guidance in empty states
|
|
1598
|
+
* (e.g., "No patients match your filters. Try adjusting your search.")
|
|
1599
|
+
*/
|
|
1600
|
+
export declare function EmptyState({ icon, title, description, action, className, ...props }: EmptyStateProps): JSX_2.Element;
|
|
1601
|
+
|
|
1602
|
+
export declare interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
1603
|
+
/** Optional icon displayed above the title */
|
|
1604
|
+
icon?: ReactNode;
|
|
1605
|
+
/** Title text */
|
|
1606
|
+
title: string;
|
|
1607
|
+
/** Descriptive text below the title */
|
|
1608
|
+
description?: string;
|
|
1609
|
+
/** Optional action element (e.g., a button) */
|
|
1610
|
+
action?: ReactNode;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
/**
|
|
1614
|
+
* ErrorState — centered error placeholder with retry action.
|
|
1615
|
+
*
|
|
1616
|
+
* Composes: Typography
|
|
1617
|
+
*
|
|
1618
|
+
* Use in place of content when a data fetch fails, a page errors,
|
|
1619
|
+
* or a section cannot render. Provides clear messaging, an optional
|
|
1620
|
+
* error code for support, and a retry action.
|
|
1621
|
+
*
|
|
1622
|
+
* Accessibility:
|
|
1623
|
+
* - Uses role="alert" to announce the error to screen readers
|
|
1624
|
+
* - Action button receives focus for quick retry
|
|
1625
|
+
*/
|
|
1626
|
+
export declare function ErrorState({ title, description, icon, action, errorCode, className, ...props }: ErrorStateProps): JSX_2.Element;
|
|
1627
|
+
|
|
1628
|
+
export declare interface ErrorStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
1629
|
+
/** Error title */
|
|
1630
|
+
title?: string;
|
|
1631
|
+
/** Descriptive message */
|
|
1632
|
+
description?: string;
|
|
1633
|
+
/** Custom icon (defaults to a warning icon) */
|
|
1634
|
+
icon?: ReactNode;
|
|
1635
|
+
/** Retry action element (e.g., a button) */
|
|
1636
|
+
action?: ReactNode;
|
|
1637
|
+
/** Error code or reference for support */
|
|
1638
|
+
errorCode?: string;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* ExpressCheckout — row of wallet buttons that bypass the multi-step form.
|
|
1643
|
+
*
|
|
1644
|
+
* Presentational only: the actual wallet SDK integration is expected to live
|
|
1645
|
+
* in the `onClick` handler.
|
|
1646
|
+
*/
|
|
1647
|
+
export declare function ExpressCheckout({ methods, heading, divider, className, ...rest }: ExpressCheckoutProps): JSX_2.Element;
|
|
1648
|
+
|
|
1649
|
+
export declare interface ExpressCheckoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
1650
|
+
methods: ExpressMethod[];
|
|
1651
|
+
/** Legend shown above the buttons. */
|
|
1652
|
+
heading?: string;
|
|
1653
|
+
/** Divider copy shown below ("or"). */
|
|
1654
|
+
divider?: string;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
export declare interface ExpressMethod {
|
|
1658
|
+
brand: PaymentBrand;
|
|
1659
|
+
label?: string;
|
|
1660
|
+
onClick?: () => void;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* FeaturedCollection — editorial collection module with a hero image, a
|
|
1665
|
+
* copy block and a tight grid of product cards. Use to merchandise a
|
|
1666
|
+
* drop or curation on the homepage.
|
|
1667
|
+
*/
|
|
1668
|
+
export declare function FeaturedCollection({ eyebrow, headline, body, image, products, layout, cta, onSelectProduct, className, ...rest }: FeaturedCollectionProps): JSX_2.Element;
|
|
1669
|
+
|
|
1670
|
+
export declare interface FeaturedCollectionProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
1671
|
+
eyebrow?: string;
|
|
1672
|
+
headline: string;
|
|
1673
|
+
body?: ReactNode;
|
|
1674
|
+
/** Hero imagery for the collection. */
|
|
1675
|
+
image: {
|
|
1676
|
+
src?: string;
|
|
1677
|
+
alt: string;
|
|
1678
|
+
seed?: string;
|
|
1679
|
+
};
|
|
1680
|
+
products: Product[];
|
|
1681
|
+
/** Layout — 'image-left' places hero on the left with products in a 2×2 grid. */
|
|
1682
|
+
layout?: 'image-left' | 'image-right' | 'stacked';
|
|
1683
|
+
cta?: {
|
|
1684
|
+
label: string;
|
|
1685
|
+
onClick?: () => void;
|
|
1686
|
+
};
|
|
1687
|
+
onSelectProduct?: (product: Product) => void;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* FileUpload — dropzone for file upload with click and drag support.
|
|
1692
|
+
*
|
|
1693
|
+
* Accessibility:
|
|
1694
|
+
* - Keyboard accessible via Enter/Space to open file dialog
|
|
1695
|
+
* - Uses role="button" on the dropzone
|
|
1696
|
+
* - aria-describedby links to instructions
|
|
1697
|
+
* - File list announced after selection
|
|
1698
|
+
*/
|
|
1699
|
+
export declare function FileUpload({ accept, multiple, maxSize, onFilesSelected, disabled, error, className, }: FileUploadProps): JSX_2.Element;
|
|
1700
|
+
|
|
1701
|
+
export declare interface FileUploadProps {
|
|
1702
|
+
/** Accepted file types (e.g., ".pdf,.jpg,image/*") */
|
|
1703
|
+
accept?: string;
|
|
1704
|
+
/** Allow multiple files */
|
|
1705
|
+
multiple?: boolean;
|
|
1706
|
+
/** Max file size in bytes */
|
|
1707
|
+
maxSize?: number;
|
|
1708
|
+
/** Callback when files are selected or dropped */
|
|
1709
|
+
onFilesSelected?: (files: File[]) => void;
|
|
1710
|
+
/** Disabled state */
|
|
1711
|
+
disabled?: boolean;
|
|
1712
|
+
/** Error message */
|
|
1713
|
+
error?: string;
|
|
1714
|
+
/** Additional CSS class */
|
|
1715
|
+
className?: string;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
export declare interface FilterGroup {
|
|
1719
|
+
id: string;
|
|
1720
|
+
title: string;
|
|
1721
|
+
kind: FilterKind;
|
|
1722
|
+
options?: FilterOption[];
|
|
1723
|
+
/** For price groups — current low/high in major units. */
|
|
1724
|
+
min?: number;
|
|
1725
|
+
max?: number;
|
|
1726
|
+
/** Initial expanded state (default true). */
|
|
1727
|
+
defaultExpanded?: boolean;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
export declare type FilterKind = 'checkbox' | 'swatch' | 'price' | 'rating';
|
|
1731
|
+
|
|
1732
|
+
export declare interface FilterOption {
|
|
1733
|
+
value: string;
|
|
1734
|
+
label: string;
|
|
1735
|
+
/** Shown as the subtle count on the right (e.g. 42). */
|
|
1736
|
+
count?: number;
|
|
1737
|
+
/** For swatch filters — CSS color. */
|
|
1738
|
+
swatchColor?: string;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* FilterPanel — left-rail faceted navigation for collection pages.
|
|
1743
|
+
*
|
|
1744
|
+
* Supports checkbox, color-swatch, and price-range facets. Controlled via
|
|
1745
|
+
* `selected` + `onChange` so callers own query-string state.
|
|
1746
|
+
*/
|
|
1747
|
+
export declare function FilterPanel({ groups, selected, onChange, onClearAll, title, className, ...rest }: FilterPanelProps): JSX_2.Element;
|
|
1748
|
+
|
|
1749
|
+
export declare interface FilterPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1750
|
+
groups: FilterGroup[];
|
|
1751
|
+
/** Map of group id -> selected values (or for price: [min, max]). */
|
|
1752
|
+
selected?: Record<string, string[] | [number, number] | undefined>;
|
|
1753
|
+
onChange?: (groupId: string, next: string[] | [number, number]) => void;
|
|
1754
|
+
onClearAll?: () => void;
|
|
1755
|
+
title?: string;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
export declare const focusRing: {
|
|
1759
|
+
readonly width: "3px";
|
|
1760
|
+
readonly color: "rgba(47, 111, 228, 0.28)";
|
|
1761
|
+
readonly offset: "2px";
|
|
1762
|
+
readonly outlineColor: "#2F6FE4";
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1765
|
+
export declare const fontFamily: {
|
|
1766
|
+
readonly sans: "\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
|
|
1767
|
+
readonly display: "\"Fraunces\", \"Inter\", system-ui, serif";
|
|
1768
|
+
readonly mono: "\"IBM Plex Mono\", \"SFMono-Regular\", Consolas, monospace";
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
export declare const fontSize: {
|
|
1772
|
+
readonly 'display-lg': "40px";
|
|
1773
|
+
readonly 'display-md': "32px";
|
|
1774
|
+
readonly 'heading-xl': "28px";
|
|
1775
|
+
readonly 'heading-lg': "24px";
|
|
1776
|
+
readonly 'heading-md': "20px";
|
|
1777
|
+
readonly 'heading-sm': "18px";
|
|
1778
|
+
readonly 'body-lg': "16px";
|
|
1779
|
+
readonly 'body-md': "14px";
|
|
1780
|
+
readonly 'body-sm': "13px";
|
|
1781
|
+
readonly 'label-lg': "14px";
|
|
1782
|
+
readonly 'label-md': "13px";
|
|
1783
|
+
readonly caption: "12px";
|
|
1784
|
+
readonly data: "14px";
|
|
1785
|
+
readonly code: "13px";
|
|
1786
|
+
};
|
|
1787
|
+
|
|
1788
|
+
export declare const fontWeight: {
|
|
1789
|
+
readonly regular: 400;
|
|
1790
|
+
readonly medium: 500;
|
|
1791
|
+
readonly semibold: 600;
|
|
1792
|
+
readonly bold: 700;
|
|
1793
|
+
};
|
|
1794
|
+
|
|
1795
|
+
export declare interface FooterColumn {
|
|
1796
|
+
id: string;
|
|
1797
|
+
title: string;
|
|
1798
|
+
links: FooterLink[];
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
export declare interface FooterLink {
|
|
1802
|
+
id: string;
|
|
1803
|
+
label: string;
|
|
1804
|
+
href?: string;
|
|
1805
|
+
onClick?: () => void;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
export declare interface FooterSocial {
|
|
1809
|
+
id: string;
|
|
1810
|
+
label: string;
|
|
1811
|
+
href?: string;
|
|
1812
|
+
icon?: ReactNode;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Format a Money value for display. Prefers the caller-supplied `display`
|
|
1817
|
+
* string, otherwise uses Intl.NumberFormat with currency style.
|
|
1818
|
+
*/
|
|
1819
|
+
export declare function formatMoney(money: Money, locale?: string): string;
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* FormField — composable wrapper that renders Label + input + HelperText/error.
|
|
1823
|
+
*
|
|
1824
|
+
* Accessibility:
|
|
1825
|
+
* - Generates aria-describedby linking between input and helper/error text
|
|
1826
|
+
* - Error messages use role="alert" via HelperText
|
|
1827
|
+
* - Required indicator on Label
|
|
1828
|
+
* - Disabled state dims the entire field
|
|
1829
|
+
*/
|
|
1830
|
+
export declare function FormField({ label, htmlFor, required, error, helperText, children, disabled, className, }: FormFieldProps): JSX_2.Element;
|
|
1831
|
+
|
|
1832
|
+
export declare interface FormFieldProps {
|
|
1833
|
+
/** Label text for the field */
|
|
1834
|
+
label?: string;
|
|
1835
|
+
/** HTML for attribute to associate label with input */
|
|
1836
|
+
htmlFor?: string;
|
|
1837
|
+
/** Mark field as required */
|
|
1838
|
+
required?: boolean;
|
|
1839
|
+
/** Error message string — renders HelperText in error state */
|
|
1840
|
+
error?: string;
|
|
1841
|
+
/** Helper text displayed below the input */
|
|
1842
|
+
helperText?: string;
|
|
1843
|
+
/** The form control element (Input, Select, Textarea, etc.) */
|
|
1844
|
+
children: ReactNode;
|
|
1845
|
+
/** Disabled state — visually dims the field */
|
|
1846
|
+
disabled?: boolean;
|
|
1847
|
+
/** Additional CSS class */
|
|
1848
|
+
className?: string;
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* FreeShippingMeter — progress indicator toward a free-shipping threshold.
|
|
1853
|
+
*
|
|
1854
|
+
* Animates to a green "unlocked" state when subtotal >= threshold. Intended
|
|
1855
|
+
* for placement above the cart list, in the mini-cart header, or at the top
|
|
1856
|
+
* of checkout.
|
|
1857
|
+
*/
|
|
1858
|
+
export declare function FreeShippingMeter({ subtotal, threshold, unlockedMessage, progressMessage, size, className, ...rest }: FreeShippingMeterProps): JSX_2.Element;
|
|
1859
|
+
|
|
1860
|
+
export declare interface FreeShippingMeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
1861
|
+
/** Current cart subtotal. */
|
|
1862
|
+
subtotal: Money;
|
|
1863
|
+
/** Threshold that unlocks free shipping. */
|
|
1864
|
+
threshold: Money;
|
|
1865
|
+
/** Override the "You unlocked free shipping" message. */
|
|
1866
|
+
unlockedMessage?: string;
|
|
1867
|
+
/** Override the progress message — receives the remaining Money value. */
|
|
1868
|
+
progressMessage?: (remaining: Money) => string;
|
|
1869
|
+
size?: 'sm' | 'md';
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* Resolve a series color by index, wrapping the palette if more series
|
|
1874
|
+
* exist than available colors. Accepts an explicit override.
|
|
1875
|
+
*/
|
|
1876
|
+
export declare function getSeriesColor(index: number, override?: string): string;
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Grid — CSS grid layout primitive.
|
|
1880
|
+
*
|
|
1881
|
+
* Provides a responsive grid with preset column counts or auto-fill
|
|
1882
|
+
* behavior based on minimum item width.
|
|
1883
|
+
*
|
|
1884
|
+
* Accessibility:
|
|
1885
|
+
* - Purely presentational — no ARIA roles needed
|
|
1886
|
+
* - Grid layout does not affect reading order for screen readers
|
|
1887
|
+
*/
|
|
1888
|
+
export declare const Grid: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>>;
|
|
1889
|
+
|
|
1890
|
+
export declare const grid: {
|
|
1891
|
+
readonly columns: 12;
|
|
1892
|
+
readonly gutter: "24px";
|
|
1893
|
+
readonly margin: {
|
|
1894
|
+
readonly desktop: "32px";
|
|
1895
|
+
readonly tablet: "24px";
|
|
1896
|
+
readonly mobile: "16px";
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
1901
|
+
/** Number of columns (1-12) or 'auto' for auto-fill */
|
|
1902
|
+
columns?: number | 'auto';
|
|
1903
|
+
/** Gap between grid items */
|
|
1904
|
+
gap?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1905
|
+
/** Minimum item width when columns='auto' */
|
|
1906
|
+
minItemWidth?: number;
|
|
1907
|
+
/** Align items vertically */
|
|
1908
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch';
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* HelperText — descriptive or error text beneath a form field.
|
|
1913
|
+
*
|
|
1914
|
+
* Accessibility:
|
|
1915
|
+
* - Link to input via aria-describedby on the input, matching this element's id
|
|
1916
|
+
* - Error messages use role="alert" for immediate screen reader announcement
|
|
1917
|
+
* - Error state uses both color and icon (not color alone)
|
|
1918
|
+
*/
|
|
1919
|
+
export declare function HelperText({ error, className, children, ...props }: HelperTextProps): JSX_2.Element;
|
|
1920
|
+
|
|
1921
|
+
export declare interface HelperTextProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
1922
|
+
/** Render as error message */
|
|
1923
|
+
error?: boolean;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
export declare interface HomePageSection {
|
|
1927
|
+
id: string;
|
|
1928
|
+
content: ReactNode;
|
|
1929
|
+
/** Full-bleed section (no padding/max-width). */
|
|
1930
|
+
bleed?: boolean;
|
|
1931
|
+
/** Muted background wrapper while keeping inner max-width. */
|
|
1932
|
+
muted?: boolean;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
/**
|
|
1936
|
+
* HomePageTemplate — marketing home-page shell. Composes a header, a hero
|
|
1937
|
+
* slot, an arbitrary list of sections (normal, bleed, or muted), and a
|
|
1938
|
+
* footer.
|
|
1939
|
+
*/
|
|
1940
|
+
export declare function HomePageTemplate({ header, footer, hero, sections, className, ...rest }: HomePageTemplateProps): JSX_2.Element;
|
|
1941
|
+
|
|
1942
|
+
export declare interface HomePageTemplateProps extends HTMLAttributes<HTMLDivElement> {
|
|
1943
|
+
header?: ReactNode;
|
|
1944
|
+
footer?: ReactNode;
|
|
1945
|
+
/** Hero module above the fold — rendered full-bleed by default. */
|
|
1946
|
+
hero?: ReactNode;
|
|
1947
|
+
sections?: HomePageSection[];
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/**
|
|
1951
|
+
* IconButton — icon-only interactive button.
|
|
1952
|
+
*
|
|
1953
|
+
* Accessibility:
|
|
1954
|
+
* - aria-label is required to provide screen reader context
|
|
1955
|
+
* - Meets 44px minimum touch target at md/lg sizes
|
|
1956
|
+
*/
|
|
1957
|
+
export declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
1958
|
+
|
|
1959
|
+
export declare interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1960
|
+
/** Accessible label (required — icon-only buttons need text for screen readers) */
|
|
1961
|
+
'aria-label': string;
|
|
1962
|
+
/** The icon element */
|
|
1963
|
+
icon: ReactNode;
|
|
1964
|
+
/** Visual variant */
|
|
1965
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
1966
|
+
/** Size */
|
|
1967
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
export declare const iconSize: {
|
|
1971
|
+
readonly xs: "12px";
|
|
1972
|
+
readonly sm: "16px";
|
|
1973
|
+
readonly md: "20px";
|
|
1974
|
+
readonly lg: "24px";
|
|
1975
|
+
};
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* InputGroup — wrapper that adds prefix/suffix addons to an input.
|
|
1979
|
+
*
|
|
1980
|
+
* Wraps a TextField (or other input) with leading/trailing elements
|
|
1981
|
+
* like icons, currency symbols, units, or action buttons.
|
|
1982
|
+
*
|
|
1983
|
+
* Accessibility:
|
|
1984
|
+
* - Addons are presentational and should not duplicate input labels
|
|
1985
|
+
* - Use aria-describedby on the input to associate addon context
|
|
1986
|
+
*/
|
|
1987
|
+
export declare function InputGroup({ startAddon, endAddon, size, error, disabled, className, children, }: InputGroupProps): JSX_2.Element;
|
|
1988
|
+
|
|
1989
|
+
export declare interface InputGroupProps {
|
|
1990
|
+
/** Content rendered before the input (e.g., icon, label, currency symbol) */
|
|
1991
|
+
startAddon?: ReactNode;
|
|
1992
|
+
/** Content rendered after the input (e.g., icon, button, unit label) */
|
|
1993
|
+
endAddon?: ReactNode;
|
|
1994
|
+
/** Size variant — matches TextField sizes */
|
|
1995
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1996
|
+
/** Error state */
|
|
1997
|
+
error?: boolean;
|
|
1998
|
+
/** Disabled state */
|
|
1999
|
+
disabled?: boolean;
|
|
2000
|
+
/** Additional className */
|
|
2001
|
+
className?: string;
|
|
2002
|
+
/** Input element */
|
|
2003
|
+
children: ReactNode;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* InventoryIndicator — compact stock-state pill with a tone-coded dot.
|
|
2008
|
+
*
|
|
2009
|
+
* Pairs with a ProductBuyBox to answer the "should I buy this?" question
|
|
2010
|
+
* at a glance.
|
|
2011
|
+
*/
|
|
2012
|
+
export declare function InventoryIndicator({ state, size, className, children, ...rest }: InventoryIndicatorProps): JSX_2.Element;
|
|
2013
|
+
|
|
2014
|
+
export declare interface InventoryIndicatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
2015
|
+
state: InventoryState;
|
|
2016
|
+
/** Size variant. */
|
|
2017
|
+
size?: 'sm' | 'md';
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
export declare interface InventoryState {
|
|
2021
|
+
status: InventoryStatus;
|
|
2022
|
+
remaining?: number;
|
|
2023
|
+
expectedDate?: string;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
export declare type InventoryStatus = 'in-stock' | 'low-stock' | 'out-of-stock' | 'preorder' | 'backorder';
|
|
2027
|
+
|
|
2028
|
+
/**
|
|
2029
|
+
* Kbd — keyboard shortcut / key indicator.
|
|
2030
|
+
*
|
|
2031
|
+
* Renders an inline `<kbd>` element styled to look like a physical key.
|
|
2032
|
+
* Use to display keyboard shortcuts in menus, tooltips, and documentation.
|
|
2033
|
+
*
|
|
2034
|
+
* Accessibility:
|
|
2035
|
+
* - Uses semantic <kbd> element for screen readers
|
|
2036
|
+
* - Screen readers will announce the content as keyboard input
|
|
2037
|
+
*/
|
|
2038
|
+
export declare function Kbd({ size, className, children, ...props }: KbdProps): JSX_2.Element;
|
|
2039
|
+
|
|
2040
|
+
export declare interface KbdProps extends HTMLAttributes<HTMLElement> {
|
|
2041
|
+
/** Size variant */
|
|
2042
|
+
size?: 'sm' | 'md';
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* KpiStatCard — premium stat card with optional inline sparkline.
|
|
2047
|
+
*
|
|
2048
|
+
* The chart-aware evolution of StatCard. Use for headline KPIs in
|
|
2049
|
+
* dashboards. Pair with `inverse` for metrics where a decrease is positive
|
|
2050
|
+
* (e.g. wait time, error rate).
|
|
2051
|
+
*
|
|
2052
|
+
* Accessibility:
|
|
2053
|
+
* - Trend icons are aria-hidden; meaning is conveyed in visible text plus an
|
|
2054
|
+
* sr-only direction phrase.
|
|
2055
|
+
* - Sparkline accepts `aria-label` for screen reader trend description.
|
|
2056
|
+
*/
|
|
2057
|
+
export declare function KpiStatCard({ label, value, unit, change, changeLabel, trend, inverse, icon, sparklineData, sparklineColor, sparklineVariant, density, className, ...props }: KpiStatCardProps): JSX_2.Element;
|
|
2058
|
+
|
|
2059
|
+
export declare interface KpiStatCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
2060
|
+
/** Metric label (e.g. "Active patients") */
|
|
2061
|
+
label: string;
|
|
2062
|
+
/** Headline value (e.g. 1284 or "98.2%") */
|
|
2063
|
+
value: ReactNode;
|
|
2064
|
+
/** Optional unit/suffix shown next to the value */
|
|
2065
|
+
unit?: ReactNode;
|
|
2066
|
+
/** Percent change (number) — positive renders as up, negative as down */
|
|
2067
|
+
change?: number;
|
|
2068
|
+
/** Label for the change context (e.g. "vs last 30 days") */
|
|
2069
|
+
changeLabel?: string;
|
|
2070
|
+
/** Override trend direction (otherwise inferred from `change`) */
|
|
2071
|
+
trend?: TrendDirection;
|
|
2072
|
+
/**
|
|
2073
|
+
* For success-positive metrics, set `inverse` to flip color semantics
|
|
2074
|
+
* (e.g. "wait time" — a decrease is good).
|
|
2075
|
+
*/
|
|
2076
|
+
inverse?: boolean;
|
|
2077
|
+
/** Optional icon rendered top-right */
|
|
2078
|
+
icon?: ReactNode;
|
|
2079
|
+
/** Optional sparkline data — when present, renders an inline trend chart */
|
|
2080
|
+
sparklineData?: SparklineProps['data'];
|
|
2081
|
+
/** Sparkline color override */
|
|
2082
|
+
sparklineColor?: string;
|
|
2083
|
+
/** Sparkline render variant */
|
|
2084
|
+
sparklineVariant?: SparklineProps['variant'];
|
|
2085
|
+
/** Density variant */
|
|
2086
|
+
density?: 'comfortable' | 'compact';
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* Label — form field label.
|
|
2091
|
+
*
|
|
2092
|
+
* Accessibility:
|
|
2093
|
+
* - Always associate with an input via htmlFor
|
|
2094
|
+
* - Required indicator uses both visual (*) and sr-only text
|
|
2095
|
+
*/
|
|
2096
|
+
export declare function Label({ required, className, children, ...props }: LabelProps): JSX_2.Element;
|
|
2097
|
+
|
|
2098
|
+
export declare interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
2099
|
+
/** Mark the field as required — adds visual indicator */
|
|
2100
|
+
required?: boolean;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
/**
|
|
2104
|
+
* Bazaar LineChart — wraps Recharts with Bazaar tokens, shell, and states.
|
|
2105
|
+
*
|
|
2106
|
+
* Time-series and trend visualization for dashboards. Pair with KpiStatCard
|
|
2107
|
+
* for headline metrics or use standalone in a ChartCard layout.
|
|
2108
|
+
*/
|
|
2109
|
+
export declare function LineChart<T extends Record<string, unknown>>({ data, xKey, series, height, showLegend, showGrid, valueFormatter, referenceLines, smooth, state, ...cardProps }: LineChartProps<T>): JSX_2.Element;
|
|
2110
|
+
|
|
2111
|
+
export declare interface LineChartProps<T extends Record<string, unknown>> extends Omit<ChartCardProps, 'children'> {
|
|
2112
|
+
/** Row-shaped data — each row represents one x-axis category */
|
|
2113
|
+
data: T[];
|
|
2114
|
+
/** Property name on each row used for the x-axis */
|
|
2115
|
+
xKey: keyof T & string;
|
|
2116
|
+
/** One or more series definitions */
|
|
2117
|
+
series: ChartSeries<T>[];
|
|
2118
|
+
/** Chart height in pixels (defaults to 280) */
|
|
2119
|
+
height?: number;
|
|
2120
|
+
/** Show legend (defaults to true when more than one series) */
|
|
2121
|
+
showLegend?: boolean;
|
|
2122
|
+
/** Show grid (defaults to true) */
|
|
2123
|
+
showGrid?: boolean;
|
|
2124
|
+
/** Format values in tooltip / axis */
|
|
2125
|
+
valueFormatter?: ValueFormatter;
|
|
2126
|
+
/** Optional reference line value(s) (e.g. target threshold) */
|
|
2127
|
+
referenceLines?: {
|
|
2128
|
+
value: number;
|
|
2129
|
+
label?: string;
|
|
2130
|
+
}[];
|
|
2131
|
+
/** Smooth curves (defaults to true) */
|
|
2132
|
+
smooth?: boolean;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
export declare const lineHeight: {
|
|
2136
|
+
readonly 'display-lg': "48px";
|
|
2137
|
+
readonly 'display-md': "40px";
|
|
2138
|
+
readonly 'heading-xl': "36px";
|
|
2139
|
+
readonly 'heading-lg': "32px";
|
|
2140
|
+
readonly 'heading-md': "28px";
|
|
2141
|
+
readonly 'heading-sm': "26px";
|
|
2142
|
+
readonly 'body-lg': "24px";
|
|
2143
|
+
readonly 'body-md': "22px";
|
|
2144
|
+
readonly 'body-sm': "20px";
|
|
2145
|
+
readonly 'label-lg': "20px";
|
|
2146
|
+
readonly 'label-md': "18px";
|
|
2147
|
+
readonly caption: "16px";
|
|
2148
|
+
readonly data: "20px";
|
|
2149
|
+
readonly code: "18px";
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
/**
|
|
2153
|
+
* Link — styled anchor primitive for navigation.
|
|
2154
|
+
*
|
|
2155
|
+
* Variants:
|
|
2156
|
+
* - `default` — underlined inline link
|
|
2157
|
+
* - `subtle` — underline on hover only
|
|
2158
|
+
* - `standalone` — no underline, bolder weight, for navigation items
|
|
2159
|
+
*
|
|
2160
|
+
* Accessibility:
|
|
2161
|
+
* - Uses native <a> element for full keyboard + screen reader support
|
|
2162
|
+
* - External links get target="_blank" with rel="noopener noreferrer"
|
|
2163
|
+
* - aria-disabled prevents interaction without removing from tab order
|
|
2164
|
+
*/
|
|
2165
|
+
export declare const Link: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;
|
|
2166
|
+
|
|
2167
|
+
export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
2168
|
+
/** Visual variant */
|
|
2169
|
+
variant?: 'default' | 'subtle' | 'standalone';
|
|
2170
|
+
/** Color */
|
|
2171
|
+
color?: 'primary' | 'secondary' | 'inherit';
|
|
2172
|
+
/** Whether to show an external indicator */
|
|
2173
|
+
external?: boolean;
|
|
2174
|
+
/** Icon slot (leading) */
|
|
2175
|
+
startIcon?: ReactNode;
|
|
2176
|
+
/** Disabled state (prevents navigation) */
|
|
2177
|
+
disabled?: boolean;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* List — composable list container for displaying groups of items.
|
|
2182
|
+
*
|
|
2183
|
+
* Accessibility:
|
|
2184
|
+
* - Uses semantic <ul>/<li> structure
|
|
2185
|
+
* - Interactive items rendered as buttons for keyboard access
|
|
2186
|
+
* - Disabled items use aria-disabled
|
|
2187
|
+
* - Selected items use aria-selected
|
|
2188
|
+
*/
|
|
2189
|
+
export declare const List: ForwardRefExoticComponent<ListProps & RefAttributes<HTMLUListElement>>;
|
|
2190
|
+
|
|
2191
|
+
export declare const ListItem: ForwardRefExoticComponent<ListItemProps & RefAttributes<HTMLLIElement>>;
|
|
2192
|
+
|
|
2193
|
+
export declare interface ListItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'prefix'> {
|
|
2194
|
+
/** Click handler — makes the item interactive */
|
|
2195
|
+
onClick?: () => void;
|
|
2196
|
+
/** Whether this item is selected */
|
|
2197
|
+
selected?: boolean;
|
|
2198
|
+
/** Whether this item is disabled */
|
|
2199
|
+
disabled?: boolean;
|
|
2200
|
+
/** Leading element (icon, avatar, etc.) */
|
|
2201
|
+
prefix?: ReactNode;
|
|
2202
|
+
/** Trailing element (badge, action button, etc.) */
|
|
2203
|
+
suffix?: ReactNode;
|
|
2204
|
+
/** Secondary description text */
|
|
2205
|
+
description?: string;
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
export declare interface ListProps extends HTMLAttributes<HTMLUListElement> {
|
|
2209
|
+
/** Show dividers between items */
|
|
2210
|
+
divided?: boolean;
|
|
2211
|
+
/** Padding inside list items */
|
|
2212
|
+
padding?: 'none' | 'sm' | 'md';
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* LookbookGallery — asymmetric editorial image grid. Variable cell spans
|
|
2217
|
+
* and tall variants create visual rhythm without turning into a single
|
|
2218
|
+
* magazine-mosaic preset.
|
|
2219
|
+
*/
|
|
2220
|
+
export declare function LookbookGallery({ eyebrow, headline, intro, images, onImageClick, className, ...rest }: LookbookGalleryProps): JSX_2.Element;
|
|
2221
|
+
|
|
2222
|
+
export declare interface LookbookGalleryProps extends HTMLAttributes<HTMLElement> {
|
|
2223
|
+
eyebrow?: string;
|
|
2224
|
+
headline?: string;
|
|
2225
|
+
intro?: ReactNode;
|
|
2226
|
+
images: LookbookImage[];
|
|
2227
|
+
onImageClick?: (image: LookbookImage) => void;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
export declare interface LookbookImage {
|
|
2231
|
+
id: string;
|
|
2232
|
+
alt: string;
|
|
2233
|
+
src?: string;
|
|
2234
|
+
seed?: string;
|
|
2235
|
+
caption?: string;
|
|
2236
|
+
/** Span in columns (1..3). Use sparingly. */
|
|
2237
|
+
span?: 1 | 2 | 3;
|
|
2238
|
+
/** Taller aspect cell. */
|
|
2239
|
+
tall?: boolean;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
export declare interface LookHotspot {
|
|
2243
|
+
id: string;
|
|
2244
|
+
/** Position (%). */
|
|
2245
|
+
x: number;
|
|
2246
|
+
y: number;
|
|
2247
|
+
productId: string;
|
|
2248
|
+
label?: string;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* LoyaltyPanel — tier, progress-to-next-tier, current points, and a list
|
|
2253
|
+
* of perks with unlocked/locked state.
|
|
2254
|
+
*/
|
|
2255
|
+
export declare function LoyaltyPanel({ programName, memberSince, tiers, currentTierId, points, perks, cta, className, ...rest }: LoyaltyPanelProps): JSX_2.Element;
|
|
2256
|
+
|
|
2257
|
+
export declare interface LoyaltyPanelProps extends HTMLAttributes<HTMLElement> {
|
|
2258
|
+
/** Program name — e.g., "House Circle". */
|
|
2259
|
+
programName?: string;
|
|
2260
|
+
memberSince?: string;
|
|
2261
|
+
/** Ordered low→high. */
|
|
2262
|
+
tiers: LoyaltyTier[];
|
|
2263
|
+
currentTierId: string;
|
|
2264
|
+
points: number;
|
|
2265
|
+
perks?: LoyaltyPerk[];
|
|
2266
|
+
/** Optional call-to-action — e.g., open rewards catalog. */
|
|
2267
|
+
cta?: ReactNode;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
export declare interface LoyaltyPerk {
|
|
2271
|
+
label: string;
|
|
2272
|
+
description?: string;
|
|
2273
|
+
/** Lowest tier that unlocks the perk. Defaults to the first tier. */
|
|
2274
|
+
unlockTierId?: string;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
export declare interface LoyaltyTier {
|
|
2278
|
+
id: string;
|
|
2279
|
+
name: string;
|
|
2280
|
+
/** Points needed to unlock this tier. */
|
|
2281
|
+
threshold: number;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
export declare function MediaPlaceholder({ src, alt, seed, aspectRatio, width, height, className, style, ...rest }: MediaPlaceholderProps): JSX_2.Element;
|
|
2285
|
+
|
|
2286
|
+
export declare interface MediaPlaceholderProps extends HTMLAttributes<HTMLDivElement> {
|
|
2287
|
+
/** If provided, renders an actual <img> instead of the gradient placeholder. */
|
|
2288
|
+
src?: string;
|
|
2289
|
+
/** Alt / label. Shown as overlay text on the gradient and as alt on the img. */
|
|
2290
|
+
alt: string;
|
|
2291
|
+
/** Seed used to pick the gradient pair deterministically. Defaults to alt. */
|
|
2292
|
+
seed?: string;
|
|
2293
|
+
/** CSS aspect ratio (e.g. "4 / 5", "1 / 1"). Defaults to 4 / 5 (portrait product). */
|
|
2294
|
+
aspectRatio?: string;
|
|
2295
|
+
/** Optional explicit size (width/height) via style. */
|
|
2296
|
+
width?: string | number;
|
|
2297
|
+
height?: string | number;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* MegaMenu — multi-column navigation panel. Meant to be rendered by
|
|
2302
|
+
* SiteHeader inside a dropdown; provides the layout only, not the
|
|
2303
|
+
* open/close behaviour.
|
|
2304
|
+
*/
|
|
2305
|
+
export declare function MegaMenu({ columns, features, className, ...rest }: MegaMenuProps): JSX_2.Element;
|
|
2306
|
+
|
|
2307
|
+
export declare interface MegaMenuColumn {
|
|
2308
|
+
id: string;
|
|
2309
|
+
title: string;
|
|
2310
|
+
links: MegaMenuLink[];
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
export declare interface MegaMenuFeature {
|
|
2314
|
+
id: string;
|
|
2315
|
+
title: string;
|
|
2316
|
+
body?: ReactNode;
|
|
2317
|
+
image: {
|
|
2318
|
+
src?: string;
|
|
2319
|
+
alt: string;
|
|
2320
|
+
seed?: string;
|
|
2321
|
+
};
|
|
2322
|
+
cta?: {
|
|
2323
|
+
label: string;
|
|
2324
|
+
onClick?: () => void;
|
|
2325
|
+
};
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
export declare interface MegaMenuLink {
|
|
2329
|
+
id: string;
|
|
2330
|
+
label: string;
|
|
2331
|
+
href?: string;
|
|
2332
|
+
onClick?: () => void;
|
|
2333
|
+
/** Tag rendered next to the label — e.g., "New". */
|
|
2334
|
+
badge?: string;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
export declare interface MegaMenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
2338
|
+
columns: MegaMenuColumn[];
|
|
2339
|
+
/** Featured tile(s) rendered on the right. */
|
|
2340
|
+
features?: MegaMenuFeature[];
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
/**
|
|
2344
|
+
* Menu — dropdown action menu surface.
|
|
2345
|
+
*
|
|
2346
|
+
* Composes MenuItem, MenuDivider, and MenuGroup as children.
|
|
2347
|
+
*
|
|
2348
|
+
* Accessibility:
|
|
2349
|
+
* - role="menu" on the dropdown, role="menuitem" on each item
|
|
2350
|
+
* - Arrow-key navigation between items
|
|
2351
|
+
* - Escape closes the menu
|
|
2352
|
+
* - Focus returns to trigger on close
|
|
2353
|
+
* - Click outside closes the menu
|
|
2354
|
+
* - Healthcare note: ideal for patient action menus, record options,
|
|
2355
|
+
* context menus on rows
|
|
2356
|
+
*/
|
|
2357
|
+
export declare function Menu({ trigger, align, width, className, children, ...props }: MenuProps): JSX_2.Element;
|
|
2358
|
+
|
|
2359
|
+
export declare function MenuDivider(): JSX_2.Element;
|
|
2360
|
+
|
|
2361
|
+
export declare function MenuGroup({ label, children }: MenuGroupProps): JSX_2.Element;
|
|
2362
|
+
|
|
2363
|
+
export declare interface MenuGroupProps {
|
|
2364
|
+
/** Group label */
|
|
2365
|
+
label: string;
|
|
2366
|
+
children: ReactNode;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
export declare function MenuItem({ icon, trailing, disabled, danger, onClick, className, children, ...props }: MenuItemProps): JSX_2.Element;
|
|
2370
|
+
|
|
2371
|
+
export declare interface MenuItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
2372
|
+
/** Leading icon */
|
|
2373
|
+
icon?: ReactNode;
|
|
2374
|
+
/** Trailing content (shortcut, badge, etc.) */
|
|
2375
|
+
trailing?: ReactNode;
|
|
2376
|
+
/** Disabled state */
|
|
2377
|
+
disabled?: boolean;
|
|
2378
|
+
/** Destructive / danger styling */
|
|
2379
|
+
danger?: boolean;
|
|
2380
|
+
/** Click handler */
|
|
2381
|
+
onClick?: (e: MouseEvent_2<HTMLDivElement>) => void;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
export declare interface MenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
2385
|
+
/** The trigger element — a single React element */
|
|
2386
|
+
trigger: ReactNode;
|
|
2387
|
+
/** Horizontal alignment relative to trigger */
|
|
2388
|
+
align?: 'start' | 'end';
|
|
2389
|
+
/** Menu width */
|
|
2390
|
+
width?: number | 'trigger';
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
/**
|
|
2394
|
+
* MiniCart — dropdown/popover cart summary. Typically rendered inside a
|
|
2395
|
+
* CartDrawer or anchored popover from the header bag icon.
|
|
2396
|
+
*
|
|
2397
|
+
* Handles empty state internally; composes CartLineItem and renders a
|
|
2398
|
+
* compact summary footer with view-cart / checkout CTAs.
|
|
2399
|
+
*/
|
|
2400
|
+
export declare function MiniCart({ lines, subtotal, topSlot, onQuantityChange, onRemove, onViewCart, onCheckout, emptyCta, onEmptyCta, className, ...rest }: MiniCartProps): JSX_2.Element;
|
|
2401
|
+
|
|
2402
|
+
export declare interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {
|
|
2403
|
+
lines: CartLine[];
|
|
2404
|
+
subtotal: Money;
|
|
2405
|
+
/** Slot above the list — commonly FreeShippingMeter. */
|
|
2406
|
+
topSlot?: ReactNode;
|
|
2407
|
+
onQuantityChange?: (line: CartLine, next: number) => void;
|
|
2408
|
+
onRemove?: (line: CartLine) => void;
|
|
2409
|
+
onViewCart?: () => void;
|
|
2410
|
+
onCheckout?: () => void;
|
|
2411
|
+
/** Empty-state CTA label. */
|
|
2412
|
+
emptyCta?: string;
|
|
2413
|
+
onEmptyCta?: () => void;
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
/**
|
|
2417
|
+
* Modal / Dialog — overlay dialog for focused interactions.
|
|
2418
|
+
*
|
|
2419
|
+
* Accessibility:
|
|
2420
|
+
* - Uses native <dialog> element for built-in focus trapping and Escape handling
|
|
2421
|
+
* - aria-labelledby links to the title
|
|
2422
|
+
* - Focus is moved into the dialog on open
|
|
2423
|
+
* - Escape key closes the dialog
|
|
2424
|
+
* - Scrim click closes the dialog
|
|
2425
|
+
* - Healthcare note: for destructive actions (e.g., cancel appointment,
|
|
2426
|
+
* delete record), always include clear confirmation language in the
|
|
2427
|
+
* dialog and use danger-variant buttons
|
|
2428
|
+
*/
|
|
2429
|
+
export declare function Modal({ open, onClose, title, size, footer, className, children }: ModalProps & {
|
|
2430
|
+
children?: ReactNode;
|
|
2431
|
+
}): JSX_2.Element;
|
|
2432
|
+
|
|
2433
|
+
export declare interface ModalProps {
|
|
2434
|
+
/** Additional className */
|
|
2435
|
+
className?: string;
|
|
2436
|
+
/** Whether the modal is visible */
|
|
2437
|
+
open: boolean;
|
|
2438
|
+
/** Called when the modal should close */
|
|
2439
|
+
onClose: () => void;
|
|
2440
|
+
/** Modal title (rendered in header) */
|
|
2441
|
+
title: ReactNode;
|
|
2442
|
+
/** Max width */
|
|
2443
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
2444
|
+
/** Footer actions */
|
|
2445
|
+
footer?: ReactNode;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
export declare const modalSize: {
|
|
2449
|
+
readonly sm: "400px";
|
|
2450
|
+
readonly md: "560px";
|
|
2451
|
+
readonly lg: "720px";
|
|
2452
|
+
readonly xl: "880px";
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
export declare interface Money {
|
|
2456
|
+
/** Amount in major units (e.g. dollars, not cents). */
|
|
2457
|
+
amount: number;
|
|
2458
|
+
currency: CurrencyCode;
|
|
2459
|
+
/** Optional pre-formatted display override. Falls back to Intl.NumberFormat. */
|
|
2460
|
+
display?: string;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* MultiSelect — multi-value select with tags and dropdown checkboxes.
|
|
2465
|
+
*
|
|
2466
|
+
* Accessibility:
|
|
2467
|
+
* - Uses role="combobox" with aria-expanded
|
|
2468
|
+
* - Dropdown uses role="listbox" with role="option" items
|
|
2469
|
+
* - Tags are removable via keyboard (Backspace removes last)
|
|
2470
|
+
* - Escape closes dropdown, focus remains on control
|
|
2471
|
+
*/
|
|
2472
|
+
export declare function MultiSelect({ options, value, onChange, placeholder, disabled, error, size, maxDisplayedTags, className, }: MultiSelectProps): JSX_2.Element;
|
|
2473
|
+
|
|
2474
|
+
export declare interface MultiSelectOption {
|
|
2475
|
+
value: string;
|
|
2476
|
+
label: string;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
export declare interface MultiSelectProps {
|
|
2480
|
+
/** Available options */
|
|
2481
|
+
options: MultiSelectOption[];
|
|
2482
|
+
/** Currently selected values */
|
|
2483
|
+
value?: string[];
|
|
2484
|
+
/** Change handler — receives updated array of selected values */
|
|
2485
|
+
onChange?: (value: string[]) => void;
|
|
2486
|
+
/** Placeholder text */
|
|
2487
|
+
placeholder?: string;
|
|
2488
|
+
/** Disabled state */
|
|
2489
|
+
disabled?: boolean;
|
|
2490
|
+
/** Error state */
|
|
2491
|
+
error?: boolean;
|
|
2492
|
+
/** Size variant */
|
|
2493
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2494
|
+
/** Maximum number of tags visible before showing "+N more" */
|
|
2495
|
+
maxDisplayedTags?: number;
|
|
2496
|
+
/** Additional CSS class */
|
|
2497
|
+
className?: string;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
export declare interface NavItem {
|
|
2501
|
+
id: string;
|
|
2502
|
+
label: string;
|
|
2503
|
+
href?: string;
|
|
2504
|
+
onClick?: () => void;
|
|
2505
|
+
/** When provided, this item becomes a mega-menu trigger. */
|
|
2506
|
+
megaMenu?: {
|
|
2507
|
+
columns: MegaMenuColumn[];
|
|
2508
|
+
features?: MegaMenuFeature[];
|
|
2509
|
+
};
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
/** Neutral palette — Oat / Ecru / Ink. Warm undertone throughout. */
|
|
2513
|
+
export declare const neutral: {
|
|
2514
|
+
readonly 0: "#FFFFFF";
|
|
2515
|
+
readonly 25: "#FBF9F4";
|
|
2516
|
+
readonly 50: "#F4F2EC";
|
|
2517
|
+
readonly 100: "#ECE7DC";
|
|
2518
|
+
readonly 200: "#D9D2C1";
|
|
2519
|
+
readonly 300: "#B8AE97";
|
|
2520
|
+
readonly 400: "#8A816B";
|
|
2521
|
+
readonly 500: "#5E5749";
|
|
2522
|
+
readonly 600: "#433D32";
|
|
2523
|
+
readonly 700: "#2E2A23";
|
|
2524
|
+
readonly 800: "#1F1C17";
|
|
2525
|
+
readonly 900: "#131110";
|
|
2526
|
+
};
|
|
2527
|
+
|
|
2528
|
+
/**
|
|
2529
|
+
* NewsletterSignup — email-capture form for footers, promo modals, and
|
|
2530
|
+
* checkout thank-you pages. Manages submitting/success/error state internally
|
|
2531
|
+
* unless `status` is provided.
|
|
2532
|
+
*/
|
|
2533
|
+
export declare function NewsletterSignup({ title, copy, placeholder, submitLabel, consent, status: statusProp, successMessage, errorMessage, onSubscribe, variant, className, ...rest }: NewsletterSignupProps): JSX_2.Element;
|
|
2534
|
+
|
|
2535
|
+
export declare interface NewsletterSignupProps extends Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit' | 'title'> {
|
|
2536
|
+
title?: ReactNode;
|
|
2537
|
+
copy?: ReactNode;
|
|
2538
|
+
placeholder?: string;
|
|
2539
|
+
submitLabel?: string;
|
|
2540
|
+
consent?: ReactNode;
|
|
2541
|
+
/** Controlled status — when provided, overrides internal state. */
|
|
2542
|
+
status?: NewsletterStatus;
|
|
2543
|
+
successMessage?: ReactNode;
|
|
2544
|
+
errorMessage?: ReactNode;
|
|
2545
|
+
onSubscribe?: (email: string) => void;
|
|
2546
|
+
variant?: 'inline' | 'stacked';
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
export declare type NewsletterStatus = 'idle' | 'submitting' | 'success' | 'error';
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* NumberField — numeric input with increment/decrement buttons.
|
|
2553
|
+
*
|
|
2554
|
+
* Accessibility:
|
|
2555
|
+
* - Uses native input[type="number"] for spinbutton role
|
|
2556
|
+
* - Increment/decrement buttons have aria-labels
|
|
2557
|
+
* - Buttons are hidden from tab order (input handles keyboard)
|
|
2558
|
+
* - min/max constraints are communicated to AT
|
|
2559
|
+
*/
|
|
2560
|
+
export declare const NumberField: ForwardRefExoticComponent<NumberFieldProps & RefAttributes<HTMLInputElement>>;
|
|
2561
|
+
|
|
2562
|
+
export declare interface NumberFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange' | 'value' | 'prefix'> {
|
|
2563
|
+
/** Current numeric value */
|
|
2564
|
+
value?: number;
|
|
2565
|
+
/** Change handler */
|
|
2566
|
+
onChange?: (value: number) => void;
|
|
2567
|
+
/** Minimum allowed value */
|
|
2568
|
+
min?: number;
|
|
2569
|
+
/** Maximum allowed value */
|
|
2570
|
+
max?: number;
|
|
2571
|
+
/** Increment step */
|
|
2572
|
+
step?: number;
|
|
2573
|
+
/** Size variant */
|
|
2574
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2575
|
+
/** Error state */
|
|
2576
|
+
error?: boolean;
|
|
2577
|
+
/** Prefix text (e.g., "$") */
|
|
2578
|
+
prefix?: string;
|
|
2579
|
+
/** Suffix text (e.g., "mg") */
|
|
2580
|
+
suffix?: string;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
export declare const opacity: {
|
|
2584
|
+
readonly disabled: 0.48;
|
|
2585
|
+
readonly subtle: 0.72;
|
|
2586
|
+
readonly overlay: 0.48;
|
|
2587
|
+
readonly scrimStrong: 0.64;
|
|
2588
|
+
};
|
|
2589
|
+
|
|
2590
|
+
export declare interface Order {
|
|
2591
|
+
id: string;
|
|
2592
|
+
placedAt: string;
|
|
2593
|
+
status: OrderStatus;
|
|
2594
|
+
total: Money;
|
|
2595
|
+
lines: OrderLine[];
|
|
2596
|
+
shippingAddress?: Address;
|
|
2597
|
+
tracking?: {
|
|
2598
|
+
carrier: string;
|
|
2599
|
+
number: string;
|
|
2600
|
+
url?: string;
|
|
2601
|
+
estimatedDelivery?: string;
|
|
2602
|
+
};
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
/**
|
|
2606
|
+
* OrderConfirmation — post-purchase "thank you" page. Presents a clear
|
|
2607
|
+
* confirmation, delivery summary, and an itemised receipt.
|
|
2608
|
+
*/
|
|
2609
|
+
export declare function OrderConfirmation({ orderNumber, email, headline, estimatedDelivery, shippingAddress, lines, subtotal, adjustments, total, ctaSlot, extraSlot, className, ...rest }: OrderConfirmationProps): JSX_2.Element;
|
|
2610
|
+
|
|
2611
|
+
export declare interface OrderConfirmationProps extends HTMLAttributes<HTMLDivElement> {
|
|
2612
|
+
orderNumber: string;
|
|
2613
|
+
email: string;
|
|
2614
|
+
/** Headline — defaults to a friendly thank-you. */
|
|
2615
|
+
headline?: string;
|
|
2616
|
+
/** Estimated arrival window copy — e.g. "April 24 – April 26". */
|
|
2617
|
+
estimatedDelivery?: string;
|
|
2618
|
+
shippingAddress?: Address;
|
|
2619
|
+
lines: CartLine[];
|
|
2620
|
+
subtotal: Money;
|
|
2621
|
+
adjustments?: CartSummaryLine[];
|
|
2622
|
+
total: Money;
|
|
2623
|
+
/** CTA slot — e.g. "Track order" link, "Continue shopping" button. */
|
|
2624
|
+
ctaSlot?: ReactNode;
|
|
2625
|
+
/** Optional post-purchase cross-sell or reassurance below the summary. */
|
|
2626
|
+
extraSlot?: ReactNode;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* OrderHistoryList — stacked card list of past orders. Each card shows a
|
|
2631
|
+
* compact header (status, date, total, number), a thumbnail strip of the
|
|
2632
|
+
* first few items, and a row of contextual actions.
|
|
2633
|
+
*/
|
|
2634
|
+
export declare function OrderHistoryList({ orders, title, onSelectOrder, onReorder, onTrack, previewCount, className, ...rest }: OrderHistoryListProps): JSX_2.Element;
|
|
2635
|
+
|
|
2636
|
+
export declare interface OrderHistoryListProps extends HTMLAttributes<HTMLElement> {
|
|
2637
|
+
orders: Order[];
|
|
2638
|
+
title?: string;
|
|
2639
|
+
onSelectOrder?: (order: Order) => void;
|
|
2640
|
+
onReorder?: (order: Order) => void;
|
|
2641
|
+
onTrack?: (order: Order) => void;
|
|
2642
|
+
/** Max previews rendered inline — defaults to 3. */
|
|
2643
|
+
previewCount?: number;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
export declare interface OrderLine {
|
|
2647
|
+
id: string;
|
|
2648
|
+
title: string;
|
|
2649
|
+
brand?: string;
|
|
2650
|
+
image?: ProductImage;
|
|
2651
|
+
price: Money;
|
|
2652
|
+
quantity: number;
|
|
2653
|
+
options?: CartLineOption[];
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
export declare type OrderStatus = 'placed' | 'processing' | 'shipped' | 'out-for-delivery' | 'delivered' | 'cancelled' | 'returned';
|
|
2657
|
+
|
|
2658
|
+
/**
|
|
2659
|
+
* OrderTracking — carrier, ETA and a step-by-step timeline for an in-flight
|
|
2660
|
+
* order. Renders a hero row with carrier + tracking number actions, a big
|
|
2661
|
+
* "arriving" callout and a vertical timeline with past/current/upcoming steps.
|
|
2662
|
+
*/
|
|
2663
|
+
export declare function OrderTracking({ order, events, onCopyTrackingNumber, onOpenCarrier, className, ...rest }: OrderTrackingProps): JSX_2.Element;
|
|
2664
|
+
|
|
2665
|
+
export declare interface OrderTrackingProps extends HTMLAttributes<HTMLElement> {
|
|
2666
|
+
order: Order;
|
|
2667
|
+
/** Event history (latest last). When omitted, a default timeline is
|
|
2668
|
+
* synthesized from `order.status`. */
|
|
2669
|
+
events?: TrackingEvent[];
|
|
2670
|
+
onCopyTrackingNumber?: () => void;
|
|
2671
|
+
onOpenCarrier?: () => void;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
/**
|
|
2675
|
+
* OTPInput — code/OTP input with separate boxes that auto-advance.
|
|
2676
|
+
*
|
|
2677
|
+
* Accessibility:
|
|
2678
|
+
* - Each digit input has aria-label describing its position
|
|
2679
|
+
* - Supports keyboard navigation (Backspace moves to previous)
|
|
2680
|
+
* - Paste support fills all boxes at once
|
|
2681
|
+
* - Error state communicated via aria-invalid
|
|
2682
|
+
*/
|
|
2683
|
+
export declare function OTPInput({ length, value, onChange, error, disabled, autoFocus, className, }: OTPInputProps): JSX_2.Element;
|
|
2684
|
+
|
|
2685
|
+
export declare interface OTPInputProps {
|
|
2686
|
+
/** Number of OTP digits */
|
|
2687
|
+
length?: number;
|
|
2688
|
+
/** Current value string */
|
|
2689
|
+
value?: string;
|
|
2690
|
+
/** Change handler — receives the full OTP string */
|
|
2691
|
+
onChange?: (value: string) => void;
|
|
2692
|
+
/** Error state */
|
|
2693
|
+
error?: boolean;
|
|
2694
|
+
/** Disabled state */
|
|
2695
|
+
disabled?: boolean;
|
|
2696
|
+
/** Auto-focus first input on mount */
|
|
2697
|
+
autoFocus?: boolean;
|
|
2698
|
+
/** Additional CSS class */
|
|
2699
|
+
className?: string;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
/**
|
|
2703
|
+
* Pagination — page navigation for paginated data.
|
|
2704
|
+
*
|
|
2705
|
+
* Accessibility:
|
|
2706
|
+
* - Wraps in <nav> with aria-label="Pagination"
|
|
2707
|
+
* - Current page indicated with aria-current="page"
|
|
2708
|
+
* - Previous/Next buttons disabled at boundaries
|
|
2709
|
+
* - Healthcare note: use pagination for patient lists, lab results,
|
|
2710
|
+
* and audit logs to keep pages manageable
|
|
2711
|
+
*/
|
|
2712
|
+
export declare function Pagination({ currentPage, totalPages, onPageChange, siblingCount, size, className, ...props }: PaginationProps): JSX_2.Element | null;
|
|
2713
|
+
|
|
2714
|
+
export declare interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
2715
|
+
/** Current active page (1-based) */
|
|
2716
|
+
currentPage: number;
|
|
2717
|
+
/** Total number of pages */
|
|
2718
|
+
totalPages: number;
|
|
2719
|
+
/** Callback when page changes */
|
|
2720
|
+
onPageChange: (page: number) => void;
|
|
2721
|
+
/** Number of sibling pages to show around the current page */
|
|
2722
|
+
siblingCount?: number;
|
|
2723
|
+
/** Size variant */
|
|
2724
|
+
size?: 'sm' | 'md';
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
/**
|
|
2728
|
+
* Paper — the foundational surface primitive.
|
|
2729
|
+
*
|
|
2730
|
+
* Paper provides a styled surface (background, border, shadow, radius)
|
|
2731
|
+
* without any layout opinions. It is the atom from which Card, Modal
|
|
2732
|
+
* content areas, Drawer panels, and other surface components compose.
|
|
2733
|
+
*
|
|
2734
|
+
* Accessibility:
|
|
2735
|
+
* - Paper is a visual primitive with no semantic role by default
|
|
2736
|
+
* - Use the `as` prop to select the correct semantic element
|
|
2737
|
+
* - Add `role` and `aria-label` when the surface represents a landmark
|
|
2738
|
+
*/
|
|
2739
|
+
export declare const Paper: ForwardRefExoticComponent<PaperProps & RefAttributes<HTMLDivElement>>;
|
|
2740
|
+
|
|
2741
|
+
export declare interface PaperProps extends HTMLAttributes<HTMLDivElement> {
|
|
2742
|
+
/** Surface background */
|
|
2743
|
+
surface?: 'default' | 'subtle' | 'canvas' | 'raised' | 'overlay';
|
|
2744
|
+
/** Elevation level (shadow depth) */
|
|
2745
|
+
elevation?: 0 | 1 | 2 | 3 | 4;
|
|
2746
|
+
/** Border radius preset */
|
|
2747
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2748
|
+
/** Whether to render a border */
|
|
2749
|
+
bordered?: boolean;
|
|
2750
|
+
/** Padding preset */
|
|
2751
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
2752
|
+
/** Render as a different HTML element */
|
|
2753
|
+
as?: 'div' | 'section' | 'article' | 'aside' | 'header' | 'footer';
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
export declare type PaymentBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'paypal' | 'apple-pay' | 'google-pay' | 'shop-pay' | 'klarna' | 'afterpay';
|
|
2757
|
+
|
|
2758
|
+
export declare type PaymentChannel = 'card' | 'paypal' | 'apple-pay' | 'klarna' | 'afterpay';
|
|
2759
|
+
|
|
2760
|
+
/**
|
|
2761
|
+
* PaymentConfidence — payment-brand rail plus a secure-checkout reassurance
|
|
2762
|
+
* block. Typically placed in a cart sidebar, checkout footer, or site footer.
|
|
2763
|
+
*/
|
|
2764
|
+
export declare function PaymentConfidence({ brands, headline, compliance, layout, className, ...rest }: PaymentConfidenceProps): JSX_2.Element;
|
|
2765
|
+
|
|
2766
|
+
export declare interface PaymentConfidenceProps extends HTMLAttributes<HTMLElement> {
|
|
2767
|
+
/** Brands to display as chips. Defaults to a standard set. */
|
|
2768
|
+
brands?: PaymentBrand[];
|
|
2769
|
+
/** Lead-in copy. */
|
|
2770
|
+
headline?: string;
|
|
2771
|
+
/** Optional compliance line. */
|
|
2772
|
+
compliance?: ReactNode;
|
|
2773
|
+
/** Layout — `rail` = brand row with secure chip; `stack` = split headline + chips below. */
|
|
2774
|
+
layout?: 'rail' | 'stack';
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
export declare interface PaymentMethod {
|
|
2778
|
+
id: string;
|
|
2779
|
+
brand: PaymentBrand;
|
|
2780
|
+
label: string;
|
|
2781
|
+
last4?: string;
|
|
2782
|
+
expires?: string;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
/**
|
|
2786
|
+
* PaymentMethodSelector — channel chooser (card, PayPal, wallets, BNPL)
|
|
2787
|
+
* plus a saved-card list when the card channel is active.
|
|
2788
|
+
*
|
|
2789
|
+
* The actual card form is not rendered here — compose a separate form (or
|
|
2790
|
+
* a PSP element) next to it, gated by `value === 'card'` and `!savedMethodId`.
|
|
2791
|
+
*/
|
|
2792
|
+
export declare function PaymentMethodSelector({ channels, value, onChange, savedMethods, savedMethodId, onSavedMethodChange, onUseNewCard, title, className, ...rest }: PaymentMethodSelectorProps): JSX_2.Element;
|
|
2793
|
+
|
|
2794
|
+
export declare interface PaymentMethodSelectorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
2795
|
+
/** Available channels (in display order). */
|
|
2796
|
+
channels?: PaymentChannel[];
|
|
2797
|
+
value?: PaymentChannel;
|
|
2798
|
+
onChange?: (channel: PaymentChannel) => void;
|
|
2799
|
+
/** Previously saved cards — shown under the "card" option. */
|
|
2800
|
+
savedMethods?: PaymentMethod[];
|
|
2801
|
+
savedMethodId?: string;
|
|
2802
|
+
onSavedMethodChange?: (method: PaymentMethod) => void;
|
|
2803
|
+
/** Called when the user opts into a new card (clears `savedMethodId` upstream). */
|
|
2804
|
+
onUseNewCard?: () => void;
|
|
2805
|
+
title?: string;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* PaymentMethodsList — saved cards and wallets with default badge and
|
|
2810
|
+
* per-row edit/remove/set-default actions. Includes a final "Add payment
|
|
2811
|
+
* method" row.
|
|
2812
|
+
*/
|
|
2813
|
+
export declare function PaymentMethodsList({ methods, defaultMethodId, title, onEdit, onRemove, onSetDefault, onAdd, className, ...rest }: PaymentMethodsListProps): JSX_2.Element;
|
|
2814
|
+
|
|
2815
|
+
export declare interface PaymentMethodsListProps extends HTMLAttributes<HTMLElement> {
|
|
2816
|
+
methods: PaymentMethod[];
|
|
2817
|
+
defaultMethodId?: string;
|
|
2818
|
+
title?: string;
|
|
2819
|
+
onEdit?: (method: PaymentMethod) => void;
|
|
2820
|
+
onRemove?: (method: PaymentMethod) => void;
|
|
2821
|
+
onSetDefault?: (method: PaymentMethod) => void;
|
|
2822
|
+
onAdd?: () => void;
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
export declare interface PDPSection {
|
|
2826
|
+
id: string;
|
|
2827
|
+
content: ReactNode;
|
|
2828
|
+
/** Render on a muted background (good for reviews, cross-sell, trust). */
|
|
2829
|
+
muted?: boolean;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
/** Percent savings between compareAt and price. Returns rounded integer or null. */
|
|
2833
|
+
export declare function percentOff(price: Money, compareAt?: Money): number | null;
|
|
2834
|
+
|
|
2835
|
+
/**
|
|
2836
|
+
* Popover — positioned overlay content triggered by a reference element.
|
|
2837
|
+
*
|
|
2838
|
+
* Accessibility:
|
|
2839
|
+
* - Escape key closes the popover
|
|
2840
|
+
* - Focus is managed: moves into popover on open, returns on close
|
|
2841
|
+
* - Click outside closes the popover
|
|
2842
|
+
* - Healthcare note: use for additional context like patient quick-view,
|
|
2843
|
+
* medication details, or field-level help without navigating away
|
|
2844
|
+
*/
|
|
2845
|
+
export declare function Popover({ trigger, content, open: controlledOpen, onOpenChange, placement, align, className, ...props }: PopoverProps): JSX_2.Element;
|
|
2846
|
+
|
|
2847
|
+
export declare interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
2848
|
+
/** Trigger element that opens the popover */
|
|
2849
|
+
trigger: ReactNode;
|
|
2850
|
+
/** Content rendered inside the popover */
|
|
2851
|
+
content: ReactNode;
|
|
2852
|
+
/** Controlled open state */
|
|
2853
|
+
open?: boolean;
|
|
2854
|
+
/** Callback when open state changes */
|
|
2855
|
+
onOpenChange?: (open: boolean) => void;
|
|
2856
|
+
/** Placement relative to the trigger */
|
|
2857
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
2858
|
+
/** Alignment along the placement axis */
|
|
2859
|
+
align?: 'start' | 'center' | 'end';
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
/**
|
|
2863
|
+
* Portal — renders children into a DOM node outside the parent hierarchy.
|
|
2864
|
+
*
|
|
2865
|
+
* Use for overlays, tooltips, modals, and other floating content that
|
|
2866
|
+
* needs to escape stacking context or overflow constraints.
|
|
2867
|
+
*
|
|
2868
|
+
* Falls back to inline rendering during SSR or when disabled.
|
|
2869
|
+
*
|
|
2870
|
+
* Accessibility:
|
|
2871
|
+
* - Portal does not affect the accessibility tree
|
|
2872
|
+
* - Focus management is the responsibility of the portal content
|
|
2873
|
+
* - Ensure ARIA relationships (aria-describedby, aria-labelledby)
|
|
2874
|
+
* still work across the portal boundary
|
|
2875
|
+
*/
|
|
2876
|
+
export declare function Portal({ children, container, disabled }: PortalProps): JSX_2.Element;
|
|
2877
|
+
|
|
2878
|
+
export declare interface PortalProps {
|
|
2879
|
+
/** Content to render in the portal */
|
|
2880
|
+
children: ReactNode;
|
|
2881
|
+
/** Target container element (defaults to document.body) */
|
|
2882
|
+
container?: Element | null;
|
|
2883
|
+
/** Whether the portal is active (renders inline when false) */
|
|
2884
|
+
disabled?: boolean;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
export declare interface PressQuote {
|
|
2888
|
+
id: string;
|
|
2889
|
+
source: string;
|
|
2890
|
+
quote: string;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
/**
|
|
2894
|
+
* PriceBlock — canonical way to render a price in Bazaar.
|
|
2895
|
+
*
|
|
2896
|
+
* Handles current + compare-at + percent-off with consistent hierarchy,
|
|
2897
|
+
* so cards, buy boxes, cart lines, and summaries all feel the same.
|
|
2898
|
+
*/
|
|
2899
|
+
export declare function PriceBlock({ price, compareAtPrice, from, showPercent, size, stacked, locale, className, ...rest }: PriceBlockProps): JSX_2.Element;
|
|
2900
|
+
|
|
2901
|
+
export declare interface PriceBlockProps extends HTMLAttributes<HTMLDivElement> {
|
|
2902
|
+
price: Money;
|
|
2903
|
+
compareAtPrice?: Money;
|
|
2904
|
+
/** Show a "From" prefix — useful when a product has a price range across variants. */
|
|
2905
|
+
from?: boolean;
|
|
2906
|
+
/** Show a percent-off pill when compareAtPrice is present. */
|
|
2907
|
+
showPercent?: boolean;
|
|
2908
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
2909
|
+
/** Stack current price above compareAt + percent on a second line. */
|
|
2910
|
+
stacked?: boolean;
|
|
2911
|
+
locale?: string;
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
export declare interface Product {
|
|
2915
|
+
id: string;
|
|
2916
|
+
slug?: string;
|
|
2917
|
+
name: string;
|
|
2918
|
+
brand?: string;
|
|
2919
|
+
price: Money;
|
|
2920
|
+
compareAtPrice?: Money;
|
|
2921
|
+
rating?: RatingSummary;
|
|
2922
|
+
images: ProductImage[];
|
|
2923
|
+
badges?: ProductBadgeData[];
|
|
2924
|
+
/** Short one-liner for cards and rails. */
|
|
2925
|
+
tagline?: string;
|
|
2926
|
+
/** Long-form description for PDP. */
|
|
2927
|
+
description?: string;
|
|
2928
|
+
variants?: VariantAxis[];
|
|
2929
|
+
inStock?: boolean;
|
|
2930
|
+
categories?: string[];
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* ProductBadge — compact merchandising badge for cards, tiles, and PDPs.
|
|
2935
|
+
* Differs from the generic <Badge /> in that it uses commerce-specific tones
|
|
2936
|
+
* (new, sale, bestSeller, lowStock, soldOut, exclusive) and typography suited
|
|
2937
|
+
* to overlaying product imagery.
|
|
2938
|
+
*/
|
|
2939
|
+
export declare function ProductBadge({ label, tone, size, className, ...rest }: ProductBadgeProps): JSX_2.Element;
|
|
2940
|
+
|
|
2941
|
+
export declare interface ProductBadgeData {
|
|
2942
|
+
label: string;
|
|
2943
|
+
tone?: ProductBadgeTone;
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
export declare interface ProductBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
2947
|
+
label: string;
|
|
2948
|
+
tone?: ProductBadgeTone;
|
|
2949
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
export declare type ProductBadgeTone = 'new' | 'sale' | 'bestSeller' | 'lowStock' | 'soldOut' | 'exclusive';
|
|
2953
|
+
|
|
2954
|
+
/**
|
|
2955
|
+
* ProductBuyBox — composite that orchestrates PriceBlock, VariantSelectors,
|
|
2956
|
+
* quantity, CTAs, and trust signals for a product detail page.
|
|
2957
|
+
*
|
|
2958
|
+
* Controlled variant selection: pass `selection` + `onVariantChange`. The
|
|
2959
|
+
* component does not enforce a "complete selection required to buy" rule —
|
|
2960
|
+
* wire that in via the parent if needed.
|
|
2961
|
+
*/
|
|
2962
|
+
export declare function ProductBuyBox({ product, selection, onVariantChange, inventory, wishlisted, onWishlistToggle, onAddToCart, ctaLabel, reassuranceSlot, showQuantity, expressSlot, className, ...rest }: ProductBuyBoxProps): JSX_2.Element;
|
|
2963
|
+
|
|
2964
|
+
export declare interface ProductBuyBoxProps extends HTMLAttributes<HTMLDivElement> {
|
|
2965
|
+
product: Product;
|
|
2966
|
+
/** Selected variant values keyed by axis name (e.g. { Color: 'sand', Size: 'm' }). */
|
|
2967
|
+
selection?: Record<string, string>;
|
|
2968
|
+
onVariantChange?: (axisName: string, option: VariantOption) => void;
|
|
2969
|
+
inventory?: InventoryState;
|
|
2970
|
+
wishlisted?: boolean;
|
|
2971
|
+
onWishlistToggle?: (product: Product) => void;
|
|
2972
|
+
onAddToCart?: (product: Product, quantity: number) => void;
|
|
2973
|
+
/** Optional alternate primary CTA label (e.g. "Pre-order", "Notify me"). */
|
|
2974
|
+
ctaLabel?: string;
|
|
2975
|
+
/** Slot below the CTA — commonly used for ShippingReassurance. */
|
|
2976
|
+
reassuranceSlot?: ReactNode;
|
|
2977
|
+
/** Helper content above variants (e.g. color: "Sand"). Auto-generated by default. */
|
|
2978
|
+
showQuantity?: boolean;
|
|
2979
|
+
/** Render an Express Checkout block (Apple Pay, PayPal, etc.) above the main CTA. */
|
|
2980
|
+
expressSlot?: ReactNode;
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
/**
|
|
2984
|
+
* ProductCard — image-first merchandising tile.
|
|
2985
|
+
*
|
|
2986
|
+
* Composes MediaPlaceholder, ProductBadge, PriceBlock, and ReviewsSummary
|
|
2987
|
+
* into the canonical Bazaar product presentation. Quick actions (wishlist,
|
|
2988
|
+
* quick view, quick add) appear on hover or focus.
|
|
2989
|
+
*/
|
|
2990
|
+
export declare function ProductCard({ product, href, onSelect, wishlisted, onWishlistToggle, onQuickView, onQuickAdd, hideQuickAdd, size, density, mediaAspectRatio, className, ...rest }: ProductCardProps): JSX_2.Element;
|
|
2991
|
+
|
|
2992
|
+
export declare interface ProductCardProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'onSelect'> {
|
|
2993
|
+
product: Product;
|
|
2994
|
+
/** Card element renders as <a> when provided, otherwise <article>. */
|
|
2995
|
+
href?: string;
|
|
2996
|
+
/** Called when the card surface is clicked. */
|
|
2997
|
+
onSelect?: (product: Product) => void;
|
|
2998
|
+
/** Wishlist state — controlled. */
|
|
2999
|
+
wishlisted?: boolean;
|
|
3000
|
+
onWishlistToggle?: (product: Product) => void;
|
|
3001
|
+
onQuickView?: (product: Product) => void;
|
|
3002
|
+
onQuickAdd?: (product: Product) => void;
|
|
3003
|
+
/** Hide the hover "Quick add" button. */
|
|
3004
|
+
hideQuickAdd?: boolean;
|
|
3005
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3006
|
+
/** Visual density — "minimal" hides brand, tagline, quick-add (editorial pages). */
|
|
3007
|
+
density?: 'default' | 'minimal';
|
|
3008
|
+
/** Aspect ratio for the media area. Defaults to 4/5 (portrait) for apparel. */
|
|
3009
|
+
mediaAspectRatio?: string;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* ProductDetailPageTemplate — PDP shell. Gallery on the left, sticky
|
|
3014
|
+
* buy box on the right, scrollable sections (details, reviews,
|
|
3015
|
+
* recommendations) below, with optional mobile ATC pinned to the bottom.
|
|
3016
|
+
*/
|
|
3017
|
+
export declare function ProductDetailPageTemplate({ header, footer, breadcrumbs, gallery, buyBox, sections, mobileAtc, className, ...rest }: ProductDetailPageTemplateProps): JSX_2.Element;
|
|
3018
|
+
|
|
3019
|
+
export declare interface ProductDetailPageTemplateProps extends HTMLAttributes<HTMLDivElement> {
|
|
3020
|
+
header?: ReactNode;
|
|
3021
|
+
footer?: ReactNode;
|
|
3022
|
+
breadcrumbs?: ReactNode;
|
|
3023
|
+
/** Main gallery — typically ProductMediaGallery. */
|
|
3024
|
+
gallery: ReactNode;
|
|
3025
|
+
/** Sticky right-rail buy box — typically ProductBuyBox. */
|
|
3026
|
+
buyBox: ReactNode;
|
|
3027
|
+
/** Scrollable sections below the fold — details, reviews, cross-sell. */
|
|
3028
|
+
sections?: PDPSection[];
|
|
3029
|
+
/** Fixed mobile ATC — typically StickyMobileATC. */
|
|
3030
|
+
mobileAtc?: ReactNode;
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3033
|
+
/**
|
|
3034
|
+
* ProductDetailsAccordion — stacked disclosure sections for long-form PDP
|
|
3035
|
+
* content: description, materials, care, shipping, returns.
|
|
3036
|
+
*/
|
|
3037
|
+
export declare function ProductDetailsAccordion({ sections, allowMultiple, className, ...rest }: ProductDetailsAccordionProps): JSX_2.Element;
|
|
3038
|
+
|
|
3039
|
+
export declare interface ProductDetailsAccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
3040
|
+
sections: ProductDetailsSection[];
|
|
3041
|
+
/** Allow multiple sections open at once (default true). */
|
|
3042
|
+
allowMultiple?: boolean;
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
export declare interface ProductDetailsSection {
|
|
3046
|
+
id: string;
|
|
3047
|
+
title: string;
|
|
3048
|
+
/** Rendered content — body copy, spec tables, care instructions, etc. */
|
|
3049
|
+
content: ReactNode;
|
|
3050
|
+
/** Start expanded. */
|
|
3051
|
+
defaultOpen?: boolean;
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3054
|
+
/**
|
|
3055
|
+
* ProductGrid — responsive grid shell for ProductCards.
|
|
3056
|
+
*
|
|
3057
|
+
* Unopinionated about what lives inside so it can also host recommendation
|
|
3058
|
+
* rails, editorial tiles, or empty-state placeholders.
|
|
3059
|
+
*/
|
|
3060
|
+
export declare function ProductGrid({ columns, mdColumns, smColumns, density, className, style, children, ...rest }: ProductGridProps): JSX_2.Element;
|
|
3061
|
+
|
|
3062
|
+
export declare interface ProductGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
3063
|
+
/** Desktop column count (default 4). Responsive breakpoints downshift to `mdColumns` and `smColumns`. */
|
|
3064
|
+
columns?: 2 | 3 | 4 | 5 | 6;
|
|
3065
|
+
mdColumns?: 2 | 3 | 4;
|
|
3066
|
+
smColumns?: 1 | 2;
|
|
3067
|
+
density?: 'default' | 'loose' | 'tight';
|
|
3068
|
+
children?: ReactNode;
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
export declare interface ProductImage {
|
|
3072
|
+
src?: string;
|
|
3073
|
+
alt: string;
|
|
3074
|
+
/** Optional background gradient seed (used by <MediaPlaceholder /> for label gradients). */
|
|
3075
|
+
seed?: string;
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
/**
|
|
3079
|
+
* ProductMediaGallery — hero image plus thumbnail strip with keyboard nav.
|
|
3080
|
+
*
|
|
3081
|
+
* Uncontrolled active index with arrow-key support; pair with a Lightbox
|
|
3082
|
+
* via the `onZoom` callback to open a zoomed view.
|
|
3083
|
+
*/
|
|
3084
|
+
export declare function ProductMediaGallery({ images, thumbLayout, aspectRatio, onZoom, videoIndex, className, ...rest }: ProductMediaGalleryProps): JSX_2.Element;
|
|
3085
|
+
|
|
3086
|
+
export declare interface ProductMediaGalleryProps extends HTMLAttributes<HTMLDivElement> {
|
|
3087
|
+
images: ProductImage[];
|
|
3088
|
+
/** Thumbnail layout — left rail (desktop) or below (mobile-first). */
|
|
3089
|
+
thumbLayout?: 'left' | 'below';
|
|
3090
|
+
/** CSS aspect-ratio for the hero tile. */
|
|
3091
|
+
aspectRatio?: string;
|
|
3092
|
+
onZoom?: (index: number) => void;
|
|
3093
|
+
/** Index of a video frame (rendered with a play-indicator overlay). */
|
|
3094
|
+
videoIndex?: number;
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
/**
|
|
3098
|
+
* Progress — horizontal bar indicating completion or progress.
|
|
3099
|
+
*
|
|
3100
|
+
* Accessibility:
|
|
3101
|
+
* - role="progressbar" with aria-valuenow, aria-valuemin, aria-valuemax
|
|
3102
|
+
* - aria-label derived from the label prop
|
|
3103
|
+
* - Useful for course progress, lesson completion, multi-step forms,
|
|
3104
|
+
* onboarding flows, and any "X of Y complete" surface
|
|
3105
|
+
*/
|
|
3106
|
+
export declare function Progress({ value, max, size, variant, label, showValue, className, ...props }: ProgressProps): JSX_2.Element;
|
|
3107
|
+
|
|
3108
|
+
/** Bazaar-specific progress tokens */
|
|
3109
|
+
export declare const progress: {
|
|
3110
|
+
readonly track: "#ECE7DC";
|
|
3111
|
+
readonly fillDefault: "#1F1C17";
|
|
3112
|
+
readonly fillSuccess: "#4A7C59";
|
|
3113
|
+
readonly fillReward: "#C96C3E";
|
|
3114
|
+
readonly gradient: "linear-gradient(90deg, #C96C3E 0%, #1F1C17 100%)";
|
|
3115
|
+
};
|
|
3116
|
+
|
|
3117
|
+
export declare interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
3118
|
+
/** Current value (0-100) */
|
|
3119
|
+
value: number;
|
|
3120
|
+
/** Maximum value (defaults to 100) */
|
|
3121
|
+
max?: number;
|
|
3122
|
+
/** Size variant */
|
|
3123
|
+
size?: 'sm' | 'md';
|
|
3124
|
+
/** Color variant */
|
|
3125
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
3126
|
+
/** Visible label text */
|
|
3127
|
+
label?: string;
|
|
3128
|
+
/** Show the numeric value */
|
|
3129
|
+
showValue?: boolean;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
/**
|
|
3133
|
+
* ProgressRing — circular progress indicator.
|
|
3134
|
+
*
|
|
3135
|
+
* Bazaar learning surface — used in dashboards, course cards, and learner
|
|
3136
|
+
* profile summaries to show completion percentage in a glanceable form.
|
|
3137
|
+
*
|
|
3138
|
+
* Accessibility:
|
|
3139
|
+
* - role="progressbar" with aria-valuenow / min / max
|
|
3140
|
+
* - When `label` is provided, it's announced via aria-label
|
|
3141
|
+
*/
|
|
3142
|
+
export declare function ProgressRing({ value, max, size, tone, label, showValue, centerContent, className, ...props }: ProgressRingProps): JSX_2.Element;
|
|
3143
|
+
|
|
3144
|
+
export declare interface ProgressRingProps extends HTMLAttributes<HTMLDivElement> {
|
|
3145
|
+
/** Current value (0-100) */
|
|
3146
|
+
value: number;
|
|
3147
|
+
/** Maximum value (defaults to 100) */
|
|
3148
|
+
max?: number;
|
|
3149
|
+
/** Size variant */
|
|
3150
|
+
size?: ProgressRingSize;
|
|
3151
|
+
/** Visual tone */
|
|
3152
|
+
tone?: ProgressRingTone;
|
|
3153
|
+
/** Optional label rendered alongside the ring */
|
|
3154
|
+
label?: string;
|
|
3155
|
+
/** Show the numeric percentage in the center */
|
|
3156
|
+
showValue?: boolean;
|
|
3157
|
+
/** Custom center content (overrides showValue) */
|
|
3158
|
+
centerContent?: ReactNode;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
export declare type ProgressRingSize = 'sm' | 'md' | 'lg';
|
|
3162
|
+
|
|
3163
|
+
export declare type ProgressRingTone = 'default' | 'success' | 'reward';
|
|
3164
|
+
|
|
3165
|
+
export declare function PromoStrip({ message, icon, ctaLabel, onCta, dismissible, tone, className, ...rest }: PromoStripProps): JSX_2.Element | null;
|
|
3166
|
+
|
|
3167
|
+
export declare interface PromoStripProps extends HTMLAttributes<HTMLDivElement> {
|
|
3168
|
+
message: ReactNode;
|
|
3169
|
+
/** Optional leading icon. */
|
|
3170
|
+
icon?: ReactNode;
|
|
3171
|
+
/** Inline CTA — rendered as a link-styled button. */
|
|
3172
|
+
ctaLabel?: string;
|
|
3173
|
+
onCta?: () => void;
|
|
3174
|
+
/** Allow the strip to be dismissed (client-side only). */
|
|
3175
|
+
dismissible?: boolean;
|
|
3176
|
+
tone?: 'dark' | 'subtle' | 'accent';
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
/**
|
|
3180
|
+
* QuantityStepper — minus / value / plus control used in carts and on PDPs.
|
|
3181
|
+
* Supports controlled and uncontrolled usage; clamps to `min` / `max`.
|
|
3182
|
+
*/
|
|
3183
|
+
export declare function QuantityStepper({ value, defaultValue, min, max, onChange, size, disabled, label, className, ...rest }: QuantityStepperProps): JSX_2.Element;
|
|
3184
|
+
|
|
3185
|
+
export declare interface QuantityStepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3186
|
+
value?: number;
|
|
3187
|
+
defaultValue?: number;
|
|
3188
|
+
min?: number;
|
|
3189
|
+
max?: number;
|
|
3190
|
+
onChange?: (value: number) => void;
|
|
3191
|
+
/** Visual density. */
|
|
3192
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3193
|
+
disabled?: boolean;
|
|
3194
|
+
label?: string;
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
/**
|
|
3198
|
+
* Radio — single-selection option within a group.
|
|
3199
|
+
*
|
|
3200
|
+
* Accessibility:
|
|
3201
|
+
* - Uses native <input type="radio">
|
|
3202
|
+
* - Wrap multiple Radios in a fieldset with legend for group labeling
|
|
3203
|
+
* - Arrow keys navigate between radios within the same name group
|
|
3204
|
+
*/
|
|
3205
|
+
export declare const Radio: ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLInputElement>>;
|
|
3206
|
+
|
|
3207
|
+
/**
|
|
3208
|
+
* RadioGroup — group of radio buttons with fieldset/legend for accessibility.
|
|
3209
|
+
*
|
|
3210
|
+
* Accessibility:
|
|
3211
|
+
* - Uses <fieldset> and <legend> for semantic grouping
|
|
3212
|
+
* - Arrow keys navigate between radios within the group
|
|
3213
|
+
* - Error message rendered with role="alert"
|
|
3214
|
+
*/
|
|
3215
|
+
export declare function RadioGroup({ label, name, options, value, onChange, error, orientation, disabled, className, }: RadioGroupProps): JSX_2.Element;
|
|
3216
|
+
|
|
3217
|
+
export declare interface RadioGroupOption {
|
|
3218
|
+
value: string;
|
|
3219
|
+
label: string;
|
|
3220
|
+
disabled?: boolean;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
export declare interface RadioGroupProps {
|
|
3224
|
+
/** Group label rendered as fieldset legend */
|
|
3225
|
+
label: string;
|
|
3226
|
+
/** Shared name attribute for all radios */
|
|
3227
|
+
name: string;
|
|
3228
|
+
/** Array of radio options */
|
|
3229
|
+
options: RadioGroupOption[];
|
|
3230
|
+
/** Currently selected value */
|
|
3231
|
+
value?: string;
|
|
3232
|
+
/** Change handler — receives the selected value */
|
|
3233
|
+
onChange?: (value: string) => void;
|
|
3234
|
+
/** Error message */
|
|
3235
|
+
error?: string;
|
|
3236
|
+
/** Layout direction */
|
|
3237
|
+
orientation?: 'vertical' | 'horizontal';
|
|
3238
|
+
/** Disabled state for all radios */
|
|
3239
|
+
disabled?: boolean;
|
|
3240
|
+
/** Additional CSS class */
|
|
3241
|
+
className?: string;
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
export declare interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3245
|
+
/** Label text */
|
|
3246
|
+
label?: string;
|
|
3247
|
+
/** Error state */
|
|
3248
|
+
error?: boolean;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
export declare const radius: {
|
|
3252
|
+
readonly none: "0";
|
|
3253
|
+
readonly sm: "6px";
|
|
3254
|
+
readonly md: "10px";
|
|
3255
|
+
readonly lg: "14px";
|
|
3256
|
+
readonly xl: "18px";
|
|
3257
|
+
readonly full: "9999px";
|
|
3258
|
+
};
|
|
3259
|
+
|
|
3260
|
+
/**
|
|
3261
|
+
* Rating — star-based rating input with keyboard navigation.
|
|
3262
|
+
*
|
|
3263
|
+
* Supports custom max values, read-only display, and custom icon rendering.
|
|
3264
|
+
*
|
|
3265
|
+
* Accessibility:
|
|
3266
|
+
* - Uses radio group pattern with arrow key navigation
|
|
3267
|
+
* - Each star has aria-label with its value
|
|
3268
|
+
* - Supports keyboard: ArrowLeft/Right to navigate, Enter/Space to select
|
|
3269
|
+
*/
|
|
3270
|
+
export declare const Rating: ForwardRefExoticComponent<RatingProps & RefAttributes<HTMLDivElement>>;
|
|
3271
|
+
|
|
3272
|
+
export declare interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3273
|
+
/** Current rating value (0 = no rating) */
|
|
3274
|
+
value?: number;
|
|
3275
|
+
/** Called when rating changes */
|
|
3276
|
+
onChange?: (value: number) => void;
|
|
3277
|
+
/** Maximum rating value */
|
|
3278
|
+
max?: number;
|
|
3279
|
+
/** Size variant */
|
|
3280
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3281
|
+
/** Whether the rating is read-only */
|
|
3282
|
+
readOnly?: boolean;
|
|
3283
|
+
/** Disabled state */
|
|
3284
|
+
disabled?: boolean;
|
|
3285
|
+
/** Label for accessibility */
|
|
3286
|
+
label?: string;
|
|
3287
|
+
/** Custom icon renderer — receives filled state */
|
|
3288
|
+
renderIcon?: (filled: boolean, index: number) => React.ReactNode;
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
export declare interface RatingSummary {
|
|
3292
|
+
value: number;
|
|
3293
|
+
count: number;
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
export declare const ReassuranceIcons: {
|
|
3297
|
+
Truck: (p: SVGProps<SVGSVGElement>) => JSX_2.Element;
|
|
3298
|
+
Return: (p: SVGProps<SVGSVGElement>) => JSX_2.Element;
|
|
3299
|
+
Shield: (p: SVGProps<SVGSVGElement>) => JSX_2.Element;
|
|
3300
|
+
Leaf: (p: SVGProps<SVGSVGElement>) => JSX_2.Element;
|
|
3301
|
+
Package: (p: SVGProps<SVGSVGElement>) => JSX_2.Element;
|
|
3302
|
+
};
|
|
3303
|
+
|
|
3304
|
+
export declare interface ReassuranceItem {
|
|
3305
|
+
icon?: ReactNode;
|
|
3306
|
+
title: string;
|
|
3307
|
+
description?: string;
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
export declare function RecommendationRail({ title, subtitle, products, columns, children, onSelectProduct, onWishlistToggle, className, style, ...rest }: RecommendationRailProps): JSX_2.Element;
|
|
3311
|
+
|
|
3312
|
+
export declare interface RecommendationRailProps extends HTMLAttributes<HTMLElement> {
|
|
3313
|
+
title: string;
|
|
3314
|
+
subtitle?: string;
|
|
3315
|
+
products?: Product[];
|
|
3316
|
+
/** Desktop column count (default 4). */
|
|
3317
|
+
columns?: 3 | 4 | 5;
|
|
3318
|
+
/** Custom children — when provided, `products` is ignored. */
|
|
3319
|
+
children?: ReactNode;
|
|
3320
|
+
onSelectProduct?: (product: Product) => void;
|
|
3321
|
+
onWishlistToggle?: (product: Product) => void;
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
/**
|
|
3325
|
+
* ReturnsPolicy — headline + bullet list of the returns promise. Slots
|
|
3326
|
+
* into PDPs (below the buy box), cart summaries and the order
|
|
3327
|
+
* confirmation page.
|
|
3328
|
+
*/
|
|
3329
|
+
export declare function ReturnsPolicy({ headline, description, bullets, onReadFullPolicy, readFullPolicyLabel, footer, className, ...rest }: ReturnsPolicyProps): JSX_2.Element;
|
|
3330
|
+
|
|
3331
|
+
export declare interface ReturnsPolicyBullet {
|
|
3332
|
+
id: string;
|
|
3333
|
+
label: string;
|
|
3334
|
+
body?: string;
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
export declare interface ReturnsPolicyProps extends HTMLAttributes<HTMLElement> {
|
|
3338
|
+
/** Headline — e.g. "60-day free returns". */
|
|
3339
|
+
headline?: string;
|
|
3340
|
+
/** Sub-headline text describing the overall guarantee. */
|
|
3341
|
+
description?: string;
|
|
3342
|
+
bullets?: ReturnsPolicyBullet[];
|
|
3343
|
+
/** Optional affordance that links to the full policy page. */
|
|
3344
|
+
onReadFullPolicy?: () => void;
|
|
3345
|
+
readFullPolicyLabel?: string;
|
|
3346
|
+
/** Optional visual slot rendered at the end (e.g., signed-for illustration). */
|
|
3347
|
+
footer?: ReactNode;
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
export declare interface Review {
|
|
3351
|
+
id: string;
|
|
3352
|
+
author: string;
|
|
3353
|
+
rating: number;
|
|
3354
|
+
title?: string;
|
|
3355
|
+
body: string;
|
|
3356
|
+
/** ISO date string. */
|
|
3357
|
+
date: string;
|
|
3358
|
+
verified?: boolean;
|
|
3359
|
+
helpful?: number;
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
/**
|
|
3363
|
+
* ReviewsList — aggregate rating, star-distribution histogram, and paged
|
|
3364
|
+
* review feed. Presentational only — filtering/sorting live upstream.
|
|
3365
|
+
*/
|
|
3366
|
+
export declare function ReviewsList({ summary, reviews, distribution, onWriteReview, pageSize, className, ...rest }: ReviewsListProps): JSX_2.Element;
|
|
3367
|
+
|
|
3368
|
+
export declare interface ReviewsListProps extends HTMLAttributes<HTMLDivElement> {
|
|
3369
|
+
summary: RatingSummary;
|
|
3370
|
+
reviews: Review[];
|
|
3371
|
+
/** Distribution — counts keyed 1..5. Used for the histogram. */
|
|
3372
|
+
distribution?: Record<1 | 2 | 3 | 4 | 5, number>;
|
|
3373
|
+
onWriteReview?: () => void;
|
|
3374
|
+
/** Max reviews shown before "Show more" — 0 disables the limit. */
|
|
3375
|
+
pageSize?: number;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
export declare function ReviewsSummary({ value, count, size, hideStars, formatCount, className, ...rest }: ReviewsSummaryProps): JSX_2.Element;
|
|
3379
|
+
|
|
3380
|
+
export declare interface ReviewsSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
3381
|
+
/** Average rating, 0–5 (supports decimals). */
|
|
3382
|
+
value: number;
|
|
3383
|
+
/** Total review count. */
|
|
3384
|
+
count: number;
|
|
3385
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3386
|
+
/** Hide stars — useful in dense contexts (cards, cart lines). */
|
|
3387
|
+
hideStars?: boolean;
|
|
3388
|
+
/** Format the count (e.g. compact 1.2k). */
|
|
3389
|
+
formatCount?: (n: number) => string;
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* SaveForLaterList — secondary list below the cart of items the user
|
|
3394
|
+
* deferred. Each line swaps its "Save for later" action for "Move to bag".
|
|
3395
|
+
*/
|
|
3396
|
+
export declare function SaveForLaterList({ lines, title, onMoveToCart, onRemove, className, ...rest }: SaveForLaterListProps): JSX_2.Element | null;
|
|
3397
|
+
|
|
3398
|
+
export declare interface SaveForLaterListProps extends HTMLAttributes<HTMLDivElement> {
|
|
3399
|
+
lines: CartLine[];
|
|
3400
|
+
title?: string;
|
|
3401
|
+
onMoveToCart?: (line: CartLine) => void;
|
|
3402
|
+
onRemove?: (line: CartLine) => void;
|
|
3403
|
+
}
|
|
3404
|
+
|
|
3405
|
+
/**
|
|
3406
|
+
* SearchBar — input with a dropdown panel containing recent searches,
|
|
3407
|
+
* typeahead suggestions and product hits. Uncontrolled by default;
|
|
3408
|
+
* pass `value` + `onChange` for controlled usage.
|
|
3409
|
+
*/
|
|
3410
|
+
export declare function SearchBar({ placeholder, value, onChange, onSubmit, recent, suggestions, productHits, onSelectSuggestion, onSelectProduct, onClearRecent, size, className, ...rest }: SearchBarProps): JSX_2.Element;
|
|
3411
|
+
|
|
3412
|
+
export declare interface SearchBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'onSubmit'> {
|
|
3413
|
+
placeholder?: string;
|
|
3414
|
+
value?: string;
|
|
3415
|
+
onChange?: (value: string) => void;
|
|
3416
|
+
onSubmit?: (value: string) => void;
|
|
3417
|
+
/** Recent searches shown above suggestions when focused with empty input. */
|
|
3418
|
+
recent?: SearchSuggestion[];
|
|
3419
|
+
/** Live query suggestions. */
|
|
3420
|
+
suggestions?: SearchSuggestion[];
|
|
3421
|
+
/** Product hits rendered alongside suggestions. */
|
|
3422
|
+
productHits?: Product[];
|
|
3423
|
+
onSelectSuggestion?: (s: SearchSuggestion) => void;
|
|
3424
|
+
onSelectProduct?: (p: Product) => void;
|
|
3425
|
+
onClearRecent?: () => void;
|
|
3426
|
+
size?: 'md' | 'lg';
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
/**
|
|
3430
|
+
* SearchField — search input with magnifying glass icon and optional clear button.
|
|
3431
|
+
*
|
|
3432
|
+
* Accessibility:
|
|
3433
|
+
* - Uses role="searchbox" for semantic search intent
|
|
3434
|
+
* - Clear button has aria-label for screen readers
|
|
3435
|
+
* - Search icon is decorative (aria-hidden)
|
|
3436
|
+
*/
|
|
3437
|
+
export declare const SearchField: ForwardRefExoticComponent<SearchFieldProps & RefAttributes<HTMLInputElement>>;
|
|
3438
|
+
|
|
3439
|
+
export declare interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
3440
|
+
/** Size of the search control */
|
|
3441
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3442
|
+
/** Error state */
|
|
3443
|
+
error?: boolean;
|
|
3444
|
+
/** Full width */
|
|
3445
|
+
fullWidth?: boolean;
|
|
3446
|
+
/** Callback when clear button is clicked */
|
|
3447
|
+
onClear?: () => void;
|
|
3448
|
+
/** Show the clear button when input has a value */
|
|
3449
|
+
showClearButton?: boolean;
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
export declare function SearchResultsHeader({ title, count, query, activeFilters, onRemoveFilter, rightSlot, className, ...rest }: SearchResultsHeaderProps): JSX_2.Element;
|
|
3453
|
+
|
|
3454
|
+
export declare interface SearchResultsHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
3455
|
+
/** Main heading (e.g., "Results for 'linen'" or "All women's apparel"). */
|
|
3456
|
+
title: string;
|
|
3457
|
+
/** Result count. Used in the subtext line with the optional query. */
|
|
3458
|
+
count: number;
|
|
3459
|
+
/** Optional search query echo. */
|
|
3460
|
+
query?: string;
|
|
3461
|
+
/** Active filter chips. */
|
|
3462
|
+
activeFilters?: ActiveFilterChip[];
|
|
3463
|
+
onRemoveFilter?: (id: string) => void;
|
|
3464
|
+
/** Controls on the right side (SortMenu, layout toggles, etc.). */
|
|
3465
|
+
rightSlot?: ReactNode;
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
/**
|
|
3469
|
+
* SearchResultsPageTemplate — shell for full-page search. Mirrors the
|
|
3470
|
+
* collection-page layout but emphasizes the search field and supports an
|
|
3471
|
+
* empty-state slot when the query returns no results.
|
|
3472
|
+
*/
|
|
3473
|
+
export declare function SearchResultsPageTemplate({ header, footer, searchSlot, suggestionsSlot, resultsHeader, resultsControls, filters, results, empty, isEmpty, pagination, className, ...rest }: SearchResultsPageTemplateProps): JSX_2.Element;
|
|
3474
|
+
|
|
3475
|
+
export declare interface SearchResultsPageTemplateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'results'> {
|
|
3476
|
+
header?: ReactNode;
|
|
3477
|
+
footer?: ReactNode;
|
|
3478
|
+
/** Large top-of-page SearchBar — slot stays rendered above the fold. */
|
|
3479
|
+
searchSlot?: ReactNode;
|
|
3480
|
+
/** Did-you-mean / spelling suggestion row. */
|
|
3481
|
+
suggestionsSlot?: ReactNode;
|
|
3482
|
+
/** SearchResultsHeader (title + count + chips). */
|
|
3483
|
+
resultsHeader?: ReactNode;
|
|
3484
|
+
/** SortMenu or view-toggle. */
|
|
3485
|
+
resultsControls?: ReactNode;
|
|
3486
|
+
/** FilterPanel on the left. */
|
|
3487
|
+
filters?: ReactNode;
|
|
3488
|
+
/** Main results — typically a ProductGrid. */
|
|
3489
|
+
results?: ReactNode;
|
|
3490
|
+
/** Rendered instead of `results` when no matches. */
|
|
3491
|
+
empty?: ReactNode;
|
|
3492
|
+
/** True when `results` should be replaced by the empty state. */
|
|
3493
|
+
isEmpty?: boolean;
|
|
3494
|
+
pagination?: ReactNode;
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
export declare interface SearchSuggestion {
|
|
3498
|
+
id: string;
|
|
3499
|
+
label: string;
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3502
|
+
/**
|
|
3503
|
+
* SeasonalPromo — bold banner for sales, drops, or limited-time offers.
|
|
3504
|
+
* Renders eyebrow + headline + optional coupon chip + countdown. Reserve
|
|
3505
|
+
* for time-bound campaigns — use CampaignHero or PromoStrip for evergreen.
|
|
3506
|
+
*/
|
|
3507
|
+
export declare function SeasonalPromo({ eyebrow, headline, body, code, endsAt, cta, tone, dismissible, onDismiss, className, ...rest }: SeasonalPromoProps): JSX_2.Element;
|
|
3508
|
+
|
|
3509
|
+
export declare interface SeasonalPromoProps extends HTMLAttributes<HTMLElement> {
|
|
3510
|
+
eyebrow?: string;
|
|
3511
|
+
headline: string;
|
|
3512
|
+
body?: ReactNode;
|
|
3513
|
+
/** Coupon / promo code chip. */
|
|
3514
|
+
code?: string;
|
|
3515
|
+
/** Optional deadline (ISO). Drives the countdown. */
|
|
3516
|
+
endsAt?: string;
|
|
3517
|
+
cta?: {
|
|
3518
|
+
label: string;
|
|
3519
|
+
onClick?: () => void;
|
|
3520
|
+
};
|
|
3521
|
+
/** Visual tone. */
|
|
3522
|
+
tone?: 'warm' | 'sand' | 'ink';
|
|
3523
|
+
/** Dismissible — shows a close button when true. */
|
|
3524
|
+
dismissible?: boolean;
|
|
3525
|
+
onDismiss?: () => void;
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
/**
|
|
3529
|
+
* Select — native dropdown select.
|
|
3530
|
+
*
|
|
3531
|
+
* Accessibility:
|
|
3532
|
+
* - Uses native <select> for full keyboard and screen reader support
|
|
3533
|
+
* - Associate with Label via htmlFor/id
|
|
3534
|
+
* - Custom chevron is decorative (aria-hidden on the icon)
|
|
3535
|
+
*/
|
|
3536
|
+
export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
|
|
3537
|
+
|
|
3538
|
+
export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
3539
|
+
/** Size */
|
|
3540
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3541
|
+
/** Error state */
|
|
3542
|
+
error?: boolean;
|
|
3543
|
+
/** Full width */
|
|
3544
|
+
fullWidth?: boolean;
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
/** Semantic colors — warm-tuned to sit naturally against ecru neutrals. */
|
|
3548
|
+
export declare const semantic: {
|
|
3549
|
+
readonly success: {
|
|
3550
|
+
readonly 50: "#EAF1EA";
|
|
3551
|
+
readonly 500: "#4A7C59";
|
|
3552
|
+
readonly 700: "#2E5237";
|
|
3553
|
+
};
|
|
3554
|
+
readonly warning: {
|
|
3555
|
+
readonly 50: "#FBF2DF";
|
|
3556
|
+
readonly 500: "#B58235";
|
|
3557
|
+
readonly 700: "#6C4B1A";
|
|
3558
|
+
};
|
|
3559
|
+
readonly error: {
|
|
3560
|
+
readonly 50: "#F9E8E4";
|
|
3561
|
+
readonly 500: "#B04848";
|
|
3562
|
+
readonly 700: "#7D2E2E";
|
|
3563
|
+
};
|
|
3564
|
+
readonly info: {
|
|
3565
|
+
readonly 50: "#F4F2EC";
|
|
3566
|
+
readonly 500: "#433D32";
|
|
3567
|
+
readonly 700: "#1F1C17";
|
|
3568
|
+
};
|
|
3569
|
+
};
|
|
3570
|
+
|
|
3571
|
+
export declare const shadow: {
|
|
3572
|
+
readonly none: "none";
|
|
3573
|
+
readonly xs: "0 1px 2px rgba(22, 32, 43, 0.05)";
|
|
3574
|
+
readonly sm: "0 1px 3px rgba(22, 32, 43, 0.06), 0 2px 8px rgba(22, 32, 43, 0.04)";
|
|
3575
|
+
readonly md: "0 2px 4px rgba(22, 32, 43, 0.04), 0 8px 20px rgba(22, 32, 43, 0.08)";
|
|
3576
|
+
readonly lg: "0 4px 8px rgba(22, 32, 43, 0.04), 0 16px 40px rgba(22, 32, 43, 0.12)";
|
|
3577
|
+
readonly xl: "0 8px 16px rgba(22, 32, 43, 0.06), 0 24px 56px rgba(22, 32, 43, 0.16)";
|
|
3578
|
+
readonly focus: "0 0 0 3px rgba(47, 111, 228, 0.28)";
|
|
3579
|
+
readonly focusError: "0 0 0 3px rgba(194, 58, 58, 0.2)";
|
|
3580
|
+
readonly focusSuccess: "0 0 0 3px rgba(47, 143, 87, 0.2)";
|
|
3581
|
+
readonly insetXs: "inset 0 1px 2px rgba(22, 32, 43, 0.06)";
|
|
3582
|
+
readonly insetSm: "inset 0 2px 4px rgba(22, 32, 43, 0.08)";
|
|
3583
|
+
};
|
|
3584
|
+
|
|
3585
|
+
export declare interface ShippingMethod {
|
|
3586
|
+
id: string;
|
|
3587
|
+
label: string;
|
|
3588
|
+
description?: string;
|
|
3589
|
+
price: Money;
|
|
3590
|
+
estimate?: string;
|
|
3591
|
+
recommended?: boolean;
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* ShippingMethodList — radio-group of shipping rates. Each row shows price,
|
|
3596
|
+
* label, delivery estimate, and an optional "Recommended" tag.
|
|
3597
|
+
*/
|
|
3598
|
+
export declare function ShippingMethodList({ methods, value, onChange, title, className, ...rest }: ShippingMethodListProps): JSX_2.Element;
|
|
3599
|
+
|
|
3600
|
+
export declare interface ShippingMethodListProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3601
|
+
methods: ShippingMethod[];
|
|
3602
|
+
value?: string;
|
|
3603
|
+
onChange?: (method: ShippingMethod) => void;
|
|
3604
|
+
title?: string;
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
/**
|
|
3608
|
+
* ShippingReassurance — trust signals shown near the buy button.
|
|
3609
|
+
*
|
|
3610
|
+
* Renders a compact list of benefits (free shipping, easy returns, secure
|
|
3611
|
+
* checkout). Callers can override the default items for campaign-specific
|
|
3612
|
+
* messaging.
|
|
3613
|
+
*/
|
|
3614
|
+
export declare function ShippingReassurance({ items, layout, className, ...rest }: ShippingReassuranceProps): JSX_2.Element;
|
|
3615
|
+
|
|
3616
|
+
export declare interface ShippingReassuranceProps extends HTMLAttributes<HTMLDivElement> {
|
|
3617
|
+
items?: ReassuranceItem[];
|
|
3618
|
+
/** Layout — inline row for PDP sidebar, stacked for cart. */
|
|
3619
|
+
layout?: 'row' | 'stacked' | 'grid';
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
/**
|
|
3623
|
+
* ShopTheLook — editorial image with numbered hotspots and a companion
|
|
3624
|
+
* product rail. Clicking a hotspot highlights the matching product card.
|
|
3625
|
+
*/
|
|
3626
|
+
export declare function ShopTheLook({ image, products, hotspots, activeId, onActiveChange, title, onAddToCart, onSelectProduct, className, ...rest }: ShopTheLookProps): JSX_2.Element;
|
|
3627
|
+
|
|
3628
|
+
export declare interface ShopTheLookProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
3629
|
+
/** Editorial image the hotspots sit on. */
|
|
3630
|
+
image: {
|
|
3631
|
+
src?: string;
|
|
3632
|
+
alt: string;
|
|
3633
|
+
seed?: string;
|
|
3634
|
+
};
|
|
3635
|
+
/** Products featured in the look (keyed by id). */
|
|
3636
|
+
products: Product[];
|
|
3637
|
+
hotspots: LookHotspot[];
|
|
3638
|
+
/** Selected hotspot id (controlled). */
|
|
3639
|
+
activeId?: string;
|
|
3640
|
+
onActiveChange?: (id: string) => void;
|
|
3641
|
+
title?: string;
|
|
3642
|
+
/** Called when the user clicks a product card's CTA. */
|
|
3643
|
+
onAddToCart?: (product: Product) => void;
|
|
3644
|
+
onSelectProduct?: (product: Product) => void;
|
|
3645
|
+
}
|
|
3646
|
+
|
|
3647
|
+
export declare const sidebarDefault = "280px";
|
|
3648
|
+
|
|
3649
|
+
/**
|
|
3650
|
+
* SideNav — vertical sidebar navigation for dashboard layouts.
|
|
3651
|
+
*
|
|
3652
|
+
* Accessibility:
|
|
3653
|
+
* - Semantic <nav> with <ul>/<li> structure
|
|
3654
|
+
* - aria-current="page" on the active item
|
|
3655
|
+
* - Collapse toggle button with aria-label
|
|
3656
|
+
* - Title attribute on items when collapsed for tooltip-style labels
|
|
3657
|
+
* - Nested items rendered as sub-lists for proper hierarchy
|
|
3658
|
+
*/
|
|
3659
|
+
export declare function SideNav({ items, collapsed, onCollapse, className }: SideNavProps): JSX_2.Element;
|
|
3660
|
+
|
|
3661
|
+
export declare interface SideNavItem {
|
|
3662
|
+
/** Display label */
|
|
3663
|
+
label: string;
|
|
3664
|
+
/** Optional URL */
|
|
3665
|
+
href?: string;
|
|
3666
|
+
/** Optional click handler */
|
|
3667
|
+
onClick?: () => void;
|
|
3668
|
+
/** Optional icon element */
|
|
3669
|
+
icon?: ReactNode;
|
|
3670
|
+
/** Whether this item is the active/current page */
|
|
3671
|
+
active?: boolean;
|
|
3672
|
+
/** Nested child items */
|
|
3673
|
+
children?: SideNavItem[];
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
export declare interface SideNavProps {
|
|
3677
|
+
/** Navigation items */
|
|
3678
|
+
items: SideNavItem[];
|
|
3679
|
+
/** Whether the sidebar is collapsed to icon-only mode */
|
|
3680
|
+
collapsed?: boolean;
|
|
3681
|
+
/** Callback when collapse state changes */
|
|
3682
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
3683
|
+
/** Additional className */
|
|
3684
|
+
className?: string;
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
/**
|
|
3688
|
+
* SiteFooter — lede column (brand + pitch + optional newsletter slot) +
|
|
3689
|
+
* navigation columns + a bottom rail with legal links, payment/cert chips,
|
|
3690
|
+
* social buttons, and copyright.
|
|
3691
|
+
*/
|
|
3692
|
+
export declare function SiteFooter({ brand, pitch, newsletterSlot, columns, legalLinks, brandChips, socials, copyright, className, ...rest }: SiteFooterProps): JSX_2.Element;
|
|
3693
|
+
|
|
3694
|
+
export declare interface SiteFooterProps extends HTMLAttributes<HTMLElement> {
|
|
3695
|
+
brand: ReactNode;
|
|
3696
|
+
/** Lead paragraph below the brand mark. */
|
|
3697
|
+
pitch?: ReactNode;
|
|
3698
|
+
/** Slot for a NewsletterSignup or custom CTA. */
|
|
3699
|
+
newsletterSlot?: ReactNode;
|
|
3700
|
+
columns: FooterColumn[];
|
|
3701
|
+
legalLinks?: FooterLink[];
|
|
3702
|
+
/** Small all-caps chips (payment brands, certifications). */
|
|
3703
|
+
brandChips?: string[];
|
|
3704
|
+
socials?: FooterSocial[];
|
|
3705
|
+
/** e.g., "© 2026 House" — rendered verbatim. */
|
|
3706
|
+
copyright?: ReactNode;
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
/**
|
|
3710
|
+
* SiteHeader — announcement slot + brand + primary nav (with mega-menu
|
|
3711
|
+
* support) + utility icons. Open/close state for mega menus is managed
|
|
3712
|
+
* internally via hover + focus-within.
|
|
3713
|
+
*/
|
|
3714
|
+
export declare function SiteHeader({ brand, nav, search, cartCount, wishlistCount, onOpenSearch, onOpenAccount, onOpenWishlist, onOpenCart, topSlot, className, ...rest }: SiteHeaderProps): JSX_2.Element;
|
|
3715
|
+
|
|
3716
|
+
export declare interface SiteHeaderProps extends HTMLAttributes<HTMLElement> {
|
|
3717
|
+
brand: ReactNode;
|
|
3718
|
+
nav: NavItem[];
|
|
3719
|
+
/** Slot for a SearchBar — rendered in the utility row. */
|
|
3720
|
+
search?: ReactNode;
|
|
3721
|
+
cartCount?: number;
|
|
3722
|
+
wishlistCount?: number;
|
|
3723
|
+
onOpenSearch?: () => void;
|
|
3724
|
+
onOpenAccount?: () => void;
|
|
3725
|
+
onOpenWishlist?: () => void;
|
|
3726
|
+
onOpenCart?: () => void;
|
|
3727
|
+
/** Slot above the nav (e.g., AnnouncementBar). */
|
|
3728
|
+
topSlot?: ReactNode;
|
|
3729
|
+
}
|
|
3730
|
+
|
|
3731
|
+
export declare type Size = 'sm' | 'md' | 'lg';
|
|
3732
|
+
|
|
3733
|
+
/**
|
|
3734
|
+
* SizeGuide — measurement table with unit toggle.
|
|
3735
|
+
*
|
|
3736
|
+
* Intended to render inside a modal, drawer, or accordion. Accepts rows
|
|
3737
|
+
* keyed by unit so "in ↔ cm" switching is instant and doesn't require
|
|
3738
|
+
* re-computing.
|
|
3739
|
+
*/
|
|
3740
|
+
export declare function SizeGuide({ title, intro, columns, rowsByUnit, units, defaultUnit, illustration, className, ...rest }: SizeGuideProps): JSX_2.Element;
|
|
3741
|
+
|
|
3742
|
+
export declare interface SizeGuideColumn {
|
|
3743
|
+
/** Column header, e.g. "Chest", "Waist". */
|
|
3744
|
+
label: string;
|
|
3745
|
+
/** Optional note shown below the label. */
|
|
3746
|
+
note?: string;
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
export declare interface SizeGuideProps extends HTMLAttributes<HTMLDivElement> {
|
|
3750
|
+
title?: string;
|
|
3751
|
+
/** Short intro copy. */
|
|
3752
|
+
intro?: ReactNode;
|
|
3753
|
+
columns: SizeGuideColumn[];
|
|
3754
|
+
/** Map of unit id (e.g. "in", "cm") -> rows. */
|
|
3755
|
+
rowsByUnit: Record<string, SizeGuideRow[]>;
|
|
3756
|
+
units?: SizeGuideUnit[];
|
|
3757
|
+
defaultUnit?: string;
|
|
3758
|
+
/** Optional illustration/diagram slot. */
|
|
3759
|
+
illustration?: ReactNode;
|
|
3760
|
+
}
|
|
3761
|
+
|
|
3762
|
+
export declare interface SizeGuideRow {
|
|
3763
|
+
/** Row label — e.g. size name "S". */
|
|
3764
|
+
size: string;
|
|
3765
|
+
/** Values by column index, aligned with `columns`. */
|
|
3766
|
+
values: (string | number)[];
|
|
3767
|
+
}
|
|
3768
|
+
|
|
3769
|
+
export declare interface SizeGuideUnit {
|
|
3770
|
+
id: string;
|
|
3771
|
+
label: string;
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
/**
|
|
3775
|
+
* Skeleton — placeholder loading indicator with shimmer animation.
|
|
3776
|
+
*
|
|
3777
|
+
* Accessibility:
|
|
3778
|
+
* - aria-hidden="true" since it is purely decorative
|
|
3779
|
+
* - Healthcare note: use Skeleton loaders in clinical dashboards to
|
|
3780
|
+
* indicate data is loading, reducing perceived wait time
|
|
3781
|
+
*/
|
|
3782
|
+
export declare function Skeleton({ variant, width, height, lines, className, style, ...props }: SkeletonProps): JSX_2.Element;
|
|
3783
|
+
|
|
3784
|
+
export declare interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
3785
|
+
/** Shape variant */
|
|
3786
|
+
variant?: 'text' | 'circular' | 'rectangular';
|
|
3787
|
+
/** Width (CSS value) */
|
|
3788
|
+
width?: string | number;
|
|
3789
|
+
/** Height (CSS value) */
|
|
3790
|
+
height?: string | number;
|
|
3791
|
+
/** Number of text lines (only for text variant) */
|
|
3792
|
+
lines?: number;
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
/**
|
|
3796
|
+
* Slider — range input with custom styling.
|
|
3797
|
+
*
|
|
3798
|
+
* Accessibility:
|
|
3799
|
+
* - Uses native input[type="range"] for full keyboard and AT support
|
|
3800
|
+
* - Label linked via htmlFor/id
|
|
3801
|
+
* - aria-valuemin, aria-valuemax, aria-valuenow communicated natively
|
|
3802
|
+
* - showValue provides visual readout of current value
|
|
3803
|
+
*/
|
|
3804
|
+
export declare const Slider: ForwardRefExoticComponent<SliderProps & RefAttributes<HTMLInputElement>>;
|
|
3805
|
+
|
|
3806
|
+
export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange' | 'value'> {
|
|
3807
|
+
/** Current value */
|
|
3808
|
+
value?: number;
|
|
3809
|
+
/** Change handler */
|
|
3810
|
+
onChange?: (value: number) => void;
|
|
3811
|
+
/** Minimum value */
|
|
3812
|
+
min?: number;
|
|
3813
|
+
/** Maximum value */
|
|
3814
|
+
max?: number;
|
|
3815
|
+
/** Step increment */
|
|
3816
|
+
step?: number;
|
|
3817
|
+
/** Disabled state */
|
|
3818
|
+
disabled?: boolean;
|
|
3819
|
+
/** Size variant */
|
|
3820
|
+
size?: 'sm' | 'md';
|
|
3821
|
+
/** Accessible label text */
|
|
3822
|
+
label?: string;
|
|
3823
|
+
/** Show current value next to the slider */
|
|
3824
|
+
showValue?: boolean;
|
|
3825
|
+
/** Additional CSS class */
|
|
3826
|
+
className?: string;
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3829
|
+
/**
|
|
3830
|
+
* SocialProof — a press/quote strip with optional stats and rating summary.
|
|
3831
|
+
* Meant for above-the-fold hero bands and mid-page reassurance blocks.
|
|
3832
|
+
*/
|
|
3833
|
+
export declare function SocialProof({ headline, quotes, stats, ratingValue, ratingCount, footer, className, ...rest }: SocialProofProps): JSX_2.Element;
|
|
3834
|
+
|
|
3835
|
+
export declare interface SocialProofProps extends HTMLAttributes<HTMLElement> {
|
|
3836
|
+
/** Headline above the quote row. */
|
|
3837
|
+
headline?: string;
|
|
3838
|
+
quotes?: PressQuote[];
|
|
3839
|
+
/** Summary stats — e.g., "4.8★ across 12k reviews". */
|
|
3840
|
+
stats?: SocialProofStat[];
|
|
3841
|
+
/** Optional star rating to show next to the headline (0–5). */
|
|
3842
|
+
ratingValue?: number;
|
|
3843
|
+
ratingCount?: number;
|
|
3844
|
+
/** Optional footer slot — e.g., "As featured in" logo strip. */
|
|
3845
|
+
footer?: ReactNode;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
export declare interface SocialProofStat {
|
|
3849
|
+
id: string;
|
|
3850
|
+
value: string;
|
|
3851
|
+
label: string;
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3854
|
+
export declare type SortDirection = 'asc' | 'desc';
|
|
3855
|
+
|
|
3856
|
+
export declare function SortMenu({ options, value, onChange, label, className, ...rest }: SortMenuProps): JSX_2.Element;
|
|
3857
|
+
|
|
3858
|
+
export declare interface SortMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3859
|
+
options: SortOption[];
|
|
3860
|
+
value: string;
|
|
3861
|
+
onChange: (value: string) => void;
|
|
3862
|
+
label?: string;
|
|
3863
|
+
}
|
|
3864
|
+
|
|
3865
|
+
export declare interface SortOption {
|
|
3866
|
+
value: string;
|
|
3867
|
+
label: string;
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
export declare const space: {
|
|
3871
|
+
readonly 0: "0";
|
|
3872
|
+
readonly 1: "4px";
|
|
3873
|
+
readonly 2: "8px";
|
|
3874
|
+
readonly 3: "12px";
|
|
3875
|
+
readonly 4: "16px";
|
|
3876
|
+
readonly 5: "20px";
|
|
3877
|
+
readonly 6: "24px";
|
|
3878
|
+
readonly 8: "32px";
|
|
3879
|
+
readonly 10: "40px";
|
|
3880
|
+
readonly 12: "48px";
|
|
3881
|
+
readonly 16: "64px";
|
|
3882
|
+
readonly 20: "80px";
|
|
3883
|
+
};
|
|
3884
|
+
|
|
3885
|
+
/**
|
|
3886
|
+
* Bazaar Sparkline — minimal inline trend chart for KPIs and table cells.
|
|
3887
|
+
*
|
|
3888
|
+
* Pure visual: no axes, grid, tooltip, or legend. Designed to live inside
|
|
3889
|
+
* stat cards, data grid cells, and dense dashboard surfaces.
|
|
3890
|
+
*/
|
|
3891
|
+
export declare function Sparkline({ data, dataKey, variant, width, height, color, strokeWidth, ariaLabel, }: SparklineProps): JSX_2.Element;
|
|
3892
|
+
|
|
3893
|
+
export declare interface SparklineProps {
|
|
3894
|
+
/** Array of numeric values OR row objects */
|
|
3895
|
+
data: number[] | Record<string, unknown>[];
|
|
3896
|
+
/** Property name when `data` is row-shaped (defaults to "value") */
|
|
3897
|
+
dataKey?: string;
|
|
3898
|
+
/** Render style */
|
|
3899
|
+
variant?: 'line' | 'area';
|
|
3900
|
+
/** Width in px (defaults to 120) — accepts any CSS length */
|
|
3901
|
+
width?: number | string;
|
|
3902
|
+
/** Height in px (defaults to 36) */
|
|
3903
|
+
height?: number | string;
|
|
3904
|
+
/** Line/area color (defaults to first Bazaar series color) */
|
|
3905
|
+
color?: string;
|
|
3906
|
+
/** Stroke width (defaults to 2) */
|
|
3907
|
+
strokeWidth?: number;
|
|
3908
|
+
/** Optional accessible label */
|
|
3909
|
+
ariaLabel?: string;
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
/**
|
|
3913
|
+
* Spinner / LoadingIndicator — visual loading state.
|
|
3914
|
+
*
|
|
3915
|
+
* Accessibility:
|
|
3916
|
+
* - role="status" with aria-label for screen reader announcement
|
|
3917
|
+
* - aria-live="polite" so loading state is announced without interrupting
|
|
3918
|
+
* - Healthcare note: in clinical workflows, always pair with text
|
|
3919
|
+
* context ("Loading patient records...") so users understand what
|
|
3920
|
+
* they are waiting for
|
|
3921
|
+
*/
|
|
3922
|
+
export declare function Spinner({ size, label, className, ...props }: SpinnerProps): JSX_2.Element;
|
|
3923
|
+
|
|
3924
|
+
export declare interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3925
|
+
/** Size */
|
|
3926
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3927
|
+
/** Accessible label */
|
|
3928
|
+
label?: string;
|
|
3929
|
+
}
|
|
3930
|
+
|
|
3931
|
+
/**
|
|
3932
|
+
* SplitImageCopy — 50/50 editorial block. Use for "About the fabric",
|
|
3933
|
+
* "From the studio", etc. Reverses direction on narrow viewports.
|
|
3934
|
+
*/
|
|
3935
|
+
export declare function SplitImageCopy({ eyebrow, headline, body, image, imageSide, aspectRatio, cta, caption, className, ...rest }: SplitImageCopyProps): JSX_2.Element;
|
|
3936
|
+
|
|
3937
|
+
export declare interface SplitImageCopyProps extends HTMLAttributes<HTMLElement> {
|
|
3938
|
+
eyebrow?: string;
|
|
3939
|
+
headline: string;
|
|
3940
|
+
body?: ReactNode;
|
|
3941
|
+
image: {
|
|
3942
|
+
src?: string;
|
|
3943
|
+
alt: string;
|
|
3944
|
+
seed?: string;
|
|
3945
|
+
};
|
|
3946
|
+
/** Image on left ('image-left') or right ('image-right'). */
|
|
3947
|
+
imageSide?: 'image-left' | 'image-right';
|
|
3948
|
+
/** Aspect ratio of the image cell. */
|
|
3949
|
+
aspectRatio?: string;
|
|
3950
|
+
/** Optional CTA rendered inside the copy column. */
|
|
3951
|
+
cta?: {
|
|
3952
|
+
label: string;
|
|
3953
|
+
onClick?: () => void;
|
|
3954
|
+
};
|
|
3955
|
+
/** Optional caption rendered under the image. */
|
|
3956
|
+
caption?: string;
|
|
3957
|
+
}
|
|
3958
|
+
|
|
3959
|
+
/**
|
|
3960
|
+
* Stack — flex layout primitive for vertical or horizontal spacing.
|
|
3961
|
+
*
|
|
3962
|
+
* The most common layout component: arranges children with consistent
|
|
3963
|
+
* gaps. Defaults to a vertical stack (column).
|
|
3964
|
+
*
|
|
3965
|
+
* Accessibility:
|
|
3966
|
+
* - Purely presentational — no ARIA roles needed
|
|
3967
|
+
* - Use semantic HTML via `as` prop when appropriate
|
|
3968
|
+
*/
|
|
3969
|
+
export declare const Stack: ForwardRefExoticComponent<StackProps & RefAttributes<HTMLDivElement>>;
|
|
3970
|
+
|
|
3971
|
+
export declare interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
3972
|
+
/** Stack direction */
|
|
3973
|
+
direction?: 'vertical' | 'horizontal';
|
|
3974
|
+
/** Gap between items */
|
|
3975
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3976
|
+
/** Align items on the cross axis */
|
|
3977
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
3978
|
+
/** Justify items on the main axis */
|
|
3979
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around';
|
|
3980
|
+
/** Whether items should wrap */
|
|
3981
|
+
wrap?: boolean;
|
|
3982
|
+
/** Render as a different HTML element */
|
|
3983
|
+
as?: ElementType;
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
export declare type Status = 'success' | 'warning' | 'error' | 'info';
|
|
3987
|
+
|
|
3988
|
+
/**
|
|
3989
|
+
* StatusBadge — semantic status pill, shared across Skyfall kits.
|
|
3990
|
+
*
|
|
3991
|
+
* Accessibility:
|
|
3992
|
+
* - Always displays text label alongside color (no color-only meaning)
|
|
3993
|
+
* - Use `label` to override the default label per status
|
|
3994
|
+
*/
|
|
3995
|
+
export declare function StatusBadge({ status, label, size, dot, className, ...props }: StatusBadgeProps): JSX_2.Element;
|
|
3996
|
+
|
|
3997
|
+
export declare interface StatusBadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
3998
|
+
/** Semantic status */
|
|
3999
|
+
status: StatusBadgeStatus;
|
|
4000
|
+
/** Override the default label text */
|
|
4001
|
+
label?: string;
|
|
4002
|
+
/** Size variant */
|
|
4003
|
+
size?: 'sm' | 'md';
|
|
4004
|
+
/** Show a colored status dot before the label */
|
|
4005
|
+
dot?: boolean;
|
|
4006
|
+
}
|
|
4007
|
+
|
|
4008
|
+
/**
|
|
4009
|
+
* Generic, cross-kit semantic status vocabulary.
|
|
4010
|
+
*
|
|
4011
|
+
* NOTE: This is a Bazaar refactor of an Aegis component that previously shipped
|
|
4012
|
+
* a healthcare-specific status set (critical, discharged, scheduled). The shared
|
|
4013
|
+
* vocabulary below is more reusable across kits — Aegis can map clinical
|
|
4014
|
+
* severities and Bazaar can map learning states onto the same primitives.
|
|
4015
|
+
*/
|
|
4016
|
+
export declare type StatusBadgeStatus = 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'pending' | 'in-progress' | 'inactive' | 'completed' | 'locked';
|
|
4017
|
+
|
|
4018
|
+
/**
|
|
4019
|
+
* Stepper — multi-step form progress indicator.
|
|
4020
|
+
*
|
|
4021
|
+
* Accessibility:
|
|
4022
|
+
* - Uses role="navigation" with aria-label
|
|
4023
|
+
* - Each step is a button (when clickable) or div with aria-current="step"
|
|
4024
|
+
* - Completed steps indicated via visual checkmark and sr-only text
|
|
4025
|
+
* - Step descriptions provide additional context
|
|
4026
|
+
*/
|
|
4027
|
+
export declare function Stepper({ steps, activeStep, orientation, onStepClick, className, }: StepperProps): JSX_2.Element;
|
|
4028
|
+
|
|
4029
|
+
export declare interface StepperProps {
|
|
4030
|
+
/** Array of step definitions */
|
|
4031
|
+
steps: StepperStep[];
|
|
4032
|
+
/** Currently active step (0-indexed) */
|
|
4033
|
+
activeStep: number;
|
|
4034
|
+
/** Layout orientation */
|
|
4035
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4036
|
+
/** Callback when a step is clicked */
|
|
4037
|
+
onStepClick?: (stepIndex: number) => void;
|
|
4038
|
+
/** Additional CSS class */
|
|
4039
|
+
className?: string;
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
export declare interface StepperStep {
|
|
4043
|
+
label: string;
|
|
4044
|
+
description?: string;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
/**
|
|
4048
|
+
* StickyMobileATC — thin bottom-anchored bar for mobile product pages.
|
|
4049
|
+
*
|
|
4050
|
+
* On viewports < 768px it pins to the bottom of the viewport with a product
|
|
4051
|
+
* thumb, price, and primary CTA. On larger screens it hides itself unless
|
|
4052
|
+
* `alwaysVisible` is set (useful for stories).
|
|
4053
|
+
*/
|
|
4054
|
+
export declare function StickyMobileATC({ product, selectionLabel, onAddToCart, ctaLabel, disabled, alwaysVisible, className, ...rest }: StickyMobileATCProps): JSX_2.Element;
|
|
4055
|
+
|
|
4056
|
+
export declare interface StickyMobileATCProps extends HTMLAttributes<HTMLDivElement> {
|
|
4057
|
+
product: Product;
|
|
4058
|
+
/** Short selection summary, e.g. "Sand · M". */
|
|
4059
|
+
selectionLabel?: string;
|
|
4060
|
+
onAddToCart?: (product: Product) => void;
|
|
4061
|
+
ctaLabel?: string;
|
|
4062
|
+
/** Disable the CTA (e.g. selection incomplete). */
|
|
4063
|
+
disabled?: boolean;
|
|
4064
|
+
/** Force-display on larger viewports (bypass the mobile-only media query). */
|
|
4065
|
+
alwaysVisible?: boolean;
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4068
|
+
export declare interface Subscription {
|
|
4069
|
+
id: string;
|
|
4070
|
+
title: string;
|
|
4071
|
+
brand?: string;
|
|
4072
|
+
image?: ProductImage;
|
|
4073
|
+
price: Money;
|
|
4074
|
+
cadence: SubscriptionCadence;
|
|
4075
|
+
/** ISO — next scheduled ship date. */
|
|
4076
|
+
nextDelivery?: string;
|
|
4077
|
+
status: SubscriptionStatus;
|
|
4078
|
+
/** Optional variant summary like "Sand · Medium". */
|
|
4079
|
+
variantSummary?: string;
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4082
|
+
export declare type SubscriptionCadence = 'weekly' | 'biweekly' | 'monthly' | 'bimonthly' | 'quarterly';
|
|
4083
|
+
|
|
4084
|
+
/**
|
|
4085
|
+
* SubscriptionsList — recurring deliveries with cadence, next-ship date and
|
|
4086
|
+
* pause/skip/cancel actions. Muted styling applied when paused or cancelled.
|
|
4087
|
+
*/
|
|
4088
|
+
export declare function SubscriptionsList({ subscriptions, title, onPause, onResume, onSkip, onCancel, onEdit, className, ...rest }: SubscriptionsListProps): JSX_2.Element;
|
|
4089
|
+
|
|
4090
|
+
export declare interface SubscriptionsListProps extends Omit<HTMLAttributes<HTMLElement>, 'onPause' | 'onResume'> {
|
|
4091
|
+
subscriptions: Subscription[];
|
|
4092
|
+
title?: string;
|
|
4093
|
+
onPause?: (sub: Subscription) => void;
|
|
4094
|
+
onResume?: (sub: Subscription) => void;
|
|
4095
|
+
onSkip?: (sub: Subscription) => void;
|
|
4096
|
+
onCancel?: (sub: Subscription) => void;
|
|
4097
|
+
onEdit?: (sub: Subscription) => void;
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
export declare type SubscriptionStatus = 'active' | 'paused' | 'cancelled';
|
|
4101
|
+
|
|
4102
|
+
/** Surface aliases */
|
|
4103
|
+
export declare const surface: {
|
|
4104
|
+
readonly canvas: "#FBF9F4";
|
|
4105
|
+
readonly default: "#FFFFFF";
|
|
4106
|
+
readonly subtle: "#F4F2EC";
|
|
4107
|
+
readonly raised: "#FFFFFF";
|
|
4108
|
+
readonly spotlight: "#FBEEE4";
|
|
4109
|
+
};
|
|
4110
|
+
|
|
4111
|
+
/**
|
|
4112
|
+
* Switch — on/off toggle control.
|
|
4113
|
+
*
|
|
4114
|
+
* Accessibility:
|
|
4115
|
+
* - Uses role="switch" with native checkbox for AT support
|
|
4116
|
+
* - aria-checked reflects state
|
|
4117
|
+
* - Label is clickable and linked
|
|
4118
|
+
* - Healthcare note: use for non-critical preferences only.
|
|
4119
|
+
* For high-risk toggles (e.g., medication alerts), prefer explicit
|
|
4120
|
+
* confirmation patterns instead.
|
|
4121
|
+
*/
|
|
4122
|
+
export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLInputElement>>;
|
|
4123
|
+
|
|
4124
|
+
export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4125
|
+
/** Label text */
|
|
4126
|
+
label?: string;
|
|
4127
|
+
}
|
|
4128
|
+
|
|
4129
|
+
export declare interface Tab {
|
|
4130
|
+
id: string;
|
|
4131
|
+
label: string;
|
|
4132
|
+
content: ReactNode;
|
|
4133
|
+
disabled?: boolean;
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
/**
|
|
4137
|
+
* Table — data table with accessible defaults.
|
|
4138
|
+
*
|
|
4139
|
+
* Accessibility:
|
|
4140
|
+
* - Semantic <table> / <thead> / <tbody> / <th> structure
|
|
4141
|
+
* - Use scope="col" on header cells
|
|
4142
|
+
* - For complex tables, use aria-describedby to link to a caption
|
|
4143
|
+
* - Healthcare note: clinical data tables should use tabular numerals
|
|
4144
|
+
* (monospace) and adequate row height for readability under stress
|
|
4145
|
+
*/
|
|
4146
|
+
export declare function Table({ density, striped, className, children, ...props }: TableProps): JSX_2.Element;
|
|
4147
|
+
|
|
4148
|
+
export declare function TableBody({ className, children, ...props }: HTMLAttributes<HTMLTableSectionElement>): JSX_2.Element;
|
|
4149
|
+
|
|
4150
|
+
export declare function TableCell({ className, children, ...props }: TdHTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
4151
|
+
|
|
4152
|
+
export declare function TableHead({ className, children, ...props }: HTMLAttributes<HTMLTableSectionElement>): JSX_2.Element;
|
|
4153
|
+
|
|
4154
|
+
export declare function TableHeaderCell({ className, children, ...props }: ThHTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
4155
|
+
|
|
4156
|
+
export declare interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
4157
|
+
/** Compact density for admin/operational views */
|
|
4158
|
+
density?: 'default' | 'compact';
|
|
4159
|
+
/** Striped rows for scan-ability */
|
|
4160
|
+
striped?: boolean;
|
|
4161
|
+
}
|
|
4162
|
+
|
|
4163
|
+
export declare function TableRow({ className, children, ...props }: HTMLAttributes<HTMLTableRowElement>): JSX_2.Element;
|
|
4164
|
+
|
|
4165
|
+
/**
|
|
4166
|
+
* Tabs — tabbed interface for switching between content panels.
|
|
4167
|
+
*
|
|
4168
|
+
* Accessibility:
|
|
4169
|
+
* - Full WAI-ARIA tabs pattern: role="tablist", role="tab", role="tabpanel"
|
|
4170
|
+
* - Arrow key navigation between tabs
|
|
4171
|
+
* - Home/End keys jump to first/last tab
|
|
4172
|
+
* - aria-selected, aria-controls, aria-labelledby for AT relationships
|
|
4173
|
+
* - Only active panel is in the tab order (tabIndex=0 on active tab)
|
|
4174
|
+
*/
|
|
4175
|
+
export declare function Tabs({ tabs, activeTab, onTabChange, className }: TabsProps): JSX_2.Element;
|
|
4176
|
+
|
|
4177
|
+
export declare interface TabsProps {
|
|
4178
|
+
/** Tab definitions */
|
|
4179
|
+
tabs: Tab[];
|
|
4180
|
+
/** Controlled active tab id */
|
|
4181
|
+
activeTab?: string;
|
|
4182
|
+
/** Callback when tab changes */
|
|
4183
|
+
onTabChange?: (id: string) => void;
|
|
4184
|
+
/** Additional className for the wrapper */
|
|
4185
|
+
className?: string;
|
|
4186
|
+
}
|
|
4187
|
+
|
|
4188
|
+
/**
|
|
4189
|
+
* TagInput — multi-value text input that creates tag chips.
|
|
4190
|
+
*
|
|
4191
|
+
* Users type text and press Enter or comma to create tags.
|
|
4192
|
+
* Tags can be removed with Backspace or by clicking the remove button.
|
|
4193
|
+
*
|
|
4194
|
+
* Accessibility:
|
|
4195
|
+
* - Tags have aria-label and remove button with aria-label
|
|
4196
|
+
* - Backspace removes last tag when input is empty
|
|
4197
|
+
* - Screen readers announce tag count via aria-describedby
|
|
4198
|
+
*/
|
|
4199
|
+
export declare const TagInput: ForwardRefExoticComponent<TagInputProps & RefAttributes<HTMLDivElement>>;
|
|
4200
|
+
|
|
4201
|
+
export declare interface TagInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4202
|
+
/** Current tag values */
|
|
4203
|
+
value?: string[];
|
|
4204
|
+
/** Called when tags change */
|
|
4205
|
+
onChange?: (tags: string[]) => void;
|
|
4206
|
+
/** Placeholder for the text input */
|
|
4207
|
+
placeholder?: string;
|
|
4208
|
+
/** Label */
|
|
4209
|
+
label?: string;
|
|
4210
|
+
/** Maximum number of tags allowed */
|
|
4211
|
+
max?: number;
|
|
4212
|
+
/** Size variant */
|
|
4213
|
+
size?: 'sm' | 'md';
|
|
4214
|
+
/** Disabled state */
|
|
4215
|
+
disabled?: boolean;
|
|
4216
|
+
/** Error state */
|
|
4217
|
+
error?: boolean;
|
|
4218
|
+
/** Characters that trigger tag creation (default: Enter, comma) */
|
|
4219
|
+
separators?: string[];
|
|
4220
|
+
/** Whether duplicates are allowed */
|
|
4221
|
+
allowDuplicates?: boolean;
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
/** Text aliases */
|
|
4225
|
+
export declare const text: {
|
|
4226
|
+
readonly primary: "#1F1C17";
|
|
4227
|
+
readonly secondary: "#433D32";
|
|
4228
|
+
readonly muted: "#8A816B";
|
|
4229
|
+
readonly inverse: "#FBF9F4";
|
|
4230
|
+
readonly brand: "#C96C3E";
|
|
4231
|
+
};
|
|
4232
|
+
|
|
4233
|
+
/**
|
|
4234
|
+
* Textarea — multi-line text input.
|
|
4235
|
+
*
|
|
4236
|
+
* Accessibility:
|
|
4237
|
+
* - Associate with Label via htmlFor/id
|
|
4238
|
+
* - Link to HelperText via aria-describedby
|
|
4239
|
+
*/
|
|
4240
|
+
export declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>;
|
|
4241
|
+
|
|
4242
|
+
export declare interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4243
|
+
/** Error state */
|
|
4244
|
+
error?: boolean;
|
|
4245
|
+
/** Full width */
|
|
4246
|
+
fullWidth?: boolean;
|
|
4247
|
+
/** Allow vertical resize */
|
|
4248
|
+
resize?: 'none' | 'vertical' | 'both';
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4251
|
+
/**
|
|
4252
|
+
* TextField — single-line text input.
|
|
4253
|
+
*
|
|
4254
|
+
* Accessibility:
|
|
4255
|
+
* - Use with <Label> and associate via htmlFor/id
|
|
4256
|
+
* - Use aria-describedby to link to HelperText or error messages
|
|
4257
|
+
* - aria-invalid signals error state to assistive technology
|
|
4258
|
+
* - Visible border change + color signals error (not color alone)
|
|
4259
|
+
*/
|
|
4260
|
+
export declare const TextField: ForwardRefExoticComponent<TextFieldProps & RefAttributes<HTMLInputElement>>;
|
|
4261
|
+
|
|
4262
|
+
export declare interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4263
|
+
/** Size of the input control */
|
|
4264
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4265
|
+
/** Error state */
|
|
4266
|
+
error?: boolean;
|
|
4267
|
+
/** Full width */
|
|
4268
|
+
fullWidth?: boolean;
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
/**
|
|
4272
|
+
* Timeline — vertical timeline for displaying sequential events.
|
|
4273
|
+
*
|
|
4274
|
+
* Accessibility:
|
|
4275
|
+
* - Uses semantic <ol> for ordered event sequence
|
|
4276
|
+
* - Each event is an <li> for proper list semantics
|
|
4277
|
+
* - Icons are decorative (aria-hidden)
|
|
4278
|
+
*/
|
|
4279
|
+
export declare function Timeline({ items, className, ...props }: TimelineProps): JSX_2.Element;
|
|
4280
|
+
|
|
4281
|
+
export declare interface TimelineItem {
|
|
4282
|
+
/** Unique identifier */
|
|
4283
|
+
id: string;
|
|
4284
|
+
/** Event title */
|
|
4285
|
+
title: string;
|
|
4286
|
+
/** Optional description */
|
|
4287
|
+
description?: string;
|
|
4288
|
+
/** Timestamp display string */
|
|
4289
|
+
timestamp: string;
|
|
4290
|
+
/** Optional icon to replace the default dot */
|
|
4291
|
+
icon?: ReactNode;
|
|
4292
|
+
/** Visual variant */
|
|
4293
|
+
variant?: TimelineItemVariant;
|
|
4294
|
+
}
|
|
4295
|
+
|
|
4296
|
+
export declare type TimelineItemVariant = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
4297
|
+
|
|
4298
|
+
export declare interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
|
|
4299
|
+
/** Timeline items in chronological order */
|
|
4300
|
+
items: TimelineItem[];
|
|
4301
|
+
}
|
|
4302
|
+
|
|
4303
|
+
/**
|
|
4304
|
+
* Toast — transient notification that auto-dismisses.
|
|
4305
|
+
*
|
|
4306
|
+
* Accessibility:
|
|
4307
|
+
* - Uses role="alert" for error/warning (assertive), role="status" for info/success (polite)
|
|
4308
|
+
* - Close button has accessible label
|
|
4309
|
+
* - Auto-dismiss can be disabled for important messages
|
|
4310
|
+
* - Icon + color + text ensures meaning is communicated multiple ways
|
|
4311
|
+
*/
|
|
4312
|
+
export declare function Toast({ message, title, status, action, onClose, duration, className, }: ToastProps): JSX_2.Element;
|
|
4313
|
+
|
|
4314
|
+
export declare interface ToastProps {
|
|
4315
|
+
/** Toast message */
|
|
4316
|
+
message: string;
|
|
4317
|
+
/** Optional title */
|
|
4318
|
+
title?: string;
|
|
4319
|
+
/** Status variant */
|
|
4320
|
+
status?: ToastStatus;
|
|
4321
|
+
/** Optional action element */
|
|
4322
|
+
action?: ReactNode;
|
|
4323
|
+
/** Called when toast is closed */
|
|
4324
|
+
onClose: () => void;
|
|
4325
|
+
/** Auto-dismiss duration in ms (0 to disable) */
|
|
4326
|
+
duration?: number;
|
|
4327
|
+
/** Additional class name */
|
|
4328
|
+
className?: string;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
export declare type ToastStatus = 'info' | 'success' | 'warning' | 'error';
|
|
4332
|
+
|
|
4333
|
+
/**
|
|
4334
|
+
* Toolbar — horizontal action bar with grouped controls.
|
|
4335
|
+
*
|
|
4336
|
+
* Use with ToolbarGroup to visually separate related actions
|
|
4337
|
+
* and ToolbarDivider for explicit separators.
|
|
4338
|
+
*
|
|
4339
|
+
* Accessibility:
|
|
4340
|
+
* - Uses toolbar ARIA role
|
|
4341
|
+
* - Children should be buttons or controls with labels
|
|
4342
|
+
*/
|
|
4343
|
+
export declare const Toolbar: ForwardRefExoticComponent<ToolbarProps & RefAttributes<HTMLDivElement>>;
|
|
4344
|
+
|
|
4345
|
+
export declare const ToolbarDivider: ForwardRefExoticComponent<ToolbarDividerProps & RefAttributes<HTMLDivElement>>;
|
|
4346
|
+
|
|
4347
|
+
export declare interface ToolbarDividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4348
|
+
}
|
|
4349
|
+
|
|
4350
|
+
export declare const ToolbarGroup: ForwardRefExoticComponent<ToolbarGroupProps & RefAttributes<HTMLDivElement>>;
|
|
4351
|
+
|
|
4352
|
+
export declare interface ToolbarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
4353
|
+
/** Group content */
|
|
4354
|
+
children: ReactNode;
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4357
|
+
export declare interface ToolbarProps extends HTMLAttributes<HTMLDivElement> {
|
|
4358
|
+
/** Size variant — affects padding and child button sizing */
|
|
4359
|
+
size?: 'sm' | 'md';
|
|
4360
|
+
/** Visual variant */
|
|
4361
|
+
variant?: 'default' | 'outlined';
|
|
4362
|
+
/** Toolbar content (buttons, groups, dividers) */
|
|
4363
|
+
children: ReactNode;
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4366
|
+
/**
|
|
4367
|
+
* Tooltip — supplementary text on hover/focus.
|
|
4368
|
+
*
|
|
4369
|
+
* Accessibility:
|
|
4370
|
+
* - Shows on both hover and keyboard focus
|
|
4371
|
+
* - Uses role="tooltip" with aria-describedby linking
|
|
4372
|
+
* - Respects reduced motion preferences (no animation)
|
|
4373
|
+
* - Healthcare note: never put critical information in tooltips alone.
|
|
4374
|
+
* Use for supplementary context only, since tooltips are easy to miss
|
|
4375
|
+
* and not accessible on touch devices.
|
|
4376
|
+
*/
|
|
4377
|
+
export declare function Tooltip({ content, children, placement, delay, className }: TooltipProps): JSX_2.Element;
|
|
4378
|
+
|
|
4379
|
+
export declare interface TooltipProps {
|
|
4380
|
+
/** Tooltip content */
|
|
4381
|
+
content: ReactNode;
|
|
4382
|
+
/** Trigger element */
|
|
4383
|
+
children: ReactNode;
|
|
4384
|
+
/** Placement */
|
|
4385
|
+
placement?: 'top' | 'bottom';
|
|
4386
|
+
/** Delay before showing (ms) */
|
|
4387
|
+
delay?: number;
|
|
4388
|
+
/** Additional className */
|
|
4389
|
+
className?: string;
|
|
4390
|
+
}
|
|
4391
|
+
|
|
4392
|
+
export declare const touchMin = "44px";
|
|
4393
|
+
|
|
4394
|
+
export declare const tracking: {
|
|
4395
|
+
readonly tight: "-0.02em";
|
|
4396
|
+
readonly normal: "0em";
|
|
4397
|
+
readonly wide: "0.01em";
|
|
4398
|
+
};
|
|
4399
|
+
|
|
4400
|
+
export declare interface TrackingEvent {
|
|
4401
|
+
status: OrderStatus | 'label-created';
|
|
4402
|
+
label: string;
|
|
4403
|
+
description?: string;
|
|
4404
|
+
/** ISO timestamp. */
|
|
4405
|
+
at?: string;
|
|
4406
|
+
location?: string;
|
|
4407
|
+
}
|
|
4408
|
+
|
|
4409
|
+
export declare interface TreeNode {
|
|
4410
|
+
/** Unique identifier */
|
|
4411
|
+
id: string;
|
|
4412
|
+
/** Display label */
|
|
4413
|
+
label: string;
|
|
4414
|
+
/** Optional icon */
|
|
4415
|
+
icon?: ReactNode;
|
|
4416
|
+
/** Child nodes */
|
|
4417
|
+
children?: TreeNode[];
|
|
4418
|
+
/** Whether the node is disabled */
|
|
4419
|
+
disabled?: boolean;
|
|
4420
|
+
}
|
|
4421
|
+
|
|
4422
|
+
/**
|
|
4423
|
+
* TreeView — hierarchical data display with expand/collapse.
|
|
4424
|
+
*
|
|
4425
|
+
* Renders nested tree data with keyboard navigation, selection,
|
|
4426
|
+
* and optional connecting guide lines.
|
|
4427
|
+
*
|
|
4428
|
+
* Accessibility:
|
|
4429
|
+
* - Uses tree/treeitem/group ARIA roles
|
|
4430
|
+
* - Arrow keys expand/collapse nodes
|
|
4431
|
+
* - Enter/Space selects nodes
|
|
4432
|
+
* - aria-expanded on branch nodes
|
|
4433
|
+
*/
|
|
4434
|
+
export declare const TreeView: ForwardRefExoticComponent<TreeViewProps & RefAttributes<HTMLDivElement>>;
|
|
4435
|
+
|
|
4436
|
+
export declare interface TreeViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
4437
|
+
/** Tree data */
|
|
4438
|
+
data: TreeNode[];
|
|
4439
|
+
/** IDs of initially expanded nodes (uncontrolled) */
|
|
4440
|
+
defaultExpanded?: string[];
|
|
4441
|
+
/** IDs of expanded nodes (controlled) */
|
|
4442
|
+
expanded?: string[];
|
|
4443
|
+
/** Called when a node is expanded/collapsed */
|
|
4444
|
+
onExpandChange?: (expanded: string[]) => void;
|
|
4445
|
+
/** Currently selected node ID */
|
|
4446
|
+
selected?: string | null;
|
|
4447
|
+
/** Called when a node is selected */
|
|
4448
|
+
onSelect?: (nodeId: string, node: TreeNode) => void;
|
|
4449
|
+
/** Size variant */
|
|
4450
|
+
size?: 'sm' | 'md';
|
|
4451
|
+
/** Show connecting lines between levels */
|
|
4452
|
+
showLines?: boolean;
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4455
|
+
export declare type TrendDirection = 'up' | 'down' | 'neutral';
|
|
4456
|
+
|
|
4457
|
+
/**
|
|
4458
|
+
* TrendStatCard — KPI card with a prominent trend chart underneath.
|
|
4459
|
+
*
|
|
4460
|
+
* Larger than KpiStatCard's inline sparkline, designed to fill more space
|
|
4461
|
+
* in dashboard rows where a trend story is the primary message.
|
|
4462
|
+
*/
|
|
4463
|
+
export declare function TrendStatCard<T extends Record<string, unknown>>({ label, value, unit, data, xKey, yKey, change, changeLabel, inverse, color, valueFormatter, chartHeight, className, ...props }: TrendStatCardProps<T>): JSX_2.Element;
|
|
4464
|
+
|
|
4465
|
+
export declare interface TrendStatCardProps<T extends Record<string, unknown>> extends HTMLAttributes<HTMLDivElement> {
|
|
4466
|
+
/** Metric label (e.g. "30-day readmissions") */
|
|
4467
|
+
label: string;
|
|
4468
|
+
/** Headline value */
|
|
4469
|
+
value: ReactNode;
|
|
4470
|
+
/** Optional unit (e.g. "%", "patients") */
|
|
4471
|
+
unit?: ReactNode;
|
|
4472
|
+
/** Trend chart data — row-shaped */
|
|
4473
|
+
data: T[];
|
|
4474
|
+
/** X-axis key on each row */
|
|
4475
|
+
xKey: keyof T & string;
|
|
4476
|
+
/** Y value key on each row */
|
|
4477
|
+
yKey: keyof T & string;
|
|
4478
|
+
/** Percent change value */
|
|
4479
|
+
change?: number;
|
|
4480
|
+
/** Change context label */
|
|
4481
|
+
changeLabel?: string;
|
|
4482
|
+
/** Inverse semantics — set true when a decrease is "good" */
|
|
4483
|
+
inverse?: boolean;
|
|
4484
|
+
/** Color override for the trend area */
|
|
4485
|
+
color?: string;
|
|
4486
|
+
/** Format values shown in tooltip */
|
|
4487
|
+
valueFormatter?: ValueFormatter;
|
|
4488
|
+
/** Chart height (defaults to 80) */
|
|
4489
|
+
chartHeight?: number;
|
|
4490
|
+
}
|
|
4491
|
+
|
|
4492
|
+
/**
|
|
4493
|
+
* TrustBadgeCluster — a row (or grid) of reassurance badges. Use in a
|
|
4494
|
+
* footer band, on a PDP below the buy box, or on a cart / confirmation
|
|
4495
|
+
* page to underline policy.
|
|
4496
|
+
*/
|
|
4497
|
+
export declare function TrustBadgeCluster({ items, layout, eyebrow, className, ...rest }: TrustBadgeClusterProps): JSX_2.Element;
|
|
4498
|
+
|
|
4499
|
+
export declare interface TrustBadgeClusterProps extends HTMLAttributes<HTMLElement> {
|
|
4500
|
+
items: TrustBadgeItem[];
|
|
4501
|
+
/** 'card' places each badge in its own bordered cell; 'inline' renders a
|
|
4502
|
+
* flat icon-and-text row separated by thin dividers. */
|
|
4503
|
+
layout?: 'card' | 'inline';
|
|
4504
|
+
/** Label displayed above the cluster (optional). */
|
|
4505
|
+
eyebrow?: string;
|
|
4506
|
+
}
|
|
4507
|
+
|
|
4508
|
+
export declare interface TrustBadgeItem {
|
|
4509
|
+
id: string;
|
|
4510
|
+
icon?: ReactNode;
|
|
4511
|
+
label: string;
|
|
4512
|
+
sublabel?: string;
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
/**
|
|
4516
|
+
* Typography — text rendering primitive.
|
|
4517
|
+
*
|
|
4518
|
+
* Maps directly to the Bazaar type scale tokens and provides a consistent
|
|
4519
|
+
* API for rendering text at any level of the hierarchy.
|
|
4520
|
+
*
|
|
4521
|
+
* Accessibility:
|
|
4522
|
+
* - Defaults to the semantically correct HTML element for each variant
|
|
4523
|
+
* (h1–h4 for headings, p for body, code for code, span for labels)
|
|
4524
|
+
* - Use `as` to override when the visual style and semantic level differ
|
|
4525
|
+
* - `color="inherit"` defers to the parent color
|
|
4526
|
+
*/
|
|
4527
|
+
export declare const Typography: ForwardRefExoticComponent<TypographyProps & RefAttributes<HTMLElement>>;
|
|
4528
|
+
|
|
4529
|
+
export declare type TypographyAlign = 'left' | 'center' | 'right';
|
|
4530
|
+
|
|
4531
|
+
export declare type TypographyColor = 'primary' | 'secondary' | 'muted' | 'inverse' | 'success' | 'warning' | 'error' | 'info' | 'inherit';
|
|
4532
|
+
|
|
4533
|
+
export declare interface TypographyProps extends HTMLAttributes<HTMLElement> {
|
|
4534
|
+
/** Typographic scale variant */
|
|
4535
|
+
variant?: TypographyVariant;
|
|
4536
|
+
/** Text color */
|
|
4537
|
+
color?: TypographyColor;
|
|
4538
|
+
/** Font weight override */
|
|
4539
|
+
weight?: TypographyWeight;
|
|
4540
|
+
/** Text alignment */
|
|
4541
|
+
align?: TypographyAlign;
|
|
4542
|
+
/** Render as a specific HTML element (overrides the variant default) */
|
|
4543
|
+
as?: ElementType;
|
|
4544
|
+
/** Truncate with ellipsis */
|
|
4545
|
+
truncate?: boolean;
|
|
4546
|
+
/** Clamp to N lines */
|
|
4547
|
+
lineClamp?: number;
|
|
4548
|
+
}
|
|
4549
|
+
|
|
4550
|
+
export declare type TypographyVariant = 'display-lg' | 'display-md' | 'heading-xl' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'label-lg' | 'label-md' | 'caption' | 'data' | 'code';
|
|
4551
|
+
|
|
4552
|
+
export declare type TypographyWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
4553
|
+
|
|
4554
|
+
export declare type ValueFormatter = (value: number | string) => string;
|
|
4555
|
+
|
|
4556
|
+
export declare type Variant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
4557
|
+
|
|
4558
|
+
export declare interface VariantAxis {
|
|
4559
|
+
/** Axis name shown above the selector, e.g. "Color", "Size". */
|
|
4560
|
+
name: string;
|
|
4561
|
+
kind: VariantKind;
|
|
4562
|
+
options: VariantOption[];
|
|
4563
|
+
/** Visual density for the axis. */
|
|
4564
|
+
style?: 'pills' | 'swatches' | 'dropdown' | 'image-swatches';
|
|
4565
|
+
}
|
|
4566
|
+
|
|
4567
|
+
export declare type VariantKind = 'color' | 'size' | 'material' | 'option' | 'image';
|
|
4568
|
+
|
|
4569
|
+
export declare interface VariantOption {
|
|
4570
|
+
kind: VariantKind;
|
|
4571
|
+
label: string;
|
|
4572
|
+
value: string;
|
|
4573
|
+
/** For color swatches — CSS color or gradient. */
|
|
4574
|
+
swatchColor?: string;
|
|
4575
|
+
/** For image swatches — background image URL. */
|
|
4576
|
+
swatchImage?: string;
|
|
4577
|
+
available?: boolean;
|
|
4578
|
+
priceDelta?: Money;
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4581
|
+
/**
|
|
4582
|
+
* VariantSelector — renders a single variant axis (color, size, material...).
|
|
4583
|
+
*
|
|
4584
|
+
* The axis's `style` drives layout: `swatches` for color chips, `pills` for
|
|
4585
|
+
* size buttons, `dropdown` for a native select, `image-swatches` for product
|
|
4586
|
+
* thumbnails. Unavailable options render with a strikethrough indicator.
|
|
4587
|
+
*/
|
|
4588
|
+
export declare function VariantSelector({ axis, value, onChange, helper, showSelectionLabel, className, ...rest }: VariantSelectorProps): JSX_2.Element;
|
|
4589
|
+
|
|
4590
|
+
export declare interface VariantSelectorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4591
|
+
axis: VariantAxis;
|
|
4592
|
+
/** Currently-selected option value. */
|
|
4593
|
+
value?: string;
|
|
4594
|
+
onChange?: (option: VariantOption) => void;
|
|
4595
|
+
/** Optional right-side helper slot, e.g. "Size guide". */
|
|
4596
|
+
helper?: React.ReactNode;
|
|
4597
|
+
/** Show the selected option label next to the axis name. */
|
|
4598
|
+
showSelectionLabel?: boolean;
|
|
4599
|
+
}
|
|
4600
|
+
|
|
4601
|
+
/**
|
|
4602
|
+
* VisuallyHidden — renders content that is hidden visually but accessible
|
|
4603
|
+
* to screen readers and other assistive technology.
|
|
4604
|
+
*
|
|
4605
|
+
* Use for:
|
|
4606
|
+
* - Labels for icon-only buttons
|
|
4607
|
+
* - Additional context for screen readers
|
|
4608
|
+
* - Skip navigation links
|
|
4609
|
+
* - Form labels that are visually unnecessary but needed for a11y
|
|
4610
|
+
*
|
|
4611
|
+
* This uses the standard screen-reader-only CSS technique that keeps
|
|
4612
|
+
* content in the document flow for assistive tech while hiding it
|
|
4613
|
+
* from sighted users.
|
|
4614
|
+
*/
|
|
4615
|
+
export declare function VisuallyHidden({ as: Component, children, ...props }: VisuallyHiddenProps): JSX_2.Element;
|
|
4616
|
+
|
|
4617
|
+
export declare interface VisuallyHiddenProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4618
|
+
/** Render as a different element */
|
|
4619
|
+
as?: 'span' | 'div' | 'label';
|
|
4620
|
+
}
|
|
4621
|
+
|
|
4622
|
+
/**
|
|
4623
|
+
* WishlistGrid — account-section presentation of saved products. Wraps
|
|
4624
|
+
* ProductGrid + ProductCard with per-card remove/add actions.
|
|
4625
|
+
*/
|
|
4626
|
+
export declare function WishlistGrid({ products, title, onRemove, onAddToCart, onSelectProduct, emptyCta, emptyTitle, emptyBody, className, ...rest }: WishlistGridProps): JSX_2.Element;
|
|
4627
|
+
|
|
4628
|
+
export declare interface WishlistGridProps extends HTMLAttributes<HTMLElement> {
|
|
4629
|
+
products: Product[];
|
|
4630
|
+
title?: string;
|
|
4631
|
+
onRemove?: (product: Product) => void;
|
|
4632
|
+
onAddToCart?: (product: Product) => void;
|
|
4633
|
+
onSelectProduct?: (product: Product) => void;
|
|
4634
|
+
/** Empty-state CTA slot. */
|
|
4635
|
+
emptyCta?: React.ReactNode;
|
|
4636
|
+
/** Override the default "Your wishlist is empty" copy. */
|
|
4637
|
+
emptyTitle?: string;
|
|
4638
|
+
emptyBody?: string;
|
|
4639
|
+
}
|
|
4640
|
+
|
|
4641
|
+
export declare const zIndex: {
|
|
4642
|
+
readonly base: 0;
|
|
4643
|
+
readonly dropdown: 1000;
|
|
4644
|
+
readonly sticky: 1100;
|
|
4645
|
+
readonly banner: 1200;
|
|
4646
|
+
readonly overlay: 1300;
|
|
4647
|
+
readonly modal: 1400;
|
|
4648
|
+
readonly toast: 1500;
|
|
4649
|
+
readonly tooltip: 1600;
|
|
4650
|
+
};
|
|
4651
|
+
|
|
4652
|
+
export { }
|