@recursica/mui-adapter 0.32.1 → 0.34.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,28 @@
1
1
  # @recursica/mui-adapter
2
2
 
3
+ ## 0.34.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2369301: Add optional `maxHeight` prop to Menu, overriding the token-driven dropdown max-height with an explicit pixel value.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [2369301]
12
+ - @recursica/adapter-common@0.25.0
13
+
14
+ ## 0.33.0
15
+
16
+ ### Minor Changes
17
+
18
+ - 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.
19
+
20
+ ### Patch Changes
21
+
22
+ - 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`.
23
+ - Updated dependencies [bc70636]
24
+ - @recursica/adapter-common@0.24.0
25
+
3
26
  ## 0.32.1
4
27
 
5
28
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -892,6 +892,12 @@ declare const ModalTitle: default_2.ForwardRefExoticComponent<(Omit<Omit<WithRec
892
892
 
893
893
  declare type ModalTitleProps = RecursicaOverStyled<DialogTitleProps>;
894
894
 
895
+ /**
896
+ * Backfills `label` (falling back to `value`) on every item, so downstream rendering can always
897
+ * read a real `label` string instead of re-deriving the same fallback at every call site.
898
+ */
899
+ export declare function normalizeComboboxData(data: RecursicaComboboxData | undefined): (string | RecursicaComboboxItemWithLabel)[] | undefined;
900
+
895
901
  export declare const NumberInput: typeof rawComponents.NumberInput;
896
902
 
897
903
  declare const NumberInput_2: default_2.ForwardRefExoticComponent<(Omit<Omit<WithRecursicaSpacing<RecursicaNumberInputProps>, BlockedStylingKeys> & ForbiddenStyles & {
@@ -1473,7 +1479,7 @@ export declare interface RecursicaAutocompleteProps extends Omit<AutocompletePro
1473
1479
  */
1474
1480
  declare interface RecursicaAutocompleteProps_2 {
1475
1481
  /** Data options to show in the dropdown */
1476
- data?: unknown[];
1482
+ data?: RecursicaComboboxData;
1477
1483
  /** Error message or toggle state */
1478
1484
  error?: boolean | default_2.ReactNode;
1479
1485
  /** Marks input as required */
@@ -1490,6 +1496,9 @@ declare interface RecursicaAutocompleteProps_2 {
1490
1496
  rightSection?: default_2.ReactNode;
1491
1497
  /** Placeholder text */
1492
1498
  placeholder?: string;
1499
+ /** Wrap `label`/`supportingText` onto additional lines instead of truncating with an ellipsis.
1500
+ * Defaults to `false` (single-line, truncated). */
1501
+ wrapItemText?: boolean;
1493
1502
  }
1494
1503
 
1495
1504
  /**
@@ -1609,6 +1618,31 @@ export declare interface RecursicaChipProps {
1609
1618
  deleteIconRef?: default_2.Ref<HTMLSpanElement>;
1610
1619
  }
1611
1620
 
1621
+ /** `data` accepted by Autocomplete/Dropdown: a plain string, or a `RecursicaComboboxItem`. */
1622
+ export declare type RecursicaComboboxData = (string | RecursicaComboboxItem)[];
1623
+
1624
+ /**
1625
+ * A single item in Autocomplete/Dropdown's `data`. Shared between both components — and both
1626
+ * adapters, via this package — since their item vocabulary is identical (see
1627
+ * MANTINE_ADAPTER_RICH_OPTION_DATA.md at the repo root).
1628
+ */
1629
+ export declare interface RecursicaComboboxItem {
1630
+ value: string;
1631
+ /** Displayed/matched text; falls back to `value` when omitted. */
1632
+ label?: string;
1633
+ disabled?: boolean;
1634
+ /** Rendered before the label inside the option row. */
1635
+ leadingIcon?: default_2.ReactNode;
1636
+ /** Rendered as a secondary line under the label inside the option row. */
1637
+ supportingText?: string;
1638
+ }
1639
+
1640
+ /** Same shape as `RecursicaComboboxItem`, but with `label` guaranteed present — the result of
1641
+ * `normalizeComboboxData` (see `../../utils/normalizeComboboxData`). */
1642
+ export declare interface RecursicaComboboxItemWithLabel extends RecursicaComboboxItem {
1643
+ label: string;
1644
+ }
1645
+
1612
1646
  /**
1613
1647
  * Union type of all Recursica components.
1614
1648
  */
@@ -1657,12 +1691,10 @@ export declare interface RecursicaDropdownProps extends Omit<SelectProps, keyof
1657
1691
  declare interface RecursicaDropdownProps_2 {
1658
1692
  /** Internal hook for Selects to override raw layout width properties */
1659
1693
  containerWidth?: default_2.CSSProperties["width"];
1660
- /** Data options array */
1661
- data?: (string | {
1662
- value: string;
1663
- label: default_2.ReactNode;
1664
- disabled?: boolean;
1665
- })[];
1694
+ /** Data options array. `label` is matched against typed text and written into the input as the
1695
+ * selected display text — stays a real string (a whole subtree can't be matched/written),
1696
+ * unlike the `ReactNode` this was previously typed as. Falls back to `value` when omitted. */
1697
+ data?: RecursicaComboboxData;
1666
1698
  /** Enable autocomplete search functionality */
1667
1699
  searchable?: boolean;
1668
1700
  /** Show input clear option button */
@@ -1671,6 +1703,9 @@ declare interface RecursicaDropdownProps_2 {
1671
1703
  withAsterisk?: boolean;
1672
1704
  /** Placeholder text when value is empty */
1673
1705
  placeholder?: string;
1706
+ /** Wrap `label`/`supportingText` onto additional lines instead of truncating with an ellipsis.
1707
+ * Defaults to `false` (single-line, truncated). */
1708
+ wrapItemText?: boolean;
1674
1709
  }
1675
1710
 
1676
1711
  /**
@@ -2084,6 +2119,12 @@ export declare interface RecursicaLoaderProps {
2084
2119
  * Props for the Recursica Menu component.
2085
2120
  */
2086
2121
  export declare interface RecursicaMenuProps {
2122
+ /**
2123
+ * Overrides the dropdown's token-driven max-height with an explicit pixel (or other CSS
2124
+ * length) value. Escape hatch for callers that need an arbitrary menu height the design
2125
+ * tokens don't express; leave unset to use the token default.
2126
+ */
2127
+ maxHeight?: default_2.CSSProperties["maxHeight"];
2087
2128
  }
2088
2129
 
2089
2130
  /**