twico-ui 1.44.0 → 1.45.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/CHANGELOG.md +25 -0
- package/dist/index.cjs +914 -868
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +155 -10
- package/dist/index.d.ts +155 -10
- package/dist/index.mjs +914 -868
- package/dist/index.mjs.map +1 -1
- package/llms.txt +2 -0
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -591,7 +591,17 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
591
591
|
children?: React.ReactNode;
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
|
|
594
|
+
/**
|
|
595
|
+
* #490: forwards `ref` to the `<button>` (or the `<a>` when `as="a"` — `ButtonProps` already commits to
|
|
596
|
+
* `ButtonHTMLAttributes<HTMLButtonElement>`, so the declared element type follows it).
|
|
597
|
+
*
|
|
598
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
599
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
600
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
601
|
+
*/
|
|
602
|
+
declare const Button: React.ForwardRefExoticComponent<
|
|
603
|
+
ButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
604
|
+
>;
|
|
595
605
|
|
|
596
606
|
/**
|
|
597
607
|
* Surface container for grouped content. Supports header (title/subtitle),
|
|
@@ -1604,7 +1614,16 @@ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
1604
1614
|
tone?: Tone;
|
|
1605
1615
|
}
|
|
1606
1616
|
|
|
1607
|
-
|
|
1617
|
+
/**
|
|
1618
|
+
* #490: forwards `ref` to the native `<input type="checkbox">`, merged with the internal ref that drives `indeterminate`.
|
|
1619
|
+
*
|
|
1620
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
1621
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
1622
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
1623
|
+
*/
|
|
1624
|
+
declare const Checkbox: React.ForwardRefExoticComponent<
|
|
1625
|
+
CheckboxProps & React.RefAttributes<HTMLInputElement>
|
|
1626
|
+
>;
|
|
1608
1627
|
|
|
1609
1628
|
/**
|
|
1610
1629
|
* Color picker with a saturation/value square, hue slider, hex input, and
|
|
@@ -1745,7 +1764,16 @@ type ComboboxOption = Option;
|
|
|
1745
1764
|
/** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
|
|
1746
1765
|
type ComboboxGroup = OptionGroup;
|
|
1747
1766
|
|
|
1748
|
-
|
|
1767
|
+
/**
|
|
1768
|
+
* #490: forwards `ref` to the text `<input>`, merged with the internal ref used for focus and caret handling.
|
|
1769
|
+
*
|
|
1770
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
1771
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
1772
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
1773
|
+
*/
|
|
1774
|
+
declare const Combobox: React.ForwardRefExoticComponent<
|
|
1775
|
+
ComboboxProps & React.RefAttributes<HTMLInputElement>
|
|
1776
|
+
>;
|
|
1749
1777
|
|
|
1750
1778
|
interface Command {
|
|
1751
1779
|
/** Stable id. */
|
|
@@ -1951,6 +1979,65 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
1951
1979
|
* This prop is the initial state — when enabled, users can hide/show the column from the toolbar's
|
|
1952
1980
|
* **Columns** panel ("Row number"). @default false */
|
|
1953
1981
|
rowNumbers?: boolean;
|
|
1982
|
+
/**
|
|
1983
|
+
* #481: style a whole row from its own state — the row-level counterpart to a column's `cellStyle`.
|
|
1984
|
+
* Without it, marking a row meant assigning `cellStyle` to **every** column: O(columns) for a
|
|
1985
|
+
* row-level fact, hand-composed against whatever else already used `cellStyle`, and with no fixed
|
|
1986
|
+
* column list to decorate at all when the columns come from a schema.
|
|
1987
|
+
*
|
|
1988
|
+
* Called `(row, index)`, the same shape as `rowKey`. **`index` is the row's 0-based position among
|
|
1989
|
+
* the rows currently rendered** — after sorting and filtering, and **within the current page**. It is
|
|
1990
|
+
* therefore *not* the number the `rowNumbers` column shows, which continues across pages; if you need
|
|
1991
|
+
* an absolute position, read it off `row` rather than from this argument.
|
|
1992
|
+
*
|
|
1993
|
+
* A `background` (or `backgroundColor`) is forwarded to the row's CELLS through the `--twc-dt-row-bg`
|
|
1994
|
+
* custom property, because `.twc-dt__td` paints an opaque surface of its own — without that it would
|
|
1995
|
+
* be invisible — and is **removed** from what reaches the `<tr>`, since a row box paints below its
|
|
1996
|
+
* cells and a leftover copy there would composite with the tint rather than hide behind it. Every
|
|
1997
|
+
* other declaration lands on the `<tr>`, except `border` (ignored on row boxes under
|
|
1998
|
+
* `border-collapse: separate`) and `backgroundImage` (painted under the cells' opaque surface) — both
|
|
1999
|
+
* need {@link getRowClassName} and a `… .twc-dt__td` rule. Sticky positioning and measured row height
|
|
2000
|
+
* are applied after yours, so a hook cannot break row pinning or row resizing.
|
|
2001
|
+
*
|
|
2002
|
+
* **Layering — one rule, not a bespoke order:** the row tint is the **bottom** layer above the
|
|
2003
|
+
* cell's plain surface, and **every** built-in state background covers it. The base `.twc-dt__td`
|
|
2004
|
+
* rule is the lowest-specificity background in the component, so hover, row selection,
|
|
2005
|
+
* `activeRowId`, a pinned row, a grabbed row, the diff add/remove/modify washes, cell
|
|
2006
|
+
* selection/active and inline editing all outrank it — and an inline per-cell `cellStyle` outranks
|
|
2007
|
+
* those. A row tint is a *data-derived* wash; nothing data-derived should be able to hide an
|
|
2008
|
+
* interaction state. So selection still reads on a tinted row, hover feedback is never lost, and a
|
|
2009
|
+
* per-cell state wins with nothing to compose on your side.
|
|
2010
|
+
*
|
|
2011
|
+
* Need a tint that survives hover? Use {@link getRowClassName} with a rule outranking `(0,3,0)` —
|
|
2012
|
+
* note `.twc-dt__row.my-row .twc-dt__td` is itself `(0,3,0)`, a tie decided by source order, so add
|
|
2013
|
+
* an element: `tr.twc-dt__row.my-row .twc-dt__td` is `(0,3,1)`, and `… .twc-dt__td[data-pin]` is
|
|
2014
|
+
* `(0,4,1)` for the pinned-column twins. You are then choosing to cover the hover cue on those rows.
|
|
2015
|
+
*
|
|
2016
|
+
* **Stripes:** there are none to layer against. Datatable does not zebra-stripe its data rows —
|
|
2017
|
+
* the only `data-zebra` rules in the component style the PIVOT grid's cells, and the hook does not
|
|
2018
|
+
* apply to pivot rows. So a row tint never has to compete with a stripe.
|
|
2019
|
+
*
|
|
2020
|
+
* **Which rows:** every data row. That includes rows pinned with the row ⋮ menu (the hook runs and
|
|
2021
|
+
* the class/non-background declarations apply, though the pinned-row highlight covers a background
|
|
2022
|
+
* tint for as long as the row is pinned, exactly like selection), and cells in a pinned COLUMN pick
|
|
2023
|
+
* the tint up, so a tinted row shows no hole where a frozen column scrolls over it. NOT group-header
|
|
2024
|
+
* rows or the pivot grid's aggregate rows: those have no `row` object to pass. Skeleton rows shown
|
|
2025
|
+
* while `loading` are untouched.
|
|
2026
|
+
*/
|
|
2027
|
+
getRowStyle?: (row: T, index: number) => React.CSSProperties | undefined;
|
|
2028
|
+
/**
|
|
2029
|
+
* #481: a class on the row's `<tr>`, appended to `twc-dt__row` (never replacing it). Same
|
|
2030
|
+
* `(row, index)` signature as {@link getRowStyle}.
|
|
2031
|
+
*
|
|
2032
|
+
* **Which to reach for.** `getRowStyle` is the default: its *background* does not land inline on the
|
|
2033
|
+
* cells — it is routed through `--twc-dt-row-bg` and read by the `(0,1,0)` base rule, so it is the
|
|
2034
|
+
* **lowest** layer and every built-in state covers it, which is almost always what a row tint should
|
|
2035
|
+
* do. (Its *non-background* declarations — opacity, font-weight, text-decoration — are ordinary
|
|
2036
|
+
* inline styles on the `<tr>` and do win.) Reach for `getRowClassName` when you deliberately want the
|
|
2037
|
+
* tint to **outrank** those cues, since your own rule picks its specificity: beat `(0,3,0)`, e.g.
|
|
2038
|
+
* `tr.twc-dt__row.my-row .twc-dt__td`. You are then choosing to cover the hover cue on those rows.
|
|
2039
|
+
*/
|
|
2040
|
+
getRowClassName?: (row: T, index: number) => string | undefined;
|
|
1954
2041
|
/** Restrict the toolbar quick-search to these column `field`s (client mode); defaults to every
|
|
1955
2042
|
* visible column. Mirrors `runDatatableQuery`'s `options.searchFields`. */
|
|
1956
2043
|
searchFields?: string[];
|
|
@@ -3210,7 +3297,16 @@ type MultiSelectOption = Option;
|
|
|
3210
3297
|
/** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
|
|
3211
3298
|
type MultiSelectGroup = OptionGroup;
|
|
3212
3299
|
|
|
3213
|
-
|
|
3300
|
+
/**
|
|
3301
|
+
* #490: forwards `ref` to the text `<input>`, merged with the internal ref used for focus and the token-removal keys.
|
|
3302
|
+
*
|
|
3303
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
3304
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
3305
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
3306
|
+
*/
|
|
3307
|
+
declare const MultiSelect: React.ForwardRefExoticComponent<
|
|
3308
|
+
MultiSelectProps & React.RefAttributes<HTMLInputElement>
|
|
3309
|
+
>;
|
|
3214
3310
|
|
|
3215
3311
|
/** The kinds of filter control a field can render. */
|
|
3216
3312
|
type FilterFieldType = "multiselect" | "daterange" | "search" | "text" | "number" | "boolean" | "select";
|
|
@@ -3514,7 +3610,16 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
3514
3610
|
"aria-label": string;
|
|
3515
3611
|
}
|
|
3516
3612
|
|
|
3517
|
-
|
|
3613
|
+
/**
|
|
3614
|
+
* #490: forwards `ref` to the `<button>` (or the `<a>` when `as="a"`, as with `Button`).
|
|
3615
|
+
*
|
|
3616
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
3617
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
3618
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
3619
|
+
*/
|
|
3620
|
+
declare const IconButton: React.ForwardRefExoticComponent<
|
|
3621
|
+
IconButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
3622
|
+
>;
|
|
3518
3623
|
|
|
3519
3624
|
/** One toggle button in a {@link ToggleGroup}. */
|
|
3520
3625
|
interface ToggleGroupItem {
|
|
@@ -3609,7 +3714,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
3609
3714
|
clearable?: boolean;
|
|
3610
3715
|
}
|
|
3611
3716
|
|
|
3612
|
-
|
|
3717
|
+
/** Forwards `ref` to the inner `<input>` (merged with the internal one `clearable` uses). */
|
|
3718
|
+
declare const Input: React.ForwardRefExoticComponent<
|
|
3719
|
+
InputProps & React.RefAttributes<HTMLInputElement>
|
|
3720
|
+
>;
|
|
3613
3721
|
|
|
3614
3722
|
interface KanbanColumn {
|
|
3615
3723
|
/** Unique column id (matches a card's `column`). */
|
|
@@ -3841,7 +3949,16 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
3841
3949
|
tone?: Tone;
|
|
3842
3950
|
}
|
|
3843
3951
|
|
|
3844
|
-
|
|
3952
|
+
/**
|
|
3953
|
+
* #490: forwards `ref` to the native `<input type="radio">`.
|
|
3954
|
+
*
|
|
3955
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
3956
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
3957
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
3958
|
+
*/
|
|
3959
|
+
declare const Radio: React.ForwardRefExoticComponent<
|
|
3960
|
+
RadioProps & React.RefAttributes<HTMLInputElement>
|
|
3961
|
+
>;
|
|
3845
3962
|
|
|
3846
3963
|
interface RadioGroupOption {
|
|
3847
3964
|
/** Submitted value for this choice. */
|
|
@@ -3998,7 +4115,16 @@ type SelectOption = Option;
|
|
|
3998
4115
|
/** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
|
|
3999
4116
|
type SelectGroup = OptionGroup;
|
|
4000
4117
|
|
|
4001
|
-
|
|
4118
|
+
/**
|
|
4119
|
+
* #490: forwards `ref` to the trigger `<button>`, merged with the internal ref used for focus return.
|
|
4120
|
+
*
|
|
4121
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
4122
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
4123
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
4124
|
+
*/
|
|
4125
|
+
declare const Select: React.ForwardRefExoticComponent<
|
|
4126
|
+
SelectProps & React.RefAttributes<HTMLButtonElement>
|
|
4127
|
+
>;
|
|
4002
4128
|
|
|
4003
4129
|
interface SidebarItem {
|
|
4004
4130
|
/** Item label. */
|
|
@@ -4221,7 +4347,16 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
4221
4347
|
tone?: Tone;
|
|
4222
4348
|
}
|
|
4223
4349
|
|
|
4224
|
-
|
|
4350
|
+
/**
|
|
4351
|
+
* #490: forwards `ref` to the native `<input role="switch">`.
|
|
4352
|
+
*
|
|
4353
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
4354
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
4355
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
4356
|
+
*/
|
|
4357
|
+
declare const Switch: React.ForwardRefExoticComponent<
|
|
4358
|
+
SwitchProps & React.RefAttributes<HTMLInputElement>
|
|
4359
|
+
>;
|
|
4225
4360
|
|
|
4226
4361
|
/** Sort state: the sorted column field (null = unsorted) and direction. */
|
|
4227
4362
|
interface TableSort {
|
|
@@ -4771,7 +4906,17 @@ interface CodeProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
4771
4906
|
rel?: string;
|
|
4772
4907
|
}
|
|
4773
4908
|
|
|
4774
|
-
|
|
4909
|
+
/**
|
|
4910
|
+
* #490: forwards `ref` to the rendered root (`<code>`, or `<pre>` when `block`, or whatever `as` names), merged with the
|
|
4911
|
+
* internal ref used to read the text for the copy button.
|
|
4912
|
+
*
|
|
4913
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
4914
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
4915
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
4916
|
+
*/
|
|
4917
|
+
declare const Code: React.ForwardRefExoticComponent<
|
|
4918
|
+
CodeProps & React.RefAttributes<HTMLElement>
|
|
4919
|
+
>;
|
|
4775
4920
|
|
|
4776
4921
|
/** Font-size token suffixes available to `Heading` (see tokens/typography.css). */
|
|
4777
4922
|
type HeadingSize =
|
package/dist/index.d.ts
CHANGED
|
@@ -591,7 +591,17 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
591
591
|
children?: React.ReactNode;
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
|
|
594
|
+
/**
|
|
595
|
+
* #490: forwards `ref` to the `<button>` (or the `<a>` when `as="a"` — `ButtonProps` already commits to
|
|
596
|
+
* `ButtonHTMLAttributes<HTMLButtonElement>`, so the declared element type follows it).
|
|
597
|
+
*
|
|
598
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
599
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
600
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
601
|
+
*/
|
|
602
|
+
declare const Button: React.ForwardRefExoticComponent<
|
|
603
|
+
ButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
604
|
+
>;
|
|
595
605
|
|
|
596
606
|
/**
|
|
597
607
|
* Surface container for grouped content. Supports header (title/subtitle),
|
|
@@ -1604,7 +1614,16 @@ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
1604
1614
|
tone?: Tone;
|
|
1605
1615
|
}
|
|
1606
1616
|
|
|
1607
|
-
|
|
1617
|
+
/**
|
|
1618
|
+
* #490: forwards `ref` to the native `<input type="checkbox">`, merged with the internal ref that drives `indeterminate`.
|
|
1619
|
+
*
|
|
1620
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
1621
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
1622
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
1623
|
+
*/
|
|
1624
|
+
declare const Checkbox: React.ForwardRefExoticComponent<
|
|
1625
|
+
CheckboxProps & React.RefAttributes<HTMLInputElement>
|
|
1626
|
+
>;
|
|
1608
1627
|
|
|
1609
1628
|
/**
|
|
1610
1629
|
* Color picker with a saturation/value square, hue slider, hex input, and
|
|
@@ -1745,7 +1764,16 @@ type ComboboxOption = Option;
|
|
|
1745
1764
|
/** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
|
|
1746
1765
|
type ComboboxGroup = OptionGroup;
|
|
1747
1766
|
|
|
1748
|
-
|
|
1767
|
+
/**
|
|
1768
|
+
* #490: forwards `ref` to the text `<input>`, merged with the internal ref used for focus and caret handling.
|
|
1769
|
+
*
|
|
1770
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
1771
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
1772
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
1773
|
+
*/
|
|
1774
|
+
declare const Combobox: React.ForwardRefExoticComponent<
|
|
1775
|
+
ComboboxProps & React.RefAttributes<HTMLInputElement>
|
|
1776
|
+
>;
|
|
1749
1777
|
|
|
1750
1778
|
interface Command {
|
|
1751
1779
|
/** Stable id. */
|
|
@@ -1951,6 +1979,65 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
1951
1979
|
* This prop is the initial state — when enabled, users can hide/show the column from the toolbar's
|
|
1952
1980
|
* **Columns** panel ("Row number"). @default false */
|
|
1953
1981
|
rowNumbers?: boolean;
|
|
1982
|
+
/**
|
|
1983
|
+
* #481: style a whole row from its own state — the row-level counterpart to a column's `cellStyle`.
|
|
1984
|
+
* Without it, marking a row meant assigning `cellStyle` to **every** column: O(columns) for a
|
|
1985
|
+
* row-level fact, hand-composed against whatever else already used `cellStyle`, and with no fixed
|
|
1986
|
+
* column list to decorate at all when the columns come from a schema.
|
|
1987
|
+
*
|
|
1988
|
+
* Called `(row, index)`, the same shape as `rowKey`. **`index` is the row's 0-based position among
|
|
1989
|
+
* the rows currently rendered** — after sorting and filtering, and **within the current page**. It is
|
|
1990
|
+
* therefore *not* the number the `rowNumbers` column shows, which continues across pages; if you need
|
|
1991
|
+
* an absolute position, read it off `row` rather than from this argument.
|
|
1992
|
+
*
|
|
1993
|
+
* A `background` (or `backgroundColor`) is forwarded to the row's CELLS through the `--twc-dt-row-bg`
|
|
1994
|
+
* custom property, because `.twc-dt__td` paints an opaque surface of its own — without that it would
|
|
1995
|
+
* be invisible — and is **removed** from what reaches the `<tr>`, since a row box paints below its
|
|
1996
|
+
* cells and a leftover copy there would composite with the tint rather than hide behind it. Every
|
|
1997
|
+
* other declaration lands on the `<tr>`, except `border` (ignored on row boxes under
|
|
1998
|
+
* `border-collapse: separate`) and `backgroundImage` (painted under the cells' opaque surface) — both
|
|
1999
|
+
* need {@link getRowClassName} and a `… .twc-dt__td` rule. Sticky positioning and measured row height
|
|
2000
|
+
* are applied after yours, so a hook cannot break row pinning or row resizing.
|
|
2001
|
+
*
|
|
2002
|
+
* **Layering — one rule, not a bespoke order:** the row tint is the **bottom** layer above the
|
|
2003
|
+
* cell's plain surface, and **every** built-in state background covers it. The base `.twc-dt__td`
|
|
2004
|
+
* rule is the lowest-specificity background in the component, so hover, row selection,
|
|
2005
|
+
* `activeRowId`, a pinned row, a grabbed row, the diff add/remove/modify washes, cell
|
|
2006
|
+
* selection/active and inline editing all outrank it — and an inline per-cell `cellStyle` outranks
|
|
2007
|
+
* those. A row tint is a *data-derived* wash; nothing data-derived should be able to hide an
|
|
2008
|
+
* interaction state. So selection still reads on a tinted row, hover feedback is never lost, and a
|
|
2009
|
+
* per-cell state wins with nothing to compose on your side.
|
|
2010
|
+
*
|
|
2011
|
+
* Need a tint that survives hover? Use {@link getRowClassName} with a rule outranking `(0,3,0)` —
|
|
2012
|
+
* note `.twc-dt__row.my-row .twc-dt__td` is itself `(0,3,0)`, a tie decided by source order, so add
|
|
2013
|
+
* an element: `tr.twc-dt__row.my-row .twc-dt__td` is `(0,3,1)`, and `… .twc-dt__td[data-pin]` is
|
|
2014
|
+
* `(0,4,1)` for the pinned-column twins. You are then choosing to cover the hover cue on those rows.
|
|
2015
|
+
*
|
|
2016
|
+
* **Stripes:** there are none to layer against. Datatable does not zebra-stripe its data rows —
|
|
2017
|
+
* the only `data-zebra` rules in the component style the PIVOT grid's cells, and the hook does not
|
|
2018
|
+
* apply to pivot rows. So a row tint never has to compete with a stripe.
|
|
2019
|
+
*
|
|
2020
|
+
* **Which rows:** every data row. That includes rows pinned with the row ⋮ menu (the hook runs and
|
|
2021
|
+
* the class/non-background declarations apply, though the pinned-row highlight covers a background
|
|
2022
|
+
* tint for as long as the row is pinned, exactly like selection), and cells in a pinned COLUMN pick
|
|
2023
|
+
* the tint up, so a tinted row shows no hole where a frozen column scrolls over it. NOT group-header
|
|
2024
|
+
* rows or the pivot grid's aggregate rows: those have no `row` object to pass. Skeleton rows shown
|
|
2025
|
+
* while `loading` are untouched.
|
|
2026
|
+
*/
|
|
2027
|
+
getRowStyle?: (row: T, index: number) => React.CSSProperties | undefined;
|
|
2028
|
+
/**
|
|
2029
|
+
* #481: a class on the row's `<tr>`, appended to `twc-dt__row` (never replacing it). Same
|
|
2030
|
+
* `(row, index)` signature as {@link getRowStyle}.
|
|
2031
|
+
*
|
|
2032
|
+
* **Which to reach for.** `getRowStyle` is the default: its *background* does not land inline on the
|
|
2033
|
+
* cells — it is routed through `--twc-dt-row-bg` and read by the `(0,1,0)` base rule, so it is the
|
|
2034
|
+
* **lowest** layer and every built-in state covers it, which is almost always what a row tint should
|
|
2035
|
+
* do. (Its *non-background* declarations — opacity, font-weight, text-decoration — are ordinary
|
|
2036
|
+
* inline styles on the `<tr>` and do win.) Reach for `getRowClassName` when you deliberately want the
|
|
2037
|
+
* tint to **outrank** those cues, since your own rule picks its specificity: beat `(0,3,0)`, e.g.
|
|
2038
|
+
* `tr.twc-dt__row.my-row .twc-dt__td`. You are then choosing to cover the hover cue on those rows.
|
|
2039
|
+
*/
|
|
2040
|
+
getRowClassName?: (row: T, index: number) => string | undefined;
|
|
1954
2041
|
/** Restrict the toolbar quick-search to these column `field`s (client mode); defaults to every
|
|
1955
2042
|
* visible column. Mirrors `runDatatableQuery`'s `options.searchFields`. */
|
|
1956
2043
|
searchFields?: string[];
|
|
@@ -3210,7 +3297,16 @@ type MultiSelectOption = Option;
|
|
|
3210
3297
|
/** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
|
|
3211
3298
|
type MultiSelectGroup = OptionGroup;
|
|
3212
3299
|
|
|
3213
|
-
|
|
3300
|
+
/**
|
|
3301
|
+
* #490: forwards `ref` to the text `<input>`, merged with the internal ref used for focus and the token-removal keys.
|
|
3302
|
+
*
|
|
3303
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
3304
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
3305
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
3306
|
+
*/
|
|
3307
|
+
declare const MultiSelect: React.ForwardRefExoticComponent<
|
|
3308
|
+
MultiSelectProps & React.RefAttributes<HTMLInputElement>
|
|
3309
|
+
>;
|
|
3214
3310
|
|
|
3215
3311
|
/** The kinds of filter control a field can render. */
|
|
3216
3312
|
type FilterFieldType = "multiselect" | "daterange" | "search" | "text" | "number" | "boolean" | "select";
|
|
@@ -3514,7 +3610,16 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
3514
3610
|
"aria-label": string;
|
|
3515
3611
|
}
|
|
3516
3612
|
|
|
3517
|
-
|
|
3613
|
+
/**
|
|
3614
|
+
* #490: forwards `ref` to the `<button>` (or the `<a>` when `as="a"`, as with `Button`).
|
|
3615
|
+
*
|
|
3616
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
3617
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
3618
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
3619
|
+
*/
|
|
3620
|
+
declare const IconButton: React.ForwardRefExoticComponent<
|
|
3621
|
+
IconButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
3622
|
+
>;
|
|
3518
3623
|
|
|
3519
3624
|
/** One toggle button in a {@link ToggleGroup}. */
|
|
3520
3625
|
interface ToggleGroupItem {
|
|
@@ -3609,7 +3714,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
3609
3714
|
clearable?: boolean;
|
|
3610
3715
|
}
|
|
3611
3716
|
|
|
3612
|
-
|
|
3717
|
+
/** Forwards `ref` to the inner `<input>` (merged with the internal one `clearable` uses). */
|
|
3718
|
+
declare const Input: React.ForwardRefExoticComponent<
|
|
3719
|
+
InputProps & React.RefAttributes<HTMLInputElement>
|
|
3720
|
+
>;
|
|
3613
3721
|
|
|
3614
3722
|
interface KanbanColumn {
|
|
3615
3723
|
/** Unique column id (matches a card's `column`). */
|
|
@@ -3841,7 +3949,16 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
3841
3949
|
tone?: Tone;
|
|
3842
3950
|
}
|
|
3843
3951
|
|
|
3844
|
-
|
|
3952
|
+
/**
|
|
3953
|
+
* #490: forwards `ref` to the native `<input type="radio">`.
|
|
3954
|
+
*
|
|
3955
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
3956
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
3957
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
3958
|
+
*/
|
|
3959
|
+
declare const Radio: React.ForwardRefExoticComponent<
|
|
3960
|
+
RadioProps & React.RefAttributes<HTMLInputElement>
|
|
3961
|
+
>;
|
|
3845
3962
|
|
|
3846
3963
|
interface RadioGroupOption {
|
|
3847
3964
|
/** Submitted value for this choice. */
|
|
@@ -3998,7 +4115,16 @@ type SelectOption = Option;
|
|
|
3998
4115
|
/** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
|
|
3999
4116
|
type SelectGroup = OptionGroup;
|
|
4000
4117
|
|
|
4001
|
-
|
|
4118
|
+
/**
|
|
4119
|
+
* #490: forwards `ref` to the trigger `<button>`, merged with the internal ref used for focus return.
|
|
4120
|
+
*
|
|
4121
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
4122
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
4123
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
4124
|
+
*/
|
|
4125
|
+
declare const Select: React.ForwardRefExoticComponent<
|
|
4126
|
+
SelectProps & React.RefAttributes<HTMLButtonElement>
|
|
4127
|
+
>;
|
|
4002
4128
|
|
|
4003
4129
|
interface SidebarItem {
|
|
4004
4130
|
/** Item label. */
|
|
@@ -4221,7 +4347,16 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
4221
4347
|
tone?: Tone;
|
|
4222
4348
|
}
|
|
4223
4349
|
|
|
4224
|
-
|
|
4350
|
+
/**
|
|
4351
|
+
* #490: forwards `ref` to the native `<input role="switch">`.
|
|
4352
|
+
*
|
|
4353
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
4354
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
4355
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
4356
|
+
*/
|
|
4357
|
+
declare const Switch: React.ForwardRefExoticComponent<
|
|
4358
|
+
SwitchProps & React.RefAttributes<HTMLInputElement>
|
|
4359
|
+
>;
|
|
4225
4360
|
|
|
4226
4361
|
/** Sort state: the sorted column field (null = unsorted) and direction. */
|
|
4227
4362
|
interface TableSort {
|
|
@@ -4771,7 +4906,17 @@ interface CodeProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
4771
4906
|
rel?: string;
|
|
4772
4907
|
}
|
|
4773
4908
|
|
|
4774
|
-
|
|
4909
|
+
/**
|
|
4910
|
+
* #490: forwards `ref` to the rendered root (`<code>`, or `<pre>` when `block`, or whatever `as` names), merged with the
|
|
4911
|
+
* internal ref used to read the text for the copy button.
|
|
4912
|
+
*
|
|
4913
|
+
* Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
|
|
4914
|
+
* prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
|
|
4915
|
+
* denied it on both. `forwardRef` works on both majors — see #488.
|
|
4916
|
+
*/
|
|
4917
|
+
declare const Code: React.ForwardRefExoticComponent<
|
|
4918
|
+
CodeProps & React.RefAttributes<HTMLElement>
|
|
4919
|
+
>;
|
|
4775
4920
|
|
|
4776
4921
|
/** Font-size token suffixes available to `Heading` (see tokens/typography.css). */
|
|
4777
4922
|
type HeadingSize =
|