twico-ui 1.33.1 → 1.35.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.d.cts CHANGED
@@ -2043,6 +2043,33 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
2043
2043
  overscan?: number;
2044
2044
  /** Estimated row height in px, used only for rows not yet measured (they refine to their real height once scrolled into view). Defaults to the density preset (compact 36 / standard 44 / comfortable 56). Set this to your typical row height for the best first-paint estimate. */
2045
2045
  rowHeight?: number;
2046
+ /** #350 (first pass): expandable/collapsible rows. Return the detail panel to render below `row` when it is
2047
+ * expanded, or `null`/`undefined` to make that row non-expandable (no chevron). Supplying this function
2048
+ * enables a leading chevron column and a full-width detail `<tr>` under each expanded row. Not yet
2049
+ * supported with `virtualized` (the detail row's height isn't measured by the windowing math). */
2050
+ renderRowDetail?: (row: T) => React.ReactNode;
2051
+ /** Controlled set of expanded row keys (values from `rowKey`). Omit for uncontrolled (internal) expansion. */
2052
+ expandedRowIds?: Array<string | number>;
2053
+ /** Fires with the next full array of expanded row keys whenever a row is expanded or collapsed.
2054
+ * Shared by `renderRowDetail` (#350) and the row-tree (#359). */
2055
+ onExpandedRowsChange?: (ids: Array<string | number>) => void;
2056
+ /** #359 (server-mode lazy row-tree): draw the same leading chevron on a parent DATA row (independent of
2057
+ * `renderRowDetail`). Expanding reveals CHILD data rows in the SAME columns rather than a detail panel.
2058
+ * In **server mode** the grid does not fetch children — the expanded key set is folded into the
2059
+ * `onServerChange` query (`expanded`), so the host returns the parent + its children inline (and sets
2060
+ * `rowCount` to the flattened visible count; a collapsed parent counts as one row). Uses the shared
2061
+ * `expandedRowIds`/`onExpandedRowsChange`. Tree rows need stable unique keys (via `rowKey`/`id`). Carries
2062
+ * the #350 limits: not yet supported with `virtualized`, pivot, or `rowGrouping`, and no chevron on a
2063
+ * pinned (sticky) row. */
2064
+ getRowCanExpand?: (row: T) => boolean;
2065
+ /** #359: 0-based nesting depth, used only for the tree indent on the first data cell (0 = top-level parent).
2066
+ * In server mode supply it from the host-flattened rows; in client mode it's derived from the `getSubRows`
2067
+ * splice when omitted. @default 0 */
2068
+ getRowDepth?: (row: T) => number;
2069
+ /** #359 (client mode): children for an expanded parent, spliced in as first-class rows (same columns)
2070
+ * immediately after it. Ignored in `serverMode` (the host returns children inline). Children are rendered
2071
+ * after pagination, so they don't consume the parent's page budget and aren't independently sorted/filtered. */
2072
+ getSubRows?: (row: T) => T[];
2046
2073
  }
2047
2074
 
2048
2075
  /** String-column filter operators (Datatable server mode). */
@@ -2083,6 +2110,10 @@ interface DatatableQuery {
2083
2110
  /** `field`s of the columns currently hidden via the Columns menu. Always populated in
2084
2111
  * `onServerChange`; optional for the same reason as `visibleColumns`. */
2085
2112
  hiddenColumns?: string[];
2113
+ /** #359 (server-mode lazy row-tree): keys of the currently-expanded parent rows. Always populated in
2114
+ * `onServerChange` when `getRowCanExpand` is used — the host fetches those parents' children and returns
2115
+ * them inline (a collapsed parent is one row). Optional on a hand-built query. */
2116
+ expanded?: Array<string | number>;
2086
2117
  }
2087
2118
 
2088
2119
  /**
@@ -3585,6 +3616,10 @@ interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChan
3585
3616
  showValue?: boolean;
3586
3617
  /** Render step ticks along the rail. @default false */
3587
3618
  showTicks?: boolean;
3619
+ /** Show editable numeric input(s) in the header so users can type an exact value (two inputs in range mode),
3620
+ * kept in sync with the thumbs. Typed entry commits on blur/Enter (ArrowUp/Down step); it's clamped, snapped
3621
+ * to `step`, and cross-clamped (start ≤ end). Replaces the read-only value display. @default false */
3622
+ editable?: boolean;
3588
3623
  /** Color intent. @default "primary" */
3589
3624
  tone?: Tone;
3590
3625
  /** Format the displayed value (label + bubble). If it returns a node, pair it with `getAriaValueText`. */
package/dist/index.d.ts CHANGED
@@ -2043,6 +2043,33 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
2043
2043
  overscan?: number;
2044
2044
  /** Estimated row height in px, used only for rows not yet measured (they refine to their real height once scrolled into view). Defaults to the density preset (compact 36 / standard 44 / comfortable 56). Set this to your typical row height for the best first-paint estimate. */
2045
2045
  rowHeight?: number;
2046
+ /** #350 (first pass): expandable/collapsible rows. Return the detail panel to render below `row` when it is
2047
+ * expanded, or `null`/`undefined` to make that row non-expandable (no chevron). Supplying this function
2048
+ * enables a leading chevron column and a full-width detail `<tr>` under each expanded row. Not yet
2049
+ * supported with `virtualized` (the detail row's height isn't measured by the windowing math). */
2050
+ renderRowDetail?: (row: T) => React.ReactNode;
2051
+ /** Controlled set of expanded row keys (values from `rowKey`). Omit for uncontrolled (internal) expansion. */
2052
+ expandedRowIds?: Array<string | number>;
2053
+ /** Fires with the next full array of expanded row keys whenever a row is expanded or collapsed.
2054
+ * Shared by `renderRowDetail` (#350) and the row-tree (#359). */
2055
+ onExpandedRowsChange?: (ids: Array<string | number>) => void;
2056
+ /** #359 (server-mode lazy row-tree): draw the same leading chevron on a parent DATA row (independent of
2057
+ * `renderRowDetail`). Expanding reveals CHILD data rows in the SAME columns rather than a detail panel.
2058
+ * In **server mode** the grid does not fetch children — the expanded key set is folded into the
2059
+ * `onServerChange` query (`expanded`), so the host returns the parent + its children inline (and sets
2060
+ * `rowCount` to the flattened visible count; a collapsed parent counts as one row). Uses the shared
2061
+ * `expandedRowIds`/`onExpandedRowsChange`. Tree rows need stable unique keys (via `rowKey`/`id`). Carries
2062
+ * the #350 limits: not yet supported with `virtualized`, pivot, or `rowGrouping`, and no chevron on a
2063
+ * pinned (sticky) row. */
2064
+ getRowCanExpand?: (row: T) => boolean;
2065
+ /** #359: 0-based nesting depth, used only for the tree indent on the first data cell (0 = top-level parent).
2066
+ * In server mode supply it from the host-flattened rows; in client mode it's derived from the `getSubRows`
2067
+ * splice when omitted. @default 0 */
2068
+ getRowDepth?: (row: T) => number;
2069
+ /** #359 (client mode): children for an expanded parent, spliced in as first-class rows (same columns)
2070
+ * immediately after it. Ignored in `serverMode` (the host returns children inline). Children are rendered
2071
+ * after pagination, so they don't consume the parent's page budget and aren't independently sorted/filtered. */
2072
+ getSubRows?: (row: T) => T[];
2046
2073
  }
2047
2074
 
2048
2075
  /** String-column filter operators (Datatable server mode). */
@@ -2083,6 +2110,10 @@ interface DatatableQuery {
2083
2110
  /** `field`s of the columns currently hidden via the Columns menu. Always populated in
2084
2111
  * `onServerChange`; optional for the same reason as `visibleColumns`. */
2085
2112
  hiddenColumns?: string[];
2113
+ /** #359 (server-mode lazy row-tree): keys of the currently-expanded parent rows. Always populated in
2114
+ * `onServerChange` when `getRowCanExpand` is used — the host fetches those parents' children and returns
2115
+ * them inline (a collapsed parent is one row). Optional on a hand-built query. */
2116
+ expanded?: Array<string | number>;
2086
2117
  }
2087
2118
 
2088
2119
  /**
@@ -3585,6 +3616,10 @@ interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChan
3585
3616
  showValue?: boolean;
3586
3617
  /** Render step ticks along the rail. @default false */
3587
3618
  showTicks?: boolean;
3619
+ /** Show editable numeric input(s) in the header so users can type an exact value (two inputs in range mode),
3620
+ * kept in sync with the thumbs. Typed entry commits on blur/Enter (ArrowUp/Down step); it's clamped, snapped
3621
+ * to `step`, and cross-clamped (start ≤ end). Replaces the read-only value display. @default false */
3622
+ editable?: boolean;
3588
3623
  /** Color intent. @default "primary" */
3589
3624
  tone?: Tone;
3590
3625
  /** Format the displayed value (label + bubble). If it returns a node, pair it with `getAriaValueText`. */