@recursica/mantine-adapter 0.38.1 → 0.39.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/ARCHITECTURE.md CHANGED
@@ -13,3 +13,6 @@ This document describes the high-level architecture and philosophy of the `@recu
13
13
 
14
14
  - Components map closely to Mantine's structure but enforce Recursica design tokens.
15
15
  - We avoid over-styling; components only diverge from Mantine defaults when dictated by the Recursica design system.
16
+ - Each component adheres to the underlying UI-kit prop signature so that they can easily replace components in the existing code-base
17
+ - Recursica defines a set of common props that are shared across all framework adapters. These sometimes serve the same purpose as existing UI-kit props. In that case, the Recursica prop takes precedence and are the preferred way to achieve the desired effect.
18
+ - Adapter props are removed from the underlying UI-kit when it leads to behavior that Recursica does not support. Recursica is opinionated about the behavior of its components and does not support all of the behavior of the underlying UI-kit.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @recursica/mantine-adapter
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 106bc34: Accordion: closed silent prop-contract conflicts where native `expanded`/`onChange`/`expandIcon`/`icon` could override Recursica's own computed state, made `variant` a real predefined union instead of a bare string, and formally supported a per-item `disabled` prop in both adapters.
8
+ Also documented `children` across all Accordion sub-components in `RecursicaAccordionProps.ts`, including a new `RecursicaAccordionPanelProps` interface for the Panel.
9
+ - 106bc34: AssistiveElement: `assistiveVariant="error"` now defaults `role="alert"` in both adapters so
10
+ error text is announced by assistive tech as it appears or changes (an explicit `role` still
11
+ wins). Also (MUI only) closed a prop-contract conflict where native `error`/`component` could
12
+ silently override Recursica's own computed values, added the missing `RecursicaOverStyled`
13
+ wrapper, and hardened a CSS specificity tie against MUI's own `.Mui-error` color. Documented
14
+ `children` in `RecursicaAssistiveElementProps.ts` and added implementation notes to both adapters.
15
+
16
+ ### Patch Changes
17
+
18
+ - 106bc34: AutoComplete (Mantine): fixed error state not turning the border red — the `wrapperProps` `data-error` hack (copied from `Input`-based components) targets Mantine's `Input.Wrapper` for `InputBase`-based components like `Autocomplete`, not the input's own root box, so it never reached the CSS. Now passes `error` as a boolean directly to Mantine's `Autocomplete`, which sets the border-triggering attribute natively without duplicating the assistive error text.
19
+ - 106bc34: Avatar (MUI): fixed `variant` being fed into MUI's native shape prop instead of a color treatment, making it a silent no-op. Also documented `children` in the shared prop types and added missing mui-adapter implementation notes.
20
+ - 106bc34: Switch: attached `SwitchGroup` as the `Switch.Group` compound export (it existed standalone but was never attached), and tightened `RecursicaSwitchGroupProps` value types from `unknown[]` to `string[]`.
21
+ - 106bc34: SwitchGroup: fixed `side-by-side` layout always rendering as if stacked — the group was capped to the switch-item label's own 200px max-width, narrower than the mandatory 224px label column, guaranteeing a wrap.
22
+ - 106bc34: Switch (Mantine): fixed the focus ring rendering Mantine's default blue instead of Recursica's focus token — suppressed the native outline and drew the real ring on the track.
23
+ - Updated dependencies [106bc34]
24
+ - Updated dependencies [106bc34]
25
+ - Updated dependencies [106bc34]
26
+ - Updated dependencies [106bc34]
27
+ - Updated dependencies [106bc34]
28
+ - @recursica/adapter-common@0.15.0
29
+
3
30
  ## 0.38.1
4
31
 
5
32
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -123,7 +123,7 @@ export declare const AccordionControl: typeof rawComponents.AccordionControl;
123
123
 
124
124
  declare const AccordionControl_2: ForwardRefExoticComponent<AccordionControlWrapperProps & RefAttributes<HTMLButtonElement>>;
125
125
 
126
- declare type AccordionControlWrapperProps = RecursicaOverStyled<AccordionControlProps & RecursicaAccordionControlProps>;
126
+ declare type AccordionControlWrapperProps = RecursicaOverStyled<Omit<AccordionControlProps, "icon"> & RecursicaAccordionControlProps>;
127
127
 
128
128
  export declare const AccordionItem: typeof rawComponents.AccordionItem;
129
129
 
@@ -135,7 +135,7 @@ export declare const AccordionPanel: typeof rawComponents.AccordionPanel;
135
135
 
136
136
  declare const AccordionPanel_2: ForwardRefExoticComponent<AccordionPanelWrapperProps & RefAttributes<HTMLDivElement>>;
137
137
 
138
- declare type AccordionPanelWrapperProps = RecursicaOverStyled<AccordionPanelProps>;
138
+ declare type AccordionPanelWrapperProps = RecursicaOverStyled<AccordionPanelProps & RecursicaAccordionPanelProps>;
139
139
 
140
140
  declare type AccordionProps = RecursicaOverStyled<Omit<AccordionProps_2, "value" | "defaultValue" | "onChange" | "multiple" | "variant"> & RecursicaAccordionProps>;
141
141
 
@@ -160,7 +160,7 @@ export declare const Avatar: typeof rawComponents.Avatar;
160
160
  */
161
161
  declare const Avatar_2: (<C = "div">(props: PolymorphicComponentProps<C, AvatarProps>) => React.ReactElement) & Omit<FunctionComponent<((AvatarProps & {
162
162
  component?: any;
163
- }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "attributes" | "overStyled" | "name" | "icon" | "size" | "component" | "alt" | "src" | "gradient" | "imageProps" | "autoContrast" | "allowedInitialsColors"> & {
163
+ }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "attributes" | "overStyled" | "icon" | "name" | "size" | "component" | "alt" | "src" | "gradient" | "imageProps" | "autoContrast" | "allowedInitialsColors"> & {
164
164
  ref?: any;
165
165
  renderRoot?: (props: any) => any;
166
166
  }) | (AvatarProps & {
@@ -220,7 +220,7 @@ export declare const Button: typeof rawComponents.Button;
220
220
  */
221
221
  declare const Button_2: (<C = "button">(props: PolymorphicComponentProps<C, ButtonProps>) => default_2.ReactElement) & Omit<default_2.FunctionComponent<((ButtonProps & {
222
222
  component?: any;
223
- }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "color" | "children" | "radius" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "attributes" | "overStyled" | "disabled" | "icon" | "justify" | "size" | "component" | "rightSection" | "data-disabled" | "gradient" | "autoContrast" | "loading" | "loaderProps" | "loaderVariant" | "loaderSize" | "useRecursicaLoader"> & {
223
+ }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "color" | "children" | "radius" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "attributes" | "overStyled" | "disabled" | "icon" | "justify" | "data-disabled" | "size" | "component" | "rightSection" | "gradient" | "autoContrast" | "loading" | "loaderProps" | "loaderVariant" | "loaderSize" | "useRecursicaLoader"> & {
224
224
  ref?: any;
225
225
  renderRoot?: (props: any) => any;
226
226
  }) | (ButtonProps & {
@@ -838,7 +838,7 @@ declare type MenuDropdownProps = RecursicaOverStyled<MenuDropdownProps_2>;
838
838
  */
839
839
  declare const MenuItem: (<C = "button">(props: PolymorphicComponentProps<C, MenuItemProps>) => React.ReactElement) & Omit<FunctionComponent<((MenuItemProps & {
840
840
  component?: any;
841
- }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "overStyled" | "disabled" | "component" | "leftSection" | "rightSection" | "data-disabled" | "closeMenuOnClick"> & {
841
+ }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "overStyled" | "disabled" | "data-disabled" | "component" | "leftSection" | "rightSection" | "closeMenuOnClick"> & {
842
842
  ref?: any;
843
843
  renderRoot?: (props: any) => any;
844
844
  }) | (MenuItemProps & {
@@ -900,7 +900,7 @@ declare type MenuSubDropdownProps = RecursicaOverStyled<MenuSubDropdownProps_2>;
900
900
  */
901
901
  declare const MenuSubItem: (<C = "button">(props: PolymorphicComponentProps<C, MenuSubItemProps>) => React.ReactElement) & Omit<FunctionComponent<((MenuSubItemProps & {
902
902
  component?: any;
903
- }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "overStyled" | "disabled" | "component" | "leftSection" | "rightSection" | "data-disabled" | "closeMenuOnClick"> & {
903
+ }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "variant" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "overStyled" | "disabled" | "data-disabled" | "component" | "leftSection" | "rightSection" | "closeMenuOnClick"> & {
904
904
  ref?: any;
905
905
  renderRoot?: (props: any) => any;
906
906
  }) | (MenuSubItemProps & {
@@ -1544,6 +1544,8 @@ export declare const RECURSICA_COMPONENTS: readonly ["Accordion", "AssistiveElem
1544
1544
  * Props for the Recursica Accordion Control component.
1545
1545
  */
1546
1546
  export declare interface RecursicaAccordionControlProps {
1547
+ /** The control's label content */
1548
+ children?: default_2.ReactNode;
1547
1549
  /** Leading icon displayed inside the control boundary */
1548
1550
  leftIcon?: default_2.ReactNode;
1549
1551
  }
@@ -1552,7 +1554,14 @@ export declare interface RecursicaAccordionControlProps {
1552
1554
  * Props for the Recursica Accordion Item component.
1553
1555
  */
1554
1556
  export declare interface RecursicaAccordionItemProps {
1555
- /** The text or element label for the item control */
1557
+ /**
1558
+ * When `title` is set, this is the panel content — the control and panel are constructed
1559
+ * automatically, with `children` becoming the panel body. When `title` is omitted, this is
1560
+ * expected to be a manually composed `Accordion.Control`/`Accordion.Panel` pair instead.
1561
+ */
1562
+ children?: default_2.ReactNode;
1563
+ /** The text or element label for the item control. When set, the control and panel are
1564
+ * constructed automatically; omit it to compose the control and panel manually instead. */
1556
1565
  title?: default_2.ReactNode;
1557
1566
  /** Leading icon for the item control */
1558
1567
  leftIcon?: default_2.ReactNode;
@@ -1560,14 +1569,30 @@ export declare interface RecursicaAccordionItemProps {
1560
1569
  divider?: boolean;
1561
1570
  /** Unique value identifier for this item */
1562
1571
  value?: string;
1572
+ /** Disables interaction with this item — it can't be expanded or collapsed, and is dimmed */
1573
+ disabled?: boolean;
1574
+ }
1575
+
1576
+ /**
1577
+ * Props for the Recursica Accordion Panel component.
1578
+ */
1579
+ export declare interface RecursicaAccordionPanelProps {
1580
+ /** The panel's content, shown when the item is expanded */
1581
+ children?: default_2.ReactNode;
1563
1582
  }
1564
1583
 
1565
1584
  /**
1566
1585
  * Props for the Recursica Accordion container component.
1567
1586
  */
1568
1587
  export declare interface RecursicaAccordionProps {
1569
- /** The styling variant of the accordion */
1570
- variant?: string;
1588
+ /** The `Accordion.Item` elements that make up the accordion */
1589
+ children?: default_2.ReactNode;
1590
+ /**
1591
+ * The styling variant of the accordion. `"default"` is the only variant with dedicated
1592
+ * Recursica styling today; any other string is accepted for advanced/custom theming but
1593
+ * has no guaranteed styling.
1594
+ */
1595
+ variant?: "default" | (string & {});
1571
1596
  /** Current expanded value(s) in controlled mode */
1572
1597
  value?: string | string[];
1573
1598
  /** Initial expanded value(s) in uncontrolled mode */
@@ -1576,7 +1601,8 @@ export declare interface RecursicaAccordionProps {
1576
1601
  onChange?: (value: string | string[] | null) => void;
1577
1602
  /** Allow multiple panels to be open simultaneously */
1578
1603
  multiple?: boolean;
1579
- /** Custom chevron icon to replace the default expand/collapse indicator */
1604
+ /** Custom chevron icon to replace the default expand/collapse indicator. Applies to every
1605
+ * item; a single item's control can still override it individually. */
1580
1606
  chevron?: default_2.ReactNode;
1581
1607
  }
1582
1608
 
@@ -1584,9 +1610,14 @@ export declare interface RecursicaAccordionProps {
1584
1610
  * Props for the Recursica AssistiveElement component.
1585
1611
  */
1586
1612
  export declare interface RecursicaAssistiveElementProps {
1587
- /** The semantic variant driving the icon and text colors */
1613
+ /** The helper or error text content */
1614
+ children?: default_2.ReactNode;
1615
+ /** The semantic variant driving the icon and text colors. `"error"` also defaults the
1616
+ * element's `role` to `"alert"` so assistive tech announces it as it appears or changes —
1617
+ * pass an explicit `role` to override. */
1588
1618
  assistiveVariant?: "help" | "error";
1589
- /** Explicitly toggle the rendering of the variant-specific SVG icon */
1619
+ /** Explicitly toggle the rendering of the variant-specific SVG icon. There is no slot for a
1620
+ * custom icon — the icon is always the fixed one belonging to the current `assistiveVariant`. */
1590
1621
  assistiveWithIcon?: boolean;
1591
1622
  }
1592
1623
 
@@ -1623,6 +1654,8 @@ export declare interface RecursicaAutocompleteProps {
1623
1654
  * Props for the Recursica Avatar component.
1624
1655
  */
1625
1656
  export declare interface RecursicaAvatarProps {
1657
+ /** Initials or other text fallback, shown when neither `src` nor `icon` is set */
1658
+ children?: default_2.ReactNode;
1626
1659
  /** Size of the avatar */
1627
1660
  size?: "small" | "default" | "large";
1628
1661
  /** Visual variant style */
@@ -2073,8 +2106,13 @@ declare interface RecursicaRadioGroupProps_2 {
2073
2106
  value?: unknown;
2074
2107
  /** Initial selected value in uncontrolled mode */
2075
2108
  defaultValue?: unknown;
2076
- /** Callback triggered when active value changes */
2077
- onChange?: (event: any, value: string) => void;
2109
+ /**
2110
+ * Callback triggered when active value changes.
2111
+ * Single-argument by design (no event): matches Mantine's native RadioGroup
2112
+ * onChange, the cross-adapter source of truth. mui-adapter's RadioGroup
2113
+ * normalizes MUI's native two-argument (event, value) callback down to this.
2114
+ */
2115
+ onChange?: (value: string) => void;
2078
2116
  }
2079
2117
 
2080
2118
  /**
@@ -2206,12 +2244,12 @@ export declare interface RecursicaSwitchGroupProps extends Omit<SwitchGroupProps
2206
2244
  * Props for the Recursica SwitchGroup component.
2207
2245
  */
2208
2246
  declare interface RecursicaSwitchGroupProps_2 {
2209
- /** Checked values list in controlled mode */
2210
- value?: unknown[];
2247
+ /** Checked values list in controlled mode — each entry matches a child Switch's own `value` */
2248
+ value?: string[];
2211
2249
  /** Checked default values list in uncontrolled mode */
2212
- defaultValue?: unknown[];
2250
+ defaultValue?: string[];
2213
2251
  /** Callback triggered when any switch toggles state */
2214
- onChange?: (value: unknown[]) => void;
2252
+ onChange?: (value: string[]) => void;
2215
2253
  }
2216
2254
 
2217
2255
  /**