twico-ui 1.5.0 → 1.6.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/dist/index.cjs +1467 -852
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +180 -23
- package/dist/index.d.ts +180 -23
- package/dist/index.mjs +1466 -852
- package/dist/index.mjs.map +1 -1
- package/llms.txt +26 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -288,6 +288,8 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">
|
|
|
288
288
|
title?: React.ReactNode;
|
|
289
289
|
/** Muted subtitle under the title. */
|
|
290
290
|
subtitle?: React.ReactNode;
|
|
291
|
+
/** Header actions rendered top-right, opposite the title/subtitle (e.g. a button or menu). */
|
|
292
|
+
actions?: React.ReactNode;
|
|
291
293
|
/** Footer content (e.g. action buttons). */
|
|
292
294
|
footer?: React.ReactNode;
|
|
293
295
|
/** Visual style. @default "elevated" */
|
|
@@ -449,6 +451,8 @@ interface Option {
|
|
|
449
451
|
label: string;
|
|
450
452
|
/** Optional second line shown under the label. */
|
|
451
453
|
description?: string;
|
|
454
|
+
/** Disable this option — not selectable, skipped by keyboard navigation. */
|
|
455
|
+
disabled?: boolean;
|
|
452
456
|
}
|
|
453
457
|
|
|
454
458
|
/** A labeled group of options (or bare string values). */
|
|
@@ -494,6 +498,16 @@ interface ComboboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
494
498
|
portal?: boolean;
|
|
495
499
|
/** Minimum popover width in px when portaled (useful when the control is narrow). @default 0 */
|
|
496
500
|
minWidth?: number;
|
|
501
|
+
/** Called with the raw query on every keystroke — drive a debounced remote fetch (with `loading` + `filter={false}`). */
|
|
502
|
+
onInputChange?: (query: string) => void;
|
|
503
|
+
/** Client-side filtering: `false` shows options as-is (server-ranked); a function replaces the default label/description match. */
|
|
504
|
+
filter?: boolean | ((option: ComboboxOption, query: string) => boolean);
|
|
505
|
+
/** Show a loading row instead of the option list / empty state. @default false */
|
|
506
|
+
loading?: boolean;
|
|
507
|
+
/** Text shown when no options match. @default "No results found" */
|
|
508
|
+
emptyText?: string;
|
|
509
|
+
/** Name for a hidden form field so the selected value participates in native form submission. */
|
|
510
|
+
name?: string;
|
|
497
511
|
/** Composed with the field's open-on-focus behavior — your handler runs first. */
|
|
498
512
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
499
513
|
/** Composed with the field's keyboard navigation (Arrows/Enter/Escape) — your handler runs first; call `event.preventDefault()` to suppress it. */
|
|
@@ -541,6 +555,8 @@ interface CommandPaletteProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
541
555
|
commands: Command[];
|
|
542
556
|
placeholder?: string;
|
|
543
557
|
emptyText?: string;
|
|
558
|
+
/** Accessible name for the search input. @default "Command palette search" */
|
|
559
|
+
searchLabel?: string;
|
|
544
560
|
}
|
|
545
561
|
|
|
546
562
|
declare function CommandPalette(props: CommandPaletteProps): React.JSX.Element | null;
|
|
@@ -702,6 +718,10 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
702
718
|
* rearrange only the movable, unpinned columns and leave pinned/actions columns in place.
|
|
703
719
|
* @default false */
|
|
704
720
|
disableColumnReorder?: boolean;
|
|
721
|
+
/** Message rendered when there are no rows (filter-aware default: "No rows match your filters" when a filter/quick-search is active, else "No rows"). */
|
|
722
|
+
emptyMessage?: React.ReactNode;
|
|
723
|
+
/** Render a custom empty state inside the table body (e.g. the shipped `<EmptyState/>`). Overrides `emptyMessage`. */
|
|
724
|
+
renderEmpty?: () => React.ReactNode;
|
|
705
725
|
/** Disable column resizing. When enabled (the default off), drag a header's right edge to resize a
|
|
706
726
|
* column, or **double-click** that edge to auto-fit the column to its widest visible content
|
|
707
727
|
* (header + rendered cells), Excel-style. @default false */
|
|
@@ -825,6 +845,8 @@ interface DatatableColumn<T = any> {
|
|
|
825
845
|
pinned?: "left" | "right";
|
|
826
846
|
/** Allow drag-to-resize of this column. @default true */
|
|
827
847
|
resizable?: boolean;
|
|
848
|
+
/** Allow drag / menu / keyboard reorder of this column (independent of the table-wide `disableColumnReorder`). @default true */
|
|
849
|
+
reorderable?: boolean;
|
|
828
850
|
/** Summary-footer aggregation: a preset, or a function over the column's values. */
|
|
829
851
|
aggregation?: "sum" | "avg" | "min" | "max" | "count" | ((values: any[], rows: T[]) => React.ReactNode);
|
|
830
852
|
/** Format an aggregation result for the footer (falls back to valueFormatter). */
|
|
@@ -969,6 +991,12 @@ interface DateRangePickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
969
991
|
locale?: string;
|
|
970
992
|
/** First day of week: 0 = Sunday … 6 = Saturday. @default 0 */
|
|
971
993
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
994
|
+
/** Earliest selectable date (inclusive); earlier days are disabled. */
|
|
995
|
+
min?: Date;
|
|
996
|
+
/** Latest selectable date (inclusive); later days are disabled. */
|
|
997
|
+
max?: Date;
|
|
998
|
+
/** Predicate to disable arbitrary dates (return true to disable). */
|
|
999
|
+
disabledDate?: (date: Date) => boolean;
|
|
972
1000
|
/** Disable all interaction (the popover cannot be opened). @default false */
|
|
973
1001
|
disabled?: boolean;
|
|
974
1002
|
/** Color intent for the focus/open accent. @default "primary" */
|
|
@@ -1068,15 +1096,16 @@ declare function EmptyState(props: EmptyStateProps): React.JSX.Element;
|
|
|
1068
1096
|
/**
|
|
1069
1097
|
* Shared form-field chrome (label, hint, error, required asterisk) that wraps ANY control.
|
|
1070
1098
|
*
|
|
1071
|
-
* `Field`
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1099
|
+
* `Field` renders the label + your `children` + a single hint/error line, reusing the exact
|
|
1100
|
+
* `.twc-field` markup Input/Select inline so every field looks identical. When `children` is a
|
|
1101
|
+
* SINGLE element, Field auto-wires it: it sets `aria-describedby` (merged with any the child
|
|
1102
|
+
* already has) to the hint/error id (`` `${id}-desc` ``) and `aria-invalid` when `error` is
|
|
1103
|
+
* present (never clobbering a child's explicit `aria-invalid`). Multiple/fragment/string children
|
|
1104
|
+
* keep manual wiring. `error` replaces `hint` when both are given (error wins).
|
|
1076
1105
|
*
|
|
1077
1106
|
* @example
|
|
1078
1107
|
* <Field label="Email" hint="We never share it." htmlFor="email" id="email-field">
|
|
1079
|
-
* <input id="email"
|
|
1108
|
+
* <input id="email" />
|
|
1080
1109
|
* </Field>
|
|
1081
1110
|
*/
|
|
1082
1111
|
interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "id"> {
|
|
@@ -1129,6 +1158,12 @@ interface FileUploadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "on
|
|
|
1129
1158
|
value?: File[];
|
|
1130
1159
|
/** Uncontrolled initial file list. @default [] */
|
|
1131
1160
|
defaultValue?: File[];
|
|
1161
|
+
/** Max size per file in bytes; larger files are rejected (drag + browse). */
|
|
1162
|
+
maxSize?: number;
|
|
1163
|
+
/** Max number of files retained (multiple mode); extra files are rejected. */
|
|
1164
|
+
maxFiles?: number;
|
|
1165
|
+
/** Called with the files that failed validation: `{ file, reason }` where reason is "type" | "size" | "count". */
|
|
1166
|
+
onReject?: (rejections: Array<{ file: File; reason: "type" | "size" | "count" }>) => void;
|
|
1132
1167
|
onChange?: (files: File[]) => void;
|
|
1133
1168
|
}
|
|
1134
1169
|
|
|
@@ -1175,11 +1210,18 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
1175
1210
|
size?: "sm" | "md" | "lg";
|
|
1176
1211
|
/** Color intent for the focus/open accent. @default "primary" */
|
|
1177
1212
|
tone?: Tone;
|
|
1178
|
-
/** Icon node inside the field, leading edge
|
|
1213
|
+
/** Icon-only node inside the field, leading edge — for a bordered text addon use `leftAddon`. */
|
|
1179
1214
|
leftIcon?: React.ReactNode;
|
|
1180
1215
|
/** Optional suffix icon/node inside the field, trailing edge. For `type="password"`, omitting this
|
|
1181
|
-
* shows a built-in reveal/hide eye toggle; providing `rightIcon` replaces it.
|
|
1216
|
+
* shows a built-in reveal/hide eye toggle; providing `rightIcon` replaces it. Icon-only — for a
|
|
1217
|
+
* bordered text addon use `rightAddon`. */
|
|
1182
1218
|
rightIcon?: React.ReactNode;
|
|
1219
|
+
/** Bordered text addon flush against the leading edge (e.g. `https://`, `@`) — distinct from the inline `leftIcon`. */
|
|
1220
|
+
leftAddon?: React.ReactNode;
|
|
1221
|
+
/** Bordered text addon flush against the trailing edge (e.g. `.00`, `kg`, `%`). */
|
|
1222
|
+
rightAddon?: React.ReactNode;
|
|
1223
|
+
/** With `maxLength`, render a live `current / max` character counter on the hint/error line; danger-toned near the limit. @default false */
|
|
1224
|
+
showCount?: boolean;
|
|
1183
1225
|
}
|
|
1184
1226
|
|
|
1185
1227
|
declare function Input(props: InputProps): React.JSX.Element;
|
|
@@ -1248,7 +1290,7 @@ interface ListItemData {
|
|
|
1248
1290
|
onClick?: (e: React.MouseEvent) => void;
|
|
1249
1291
|
/** Makes the row a link. */
|
|
1250
1292
|
href?: string;
|
|
1251
|
-
/** Highlight as selected. */
|
|
1293
|
+
/** Highlight as selected — also sets `aria-current="page"` on link/button rows. */
|
|
1252
1294
|
active?: boolean;
|
|
1253
1295
|
}
|
|
1254
1296
|
|
|
@@ -1262,6 +1304,8 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
|
1262
1304
|
items: ListItemData[];
|
|
1263
1305
|
/** Drop the card chrome (borderless, transparent). @default false */
|
|
1264
1306
|
plain?: boolean;
|
|
1307
|
+
/** Shown as a centered zero-state row when `items` is empty. @default "Nothing here yet" */
|
|
1308
|
+
emptyMessage?: React.ReactNode;
|
|
1265
1309
|
}
|
|
1266
1310
|
|
|
1267
1311
|
declare function List(props: ListProps): React.JSX.Element;
|
|
@@ -1303,6 +1347,16 @@ interface MultiSelectProps extends Omit<React.InputHTMLAttributes<HTMLInputEleme
|
|
|
1303
1347
|
portal?: boolean;
|
|
1304
1348
|
/** Minimum popover width in px when portaled (useful when the control is narrow). @default 0 */
|
|
1305
1349
|
minWidth?: number;
|
|
1350
|
+
/** Show a loading row instead of the option list / empty state. @default false */
|
|
1351
|
+
loading?: boolean;
|
|
1352
|
+
/** Text shown when no options match. @default "No results found" */
|
|
1353
|
+
emptyText?: string;
|
|
1354
|
+
/** Name for hidden form fields (one per selected value) for native form submission. */
|
|
1355
|
+
name?: string;
|
|
1356
|
+
/** Cap the number of selectable values; once reached, unselected options become disabled. */
|
|
1357
|
+
max?: number;
|
|
1358
|
+
/** Collapse chips after N into a "+K more" pill. */
|
|
1359
|
+
maxTagCount?: number;
|
|
1306
1360
|
/** Composed with the field's open-on-focus behavior — your handler runs first. */
|
|
1307
1361
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
1308
1362
|
/** Composed with the field's keyboard navigation (Arrows/Enter/Escape/Backspace) — your handler runs first; call `event.preventDefault()` to suppress it. */
|
|
@@ -1381,6 +1435,8 @@ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onCha
|
|
|
1381
1435
|
showPageJumper?: boolean;
|
|
1382
1436
|
/** Label before the jump input. @default "Go to" */
|
|
1383
1437
|
jumperLabel?: React.ReactNode;
|
|
1438
|
+
/** Accessible label for each numbered page button (for i18n). @default (n) => `Page ${n}` */
|
|
1439
|
+
getPageLabel?: (page: number) => string;
|
|
1384
1440
|
}
|
|
1385
1441
|
|
|
1386
1442
|
declare function Pagination(props: PaginationProps): React.JSX.Element;
|
|
@@ -1456,15 +1512,68 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
1456
1512
|
|
|
1457
1513
|
declare function Radio(props: RadioProps): React.JSX.Element;
|
|
1458
1514
|
|
|
1515
|
+
interface RadioGroupOption {
|
|
1516
|
+
/** Submitted value for this choice. */
|
|
1517
|
+
value: string;
|
|
1518
|
+
/** Visible label. */
|
|
1519
|
+
label?: React.ReactNode;
|
|
1520
|
+
/** Secondary text under the label. */
|
|
1521
|
+
description?: React.ReactNode;
|
|
1522
|
+
/** Disable just this option. */
|
|
1523
|
+
disabled?: boolean;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Grouped radios with one controlled value, a `role="radiogroup"` container, a hoisted
|
|
1528
|
+
* group label/hint/error, and a shared `name`. Provide choices via `options` or by passing
|
|
1529
|
+
* `<Radio>` children (their `name`/`checked`/`onChange` are injected). Native inputs give
|
|
1530
|
+
* roving tabindex + Arrow-key selection for free.
|
|
1531
|
+
*
|
|
1532
|
+
* @startingPoint section="Inputs" subtitle="Grouped radios with one value" viewport="700x220"
|
|
1533
|
+
*/
|
|
1534
|
+
interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
1535
|
+
/** Shared `name` for the radios (auto-generated when omitted). */
|
|
1536
|
+
name?: string;
|
|
1537
|
+
/** Controlled selected value. */
|
|
1538
|
+
value?: string;
|
|
1539
|
+
/** Uncontrolled initial value. */
|
|
1540
|
+
defaultValue?: string;
|
|
1541
|
+
/** Called with the newly-selected value. */
|
|
1542
|
+
onChange?: (value: string) => void;
|
|
1543
|
+
/** Choices (alternative to passing `<Radio>` children). */
|
|
1544
|
+
options?: RadioGroupOption[];
|
|
1545
|
+
/** `<Radio>` children (alternative to `options`); their group props are injected. */
|
|
1546
|
+
children?: React.ReactNode;
|
|
1547
|
+
/** Group label (rendered as the radiogroup's accessible name). */
|
|
1548
|
+
label?: React.ReactNode;
|
|
1549
|
+
/** Helper text below the group. */
|
|
1550
|
+
hint?: React.ReactNode;
|
|
1551
|
+
/** Error text below the group; sets `aria-invalid` and is announced once for the whole group. */
|
|
1552
|
+
error?: React.ReactNode;
|
|
1553
|
+
/** Lay the radios in a column or a wrapping row. @default "vertical" */
|
|
1554
|
+
orientation?: "vertical" | "horizontal";
|
|
1555
|
+
/** Disable every radio in the group. @default false */
|
|
1556
|
+
disabled?: boolean;
|
|
1557
|
+
/** Mark the group required (native `required` on the radios + `aria-required`). @default false */
|
|
1558
|
+
required?: boolean;
|
|
1559
|
+
/** Control size applied to each radio. @default "md" */
|
|
1560
|
+
size?: "sm" | "md" | "lg";
|
|
1561
|
+
/** Color intent applied to each radio. @default "primary" */
|
|
1562
|
+
tone?: Tone;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
declare function RadioGroup(props: RadioGroupProps): React.JSX.Element;
|
|
1566
|
+
|
|
1459
1567
|
/**
|
|
1460
1568
|
* Star rating — interactive (click/hover) or read-only display.
|
|
1461
1569
|
*
|
|
1462
1570
|
* @startingPoint section="Inputs" subtitle="Star rating" viewport="700x90"
|
|
1463
1571
|
*/
|
|
1464
1572
|
interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "color"> {
|
|
1465
|
-
/** Controlled value (0…count).
|
|
1573
|
+
/** Controlled value (0…count; 0 means "no rating"). A fractional value renders a partial
|
|
1574
|
+
* star fill (display) — interactive click/keyboard selection is integer-only. */
|
|
1466
1575
|
value?: number;
|
|
1467
|
-
/** Uncontrolled initial value. @default 0 */
|
|
1576
|
+
/** Uncontrolled initial value (0 means "no rating"). @default 0 */
|
|
1468
1577
|
defaultValue?: number;
|
|
1469
1578
|
/** Number of stars. @default 5 */
|
|
1470
1579
|
count?: number;
|
|
@@ -1474,12 +1583,19 @@ interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChan
|
|
|
1474
1583
|
tone?: Tone;
|
|
1475
1584
|
/** Explicit filled-star color; overrides `tone` when set. */
|
|
1476
1585
|
color?: string;
|
|
1477
|
-
/** Display only
|
|
1586
|
+
/** Display only — renders a single static value as `role="img"` named "<value> out of <count> stars"
|
|
1587
|
+
* (overridable via `aria-label`), not a radiogroup of radios. @default false */
|
|
1478
1588
|
readOnly?: boolean;
|
|
1479
1589
|
/** Disable all interaction and dim the control. @default false */
|
|
1480
1590
|
disabled?: boolean;
|
|
1481
|
-
/** Show the numeric value beside the stars. @default false */
|
|
1591
|
+
/** Show the numeric value beside the stars (clean integer, or one decimal for fractional). @default false */
|
|
1482
1592
|
showValue?: boolean;
|
|
1593
|
+
/** Allow clearing back to 0 — clicking the selected star, or pressing Delete/Backspace, resets to "no rating". @default true */
|
|
1594
|
+
clearable?: boolean;
|
|
1595
|
+
/** Custom formatter for the `showValue` badge and the read-only accessible label. Defaults to a clean integer, or one decimal for fractional values. */
|
|
1596
|
+
format?: (value: number) => React.ReactNode;
|
|
1597
|
+
/** Name for a hidden form field so the value participates in native form submission. */
|
|
1598
|
+
name?: string;
|
|
1483
1599
|
onChange?: (value: number) => void;
|
|
1484
1600
|
}
|
|
1485
1601
|
|
|
@@ -1527,6 +1643,14 @@ interface SelectProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, "onC
|
|
|
1527
1643
|
portal?: boolean;
|
|
1528
1644
|
/** Minimum popover width in px when portaled (useful when the trigger is narrow). @default 0 */
|
|
1529
1645
|
minWidth?: number;
|
|
1646
|
+
/** Pin the popover to the trigger's width. Set false to size it to the widest option (clamped to the viewport). @default true */
|
|
1647
|
+
matchTriggerWidth?: boolean;
|
|
1648
|
+
/** Show a loading row instead of the option list / empty state (e.g. while fetching options). @default false */
|
|
1649
|
+
loading?: boolean;
|
|
1650
|
+
/** Text shown when no options match. @default "No results found" */
|
|
1651
|
+
emptyText?: string;
|
|
1652
|
+
/** Name for a hidden form field so the selected value participates in native form submission. */
|
|
1653
|
+
name?: string;
|
|
1530
1654
|
}
|
|
1531
1655
|
|
|
1532
1656
|
/** Alias of the shared {@link Option} type (kept for backward-compatible imports). */
|
|
@@ -1626,16 +1750,22 @@ interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChan
|
|
|
1626
1750
|
hint?: React.ReactNode;
|
|
1627
1751
|
/** Error message shown below the track — turns it red (sets `aria-invalid`) and replaces the hint. */
|
|
1628
1752
|
error?: React.ReactNode;
|
|
1629
|
-
/** Controlled value. */
|
|
1630
|
-
value?: number;
|
|
1631
|
-
/** Uncontrolled initial value. @default 0 */
|
|
1632
|
-
defaultValue?: number;
|
|
1753
|
+
/** Controlled value. A `[number, number]` tuple enables dual-thumb range mode. Clamped into [min, max]. */
|
|
1754
|
+
value?: number | [number, number];
|
|
1755
|
+
/** Uncontrolled initial value (a tuple enables range mode). Clamped into [min, max]. @default 0 */
|
|
1756
|
+
defaultValue?: number | [number, number];
|
|
1757
|
+
/** Force dual-thumb range mode even without a tuple value (defaults the range to [min, max]). @default false */
|
|
1758
|
+
range?: boolean;
|
|
1633
1759
|
/** @default 0 */
|
|
1634
1760
|
min?: number;
|
|
1635
1761
|
/** @default 100 */
|
|
1636
1762
|
max?: number;
|
|
1637
1763
|
/** @default 1 */
|
|
1638
1764
|
step?: number;
|
|
1765
|
+
/** Large-step increment for PageUp/PageDown. @default Math.max(step, (max - min) / 10) */
|
|
1766
|
+
pageStep?: number;
|
|
1767
|
+
/** Decimal places for the default display + aria value; derived from `step` when unset. */
|
|
1768
|
+
precision?: number;
|
|
1639
1769
|
disabled?: boolean;
|
|
1640
1770
|
/** Show the current value at the top-right. @default true */
|
|
1641
1771
|
showValue?: boolean;
|
|
@@ -1643,9 +1773,13 @@ interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChan
|
|
|
1643
1773
|
showTicks?: boolean;
|
|
1644
1774
|
/** Color intent. @default "primary" */
|
|
1645
1775
|
tone?: Tone;
|
|
1646
|
-
/** Format the displayed value (label + bubble). */
|
|
1776
|
+
/** Format the displayed value (label + bubble). If it returns a node, pair it with `getAriaValueText`. */
|
|
1647
1777
|
formatValue?: (value: number) => React.ReactNode;
|
|
1648
|
-
|
|
1778
|
+
/** Human-readable value for assistive tech (`aria-valuetext`) — use when `formatValue` returns a node. */
|
|
1779
|
+
getAriaValueText?: (value: number) => string;
|
|
1780
|
+
/** Name for hidden form field(s) so the value participates in native form submission. */
|
|
1781
|
+
name?: string;
|
|
1782
|
+
onChange?: (value: number | [number, number]) => void;
|
|
1649
1783
|
}
|
|
1650
1784
|
|
|
1651
1785
|
declare function Slider(props: SliderProps): React.JSX.Element;
|
|
@@ -1785,6 +1919,16 @@ interface TableProps<T = any> extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1785
1919
|
stickyHeader?: boolean;
|
|
1786
1920
|
/** Cap the table height and give it its own vertical scroll area (CSS length or number of px). */
|
|
1787
1921
|
maxHeight?: number | string;
|
|
1922
|
+
/** Show shimmering skeleton rows instead of data (e.g. while fetching); sets `aria-busy`. @default false */
|
|
1923
|
+
loading?: boolean;
|
|
1924
|
+
/** Number of skeleton rows to render while `loading`. @default 8 */
|
|
1925
|
+
loadingRows?: number;
|
|
1926
|
+
/** Rendered as a single full-width row when `rows` is empty. @default "No data" */
|
|
1927
|
+
emptyMessage?: React.ReactNode;
|
|
1928
|
+
/** Accessible name applied to the `<table>` (not the wrapper). A raw `aria-label` prop takes precedence. */
|
|
1929
|
+
ariaLabel?: string;
|
|
1930
|
+
/** Renders a visually-hidden `<caption>` naming the table. */
|
|
1931
|
+
caption?: React.ReactNode;
|
|
1788
1932
|
}
|
|
1789
1933
|
|
|
1790
1934
|
interface TableColumn<T = any> {
|
|
@@ -1875,9 +2019,20 @@ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
|
1875
2019
|
size?: "sm" | "md" | "lg";
|
|
1876
2020
|
/** Color intent for the focus/open accent. @default "primary" */
|
|
1877
2021
|
tone?: Tone;
|
|
2022
|
+
/** Grow to fit content between `minRows` and `maxRows` (resize handle hidden). @default false */
|
|
2023
|
+
autosize?: boolean;
|
|
2024
|
+
/** Minimum rows when `autosize` (falls back to `rows`). */
|
|
2025
|
+
minRows?: number;
|
|
2026
|
+
/** Maximum rows when `autosize`; taller content scrolls. */
|
|
2027
|
+
maxRows?: number;
|
|
2028
|
+
/** With `maxLength`, render a live `current / max` character counter; danger-toned near the limit. @default false */
|
|
2029
|
+
showCount?: boolean;
|
|
1878
2030
|
}
|
|
1879
2031
|
|
|
1880
|
-
|
|
2032
|
+
/** Forwards `ref` to the inner `<textarea>`. */
|
|
2033
|
+
declare const Textarea: React.ForwardRefExoticComponent<
|
|
2034
|
+
TextareaProps & React.RefAttributes<HTMLTextAreaElement>
|
|
2035
|
+
>;
|
|
1881
2036
|
|
|
1882
2037
|
interface TimelineItem {
|
|
1883
2038
|
/** Event title. */
|
|
@@ -1915,9 +2070,11 @@ interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">
|
|
|
1915
2070
|
title?: React.ReactNode;
|
|
1916
2071
|
/** Override the tone icon. */
|
|
1917
2072
|
icon?: React.ReactNode;
|
|
1918
|
-
/**
|
|
2073
|
+
/** Renders the close button AND is the dismissal handler. The Toast is controlled — it never
|
|
2074
|
+
* removes itself, so BOTH the close button and `duration` auto-dismiss require this. */
|
|
1919
2075
|
onClose?: () => void;
|
|
1920
|
-
/** Auto-dismiss after this many ms (paused on hover/focus). `
|
|
2076
|
+
/** Auto-dismiss after this many ms (paused on hover/focus). **No-op unless `onClose` is provided** —
|
|
2077
|
+
* the timer's only action is to call `onClose`. `0`/`Infinity` keeps it open. @default 4500 */
|
|
1921
2078
|
duration?: number;
|
|
1922
2079
|
children?: React.ReactNode;
|
|
1923
2080
|
}
|
|
@@ -2449,4 +2606,4 @@ declare function useFocusTrap<T extends HTMLElement = HTMLElement>(
|
|
|
2449
2606
|
*/
|
|
2450
2607
|
declare function usePortal(): (node: React.ReactNode) => React.ReactPortal | React.ReactNode | null;
|
|
2451
2608
|
|
|
2452
|
-
export { Accordion, type AccordionItem, type AccordionProps, type ActionTone, Alert, type AlertProps, AppShell, type AppShellProps, Avatar, AvatarMenu, type AvatarMenuProps, type AvatarProps, Badge, type BadgeProps, type BarTone, Box, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartDatum, type ChartProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type Command, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, Currency, CurrencyField, type CurrencyFieldProps, type CurrencyOption, type CurrencyProps, Datatable, type DatatableBatchAction, type DatatableColumn, type DatatableFilter, type DatatableFilterOp, type DatatableNumberOp, type DatatableProps, type DatatableQuery, type DatatableRowAction, type DatatableStringOp, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, type DialogProps, Divider, type DividerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, Field, type FieldProps, FileUpload, type FileUploadProps, Grid, type GridProps, Heading, type HeadingProps, type HeadingSize, 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, type Option, type OptionGroup, Pagination, type PaginationProps, type PolymorphicAs, Popover, type PopoverProps, Progress, type ProgressProps, Radio, type RadioProps, Rating, type RatingProps, type ResponsiveColumns, Select, type SelectGroup, type SelectOption, type SelectProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackProps, Stat, type StatProps, type Step, Stepper, type StepperProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, type TextTone, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, type ToastTone, ToastViewport, type ToastViewportProps, type Tone, Tooltip, type TooltipProps, type TreeNode, TreeView, type TreeViewProps, type UseColorSchemeOptions, type UseFocusTrapOptions, type UseKeyPressOptions, type UseMediaQueryOptions, runDatatableQuery, useClickOutside, useColorScheme, useControllableState, useCopyToClipboard, useDebouncedCallback, useDebouncedValue, useDisclosure, useEventListener, useFocusTrap, useHover, useId, useIntersectionObserver, useInterval, useIsomorphicLayoutEffect, useKeyPress, useLocalStorage, useMediaQuery, useMounted, usePortal, usePrefersReducedMotion, usePrevious, useScrollLock, useTimeout, useToast, useToggle, useWindowSize };
|
|
2609
|
+
export { Accordion, type AccordionItem, type AccordionProps, type ActionTone, Alert, type AlertProps, AppShell, type AppShellProps, Avatar, AvatarMenu, type AvatarMenuProps, type AvatarProps, Badge, type BadgeProps, type BarTone, Box, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartDatum, type ChartProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type Command, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, Currency, CurrencyField, type CurrencyFieldProps, type CurrencyOption, type CurrencyProps, Datatable, type DatatableBatchAction, type DatatableColumn, type DatatableFilter, type DatatableFilterOp, type DatatableNumberOp, type DatatableProps, type DatatableQuery, type DatatableRowAction, type DatatableStringOp, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, type DialogProps, Divider, type DividerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, Field, type FieldProps, FileUpload, type FileUploadProps, Grid, type GridProps, Heading, type HeadingProps, type HeadingSize, 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, type Option, type OptionGroup, Pagination, type PaginationProps, type PolymorphicAs, Popover, type PopoverProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type ResponsiveColumns, Select, type SelectGroup, type SelectOption, type SelectProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackProps, Stat, type StatProps, type Step, Stepper, type StepperProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, type TextTone, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, type ToastTone, ToastViewport, type ToastViewportProps, type Tone, Tooltip, type TooltipProps, type TreeNode, TreeView, type TreeViewProps, type UseColorSchemeOptions, type UseFocusTrapOptions, type UseKeyPressOptions, type UseMediaQueryOptions, runDatatableQuery, useClickOutside, useColorScheme, useControllableState, useCopyToClipboard, useDebouncedCallback, useDebouncedValue, useDisclosure, useEventListener, useFocusTrap, useHover, useId, useIntersectionObserver, useInterval, useIsomorphicLayoutEffect, useKeyPress, useLocalStorage, useMediaQuery, useMounted, usePortal, usePrefersReducedMotion, usePrevious, useScrollLock, useTimeout, useToast, useToggle, useWindowSize };
|