twico-ui 1.45.0 → 1.46.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
@@ -591,7 +591,17 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
591
591
  children?: React.ReactNode;
592
592
  }
593
593
 
594
- declare function Button(props: ButtonProps): React.JSX.Element;
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
- declare function Checkbox(props: CheckboxProps): React.JSX.Element;
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
- declare function Combobox(props: ComboboxProps): React.JSX.Element;
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. */
@@ -2059,6 +2087,26 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
2059
2087
  * full row objects server-side rather than relying on `selectedRows`.
2060
2088
  */
2061
2089
  batchActions?: DatatableBatchAction<T>[];
2090
+ /**
2091
+ * #492: extra node in the **selection** toolbar, rendered beside the "N selected" count and before
2092
+ * the batch actions — for the number the count does not carry.
2093
+ *
2094
+ * The count is not always what decides anything. A batch capped by total **size** refuses on
2095
+ * gigabytes, not on items: "12 selected" is not the number the user needs, "12 selected · 2.4 GB"
2096
+ * is. Before this there was nowhere to put it, so hosts lifted it into the main toolbar behind
2097
+ * their own `selected.length > 0` guard — putting it in a different row from the count it
2098
+ * qualifies, and re-deriving a selection this component already tracks.
2099
+ *
2100
+ * Prefer the **function form**: it receives the same `(keys, rows)` the batch actions get, so the
2101
+ * host supplies one pure function and keeps no selection state of its own. (With `retainSelectedRows`
2102
+ * the off-page rows resolve too; without it only the rows currently rendered do.) Pass a plain
2103
+ * node when the summary does not depend on the selection.
2104
+ *
2105
+ * Complements `disabledReason` (#479), which explains the refusal once a cap is exceeded: this is
2106
+ * the running total *before* that point, which is what lets someone stop at the right number
2107
+ * instead of discovering the cap by hitting it.
2108
+ */
2109
+ selectionSummary?: React.ReactNode | ((keys: Array<string | number>, rows: T[]) => React.ReactNode);
2062
2110
  /** #322: fired when the checkbox row selection changes — `(keys, rows)`. The row-mode analogue of
2063
2111
  * `onCellSelectionChange`, so a consumer can track the selection and drive a batch action's own
2064
2112
  * `disabled`/`hidden` (which also accept predicates). */
@@ -2851,6 +2899,26 @@ interface CardGridProps<Row = any> extends Omit<React.HTMLAttributes<HTMLDivElem
2851
2899
  * `ctx.anchorEl` so an action can anchor a popover to its own button.
2852
2900
  */
2853
2901
  batchActions?: CardGridBatchAction<Row>[];
2902
+ /**
2903
+ * #492: extra node in the **selection** toolbar, rendered beside the "N selected" count and before
2904
+ * the batch actions — for the number the count does not carry.
2905
+ *
2906
+ * The count is not always what decides anything. A batch capped by total **size** refuses on
2907
+ * gigabytes, not on items: "12 selected" is not the number the user needs, "12 selected · 2.4 GB"
2908
+ * is. Before this there was nowhere to put it, so hosts lifted it into the main toolbar behind
2909
+ * their own `selected.length > 0` guard — putting it in a different row from the count it
2910
+ * qualifies, and re-deriving a selection this component already tracks.
2911
+ *
2912
+ * Prefer the **function form**: it receives the same `(keys, rows)` the batch actions get, so the
2913
+ * host supplies one pure function and keeps no selection state of its own. (With `retainSelectedRows`
2914
+ * the off-page rows resolve too; without it only the rows currently rendered do.) Pass a plain
2915
+ * node when the summary does not depend on the selection.
2916
+ *
2917
+ * Complements `disabledReason` (#479), which explains the refusal once a cap is exceeded: this is
2918
+ * the running total *before* that point, which is what lets someone stop at the right number
2919
+ * instead of discovering the cap by hitting it.
2920
+ */
2921
+ selectionSummary?: React.ReactNode | ((keys: Array<string | number>, rows: Row[]) => React.ReactNode);
2854
2922
  /** Fired when the selection changes — `(keys, rows)`, matching `Datatable.onRowSelectionChange`. */
2855
2923
  onRowSelectionChange?: (keys: Array<string | number>, rows: Row[]) => void;
2856
2924
  /**
@@ -3269,7 +3337,16 @@ type MultiSelectOption = Option;
3269
3337
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
3270
3338
  type MultiSelectGroup = OptionGroup;
3271
3339
 
3272
- declare function MultiSelect(props: MultiSelectProps): React.JSX.Element;
3340
+ /**
3341
+ * #490: forwards `ref` to the text `<input>`, merged with the internal ref used for focus and the token-removal keys.
3342
+ *
3343
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
3344
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
3345
+ * denied it on both. `forwardRef` works on both majors — see #488.
3346
+ */
3347
+ declare const MultiSelect: React.ForwardRefExoticComponent<
3348
+ MultiSelectProps & React.RefAttributes<HTMLInputElement>
3349
+ >;
3273
3350
 
3274
3351
  /** The kinds of filter control a field can render. */
3275
3352
  type FilterFieldType = "multiselect" | "daterange" | "search" | "text" | "number" | "boolean" | "select";
@@ -3573,7 +3650,16 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
3573
3650
  "aria-label": string;
3574
3651
  }
3575
3652
 
3576
- declare function IconButton(props: IconButtonProps): React.JSX.Element;
3653
+ /**
3654
+ * #490: forwards `ref` to the `<button>` (or the `<a>` when `as="a"`, as with `Button`).
3655
+ *
3656
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
3657
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
3658
+ * denied it on both. `forwardRef` works on both majors — see #488.
3659
+ */
3660
+ declare const IconButton: React.ForwardRefExoticComponent<
3661
+ IconButtonProps & React.RefAttributes<HTMLButtonElement>
3662
+ >;
3577
3663
 
3578
3664
  /** One toggle button in a {@link ToggleGroup}. */
3579
3665
  interface ToggleGroupItem {
@@ -3668,7 +3754,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3668
3754
  clearable?: boolean;
3669
3755
  }
3670
3756
 
3671
- declare function Input(props: InputProps): React.JSX.Element;
3757
+ /** Forwards `ref` to the inner `<input>` (merged with the internal one `clearable` uses). */
3758
+ declare const Input: React.ForwardRefExoticComponent<
3759
+ InputProps & React.RefAttributes<HTMLInputElement>
3760
+ >;
3672
3761
 
3673
3762
  interface KanbanColumn {
3674
3763
  /** Unique column id (matches a card's `column`). */
@@ -3900,7 +3989,16 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3900
3989
  tone?: Tone;
3901
3990
  }
3902
3991
 
3903
- declare function Radio(props: RadioProps): React.JSX.Element;
3992
+ /**
3993
+ * #490: forwards `ref` to the native `<input type="radio">`.
3994
+ *
3995
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
3996
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
3997
+ * denied it on both. `forwardRef` works on both majors — see #488.
3998
+ */
3999
+ declare const Radio: React.ForwardRefExoticComponent<
4000
+ RadioProps & React.RefAttributes<HTMLInputElement>
4001
+ >;
3904
4002
 
3905
4003
  interface RadioGroupOption {
3906
4004
  /** Submitted value for this choice. */
@@ -4057,7 +4155,16 @@ type SelectOption = Option;
4057
4155
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
4058
4156
  type SelectGroup = OptionGroup;
4059
4157
 
4060
- declare function Select(props: SelectProps): React.JSX.Element;
4158
+ /**
4159
+ * #490: forwards `ref` to the trigger `<button>`, merged with the internal ref used for focus return.
4160
+ *
4161
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
4162
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
4163
+ * denied it on both. `forwardRef` works on both majors — see #488.
4164
+ */
4165
+ declare const Select: React.ForwardRefExoticComponent<
4166
+ SelectProps & React.RefAttributes<HTMLButtonElement>
4167
+ >;
4061
4168
 
4062
4169
  interface SidebarItem {
4063
4170
  /** Item label. */
@@ -4280,7 +4387,16 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
4280
4387
  tone?: Tone;
4281
4388
  }
4282
4389
 
4283
- declare function Switch(props: SwitchProps): React.JSX.Element;
4390
+ /**
4391
+ * #490: forwards `ref` to the native `<input role="switch">`.
4392
+ *
4393
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
4394
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
4395
+ * denied it on both. `forwardRef` works on both majors — see #488.
4396
+ */
4397
+ declare const Switch: React.ForwardRefExoticComponent<
4398
+ SwitchProps & React.RefAttributes<HTMLInputElement>
4399
+ >;
4284
4400
 
4285
4401
  /** Sort state: the sorted column field (null = unsorted) and direction. */
4286
4402
  interface TableSort {
@@ -4830,7 +4946,17 @@ interface CodeProps extends React.HTMLAttributes<HTMLElement> {
4830
4946
  rel?: string;
4831
4947
  }
4832
4948
 
4833
- declare function Code(props: CodeProps): React.JSX.Element;
4949
+ /**
4950
+ * #490: forwards `ref` to the rendered root (`<code>`, or `<pre>` when `block`, or whatever `as` names), merged with the
4951
+ * internal ref used to read the text for the copy button.
4952
+ *
4953
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
4954
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
4955
+ * denied it on both. `forwardRef` works on both majors — see #488.
4956
+ */
4957
+ declare const Code: React.ForwardRefExoticComponent<
4958
+ CodeProps & React.RefAttributes<HTMLElement>
4959
+ >;
4834
4960
 
4835
4961
  /** Font-size token suffixes available to `Heading` (see tokens/typography.css). */
4836
4962
  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
- declare function Button(props: ButtonProps): React.JSX.Element;
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
- declare function Checkbox(props: CheckboxProps): React.JSX.Element;
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
- declare function Combobox(props: ComboboxProps): React.JSX.Element;
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. */
@@ -2059,6 +2087,26 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
2059
2087
  * full row objects server-side rather than relying on `selectedRows`.
2060
2088
  */
2061
2089
  batchActions?: DatatableBatchAction<T>[];
2090
+ /**
2091
+ * #492: extra node in the **selection** toolbar, rendered beside the "N selected" count and before
2092
+ * the batch actions — for the number the count does not carry.
2093
+ *
2094
+ * The count is not always what decides anything. A batch capped by total **size** refuses on
2095
+ * gigabytes, not on items: "12 selected" is not the number the user needs, "12 selected · 2.4 GB"
2096
+ * is. Before this there was nowhere to put it, so hosts lifted it into the main toolbar behind
2097
+ * their own `selected.length > 0` guard — putting it in a different row from the count it
2098
+ * qualifies, and re-deriving a selection this component already tracks.
2099
+ *
2100
+ * Prefer the **function form**: it receives the same `(keys, rows)` the batch actions get, so the
2101
+ * host supplies one pure function and keeps no selection state of its own. (With `retainSelectedRows`
2102
+ * the off-page rows resolve too; without it only the rows currently rendered do.) Pass a plain
2103
+ * node when the summary does not depend on the selection.
2104
+ *
2105
+ * Complements `disabledReason` (#479), which explains the refusal once a cap is exceeded: this is
2106
+ * the running total *before* that point, which is what lets someone stop at the right number
2107
+ * instead of discovering the cap by hitting it.
2108
+ */
2109
+ selectionSummary?: React.ReactNode | ((keys: Array<string | number>, rows: T[]) => React.ReactNode);
2062
2110
  /** #322: fired when the checkbox row selection changes — `(keys, rows)`. The row-mode analogue of
2063
2111
  * `onCellSelectionChange`, so a consumer can track the selection and drive a batch action's own
2064
2112
  * `disabled`/`hidden` (which also accept predicates). */
@@ -2851,6 +2899,26 @@ interface CardGridProps<Row = any> extends Omit<React.HTMLAttributes<HTMLDivElem
2851
2899
  * `ctx.anchorEl` so an action can anchor a popover to its own button.
2852
2900
  */
2853
2901
  batchActions?: CardGridBatchAction<Row>[];
2902
+ /**
2903
+ * #492: extra node in the **selection** toolbar, rendered beside the "N selected" count and before
2904
+ * the batch actions — for the number the count does not carry.
2905
+ *
2906
+ * The count is not always what decides anything. A batch capped by total **size** refuses on
2907
+ * gigabytes, not on items: "12 selected" is not the number the user needs, "12 selected · 2.4 GB"
2908
+ * is. Before this there was nowhere to put it, so hosts lifted it into the main toolbar behind
2909
+ * their own `selected.length > 0` guard — putting it in a different row from the count it
2910
+ * qualifies, and re-deriving a selection this component already tracks.
2911
+ *
2912
+ * Prefer the **function form**: it receives the same `(keys, rows)` the batch actions get, so the
2913
+ * host supplies one pure function and keeps no selection state of its own. (With `retainSelectedRows`
2914
+ * the off-page rows resolve too; without it only the rows currently rendered do.) Pass a plain
2915
+ * node when the summary does not depend on the selection.
2916
+ *
2917
+ * Complements `disabledReason` (#479), which explains the refusal once a cap is exceeded: this is
2918
+ * the running total *before* that point, which is what lets someone stop at the right number
2919
+ * instead of discovering the cap by hitting it.
2920
+ */
2921
+ selectionSummary?: React.ReactNode | ((keys: Array<string | number>, rows: Row[]) => React.ReactNode);
2854
2922
  /** Fired when the selection changes — `(keys, rows)`, matching `Datatable.onRowSelectionChange`. */
2855
2923
  onRowSelectionChange?: (keys: Array<string | number>, rows: Row[]) => void;
2856
2924
  /**
@@ -3269,7 +3337,16 @@ type MultiSelectOption = Option;
3269
3337
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
3270
3338
  type MultiSelectGroup = OptionGroup;
3271
3339
 
3272
- declare function MultiSelect(props: MultiSelectProps): React.JSX.Element;
3340
+ /**
3341
+ * #490: forwards `ref` to the text `<input>`, merged with the internal ref used for focus and the token-removal keys.
3342
+ *
3343
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
3344
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
3345
+ * denied it on both. `forwardRef` works on both majors — see #488.
3346
+ */
3347
+ declare const MultiSelect: React.ForwardRefExoticComponent<
3348
+ MultiSelectProps & React.RefAttributes<HTMLInputElement>
3349
+ >;
3273
3350
 
3274
3351
  /** The kinds of filter control a field can render. */
3275
3352
  type FilterFieldType = "multiselect" | "daterange" | "search" | "text" | "number" | "boolean" | "select";
@@ -3573,7 +3650,16 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
3573
3650
  "aria-label": string;
3574
3651
  }
3575
3652
 
3576
- declare function IconButton(props: IconButtonProps): React.JSX.Element;
3653
+ /**
3654
+ * #490: forwards `ref` to the `<button>` (or the `<a>` when `as="a"`, as with `Button`).
3655
+ *
3656
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
3657
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
3658
+ * denied it on both. `forwardRef` works on both majors — see #488.
3659
+ */
3660
+ declare const IconButton: React.ForwardRefExoticComponent<
3661
+ IconButtonProps & React.RefAttributes<HTMLButtonElement>
3662
+ >;
3577
3663
 
3578
3664
  /** One toggle button in a {@link ToggleGroup}. */
3579
3665
  interface ToggleGroupItem {
@@ -3668,7 +3754,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3668
3754
  clearable?: boolean;
3669
3755
  }
3670
3756
 
3671
- declare function Input(props: InputProps): React.JSX.Element;
3757
+ /** Forwards `ref` to the inner `<input>` (merged with the internal one `clearable` uses). */
3758
+ declare const Input: React.ForwardRefExoticComponent<
3759
+ InputProps & React.RefAttributes<HTMLInputElement>
3760
+ >;
3672
3761
 
3673
3762
  interface KanbanColumn {
3674
3763
  /** Unique column id (matches a card's `column`). */
@@ -3900,7 +3989,16 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3900
3989
  tone?: Tone;
3901
3990
  }
3902
3991
 
3903
- declare function Radio(props: RadioProps): React.JSX.Element;
3992
+ /**
3993
+ * #490: forwards `ref` to the native `<input type="radio">`.
3994
+ *
3995
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
3996
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
3997
+ * denied it on both. `forwardRef` works on both majors — see #488.
3998
+ */
3999
+ declare const Radio: React.ForwardRefExoticComponent<
4000
+ RadioProps & React.RefAttributes<HTMLInputElement>
4001
+ >;
3904
4002
 
3905
4003
  interface RadioGroupOption {
3906
4004
  /** Submitted value for this choice. */
@@ -4057,7 +4155,16 @@ type SelectOption = Option;
4057
4155
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
4058
4156
  type SelectGroup = OptionGroup;
4059
4157
 
4060
- declare function Select(props: SelectProps): React.JSX.Element;
4158
+ /**
4159
+ * #490: forwards `ref` to the trigger `<button>`, merged with the internal ref used for focus return.
4160
+ *
4161
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
4162
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
4163
+ * denied it on both. `forwardRef` works on both majors — see #488.
4164
+ */
4165
+ declare const Select: React.ForwardRefExoticComponent<
4166
+ SelectProps & React.RefAttributes<HTMLButtonElement>
4167
+ >;
4061
4168
 
4062
4169
  interface SidebarItem {
4063
4170
  /** Item label. */
@@ -4280,7 +4387,16 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
4280
4387
  tone?: Tone;
4281
4388
  }
4282
4389
 
4283
- declare function Switch(props: SwitchProps): React.JSX.Element;
4390
+ /**
4391
+ * #490: forwards `ref` to the native `<input role="switch">`.
4392
+ *
4393
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
4394
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
4395
+ * denied it on both. `forwardRef` works on both majors — see #488.
4396
+ */
4397
+ declare const Switch: React.ForwardRefExoticComponent<
4398
+ SwitchProps & React.RefAttributes<HTMLInputElement>
4399
+ >;
4284
4400
 
4285
4401
  /** Sort state: the sorted column field (null = unsorted) and direction. */
4286
4402
  interface TableSort {
@@ -4830,7 +4946,17 @@ interface CodeProps extends React.HTMLAttributes<HTMLElement> {
4830
4946
  rel?: string;
4831
4947
  }
4832
4948
 
4833
- declare function Code(props: CodeProps): React.JSX.Element;
4949
+ /**
4950
+ * #490: forwards `ref` to the rendered root (`<code>`, or `<pre>` when `block`, or whatever `as` names), merged with the
4951
+ * internal ref used to read the text for the copy button.
4952
+ *
4953
+ * Declared rather than left to React 19's implicit pass-through: on React 19 `ref` is an ordinary
4954
+ * prop, so `{...rest}` would land one on the element anyway, but React 18 strips it and the type
4955
+ * denied it on both. `forwardRef` works on both majors — see #488.
4956
+ */
4957
+ declare const Code: React.ForwardRefExoticComponent<
4958
+ CodeProps & React.RefAttributes<HTMLElement>
4959
+ >;
4834
4960
 
4835
4961
  /** Font-size token suffixes available to `Heading` (see tokens/typography.css). */
4836
4962
  type HeadingSize =