@stackone/malachite 0.54.1 → 0.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +26 -4
- package/dist/index.js +4748 -3692
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1480,7 +1480,7 @@ export declare interface TabItem {
|
|
|
1480
1480
|
disabled?: boolean;
|
|
1481
1481
|
}
|
|
1482
1482
|
|
|
1483
|
-
export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, error, errorTitle, errorSubTitle, bordered, showHeader, rowKey, scrollHeight, size, layout, headerVariant, rowClassName, rowVariant, onRow, onClickRow, rowSelection, pagination, className, style, stickyHeaderTop, scrollX, rowSection, renderSectionDivider, }: TableProps<T>) => JSX_2.Element;
|
|
1483
|
+
export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, error, errorTitle, errorSubTitle, bordered, showHeader, rowKey, scrollHeight, size, layout, headerVariant, rowClassName, rowVariant, onRow, onClickRow, rowSelection, pagination, className, style, stickyHeaderTop, scrollX, rowSection, renderSectionDivider, virtual, virtualRowHeightEstimate, virtualScrollElement, }: TableProps<T>) => JSX_2.Element;
|
|
1484
1484
|
|
|
1485
1485
|
export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
1486
1486
|
title: string | default_2.ReactNode;
|
|
@@ -1549,6 +1549,19 @@ declare type TableProps<T = Record<string, unknown>> = {
|
|
|
1549
1549
|
scrollX?: boolean;
|
|
1550
1550
|
rowSection?: (record: T) => string;
|
|
1551
1551
|
renderSectionDivider?: (sectionKey: string, records: T[]) => default_2.ReactNode;
|
|
1552
|
+
/** Windowed rendering for large datasets (detached variant only), powered by
|
|
1553
|
+
* TanStack Virtual: only rows near the viewport stay mounted; spacers keep the
|
|
1554
|
+
* scrollbar reflecting the full list. The table body becomes the scroll
|
|
1555
|
+
* container, so give it a bounded height via `scrollHeight`. Row heights are
|
|
1556
|
+
* measured per row (non-uniform rows are fine). */
|
|
1557
|
+
virtual?: boolean;
|
|
1558
|
+
/** Estimated row height (px) used by `virtual` before rows are measured. */
|
|
1559
|
+
virtualRowHeightEstimate?: number;
|
|
1560
|
+
/** With `virtual`: virtualize against this ancestor scroll container instead of
|
|
1561
|
+
* the table body (e.g. a page-level scroller so content above the table can
|
|
1562
|
+
* scroll away). Pass the element from state (not a ref) so it arrives after
|
|
1563
|
+
* mount. The table body stops scrolling when this is set. */
|
|
1564
|
+
virtualScrollElement?: HTMLElement | null;
|
|
1552
1565
|
};
|
|
1553
1566
|
|
|
1554
1567
|
declare type TableRowActions<T = Record<string, unknown>> = {
|
|
@@ -1745,13 +1758,22 @@ declare interface TooltipProps {
|
|
|
1745
1758
|
fill?: boolean;
|
|
1746
1759
|
/** Max width of tooltip. Default: 320px */
|
|
1747
1760
|
maxWidth?: number | string;
|
|
1761
|
+
/** Called synchronously when the trigger is hovered/focused; return false to
|
|
1762
|
+
* suppress the tooltip for this interaction. Lets wrappers defer expensive
|
|
1763
|
+
* checks (e.g. truncation measurement) to interaction time instead of mount. */
|
|
1764
|
+
shouldShow?: () => boolean;
|
|
1748
1765
|
}
|
|
1749
1766
|
|
|
1750
1767
|
/**
|
|
1751
1768
|
* TruncatedTooltip renders its children in a single-line truncating container
|
|
1752
|
-
* (overflow:hidden + text-overflow:ellipsis + white-space:nowrap)
|
|
1753
|
-
* the
|
|
1754
|
-
*
|
|
1769
|
+
* (overflow:hidden + text-overflow:ellipsis + white-space:nowrap) and surfaces
|
|
1770
|
+
* the malachite Tooltip only when the content is actually being cut off.
|
|
1771
|
+
*
|
|
1772
|
+
* Truncation is checked at interaction time (Tooltip's `shouldShow`), not at
|
|
1773
|
+
* mount: a mount-time measurement forces a synchronous layout per instance,
|
|
1774
|
+
* and in large tables those reads interleave with other components' DOM writes
|
|
1775
|
+
* — hundreds of full layout passes per mounted batch (the Safari row-mount
|
|
1776
|
+
* stalls of ENG-1168). The ellipsis itself is pure CSS and needs no JS.
|
|
1755
1777
|
*/
|
|
1756
1778
|
export declare const TruncatedTooltip: default_2.FC<TruncatedTooltipProps>;
|
|
1757
1779
|
|