@recursica/mantine-adapter 0.48.1 → 0.49.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @recursica/mantine-adapter
2
2
 
3
+ ## 0.49.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bc70636: Add optional `leadingIcon`/`supportingText` fields to Autocomplete/Dropdown `data` items, rendered inside the option row by default. Add a `wrapItemText` prop (default `false`) to wrap label/supportingText instead of truncating with an ellipsis.
8
+
9
+ ### Patch Changes
10
+
11
+ - bc70636: Fix Dropdown/Autocomplete selected-option background highlight. mantine-adapter was keying off `data-combobox-selected` (Mantine's transient keyboard-nav highlight) instead of `data-combobox-active` (the real "matches current value" attribute), so the highlight only showed while arrow-key navigating. mui-adapter's Autocomplete had no selected-state rule at all; now keys off MUI's own `aria-selected`.
12
+ - Updated dependencies [bc70636]
13
+ - @recursica/adapter-common@0.24.0
14
+
3
15
  ## 0.48.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1073,6 +1073,12 @@ declare const ModalTitle: default_2.ForwardRefExoticComponent<ModalTitleProps &
1073
1073
 
1074
1074
  declare type ModalTitleProps = RecursicaOverStyled<ModalTitleProps_2>;
1075
1075
 
1076
+ /**
1077
+ * Backfills `label` (falling back to `value`) on every item, so downstream rendering can always
1078
+ * read a real `label` string instead of re-deriving the same fallback at every call site.
1079
+ */
1080
+ export declare function normalizeComboboxData(data: RecursicaComboboxData | undefined): (string | RecursicaComboboxItemWithLabel)[] | undefined;
1081
+
1076
1082
  export declare const NumberInput: typeof rawComponents.NumberInput;
1077
1083
 
1078
1084
  declare const NumberInput_2: default_2.ForwardRefExoticComponent<NumberInputProps_2 & default_2.RefAttributes<HTMLInputElement>>;
@@ -1730,7 +1736,7 @@ declare interface RecursicaAutoCompleteProps extends Omit<AutocompleteProps, "si
1730
1736
  */
1731
1737
  export declare interface RecursicaAutocompleteProps {
1732
1738
  /** Data options to show in the dropdown */
1733
- data?: unknown[];
1739
+ data?: RecursicaComboboxData;
1734
1740
  /** Error message or toggle state */
1735
1741
  error?: boolean | default_2.ReactNode;
1736
1742
  /** Marks input as required */
@@ -1747,6 +1753,9 @@ export declare interface RecursicaAutocompleteProps {
1747
1753
  rightSection?: default_2.ReactNode;
1748
1754
  /** Placeholder text */
1749
1755
  placeholder?: string;
1756
+ /** Wrap `label`/`supportingText` onto additional lines instead of truncating with an ellipsis.
1757
+ * Defaults to `false` (single-line, truncated). */
1758
+ wrapItemText?: boolean;
1750
1759
  }
1751
1760
 
1752
1761
  /**
@@ -1865,6 +1874,31 @@ export declare interface RecursicaChipProps {
1865
1874
  deleteIconRef?: default_2.Ref<HTMLSpanElement>;
1866
1875
  }
1867
1876
 
1877
+ /** `data` accepted by Autocomplete/Dropdown: a plain string, or a `RecursicaComboboxItem`. */
1878
+ export declare type RecursicaComboboxData = (string | RecursicaComboboxItem)[];
1879
+
1880
+ /**
1881
+ * A single item in Autocomplete/Dropdown's `data`. Shared between both components — and both
1882
+ * adapters, via this package — since their item vocabulary is identical (see
1883
+ * MANTINE_ADAPTER_RICH_OPTION_DATA.md at the repo root).
1884
+ */
1885
+ export declare interface RecursicaComboboxItem {
1886
+ value: string;
1887
+ /** Displayed/matched text; falls back to `value` when omitted. */
1888
+ label?: string;
1889
+ disabled?: boolean;
1890
+ /** Rendered before the label inside the option row. */
1891
+ leadingIcon?: default_2.ReactNode;
1892
+ /** Rendered as a secondary line under the label inside the option row. */
1893
+ supportingText?: string;
1894
+ }
1895
+
1896
+ /** Same shape as `RecursicaComboboxItem`, but with `label` guaranteed present — the result of
1897
+ * `normalizeComboboxData` (see `../../utils/normalizeComboboxData`). */
1898
+ export declare interface RecursicaComboboxItemWithLabel extends RecursicaComboboxItem {
1899
+ label: string;
1900
+ }
1901
+
1868
1902
  /**
1869
1903
  * Union type of all Recursica components.
1870
1904
  */
@@ -1900,12 +1934,10 @@ export declare interface RecursicaDropdownProps extends Omit<SelectProps, "size"
1900
1934
  declare interface RecursicaDropdownProps_2 {
1901
1935
  /** Internal hook for Selects to override raw layout width properties */
1902
1936
  containerWidth?: default_2.CSSProperties["width"];
1903
- /** Data options array */
1904
- data?: (string | {
1905
- value: string;
1906
- label: default_2.ReactNode;
1907
- disabled?: boolean;
1908
- })[];
1937
+ /** Data options array. `label` is matched against typed text and written into the input as the
1938
+ * selected display text — stays a real string (a whole subtree can't be matched/written),
1939
+ * unlike the `ReactNode` this was previously typed as. Falls back to `value` when omitted. */
1940
+ data?: RecursicaComboboxData;
1909
1941
  /** Enable autocomplete search functionality */
1910
1942
  searchable?: boolean;
1911
1943
  /** Show input clear option button */
@@ -1914,6 +1946,9 @@ declare interface RecursicaDropdownProps_2 {
1914
1946
  withAsterisk?: boolean;
1915
1947
  /** Placeholder text when value is empty */
1916
1948
  placeholder?: string;
1949
+ /** Wrap `label`/`supportingText` onto additional lines instead of truncating with an ellipsis.
1950
+ * Defaults to `false` (single-line, truncated). */
1951
+ wrapItemText?: boolean;
1917
1952
  }
1918
1953
 
1919
1954
  /**