twico-ui 1.45.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/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. */
@@ -3269,7 +3297,16 @@ type MultiSelectOption = Option;
3269
3297
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
3270
3298
  type MultiSelectGroup = OptionGroup;
3271
3299
 
3272
- declare function MultiSelect(props: MultiSelectProps): React.JSX.Element;
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
+ >;
3273
3310
 
3274
3311
  /** The kinds of filter control a field can render. */
3275
3312
  type FilterFieldType = "multiselect" | "daterange" | "search" | "text" | "number" | "boolean" | "select";
@@ -3573,7 +3610,16 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
3573
3610
  "aria-label": string;
3574
3611
  }
3575
3612
 
3576
- declare function IconButton(props: IconButtonProps): React.JSX.Element;
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
+ >;
3577
3623
 
3578
3624
  /** One toggle button in a {@link ToggleGroup}. */
3579
3625
  interface ToggleGroupItem {
@@ -3668,7 +3714,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3668
3714
  clearable?: boolean;
3669
3715
  }
3670
3716
 
3671
- declare function Input(props: InputProps): React.JSX.Element;
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
+ >;
3672
3721
 
3673
3722
  interface KanbanColumn {
3674
3723
  /** Unique column id (matches a card's `column`). */
@@ -3900,7 +3949,16 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3900
3949
  tone?: Tone;
3901
3950
  }
3902
3951
 
3903
- declare function Radio(props: RadioProps): React.JSX.Element;
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
+ >;
3904
3962
 
3905
3963
  interface RadioGroupOption {
3906
3964
  /** Submitted value for this choice. */
@@ -4057,7 +4115,16 @@ type SelectOption = Option;
4057
4115
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
4058
4116
  type SelectGroup = OptionGroup;
4059
4117
 
4060
- declare function Select(props: SelectProps): React.JSX.Element;
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
+ >;
4061
4128
 
4062
4129
  interface SidebarItem {
4063
4130
  /** Item label. */
@@ -4280,7 +4347,16 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
4280
4347
  tone?: Tone;
4281
4348
  }
4282
4349
 
4283
- declare function Switch(props: SwitchProps): React.JSX.Element;
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
+ >;
4284
4360
 
4285
4361
  /** Sort state: the sorted column field (null = unsorted) and direction. */
4286
4362
  interface TableSort {
@@ -4830,7 +4906,17 @@ interface CodeProps extends React.HTMLAttributes<HTMLElement> {
4830
4906
  rel?: string;
4831
4907
  }
4832
4908
 
4833
- declare function Code(props: CodeProps): React.JSX.Element;
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
+ >;
4834
4920
 
4835
4921
  /** Font-size token suffixes available to `Heading` (see tokens/typography.css). */
4836
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
- 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. */
@@ -3269,7 +3297,16 @@ type MultiSelectOption = Option;
3269
3297
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
3270
3298
  type MultiSelectGroup = OptionGroup;
3271
3299
 
3272
- declare function MultiSelect(props: MultiSelectProps): React.JSX.Element;
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
+ >;
3273
3310
 
3274
3311
  /** The kinds of filter control a field can render. */
3275
3312
  type FilterFieldType = "multiselect" | "daterange" | "search" | "text" | "number" | "boolean" | "select";
@@ -3573,7 +3610,16 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
3573
3610
  "aria-label": string;
3574
3611
  }
3575
3612
 
3576
- declare function IconButton(props: IconButtonProps): React.JSX.Element;
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
+ >;
3577
3623
 
3578
3624
  /** One toggle button in a {@link ToggleGroup}. */
3579
3625
  interface ToggleGroupItem {
@@ -3668,7 +3714,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3668
3714
  clearable?: boolean;
3669
3715
  }
3670
3716
 
3671
- declare function Input(props: InputProps): React.JSX.Element;
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
+ >;
3672
3721
 
3673
3722
  interface KanbanColumn {
3674
3723
  /** Unique column id (matches a card's `column`). */
@@ -3900,7 +3949,16 @@ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
3900
3949
  tone?: Tone;
3901
3950
  }
3902
3951
 
3903
- declare function Radio(props: RadioProps): React.JSX.Element;
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
+ >;
3904
3962
 
3905
3963
  interface RadioGroupOption {
3906
3964
  /** Submitted value for this choice. */
@@ -4057,7 +4115,16 @@ type SelectOption = Option;
4057
4115
  /** Alias of the shared {@link OptionGroup} type (kept for backward-compatible imports). */
4058
4116
  type SelectGroup = OptionGroup;
4059
4117
 
4060
- declare function Select(props: SelectProps): React.JSX.Element;
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
+ >;
4061
4128
 
4062
4129
  interface SidebarItem {
4063
4130
  /** Item label. */
@@ -4280,7 +4347,16 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
4280
4347
  tone?: Tone;
4281
4348
  }
4282
4349
 
4283
- declare function Switch(props: SwitchProps): React.JSX.Element;
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
+ >;
4284
4360
 
4285
4361
  /** Sort state: the sorted column field (null = unsorted) and direction. */
4286
4362
  interface TableSort {
@@ -4830,7 +4906,17 @@ interface CodeProps extends React.HTMLAttributes<HTMLElement> {
4830
4906
  rel?: string;
4831
4907
  }
4832
4908
 
4833
- declare function Code(props: CodeProps): React.JSX.Element;
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
+ >;
4834
4920
 
4835
4921
  /** Font-size token suffixes available to `Heading` (see tokens/typography.css). */
4836
4922
  type HeadingSize =