twico-ui 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.
@@ -0,0 +1,1501 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * Vertically stacked, expandable disclosure panels with smooth height animation.
5
+ *
6
+ * @startingPoint section="Navigation" subtitle="Expandable disclosure panels" viewport="700x300"
7
+ */
8
+ interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ items: AccordionItem[];
10
+ /** Allow multiple panels open at once. @default false */
11
+ multiple?: boolean;
12
+ /** Values open on first render. */
13
+ defaultOpen?: string[];
14
+ }
15
+
16
+ interface AccordionItem {
17
+ value: string;
18
+ label: React.ReactNode;
19
+ content: React.ReactNode;
20
+ icon?: React.ReactNode;
21
+ }
22
+
23
+ declare function Accordion(props: AccordionProps): React.JSX.Element;
24
+
25
+ /**
26
+ * Inline message banner with semantic tones, optional title, icon, and dismiss.
27
+ */
28
+ interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
29
+ /** @default "info" */
30
+ tone?: "info" | "success" | "warning" | "danger";
31
+ /** Bold heading line. */
32
+ title?: React.ReactNode;
33
+ /** Override the default tone icon. */
34
+ icon?: React.ReactNode;
35
+ /** Show a close button and handle dismissal. */
36
+ onClose?: () => void;
37
+ children?: React.ReactNode;
38
+ }
39
+
40
+ declare function Alert(props: AlertProps): React.JSX.Element;
41
+
42
+ /**
43
+ * User avatar — image with graceful fallback to initials, optional status dot.
44
+ */
45
+ interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {
46
+ /** Image URL. Falls back to initials on error or when absent. */
47
+ src?: string;
48
+ /** Full name — used for initials and the accessible label. */
49
+ name?: string;
50
+ /** @default "md" */
51
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
52
+ /** Rounded-square instead of circle. */
53
+ square?: boolean;
54
+ /** Presence indicator. */
55
+ status?: "online" | "busy" | "away" | "offline";
56
+ /** Adds a brand ring around the avatar. */
57
+ ring?: boolean;
58
+ }
59
+
60
+ declare function Avatar(props: AvatarProps): React.JSX.Element;
61
+
62
+ interface MenuItemDef {
63
+ /** Item label (also used for a heading when `heading` is true). */
64
+ label?: React.ReactNode;
65
+ /** Leading icon. */
66
+ icon?: React.ReactNode;
67
+ /** Click handler — menu closes after it runs. */
68
+ onClick?: () => void;
69
+ /** Right-aligned shortcut hint (mono). */
70
+ shortcut?: string;
71
+ /** Render in danger color. */
72
+ danger?: boolean;
73
+ disabled?: boolean;
74
+ /** Render a divider line (ignores other fields). */
75
+ separator?: boolean;
76
+ /** Render as an uppercase section heading. */
77
+ heading?: boolean;
78
+ }
79
+
80
+ /**
81
+ * Dropdown menu. Provide a `trigger` element and an `items` array. Renders in a
82
+ * portal (never clipped), auto-flips near the viewport edge, supports an optional
83
+ * rich `header`, and is keyboard-navigable (↑/↓, Enter, Esc). Closes on outside
84
+ * click, Esc, or item selection.
85
+ *
86
+ * @startingPoint section="Overlay" subtitle="Dropdown menu with headings & shortcuts" viewport="700x360"
87
+ */
88
+ interface MenuProps extends React.HTMLAttributes<HTMLSpanElement> {
89
+ /** Clickable trigger (e.g. a Button or IconButton). */
90
+ trigger: React.ReactNode;
91
+ items: MenuItemDef[];
92
+ /** Horizontal alignment to the trigger. @default "start" */
93
+ align?: "start" | "end";
94
+ /** Optional rich header node rendered above the items (e.g. user info). */
95
+ header?: React.ReactNode;
96
+ /** Fixed menu width in px (defaults to max(200, trigger width)). */
97
+ width?: number;
98
+ }
99
+
100
+ declare function Menu(props: MenuProps): React.JSX.Element;
101
+
102
+ /**
103
+ * Avatar that opens a dropdown menu of account options — the classic user menu.
104
+ * Shows the user's avatar (optionally with name/email), and a portaled menu with
105
+ * a rich header (avatar + name + email) above the items.
106
+ *
107
+ * @startingPoint section="Data display" subtitle="Avatar account menu" viewport="700x320"
108
+ */
109
+ interface AvatarMenuProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "title"> {
110
+ /** User's full name (drives initials + header). */
111
+ name?: string;
112
+ /** Avatar image URL. */
113
+ src?: string;
114
+ /** Email shown in the header (and trigger when `showName`). */
115
+ email?: string;
116
+ /** Subtitle override for the header/trigger (defaults to `email`). */
117
+ subtitle?: React.ReactNode;
118
+ /** Presence dot. */
119
+ status?: "online" | "busy" | "away" | "offline";
120
+ /** Trigger avatar size. @default "sm" */
121
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
122
+ /** Menu items (same shape as Menu's items). */
123
+ items: MenuItemDef[];
124
+ /** Show name/email next to the avatar in the trigger. @default false */
125
+ showName?: boolean;
126
+ /** Show a chevron in the trigger (defaults to `showName`). */
127
+ showChevron?: boolean;
128
+ /** Menu alignment to the trigger. @default "end" */
129
+ align?: "start" | "end";
130
+ }
131
+
132
+ declare function AvatarMenu(props: AvatarMenuProps): React.JSX.Element;
133
+
134
+ /**
135
+ * Small status label / count. Six tones × three variants.
136
+ */
137
+ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
138
+ /** Semantic color. @default "primary" */
139
+ tone?: "primary" | "success" | "warning" | "danger" | "info" | "neutral";
140
+ /** Fill style. @default "soft" */
141
+ variant?: "soft" | "solid" | "outline";
142
+ /** @default "md" */
143
+ size?: "md" | "lg";
144
+ /** Show a leading status dot. */
145
+ dot?: boolean;
146
+ children?: React.ReactNode;
147
+ }
148
+
149
+ declare function Badge(props: BadgeProps): React.JSX.Element;
150
+
151
+ interface BreadcrumbItem {
152
+ /** Visible label. */
153
+ label: React.ReactNode;
154
+ /** Link target (omit on the last/current item). */
155
+ href?: string;
156
+ /** Optional leading icon. */
157
+ icon?: React.ReactNode;
158
+ /** Click handler (for SPA navigation). */
159
+ onClick?: (e: React.MouseEvent) => void;
160
+ }
161
+
162
+ /**
163
+ * Breadcrumb trail showing the path to the current page. Supports leading icons
164
+ * per item and collapsing the middle into a “…” that expands on click.
165
+ *
166
+ * @startingPoint section="Navigation" subtitle="Breadcrumb trail" viewport="700x80"
167
+ */
168
+ interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
169
+ /** Ordered trail; the last item renders as the current page. */
170
+ items: BreadcrumbItem[];
171
+ /** Custom separator node (defaults to a chevron). */
172
+ separator?: React.ReactNode;
173
+ /** Collapse to first + last items past this count (0 = never). @default 0 */
174
+ maxItems?: number;
175
+ }
176
+
177
+ declare function Breadcrumb(props: BreadcrumbProps): React.JSX.Element;
178
+
179
+ /**
180
+ * Primary action button with solid / soft / outline / ghost / danger variants,
181
+ * three sizes, loading state, icons, and a click ripple.
182
+ *
183
+ * @startingPoint section="Buttons" subtitle="Action button with ripple + variants" viewport="700x200"
184
+ */
185
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
186
+ /** Visual style. @default "solid" */
187
+ variant?: "solid" | "soft" | "outline" | "ghost" | "danger";
188
+ /** Control size. @default "md" */
189
+ size?: "sm" | "md" | "lg";
190
+ /** Icon node rendered before the label. */
191
+ leftIcon?: React.ReactNode;
192
+ /** Icon node rendered after the label. */
193
+ rightIcon?: React.ReactNode;
194
+ /** Show a spinner and block interaction. @default false */
195
+ loading?: boolean;
196
+ /** Stretch to fill the container width. @default false */
197
+ fullWidth?: boolean;
198
+ /** Render as a different element (e.g. "a"). @default "button" */
199
+ as?: "button" | "a";
200
+ children?: React.ReactNode;
201
+ }
202
+
203
+ declare function Button(props: ButtonProps): React.JSX.Element;
204
+
205
+ /**
206
+ * Surface container for grouped content. Supports header (title/subtitle),
207
+ * body, footer, three variants, and an interactive hover-lift.
208
+ *
209
+ * @startingPoint section="Data display" subtitle="Content card with header & footer" viewport="700x260"
210
+ */
211
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
212
+ /** Bold title in the card header. */
213
+ title?: React.ReactNode;
214
+ /** Muted subtitle under the title. */
215
+ subtitle?: React.ReactNode;
216
+ /** Footer content (e.g. action buttons). */
217
+ footer?: React.ReactNode;
218
+ /** Visual style. @default "elevated" */
219
+ variant?: "elevated" | "outline" | "soft";
220
+ /** Inner padding. @default "md" */
221
+ padding?: "none" | "md" | "lg";
222
+ /** Adds a hover-lift + pointer cursor. */
223
+ interactive?: boolean;
224
+ children?: React.ReactNode;
225
+ }
226
+
227
+ declare function Card(props: CardProps): React.JSX.Element;
228
+
229
+ /**
230
+ * Sliding carousel — one slide per view, prev/next arrows, dot indicators,
231
+ * optional looping and autoplay (pauses on hover). Each child is a slide.
232
+ *
233
+ * @startingPoint section="Data display" subtitle="Sliding carousel" viewport="700x320"
234
+ */
235
+ interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
236
+ /** Show prev/next arrows. @default true */
237
+ showArrows?: boolean;
238
+ /** Show dot indicators. @default true */
239
+ showDots?: boolean;
240
+ /** Wrap around at the ends. @default true */
241
+ loop?: boolean;
242
+ /** Auto-advance slides. @default false */
243
+ autoPlay?: boolean;
244
+ /** Autoplay interval in ms. @default 4000 */
245
+ interval?: number;
246
+ /** Slides (each child is one slide). */
247
+ children?: React.ReactNode;
248
+ }
249
+
250
+ declare function Carousel(props: CarouselProps): React.JSX.Element;
251
+
252
+ interface ChartDatum {
253
+ /** X-axis label. */
254
+ label: React.ReactNode;
255
+ /** One numeric field per series key (default key is "value"). */
256
+ [key: string]: any;
257
+ }
258
+
259
+ /**
260
+ * Lightweight, dependency-free SVG chart — bar or line, single or multi-series,
261
+ * with grid, axes, animated entrance, tooltips, and optional legend.
262
+ *
263
+ * @startingPoint section="Data display" subtitle="Bar / line chart (no deps)" viewport="700x280"
264
+ */
265
+ interface ChartProps extends React.HTMLAttributes<HTMLDivElement> {
266
+ /** @default "bar" */
267
+ type?: "bar" | "line";
268
+ /** Data points. Each has a `label` + one numeric field per series. */
269
+ data: ChartDatum[];
270
+ /** Series field names (defaults to ["value"]). Multiple = grouped bars / multi-line. */
271
+ series?: string[];
272
+ /** Pixel height. @default 220 */
273
+ height?: number;
274
+ /** Horizontal grid lines. @default true */
275
+ showGrid?: boolean;
276
+ /** Axis labels. @default true */
277
+ showAxis?: boolean;
278
+ /** Series legend (multi-series). @default false */
279
+ showLegend?: boolean;
280
+ /** Tooltip value formatter. */
281
+ valueFormat?: (value: number) => string;
282
+ }
283
+
284
+ declare function Chart(props: ChartProps): React.JSX.Element;
285
+
286
+ /**
287
+ * Checkbox with animated checkmark, label, description, and indeterminate state.
288
+ */
289
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
290
+ label?: React.ReactNode;
291
+ description?: React.ReactNode;
292
+ /** Render the dash (mixed) state. */
293
+ indeterminate?: boolean;
294
+ size?: "sm" | "md";
295
+ }
296
+
297
+ declare function Checkbox(props: CheckboxProps): React.JSX.Element;
298
+
299
+ /**
300
+ * Color picker with a saturation/value square, hue slider, hex input, and
301
+ * preset swatches. Opens in a popover; value is a hex string.
302
+ *
303
+ * @startingPoint section="Inputs" subtitle="Color picker with hue + presets" viewport="700x120"
304
+ */
305
+ interface ColorPickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
306
+ label?: React.ReactNode;
307
+ /** Controlled hex value, e.g. "#6366F1". */
308
+ value?: string;
309
+ /** Uncontrolled initial hex. @default "#6366F1" */
310
+ defaultValue?: string;
311
+ /** Preset swatches (hex strings). */
312
+ presets?: string[];
313
+ onChange?: (hex: string) => void;
314
+ }
315
+
316
+ declare function ColorPicker(props: ColorPickerProps): React.JSX.Element;
317
+
318
+ /**
319
+ * Searchable single-select (MUI-Autocomplete style) — type directly in the
320
+ * field to filter; the overlay shows only options. Supports grouped options
321
+ * and two-line (title + subtitle) options.
322
+ * Keyboard: ↑/↓ to move, Enter to select, Esc to close.
323
+ *
324
+ * @startingPoint section="Selects" subtitle="Searchable single-select dropdown" viewport="700x160"
325
+ */
326
+ interface ComboboxProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue"> {
327
+ label?: React.ReactNode;
328
+ hint?: React.ReactNode;
329
+ error?: React.ReactNode;
330
+ required?: boolean;
331
+ size?: "sm" | "md" | "lg";
332
+ /** Field placeholder. */
333
+ placeholder?: string;
334
+ /** Options — strings, {value,label,description}, or {group,options} groups. */
335
+ options: Array<string | ComboboxOption | ComboboxGroup>;
336
+ /** Controlled selected value. */
337
+ value?: string | null;
338
+ /** Uncontrolled initial value. */
339
+ defaultValue?: string | null;
340
+ onChange?: (value: string | null) => void;
341
+ /** Show a clear (×) affix when a value is selected. */
342
+ clearable?: boolean;
343
+ disabled?: boolean;
344
+ }
345
+
346
+ interface ComboboxOption {
347
+ value: string;
348
+ label: string;
349
+ /** Optional second line shown under the label. */
350
+ description?: string;
351
+ }
352
+
353
+ /** A group heading with its own options. */
354
+ interface ComboboxGroup {
355
+ group: string;
356
+ options: Array<string | ComboboxOption>;
357
+ }
358
+
359
+ declare function Combobox(props: ComboboxProps): React.JSX.Element;
360
+
361
+ interface Command {
362
+ /** Stable id. */
363
+ id?: string;
364
+ /** Visible label. */
365
+ label: string;
366
+ /** Secondary description line. */
367
+ description?: string;
368
+ /** Leading icon. */
369
+ icon?: React.ReactNode;
370
+ /** Right-aligned shortcut hint, e.g. "⌘K". */
371
+ shortcut?: string;
372
+ /** Group heading this command appears under. */
373
+ group?: string;
374
+ /** Extra search terms (space-separated). */
375
+ keywords?: string;
376
+ /** Invoked on Enter / click (palette closes after). */
377
+ onSelect?: () => void;
378
+ }
379
+
380
+ /**
381
+ * ⌘K-style command palette — fuzzy-ish search over grouped commands with full
382
+ * keyboard nav (↑/↓, Enter, Esc). Drive `open` yourself (e.g. on Cmd/Ctrl+K).
383
+ */
384
+ interface CommandPaletteProps extends React.HTMLAttributes<HTMLDivElement> {
385
+ open: boolean;
386
+ onClose?: () => void;
387
+ commands: Command[];
388
+ placeholder?: string;
389
+ emptyText?: string;
390
+ }
391
+
392
+ declare function CommandPalette(props: CommandPaletteProps): React.JSX.Element | null;
393
+
394
+ /**
395
+ * Currency input with a fixed currency defined in code. Shows the symbol as a
396
+ * prefix and the currency code as a suffix, and enforces decimal precision
397
+ * (e.g. precision 2 accepts 2.25 but not 2.259).
398
+ *
399
+ * @startingPoint section="Inputs" subtitle="Currency input with symbol + code" viewport="700x140"
400
+ */
401
+ interface CurrencyProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange"> {
402
+ label?: React.ReactNode;
403
+ hint?: React.ReactNode;
404
+ error?: React.ReactNode;
405
+ required?: boolean;
406
+ size?: "sm" | "md" | "lg";
407
+ /** Currency code (key in the built-in table), e.g. "USD", "EUR", "IDR", "JPY". @default "USD" */
408
+ currency?: string;
409
+ /** Override the currency's decimal precision (number of digits after the decimal). */
410
+ precision?: number;
411
+ /** Override the displayed prefix symbol. */
412
+ symbol?: string;
413
+ /** Override the displayed suffix code. */
414
+ code?: string;
415
+ /** Controlled string value. */
416
+ value?: string | number;
417
+ /** Uncontrolled initial value. */
418
+ defaultValue?: string | number;
419
+ /** Native change handler (receives the event). */
420
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
421
+ /** Convenience callback with the parsed numeric value and the formatted string. */
422
+ onValueChange?: (value: number | null, formatted: string) => void;
423
+ }
424
+
425
+ declare function Currency(props: CurrencyProps): React.JSX.Element;
426
+
427
+ interface CurrencyOption { value: string; label: string; }
428
+
429
+ /**
430
+ * Currency input where the USER selects the currency from a dropdown. The chosen
431
+ * currency drives the prefix symbol, the suffix code, and the enforced decimal
432
+ * precision.
433
+ *
434
+ * @startingPoint section="Inputs" subtitle="Currency input with selectable currency" viewport="700x140"
435
+ */
436
+ interface CurrencyFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange"> {
437
+ label?: React.ReactNode;
438
+ hint?: React.ReactNode;
439
+ error?: React.ReactNode;
440
+ required?: boolean;
441
+ size?: "sm" | "md" | "lg";
442
+ /** Controlled selected currency code. */
443
+ currency?: string;
444
+ /** Uncontrolled initial currency code. @default "USD" */
445
+ defaultCurrency?: string;
446
+ /** Called when the user picks a different currency. */
447
+ onCurrencyChange?: (code: string) => void;
448
+ /** Limit the selectable currencies (codes or {value,label}); defaults to the full built-in list. */
449
+ currencies?: Array<string | CurrencyOption>;
450
+ /** Controlled amount string. */
451
+ value?: string | number;
452
+ /** Uncontrolled initial amount. */
453
+ defaultValue?: string | number;
454
+ /** Callback with the parsed number, formatted string, and active currency code. */
455
+ onValueChange?: (value: number | null, formatted: string, currency: string) => void;
456
+ }
457
+
458
+ declare function CurrencyField(props: CurrencyFieldProps): React.JSX.Element;
459
+
460
+ /**
461
+ * Advanced data table (Material UI Data Grid Premium style): sortable, filterable
462
+ * (per-column operators + quick search), hideable (with a searchable column list),
463
+ * and pinnable (left/right, sticky) columns, drag-to-reorder and drag-to-resize
464
+ * columns, a column-management + filter toolbar, density control, CSV export,
465
+ * an optional aggregation/summary footer, optional checkbox selection with a
466
+ * batch-action toolbar, an actions column (per-row icon buttons + overflow menu),
467
+ * page-number pagination with a configurable rows-per-page selector, a skeleton
468
+ * loading state, and an optional server-side mode (sort/filter/paginate on the
469
+ * backend — only the current page is loaded). Filter controls and the pager are
470
+ * built from the Twico Select, Input, and Pagination components.
471
+ *
472
+ * @startingPoint section="Data display" subtitle="MUI-style sortable/filterable/pinnable data table" viewport="900x460"
473
+ */
474
+ interface DatatableProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "rows"> {
475
+ /** Column definitions. */
476
+ columns: DatatableColumn[];
477
+ /** Row objects. In server mode, only the current page's rows. */
478
+ rows: any[];
479
+ /** Show shimmering skeleton rows instead of data. @default false */
480
+ loading?: boolean;
481
+ /** Returns a stable key per row. @default (r,i) => r.id ?? i */
482
+ rowKey?: (row: any, index: number) => string | number;
483
+ /** Render a leading checkbox-selection column. @default false */
484
+ checkboxSelection?: boolean;
485
+ /**
486
+ * Actions shown in the toolbar when one or more rows are selected (requires
487
+ * `checkboxSelection`). Each handler receives the selected keys, the resolved
488
+ * selected row objects, and a `clearSelection()` callback.
489
+ */
490
+ batchActions?: DatatableBatchAction[];
491
+ /** Row height preset. @default "standard" */
492
+ density?: "compact" | "standard" | "comfortable";
493
+ /** Initial rows per page. 0 disables pagination. @default 10 */
494
+ pageSize?: number;
495
+ /** Options shown in the rows-per-page selector. @default [5, 10, 25, 50] */
496
+ pageSizeOptions?: number[];
497
+ /** Max height of the scroll area in px (header/footer stay fixed). @default 440 */
498
+ height?: number;
499
+ /**
500
+ * Enable server-side data. When true, the table does NOT sort/filter/paginate
501
+ * the `rows` you pass (they are treated as the already-fetched current page);
502
+ * instead it calls `onServerChange` whenever the query changes so you can fetch
503
+ * the right slice. Provide `rowCount` for correct page counts. @default false
504
+ */
505
+ serverMode?: boolean;
506
+ /** Total row count on the server (required for pagination in server mode). */
507
+ rowCount?: number;
508
+ /** Server-mode callback fired (debounced) whenever the query changes. */
509
+ onServerChange?: (state: DatatableQuery) => void;
510
+ /** Show the Export toolbar button (split button: click = CSV, chevron = format menu). @default true */
511
+ showExport?: boolean;
512
+ /** Filename (without extension) for exports (CSV / Excel / TSV / JSON). @default "export" */
513
+ exportFilename?: string;
514
+ /** Server-mode precomputed aggregation. Per field, either a scalar/node (used as-is) or a per-function map
515
+ * `{ sum, avg, min, max, count }` so the footer honors whichever function the user picks in the panel. */
516
+ aggregationValues?: Record<string, React.ReactNode | Partial<Record<"sum" | "avg" | "min" | "max" | "count", React.ReactNode>>> | null;
517
+ /** Disable drag-to-reorder of columns. @default false */
518
+ disableColumnReorder?: boolean;
519
+ /** Disable drag-to-resize of columns. @default false */
520
+ disableColumnResize?: boolean;
521
+ /** Make all columns editable by default (double-click a cell to edit; per-column `editable` overrides). @default false */
522
+ editMode?: boolean;
523
+ /** Called when a cell edit is committed: (updatedRow, originalRow, field). */
524
+ onRowUpdate?: (updatedRow: any, originalRow: any, field: string) => void;
525
+ /** Controlled-rows callback: receives the full next rows array after an edit (client mode). */
526
+ onRowsChange?: (rows: any[]) => void;
527
+ /** Fired when the built-in batch editor applies columns across selected rows:
528
+ * (changedRows, patch, selectedKeys). The selection-toolbar "Edit" button appears
529
+ * automatically when there are editable columns. */
530
+ onBatchUpdate?: (changedRows: any[], patch: Record<string, any>, selectedKeys: Array<string | number>) => void;
531
+ /** Show a "Go to" page jumper in the footer when there are more than 5 pages. @default true */
532
+ showPageJumper?: boolean;
533
+ /** Click-to-select mode: "row" highlights the clicked row, "cell" highlights a single cell. @default "none" */
534
+ selectionMode?: "none" | "row" | "cell";
535
+ /** Fired when a row is clicked in "row" selection mode: (row, key). */
536
+ onRowClick?: (row: any, key: string | number) => void;
537
+ /** Fired when a cell is clicked in "cell" selection mode: (value, row, field). */
538
+ onCellClick?: (value: any, row: any, field: string) => void;
539
+ /** Fired when the active cell changes: ({ key, field } | null). */
540
+ onActiveCellChange?: (cell: { key: string | number; field: string } | null) => void;
541
+ /** Initial “show totals row” state. Aggregation is OFF by default and is configured at runtime from the toolbar **Aggregation** panel (pick columns + function); a column's `aggregation` prop just seeds the initial choice. @default false */
542
+ showAggregation?: boolean;
543
+ /** Accessible label for the grid (role="grid"). @default "Data table" */
544
+ ariaLabel?: string;
545
+ /** Initial row-grouping fields (collapsible groups with subtotals). Users can also group via a column's ⋮ menu. @default [] */
546
+ rowGrouping?: string[];
547
+ /** Enable row pinning — adds "Pin to top/bottom" to each row's actions menu; pinned rows stay sticky above/below the scroll body. @default false */
548
+ rowPinning?: boolean;
549
+ /** Enable drag-to-reorder of rows (whole row is draggable). Persists via `onRowOrderChange`. Disabled while sorting or grouping. @default false */
550
+ rowReorder?: boolean;
551
+ /** Enable drag-to-resize row height (handle on the row's bottom edge). @default false */
552
+ rowResize?: boolean;
553
+ /** Called with the new array of row keys after a drag-reorder. */
554
+ onRowOrderChange?: (keys: Array<string | number>) => void;
555
+ /** Initial pivot model (seeds the toolbar **Pivot** panel, which the user can edit live): aggregate `values` across `rows` (row groups) × `columns` (nested column groups). */
556
+ pivot?: {
557
+ rows: string[];
558
+ columns?: string[];
559
+ values: Array<{ field: string; agg?: "sum" | "avg" | "min" | "max" | "count"; label?: string; valueFormatter?: (v: any) => React.ReactNode }>;
560
+ } | null;
561
+ /** Start in pivot view. @default false */
562
+ pivotMode?: boolean;
563
+ }
564
+
565
+ /** Query state reported by a server-mode Datatable. */
566
+ interface DatatableQuery {
567
+ /** Zero-based page index. */
568
+ page: number;
569
+ /** Current rows per page. */
570
+ pageSize: number;
571
+ /** Active sort, or null. */
572
+ sort: { field: string; dir: "asc" | "desc" } | null;
573
+ /** Active column filters. */
574
+ filters: Array<{ field: string; op: string; value: string }>;
575
+ /** Quick-search text. */
576
+ quickFilter: string;
577
+ }
578
+
579
+ interface DatatableColumn {
580
+ /** Row object key (also the sort/filter key). */
581
+ field: string;
582
+ /** Header label. @default field */
583
+ headerName?: string;
584
+ /** Data type. "actions" renders per-row action buttons via getActions. @default "string" */
585
+ type?: "string" | "number" | "actions";
586
+ /** Column width in px. @default 160 (110 for actions) */
587
+ width?: number;
588
+ /** Allow sorting this column. @default true */
589
+ sortable?: boolean;
590
+ /** Allow filtering this column. @default true */
591
+ filterable?: boolean;
592
+ /** Allow hiding this column. @default true */
593
+ hideable?: boolean;
594
+ /** Allow pinning this column. @default true */
595
+ pinnable?: boolean;
596
+ /** Allow grouping rows by this column (via the ⋮ menu). @default true for non-number, non-actions columns */
597
+ groupable?: boolean;
598
+ /** Pin this column on first render. */
599
+ pinned?: "left" | "right";
600
+ /** Allow drag-to-resize of this column. @default true */
601
+ resizable?: boolean;
602
+ /** Summary-footer aggregation: a preset, or a function over the column's values. */
603
+ aggregation?: "sum" | "avg" | "min" | "max" | "count" | ((values: any[], rows: any[]) => React.ReactNode);
604
+ /** Format an aggregation result for the footer (falls back to valueFormatter). */
605
+ aggregationFormatter?: (value: any) => React.ReactNode;
606
+ /** Map a row to its exported CSV value (defaults to the raw field value). */
607
+ exportValue?: (value: any, row: any) => string | number;
608
+ /** Make this column's cells editable (double-click to edit). Overrides the grid `editMode`. */
609
+ editable?: boolean;
610
+ /** Editor type. "select" (or any column with `valueOptions`) renders a dropdown; else a text/number input by column type. */
611
+ editType?: "text" | "number" | "select";
612
+ /** Hide the column header ⋮ menu. @default true for actions columns, else false */
613
+ disableColumnMenu?: boolean;
614
+ /** Distinct values for the "is any of" multi-value filter (recommended in server mode). */
615
+ valueOptions?: Array<string | { value: string; label: string }>;
616
+ /** Format the raw value to a string/number for display. */
617
+ valueFormatter?: (value: any, row: any) => React.ReactNode;
618
+ /** Fully custom cell renderer (badges, avatars, etc.). */
619
+ renderCell?: (value: any, row: any) => React.ReactNode;
620
+ /** For type:"actions" — returns the row's action items. */
621
+ getActions?: (row: any) => DatatableRowAction[];
622
+ }
623
+
624
+ /** A per-row action in an actions column. */
625
+ interface DatatableRowAction {
626
+ /** Icon node (rendered as an icon button, or leading icon in the overflow menu). */
627
+ icon?: React.ReactNode;
628
+ /** Accessible label / tooltip / menu text. */
629
+ label: string;
630
+ /** Click handler, receives the row. */
631
+ onClick?: (row: any) => void;
632
+ /** Place in the ⋮ overflow menu instead of inline. @default false */
633
+ showInMenu?: boolean;
634
+ /** Render in danger color. */
635
+ danger?: boolean;
636
+ disabled?: boolean;
637
+ }
638
+
639
+ /** A batch action shown in the selection toolbar. */
640
+ interface DatatableBatchAction {
641
+ /** Button label. */
642
+ label: string;
643
+ /** Leading icon node. */
644
+ icon?: React.ReactNode;
645
+ /** Handler: (selectedKeys, selectedRows, clearSelection). */
646
+ onClick?: (keys: Array<string | number>, rows: any[], clearSelection: () => void) => void;
647
+ /** Render in danger color. */
648
+ danger?: boolean;
649
+ disabled?: boolean;
650
+ }
651
+
652
+ declare function Datatable(props: DatatableProps): React.JSX.Element;
653
+
654
+ /**
655
+ * Date picker with a calendar popover — month/year navigation, a month grid,
656
+ * today highlight, min/max bounds, clearable value, and custom formatting.
657
+ *
658
+ * @startingPoint section="Inputs" subtitle="Calendar date picker" viewport="700x120"
659
+ */
660
+ interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
661
+ label?: React.ReactNode;
662
+ /** Controlled selected date (or null). */
663
+ value?: Date | null;
664
+ /** Uncontrolled initial date. @default null */
665
+ defaultValue?: Date | null;
666
+ placeholder?: string;
667
+ /** Earliest selectable date. */
668
+ min?: Date;
669
+ /** Latest selectable date. */
670
+ max?: Date;
671
+ disabled?: boolean;
672
+ /** Show a clear (×) button when a date is set. @default true */
673
+ clearable?: boolean;
674
+ /** Custom display formatter (defaults to a localized medium date). */
675
+ format?: (date: Date) => string;
676
+ /** First day of week: 0 = Sunday, 1 = Monday. @default 0 */
677
+ weekStartsOn?: 0 | 1;
678
+ onChange?: (date: Date | null) => void;
679
+ }
680
+
681
+ declare function DatePicker(props: DatePickerProps): React.JSX.Element;
682
+
683
+ interface DateRange {
684
+ start: Date | null;
685
+ end: Date | null;
686
+ }
687
+
688
+ /**
689
+ * Date-range picker — calendar with click-start/click-end selection, in-range
690
+ * highlighting, hover preview, and quick presets (Last 7/14/30/90 days).
691
+ *
692
+ * @startingPoint section="Inputs" subtitle="Date range picker with presets" viewport="700x120"
693
+ */
694
+ interface DateRangePickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
695
+ label?: React.ReactNode;
696
+ /** Controlled range. */
697
+ value?: DateRange;
698
+ /** Uncontrolled initial range. @default { start: null, end: null } */
699
+ defaultValue?: DateRange;
700
+ placeholder?: string;
701
+ /** Show the quick-preset column. @default true */
702
+ presets?: boolean;
703
+ /** First day of week: 0 = Sunday, 1 = Monday. @default 0 */
704
+ weekStartsOn?: 0 | 1;
705
+ onChange?: (range: DateRange) => void;
706
+ }
707
+
708
+ declare function DateRangePicker(props: DateRangePickerProps): React.JSX.Element;
709
+
710
+ /**
711
+ * Modal dialog with scrim, pop-in animation, Esc-to-close, and backdrop close.
712
+ * Render conditionally and drive with `open` + `onClose`.
713
+ */
714
+ interface DialogProps extends React.HTMLAttributes<HTMLDivElement> {
715
+ /** Whether the dialog is visible. */
716
+ open: boolean;
717
+ /** Called on close (Esc, backdrop, close button). */
718
+ onClose?: () => void;
719
+ title?: React.ReactNode;
720
+ description?: React.ReactNode;
721
+ /** Footer content, typically action buttons (right-aligned). */
722
+ footer?: React.ReactNode;
723
+ /** @default "md" */
724
+ size?: "sm" | "md" | "lg";
725
+ /** Close when the backdrop is clicked. @default true */
726
+ closeOnBackdrop?: boolean;
727
+ children?: React.ReactNode;
728
+ }
729
+
730
+ declare function Dialog(props: DialogProps): React.JSX.Element | null;
731
+
732
+ /**
733
+ * Thin rule that separates content. Horizontal or vertical; can carry a centered
734
+ * (or left/right-aligned) label.
735
+ */
736
+ interface DividerProps extends React.HTMLAttributes<HTMLElement> {
737
+ /** @default "horizontal" */
738
+ orientation?: "horizontal" | "vertical";
739
+ /** Indent the start of a horizontal rule. */
740
+ inset?: boolean;
741
+ /** Label alignment when children are provided. @default "center" */
742
+ align?: "left" | "center" | "right";
743
+ /** Optional label text rendered in the middle of the rule. */
744
+ children?: React.ReactNode;
745
+ }
746
+
747
+ declare function Divider(props: DividerProps): React.JSX.Element;
748
+
749
+ /**
750
+ * Slide-in panel anchored to any screen edge, with scrim, Esc-to-close, and a
751
+ * header/body/footer layout. Drive with `open` + `onClose`.
752
+ */
753
+ interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
754
+ open: boolean;
755
+ onClose?: () => void;
756
+ /** Edge the panel slides from. @default "right" */
757
+ side?: "left" | "right" | "top" | "bottom";
758
+ title?: React.ReactNode;
759
+ description?: React.ReactNode;
760
+ /** Footer content, typically action buttons (right-aligned). */
761
+ footer?: React.ReactNode;
762
+ /** Panel width (left/right) or height (top/bottom) — number (px) or CSS value. */
763
+ size?: number | string;
764
+ /** Close when the backdrop is clicked. @default true */
765
+ closeOnBackdrop?: boolean;
766
+ children?: React.ReactNode;
767
+ }
768
+
769
+ declare function Drawer(props: DrawerProps): React.JSX.Element | null;
770
+
771
+ /**
772
+ * Empty / zero-data placeholder — icon, title, description, and call-to-action.
773
+ *
774
+ * @startingPoint section="Feedback" subtitle="Empty / zero-data state" viewport="700x300"
775
+ */
776
+ interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
777
+ /** Illustrative icon shown in a tinted tile. */
778
+ icon?: React.ReactNode;
779
+ title?: React.ReactNode;
780
+ description?: React.ReactNode;
781
+ /** Action buttons row. */
782
+ actions?: React.ReactNode;
783
+ /** Add a dashed border (good for drop targets / placeholders). @default false */
784
+ bordered?: boolean;
785
+ }
786
+
787
+ declare function EmptyState(props: EmptyStateProps): React.JSX.Element;
788
+
789
+ /**
790
+ * Drag-and-drop file upload (dropzone) with a click-to-browse fallback and a
791
+ * removable selected-file list. Controlled via `value` (File[]) + `onChange`,
792
+ * or uncontrolled.
793
+ *
794
+ * @startingPoint section="Inputs" subtitle="Drag & drop file upload" viewport="700x320"
795
+ */
796
+ interface FileUploadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
797
+ /** Accepted file types (input accept string, e.g. "image/*,.pdf"). */
798
+ accept?: string;
799
+ /** Allow selecting multiple files. @default false */
800
+ multiple?: boolean;
801
+ disabled?: boolean;
802
+ /** Hint line under the prompt (defaults to the accept types). */
803
+ hint?: React.ReactNode;
804
+ /** Controlled list of selected files. */
805
+ value?: File[];
806
+ onChange?: (files: File[]) => void;
807
+ }
808
+
809
+ declare function FileUpload(props: FileUploadProps): React.JSX.Element;
810
+
811
+ /**
812
+ * Square (or circular) button for a single icon. Always provide an aria-label.
813
+ *
814
+ * @startingPoint section="Buttons" subtitle="Icon-only button" viewport="700x120"
815
+ */
816
+ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
817
+ /** The icon node to render (e.g. a Lucide SVG). */
818
+ icon?: React.ReactNode;
819
+ /** Visual style. @default "ghost" */
820
+ variant?: "solid" | "soft" | "outline" | "ghost";
821
+ /** Control size. @default "md" */
822
+ size?: "sm" | "md" | "lg";
823
+ /** Fully rounded (circular). @default false */
824
+ round?: boolean;
825
+ /** Accessible label — required for icon-only buttons. */
826
+ "aria-label": string;
827
+ }
828
+
829
+ declare function IconButton(props: IconButtonProps): React.JSX.Element;
830
+
831
+ /**
832
+ * Text input with optional label, hint, error state, and inline icons.
833
+ *
834
+ * @startingPoint section="Inputs" subtitle="Labeled text input with validation" viewport="700x140"
835
+ */
836
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
837
+ /** Field label rendered above the control. */
838
+ label?: React.ReactNode;
839
+ /** Helper text shown below when there is no error. */
840
+ hint?: React.ReactNode;
841
+ /** Error message — turns the field red and replaces the hint. */
842
+ error?: React.ReactNode;
843
+ /** Marks the field required (adds an asterisk). */
844
+ required?: boolean;
845
+ /** Control size. @default "md" */
846
+ size?: "sm" | "md" | "lg";
847
+ /** Icon node inside the field, leading edge (prefix). */
848
+ leftIcon?: React.ReactNode;
849
+ /** Optional suffix icon/node inside the field, trailing edge. For `type="password"`, omitting this
850
+ * shows a built-in reveal/hide eye toggle; providing `rightIcon` replaces it. */
851
+ rightIcon?: React.ReactNode;
852
+ }
853
+
854
+ declare function Input(props: InputProps): React.JSX.Element;
855
+
856
+ interface KanbanColumn {
857
+ /** Unique column id (matches a card's `column`). */
858
+ id: string;
859
+ /** Column heading. */
860
+ title: React.ReactNode;
861
+ /** Dot color for the heading. */
862
+ color?: string;
863
+ }
864
+
865
+ interface KanbanCard {
866
+ id: string;
867
+ /** Which column the card is in. */
868
+ column: string;
869
+ title?: React.ReactNode;
870
+ description?: React.ReactNode;
871
+ /** Small uppercase tag chips. */
872
+ tags?: React.ReactNode[];
873
+ /** Footer node (e.g. an Avatar / due date). */
874
+ footer?: React.ReactNode;
875
+ [key: string]: any;
876
+ }
877
+
878
+ /**
879
+ * Drag-and-drop Kanban board — columns of cards you can drag between columns.
880
+ * Controlled via `cards` + `onCardMove`, or uncontrolled. Supply `renderCard`
881
+ * for custom card content.
882
+ *
883
+ * @startingPoint section="Data display" subtitle="Drag-and-drop Kanban board" viewport="900x420"
884
+ */
885
+ interface KanbanProps extends React.HTMLAttributes<HTMLDivElement> {
886
+ columns: KanbanColumn[];
887
+ cards: KanbanCard[];
888
+ /** Fired when a card is dropped in a new column: (cardId, toColumn, nextCards). */
889
+ onCardMove?: (cardId: string, toColumn: string, nextCards: KanbanCard[]) => void;
890
+ /** Custom card renderer. */
891
+ renderCard?: (card: KanbanCard) => React.ReactNode;
892
+ }
893
+
894
+ declare function Kanban(props: KanbanProps): React.JSX.Element;
895
+
896
+ interface ListItemData {
897
+ /** Primary text. */
898
+ title: React.ReactNode;
899
+ /** Secondary text under the title. */
900
+ description?: React.ReactNode;
901
+ /** Leading node (icon / avatar). */
902
+ leading?: React.ReactNode;
903
+ /** Trailing node (badge, meta, chevron, switch). */
904
+ trailing?: React.ReactNode;
905
+ /** Makes the row a button. */
906
+ onClick?: (e: React.MouseEvent) => void;
907
+ /** Makes the row a link. */
908
+ href?: string;
909
+ /** Highlight as selected. */
910
+ active?: boolean;
911
+ }
912
+
913
+ /**
914
+ * Vertical list of rows with leading/trailing slots, title + description, and
915
+ * optional interactivity (button or link rows).
916
+ *
917
+ * @startingPoint section="Data display" subtitle="List rows with lead/trail slots" viewport="700x300"
918
+ */
919
+ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
920
+ items: ListItemData[];
921
+ /** Drop the card chrome (borderless, transparent). @default false */
922
+ plain?: boolean;
923
+ }
924
+
925
+ declare function List(props: ListProps): React.JSX.Element;
926
+
927
+ /**
928
+ * Multi-select (MUI-Autocomplete style) — type directly among the chips to
929
+ * filter; the overlay shows checkable options only. Supports grouped options
930
+ * and two-line (title + subtitle) options. Backspace on empty input removes
931
+ * the last chip.
932
+ *
933
+ * @startingPoint section="Selects" subtitle="Multi-select with chips & inline search" viewport="700x180"
934
+ */
935
+ interface MultiSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
936
+ label?: React.ReactNode;
937
+ hint?: React.ReactNode;
938
+ error?: React.ReactNode;
939
+ required?: boolean;
940
+ placeholder?: string;
941
+ /** Options — strings, {value,label,description}, or {group,options} groups. */
942
+ options: Array<string | MultiSelectOption | MultiSelectGroup>;
943
+ /** Controlled selected values. */
944
+ value?: string[];
945
+ /** Uncontrolled initial values. */
946
+ defaultValue?: string[];
947
+ onChange?: (values: string[]) => void;
948
+ disabled?: boolean;
949
+ }
950
+
951
+ interface MultiSelectOption {
952
+ value: string;
953
+ label: string;
954
+ /** Optional second line shown under the label. */
955
+ description?: string;
956
+ }
957
+
958
+ /** A group heading with its own options. */
959
+ interface MultiSelectGroup {
960
+ group: string;
961
+ options: Array<string | MultiSelectOption>;
962
+ }
963
+
964
+ declare function MultiSelect(props: MultiSelectProps): React.JSX.Element;
965
+
966
+ interface NavbarLink {
967
+ label: React.ReactNode;
968
+ href?: string;
969
+ icon?: React.ReactNode;
970
+ active?: boolean;
971
+ onClick?: (e: React.MouseEvent) => void;
972
+ }
973
+
974
+ /**
975
+ * Top application bar — brand, inline nav links (hidden on small screens), and
976
+ * a right-aligned actions slot. Sticky + translucent by default.
977
+ *
978
+ * @startingPoint section="Layout" subtitle="Top app bar / navbar" viewport="900x80"
979
+ */
980
+ interface NavbarProps extends React.HTMLAttributes<HTMLElement> {
981
+ /** Brand/logo node at the left. */
982
+ brand?: React.ReactNode;
983
+ /** Center nav links. */
984
+ links?: NavbarLink[];
985
+ /** Right-aligned actions (buttons, avatar, etc.). */
986
+ actions?: React.ReactNode;
987
+ /** Stick to the top with a translucent blur. @default true */
988
+ sticky?: boolean;
989
+ /** Hamburger handler shown on small screens. */
990
+ onMenuClick?: () => void;
991
+ }
992
+
993
+ declare function Navbar(props: NavbarProps): React.JSX.Element;
994
+
995
+ /**
996
+ * Page navigation with first/last, prev/next, and smart ellipsis truncation.
997
+ */
998
+ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
999
+ /** Current 1-based page. @default 1 */
1000
+ page?: number;
1001
+ /** Total number of pages. */
1002
+ total: number;
1003
+ /** Called with the new page when the user navigates. */
1004
+ onChange?: (page: number) => void;
1005
+ /** Page numbers shown on each side of the current page. @default 1 */
1006
+ siblings?: number;
1007
+ /** Page numbers always shown at each end (first/last). @default 1 */
1008
+ boundaries?: number;
1009
+ /** @default "md" */
1010
+ size?: "sm" | "md";
1011
+ /** Show a "Go to" page input for jumping directly to a page. @default false */
1012
+ showJumper?: boolean;
1013
+ /** Label before the jump input. @default "Go to" */
1014
+ jumperLabel?: React.ReactNode;
1015
+ }
1016
+
1017
+ declare function Pagination(props: PaginationProps): React.JSX.Element;
1018
+
1019
+ /**
1020
+ * Click-triggered floating panel anchored to a trigger element. Renders in a
1021
+ * portal (never clipped), auto-flips near the viewport edge, closes on
1022
+ * outside-click / Esc. Use for rich content; for plain text use Tooltip.
1023
+ */
1024
+ interface PopoverProps extends React.HTMLAttributes<HTMLSpanElement> {
1025
+ /** The clickable trigger element. */
1026
+ trigger: React.ReactNode;
1027
+ /** Optional bold title inside the panel. */
1028
+ title?: React.ReactNode;
1029
+ /** Side to open toward. @default "bottom" */
1030
+ placement?: "top" | "bottom" | "left" | "right";
1031
+ /** Cross-axis alignment for top/bottom. @default "center" */
1032
+ align?: "start" | "center" | "end";
1033
+ /** Panel width in px. @default 240 */
1034
+ width?: number;
1035
+ /** Panel content. */
1036
+ children?: React.ReactNode;
1037
+ }
1038
+
1039
+ declare function Popover(props: PopoverProps): React.JSX.Element;
1040
+
1041
+ /**
1042
+ * Linear progress bar — determinate or indeterminate, with semantic tones.
1043
+ */
1044
+ interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
1045
+ /** Current value. @default 0 */
1046
+ value?: number;
1047
+ /** Maximum value. @default 100 */
1048
+ max?: number;
1049
+ /** @default "primary" */
1050
+ tone?: "primary" | "success" | "warning" | "danger";
1051
+ /** @default "md" */
1052
+ size?: "sm" | "md" | "lg";
1053
+ /** Animate as an indeterminate bar (ignores value). */
1054
+ indeterminate?: boolean;
1055
+ /** Show a percentage label above the bar. */
1056
+ showLabel?: boolean;
1057
+ }
1058
+
1059
+ declare function Progress(props: ProgressProps): React.JSX.Element;
1060
+
1061
+ /**
1062
+ * Radio button with label and description. Group several with the same `name`.
1063
+ */
1064
+ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
1065
+ label?: React.ReactNode;
1066
+ description?: React.ReactNode;
1067
+ size?: "sm" | "md";
1068
+ }
1069
+
1070
+ declare function Radio(props: RadioProps): React.JSX.Element;
1071
+
1072
+ /**
1073
+ * Star rating — interactive (click/hover) or read-only display.
1074
+ *
1075
+ * @startingPoint section="Inputs" subtitle="Star rating" viewport="700x90"
1076
+ */
1077
+ interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "color"> {
1078
+ /** Controlled value (0…count). */
1079
+ value?: number;
1080
+ /** Uncontrolled initial value. @default 0 */
1081
+ defaultValue?: number;
1082
+ /** Number of stars. @default 5 */
1083
+ count?: number;
1084
+ /** @default "md" */
1085
+ size?: "sm" | "md" | "lg";
1086
+ /** Filled-star color (defaults to the warning/amber token). */
1087
+ color?: string;
1088
+ /** Display only, no interaction. @default false */
1089
+ readOnly?: boolean;
1090
+ /** Show the numeric value beside the stars. @default false */
1091
+ showValue?: boolean;
1092
+ onChange?: (value: number) => void;
1093
+ }
1094
+
1095
+ declare function Rating(props: RatingProps): React.JSX.Element;
1096
+
1097
+ /**
1098
+ * Custom select with a rounded popover (no native browser dropdown). Supports
1099
+ * grouped options and two-line (title + subtitle) options. Keyboard navigable.
1100
+ *
1101
+ * @startingPoint section="Selects" subtitle="Custom select with grouped options" viewport="700x160"
1102
+ */
1103
+ interface SelectProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue"> {
1104
+ label?: React.ReactNode;
1105
+ hint?: React.ReactNode;
1106
+ error?: React.ReactNode;
1107
+ required?: boolean;
1108
+ size?: "sm" | "md" | "lg";
1109
+ placeholder?: string;
1110
+ /** Placeholder for the in-popover search box. @default "Search…" */
1111
+ searchPlaceholder?: string;
1112
+ /** Show a search box inside the dropdown to filter options. Omit to auto-enable when there are >5 options. */
1113
+ searchable?: boolean;
1114
+ /** Options — strings, {value,label,description}, or {group,options} groups. */
1115
+ options: Array<string | SelectOption | SelectGroup>;
1116
+ /** Controlled selected value. */
1117
+ value?: string | null;
1118
+ /** Uncontrolled initial value. */
1119
+ defaultValue?: string | null;
1120
+ onChange?: (value: string) => void;
1121
+ disabled?: boolean;
1122
+ /** Open the menu upward instead of down (e.g. near a viewport bottom). @default "bottom" */
1123
+ placement?: "bottom" | "top";
1124
+ /** Render the dropdown in a portal (position:fixed on document.body) so it is never clipped by a
1125
+ * scrolling/overflow-hidden ancestor; auto-flips up near the viewport bottom. @default false */
1126
+ portal?: boolean;
1127
+ /** Minimum popover width in px when portaled (useful when the trigger is narrow). @default 0 */
1128
+ minWidth?: number;
1129
+ }
1130
+
1131
+ interface SelectOption {
1132
+ value: string;
1133
+ label: string;
1134
+ /** Optional second line shown under the label. */
1135
+ description?: string;
1136
+ }
1137
+
1138
+ /** A group heading with its own options. */
1139
+ interface SelectGroup {
1140
+ group: string;
1141
+ options: Array<string | SelectOption>;
1142
+ }
1143
+
1144
+ declare function Select(props: SelectProps): React.JSX.Element;
1145
+
1146
+ interface SidebarItem {
1147
+ /** Item label. */
1148
+ label?: React.ReactNode;
1149
+ /** Leading icon (shown in collapsed mode too). */
1150
+ icon?: React.ReactNode;
1151
+ href?: string;
1152
+ active?: boolean;
1153
+ onClick?: (e: React.MouseEvent) => void;
1154
+ /** Trailing count badge. */
1155
+ badge?: React.ReactNode;
1156
+ /** Render as an uppercase section heading instead of a link. */
1157
+ section?: React.ReactNode;
1158
+ }
1159
+
1160
+ /**
1161
+ * Collapsible side navigation — brand header, grouped nav items with icons and
1162
+ * badges, an optional footer, and a collapse toggle (icon-only when collapsed).
1163
+ *
1164
+ * @startingPoint section="Layout" subtitle="Collapsible side navigation" viewport="280x520"
1165
+ */
1166
+ interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
1167
+ brand?: React.ReactNode;
1168
+ items: SidebarItem[];
1169
+ /** Content pinned above the collapse toggle (e.g. a user row). */
1170
+ footer?: React.ReactNode;
1171
+ /** Controlled collapsed state. */
1172
+ collapsed?: boolean;
1173
+ /** Uncontrolled initial collapsed state. @default false */
1174
+ defaultCollapsed?: boolean;
1175
+ /** Show the collapse toggle. @default true */
1176
+ collapsible?: boolean;
1177
+ onCollapsedChange?: (collapsed: boolean) => void;
1178
+ }
1179
+
1180
+ declare function Sidebar(props: SidebarProps): React.JSX.Element;
1181
+
1182
+ /**
1183
+ * Shimmering placeholder shown while content loads.
1184
+ */
1185
+ interface SkeletonProps extends React.HTMLAttributes<HTMLSpanElement> {
1186
+ /** Shape. @default "text" */
1187
+ variant?: "text" | "circle" | "rect";
1188
+ /** CSS width (e.g. "120px", "60%"). */
1189
+ width?: string | number;
1190
+ /** CSS height. */
1191
+ height?: string | number;
1192
+ /** For text variant: number of lines (last is shortened). @default 1 */
1193
+ lines?: number;
1194
+ }
1195
+
1196
+ declare function Skeleton(props: SkeletonProps): React.JSX.Element;
1197
+
1198
+ /**
1199
+ * Range slider with a filled track, draggable thumb, value bubble, optional
1200
+ * ticks, and full keyboard support (arrows / Home / End).
1201
+ *
1202
+ * @startingPoint section="Inputs" subtitle="Range slider with value bubble" viewport="700x110"
1203
+ */
1204
+ interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
1205
+ /** Label shown above the track. */
1206
+ label?: React.ReactNode;
1207
+ /** Controlled value. */
1208
+ value?: number;
1209
+ /** Uncontrolled initial value. @default 0 */
1210
+ defaultValue?: number;
1211
+ /** @default 0 */
1212
+ min?: number;
1213
+ /** @default 100 */
1214
+ max?: number;
1215
+ /** @default 1 */
1216
+ step?: number;
1217
+ disabled?: boolean;
1218
+ /** Show the current value at the top-right. @default true */
1219
+ showValue?: boolean;
1220
+ /** Render step ticks along the rail. @default false */
1221
+ showTicks?: boolean;
1222
+ /** Format the displayed value (label + bubble). */
1223
+ formatValue?: (value: number) => React.ReactNode;
1224
+ onChange?: (value: number) => void;
1225
+ }
1226
+
1227
+ declare function Slider(props: SliderProps): React.JSX.Element;
1228
+
1229
+ /**
1230
+ * Indeterminate loading spinner.
1231
+ */
1232
+ interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
1233
+ /** @default "md" */
1234
+ size?: "sm" | "md" | "lg" | "xl";
1235
+ /** @default "primary" — use "white" on colored backgrounds. */
1236
+ tone?: "primary" | "neutral" | "white";
1237
+ /** Accessible label. @default "Loading" */
1238
+ label?: string;
1239
+ }
1240
+
1241
+ declare function Spinner(props: SpinnerProps): React.JSX.Element;
1242
+
1243
+ /**
1244
+ * KPI / metric card — label, big value, optional icon, trend delta, and help text.
1245
+ *
1246
+ * @startingPoint section="Data display" subtitle="KPI / metric card" viewport="700x160"
1247
+ */
1248
+ interface StatProps extends React.HTMLAttributes<HTMLDivElement> {
1249
+ label: React.ReactNode;
1250
+ value: React.ReactNode;
1251
+ /** Icon shown top-right in a tinted tile. */
1252
+ icon?: React.ReactNode;
1253
+ /** Trend value, e.g. "+12.5%" or "-3%". */
1254
+ delta?: React.ReactNode;
1255
+ /** Force the trend direction/color; otherwise inferred from a leading "-". */
1256
+ deltaDirection?: "up" | "down" | "flat";
1257
+ /** Muted text after the delta, e.g. "vs last month". */
1258
+ helpText?: React.ReactNode;
1259
+ /** Drop the card chrome (no border/background/padding). @default false */
1260
+ plain?: boolean;
1261
+ }
1262
+
1263
+ declare function Stat(props: StatProps): React.JSX.Element;
1264
+
1265
+ interface Step {
1266
+ /** Step title. */
1267
+ title: React.ReactNode;
1268
+ /** Optional sub-label under the title. */
1269
+ description?: React.ReactNode;
1270
+ /** Custom indicator content (defaults to the step number). */
1271
+ icon?: React.ReactNode;
1272
+ /** Mark this step as errored (red indicator). */
1273
+ error?: boolean;
1274
+ }
1275
+
1276
+ /**
1277
+ * Multi-step progress indicator. Steps before `active` show a check, the active
1278
+ * step is ringed, later steps are muted; horizontal or vertical.
1279
+ *
1280
+ * @startingPoint section="Navigation" subtitle="Multi-step progress" viewport="700x140"
1281
+ */
1282
+ interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
1283
+ steps: Step[];
1284
+ /** Index of the current step. @default 0 */
1285
+ active?: number;
1286
+ /** @default "horizontal" */
1287
+ orientation?: "horizontal" | "vertical";
1288
+ /** Allow clicking completed/active steps. @default false */
1289
+ clickable?: boolean;
1290
+ /** Fired when a clickable step is clicked. */
1291
+ onStepClick?: (index: number) => void;
1292
+ }
1293
+
1294
+ declare function Stepper(props: StepperProps): React.JSX.Element;
1295
+
1296
+ /**
1297
+ * Toggle switch with a springy thumb. Use for instant on/off settings.
1298
+ *
1299
+ * @startingPoint section="Toggles" subtitle="On/off toggle switch" viewport="700x120"
1300
+ */
1301
+ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
1302
+ label?: React.ReactNode;
1303
+ description?: React.ReactNode;
1304
+ size?: "sm" | "md";
1305
+ }
1306
+
1307
+ declare function Switch(props: SwitchProps): React.JSX.Element;
1308
+
1309
+ /**
1310
+ * Data table with sticky-styled header, hover/striped rows, client-side
1311
+ * sorting, custom cell renderers, and row selection highlight.
1312
+ *
1313
+ * @startingPoint section="Data display" subtitle="Sortable data table" viewport="700x320"
1314
+ */
1315
+ interface TableProps<T = any> extends React.HTMLAttributes<HTMLDivElement> {
1316
+ columns: TableColumn<T>[];
1317
+ data: T[];
1318
+ /** Row hover highlight. @default true */
1319
+ hover?: boolean;
1320
+ /** Zebra striping. @default false */
1321
+ striped?: boolean;
1322
+ /** @default "md" */
1323
+ size?: "sm" | "md";
1324
+ /** Enable click-to-sort headers. @default false */
1325
+ sortable?: boolean;
1326
+ /** Returns a stable key per row. */
1327
+ rowKey?: (row: T, index: number) => string | number;
1328
+ /** Keys of rows to highlight as selected. */
1329
+ selectedKeys?: Array<string | number>;
1330
+ }
1331
+
1332
+ interface TableColumn<T = any> {
1333
+ /** Object key in each row + sort key. */
1334
+ key: string;
1335
+ /** Header label. */
1336
+ header: React.ReactNode;
1337
+ /** Cell alignment. @default "left" */
1338
+ align?: "left" | "center" | "right";
1339
+ /** Fixed column width (CSS value). */
1340
+ width?: string;
1341
+ /** Disable sorting for this column when the table is sortable. */
1342
+ sortable?: boolean;
1343
+ /** Custom cell renderer. */
1344
+ render?: (value: any, row: T, index: number) => React.ReactNode;
1345
+ }
1346
+
1347
+ declare function Table<T = any>(props: TableProps<T>): React.JSX.Element;
1348
+
1349
+ /**
1350
+ * Tabbed navigation with a sliding active indicator. Line or pill variant.
1351
+ * Controlled (`value` + `onChange`) or uncontrolled (`defaultValue`).
1352
+ *
1353
+ * @startingPoint section="Navigation" subtitle="Tabs with sliding indicator" viewport="700x220"
1354
+ */
1355
+ interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
1356
+ items: TabItem[];
1357
+ value?: string;
1358
+ defaultValue?: string;
1359
+ onChange?: (value: string) => void;
1360
+ /** @default "line" */
1361
+ variant?: "line" | "pill";
1362
+ }
1363
+
1364
+ interface TabItem {
1365
+ /** Unique value / id. */
1366
+ value: string;
1367
+ /** Tab label. */
1368
+ label: React.ReactNode;
1369
+ /** Optional leading icon. */
1370
+ icon?: React.ReactNode;
1371
+ /** Optional count pill. */
1372
+ count?: number;
1373
+ /** Panel content rendered when active (omit for nav-only tabs). */
1374
+ content?: React.ReactNode;
1375
+ }
1376
+
1377
+ declare function Tabs(props: TabsProps): React.JSX.Element;
1378
+
1379
+ /**
1380
+ * Removable chip for filters, selected items, and keywords.
1381
+ */
1382
+ interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
1383
+ /** Show a remove (×) button and handle its click. */
1384
+ onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;
1385
+ /** Optional leading icon. */
1386
+ leftIcon?: React.ReactNode;
1387
+ children?: React.ReactNode;
1388
+ }
1389
+
1390
+ declare function Tag(props: TagProps): React.JSX.Element;
1391
+
1392
+ /**
1393
+ * Multi-line text input with label, hint, and error state.
1394
+ */
1395
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
1396
+ label?: React.ReactNode;
1397
+ hint?: React.ReactNode;
1398
+ error?: React.ReactNode;
1399
+ required?: boolean;
1400
+ }
1401
+
1402
+ declare function Textarea(props: TextareaProps): React.JSX.Element;
1403
+
1404
+ interface TimelineItem {
1405
+ /** Event title. */
1406
+ title: React.ReactNode;
1407
+ /** Muted timestamp shown to the right of the title. */
1408
+ time?: React.ReactNode;
1409
+ /** Supporting description. */
1410
+ description?: React.ReactNode;
1411
+ /** Icon inside the node dot. */
1412
+ icon?: React.ReactNode;
1413
+ /** Node color. */
1414
+ tone?: "primary" | "success" | "warning" | "danger";
1415
+ }
1416
+
1417
+ /**
1418
+ * Vertical timeline of events — node dots connected by a rail, each with title,
1419
+ * time, and description.
1420
+ *
1421
+ * @startingPoint section="Data display" subtitle="Vertical event timeline" viewport="700x340"
1422
+ */
1423
+ interface TimelineProps extends React.HTMLAttributes<HTMLUListElement> {
1424
+ items: TimelineItem[];
1425
+ }
1426
+
1427
+ declare function Timeline(props: TimelineProps): React.JSX.Element;
1428
+
1429
+ /**
1430
+ * Transient notification card. Render inside a <ToastViewport> and manage a
1431
+ * list in state (push on action, remove on close / timeout).
1432
+ */
1433
+ interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {
1434
+ /** @default "default" */
1435
+ tone?: "default" | "success" | "warning" | "danger" | "info";
1436
+ /** Bold heading. */
1437
+ title?: React.ReactNode;
1438
+ /** Override the tone icon. */
1439
+ icon?: React.ReactNode;
1440
+ /** Show close button + handle dismissal. */
1441
+ onClose?: () => void;
1442
+ children?: React.ReactNode;
1443
+ }
1444
+
1445
+ declare function Toast(props: ToastProps): React.JSX.Element;
1446
+
1447
+ interface ToastViewportProps extends React.HTMLAttributes<HTMLDivElement> {
1448
+ children?: React.ReactNode;
1449
+ }
1450
+
1451
+ /** Fixed bottom-right stack container for toasts. */
1452
+ declare function ToastViewport(props: ToastViewportProps): React.JSX.Element;
1453
+
1454
+ /**
1455
+ * Hover/focus tooltip. Wraps a single trigger element.
1456
+ */
1457
+ interface TooltipProps extends React.HTMLAttributes<HTMLSpanElement> {
1458
+ /** Tooltip text/content. */
1459
+ label: React.ReactNode;
1460
+ /** @default "top" */
1461
+ placement?: "top" | "bottom" | "left" | "right";
1462
+ /** Open delay in ms. @default 120 */
1463
+ delay?: number;
1464
+ /** The trigger element. */
1465
+ children: React.ReactNode;
1466
+ }
1467
+
1468
+ declare function Tooltip(props: TooltipProps): React.JSX.Element;
1469
+
1470
+ interface TreeNode {
1471
+ /** Unique id. */
1472
+ id: string;
1473
+ /** Row label. */
1474
+ label: React.ReactNode;
1475
+ /** Leading icon. */
1476
+ icon?: React.ReactNode;
1477
+ /** Trailing meta (count, etc.). */
1478
+ badge?: React.ReactNode;
1479
+ /** Child nodes (presence makes the row expandable). */
1480
+ children?: TreeNode[];
1481
+ }
1482
+
1483
+ /**
1484
+ * Hierarchical tree with expand/collapse carets, indentation, icons, and a
1485
+ * selected row. Good for file explorers and nested navigation.
1486
+ *
1487
+ * @startingPoint section="Navigation" subtitle="Hierarchical tree view" viewport="700x340"
1488
+ */
1489
+ interface TreeViewProps extends React.HTMLAttributes<HTMLDivElement> {
1490
+ data: TreeNode[];
1491
+ /** Node ids expanded on first render. */
1492
+ defaultExpanded?: string[];
1493
+ /** Controlled selected node id. */
1494
+ selectedId?: string | null;
1495
+ /** Fired with the node when a row is clicked. */
1496
+ onSelect?: (node: TreeNode) => void;
1497
+ }
1498
+
1499
+ declare function TreeView(props: TreeViewProps): React.JSX.Element;
1500
+
1501
+ export { Accordion, type AccordionItem, type AccordionProps, Alert, type AlertProps, Avatar, AvatarMenu, type AvatarMenuProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartDatum, type ChartProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type Command, CommandPalette, type CommandPaletteProps, Currency, CurrencyField, type CurrencyFieldProps, type CurrencyOption, type CurrencyProps, Datatable, type DatatableBatchAction, type DatatableColumn, type DatatableProps, type DatatableQuery, type DatatableRowAction, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, type DialogProps, Divider, type DividerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, FileUpload, type FileUploadProps, IconButton, type IconButtonProps, Input, type InputProps, Kanban, type KanbanCard, type KanbanColumn, type KanbanProps, List, type ListItemData, type ListProps, Menu, type MenuItemDef, type MenuProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, Navbar, type NavbarLink, type NavbarProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, Radio, type RadioProps, Rating, type RatingProps, Select, type SelectGroup, type SelectOption, type SelectProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stat, type StatProps, type Step, Stepper, type StepperProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastProps, ToastViewport, type ToastViewportProps, Tooltip, type TooltipProps, type TreeNode, TreeView, type TreeViewProps };