@recursica/mantine-adapter 0.38.1 → 0.40.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.
Files changed (32) hide show
  1. package/ARCHITECTURE.md +3 -0
  2. package/CHANGELOG.md +51 -0
  3. package/dist/index.d.ts +186 -20
  4. package/dist/mantine-adapter.cjs +2 -2
  5. package/dist/mantine-adapter.cjs.map +1 -1
  6. package/dist/mantine-adapter.css +1 -1
  7. package/dist/mantine-adapter.js +2724 -2491
  8. package/dist/mantine-adapter.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +16 -2
  11. package/src/components/Accordion/Accordion.module.css +10 -1
  12. package/src/components/Accordion/Accordion.stories.tsx +36 -0
  13. package/src/components/Accordion/Accordion.tsx +40 -7
  14. package/src/components/AssistiveElement/ASSISTIVEELEMENT_IMPLEMENTATION_NOTES.md +45 -0
  15. package/src/components/AssistiveElement/AssistiveElement.tsx +8 -1
  16. package/src/components/AutoComplete/AutoComplete.tsx +1 -4
  17. package/src/components/Avatar/AVATAR_IMPLEMENTATION_NOTES.md +10 -0
  18. package/src/components/Button/Button.module.css +13 -0
  19. package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +59 -0
  20. package/src/components/Chip/Chip.module.css +36 -4
  21. package/src/components/Chip/Chip.tsx +14 -5
  22. package/src/components/Chip/USAGE.md +7 -0
  23. package/src/components/FileUpload/FILEUPLOAD_IMPLEMENTATION_NOTES.md +244 -0
  24. package/src/components/FileUpload/FileUpload.module.css +204 -42
  25. package/src/components/FileUpload/FileUpload.stories.tsx +348 -4
  26. package/src/components/FileUpload/FileUpload.tsx +352 -5
  27. package/src/components/FileUpload/USAGE.md +163 -5
  28. package/src/components/Switch/SWITCH_IMPLEMENTATION_NOTES.md +36 -0
  29. package/src/components/Switch/Switch.module.css +19 -2
  30. package/src/components/Switch/SwitchGroup.tsx +6 -3
  31. package/src/components/TimePicker/TIMEPICKER_IMPLEMENTATION_NOTES.md +10 -0
  32. package/src/components/TimePicker/TimePicker.tsx +1 -1
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,56 @@
1
1
  # @recursica/mantine-adapter
2
2
 
3
+ ## 0.40.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1c317a3: Implement the `FileUpload` component (drag-and-drop dropzone, browse-button fallback, removable file-chip list) in `mantine-adapter` and `mui-adapter`, replacing the "coming soon" stub, with a shared `RecursicaFileUploadProps`/`RecursicaFileUploadItem` contract in `adapter-common`. Also fixes `mui-adapter`'s `Chip` component's public type to allow `children` (a pre-existing type-only gap; the component already accepted them at runtime).
8
+
9
+ ### Patch Changes
10
+
11
+ - 1c317a3: `FileUpload` now surfaces a built-in error message ("File type not accepted", overridable via the new `invalidFileTypeMessage` prop) when a dropped/picked file doesn't match `accept`, shown through the standard assistive-text error slot instead of requiring the integrator to wire up `onFilesRejected` themselves. Also reverts `FileUpload`'s assistive/error rendering back to `FormControlWrapper` (file list renders above the assistive/error text again, matching every other form control).
12
+
13
+ Fixes `Chip` clipping the descender (e.g. the "g" in "image.png") off long labels — `overflow: hidden` was clipping vertically as well as horizontally, cutting off glyph ink whenever the line-height token was tighter than the font's natural ascent+descent.
14
+
15
+ - 1c317a3: `FileUpload` now supports a `maxFiles` prop (with an overridable `maxFilesMessage`, defaulting to "Maximum of {maxFiles} files allowed") that rejects files past a total-count cap the same way `accept`/`maxSize` already do.
16
+
17
+ Fixes `Chip` rendered without a real handler (`onRemove`/`onClick`/`onChange`) — such as `FileUpload`'s `readOnly` file list — still showing a pointer cursor on hover and picking up a phantom, un-styled keyboard Tab stop on its truncated label text. Both were general `Chip` bugs, not specific to `FileUpload`.
18
+
19
+ - 1c317a3: Fix `Button` showing the native browser focus outline instead of the recursica focus ring, and fix `Chip` losing its remove (X) icon behind an overflowing long label instead of truncating with an ellipsis. Adds optional `removeTabIndex`/`removeIconRef` props to `Chip` for building keyboard-navigable chip groups. Also fixes the remove icon's own focus ring rendering in the chip's neutral border color instead of the recursica focus-ring color, making it barely visible.
20
+ - 1c317a3: Fix `TimePicker`'s AM/PM dropdown showing blank until an hour is typed; it now defaults to "AM", matching `mui-adapter`.
21
+ - Updated dependencies [1c317a3]
22
+ - Updated dependencies [1c317a3]
23
+ - Updated dependencies [1c317a3]
24
+ - Updated dependencies [1c317a3]
25
+ - @recursica/adapter-common@0.16.0
26
+
27
+ ## 0.39.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 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.
32
+ Also documented `children` across all Accordion sub-components in `RecursicaAccordionProps.ts`, including a new `RecursicaAccordionPanelProps` interface for the Panel.
33
+ - 106bc34: AssistiveElement: `assistiveVariant="error"` now defaults `role="alert"` in both adapters so
34
+ error text is announced by assistive tech as it appears or changes (an explicit `role` still
35
+ wins). Also (MUI only) closed a prop-contract conflict where native `error`/`component` could
36
+ silently override Recursica's own computed values, added the missing `RecursicaOverStyled`
37
+ wrapper, and hardened a CSS specificity tie against MUI's own `.Mui-error` color. Documented
38
+ `children` in `RecursicaAssistiveElementProps.ts` and added implementation notes to both adapters.
39
+
40
+ ### Patch Changes
41
+
42
+ - 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.
43
+ - 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.
44
+ - 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[]`.
45
+ - 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.
46
+ - 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.
47
+ - Updated dependencies [106bc34]
48
+ - Updated dependencies [106bc34]
49
+ - Updated dependencies [106bc34]
50
+ - Updated dependencies [106bc34]
51
+ - Updated dependencies [106bc34]
52
+ - @recursica/adapter-common@0.15.0
53
+
3
54
  ## 0.38.1
4
55
 
5
56
  ### 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 & {
@@ -375,11 +375,32 @@ declare const FileInput_2: default_2.FC<FileInputProps>;
375
375
 
376
376
  declare type FileInputProps = default_2.HTMLAttributes<HTMLDivElement>;
377
377
 
378
+ /**
379
+ * Mirrors the semantics of the native HTML `accept` attribute (comma-separated file extensions,
380
+ * MIME types, or MIME wildcards like `image/*`) so drag-and-drop can be validated the same way —
381
+ * the browser only applies `accept` to its own file-picker dialog, never to a `drop` event, so
382
+ * without this a dropped file bypasses the restriction entirely.
383
+ */
384
+ export declare function fileMatchesAccept(file: File, accept?: string): boolean;
385
+
378
386
  export declare const FileUpload: typeof rawComponents.FileUpload;
379
387
 
380
- declare const FileUpload_2: default_2.FC<FileUploadProps>;
388
+ /**
389
+ * A dropzone for uploading files, with a native browse-button fallback and a
390
+ * removable-chip list of the currently selected files.
391
+ *
392
+ * @example
393
+ * <FileUpload
394
+ * label="Upload Files"
395
+ * assistiveText="Max file size 5MB"
396
+ * files={files}
397
+ * onFilesAdded={(added) => setFiles((f) => [...f, ...added.map((file) => ({ file }))])}
398
+ * onFileRemove={(id) => setFiles((f) => f.filter((item) => (item.id ?? item.file.name) !== id))}
399
+ * />
400
+ */
401
+ declare const FileUpload_2: default_2.ForwardRefExoticComponent<FileUploadProps & default_2.RefAttributes<HTMLDivElement>>;
381
402
 
382
- declare type FileUploadProps = default_2.HTMLAttributes<HTMLDivElement>;
403
+ declare type FileUploadProps = RecursicaOverStyled<RecursicaFileUploadProps_2>;
383
404
 
384
405
  export declare const Flex: (<C = "div">(props: PolymorphicComponentProps<C, rawComponents.FlexProps>) => React.ReactElement) & Omit<FunctionComponent<(Omit<FlexProps_2 & RecursicaFlexProps, "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap"> & {
385
406
  m?: string | number | RecursicaSpacing;
@@ -838,7 +859,7 @@ declare type MenuDropdownProps = RecursicaOverStyled<MenuDropdownProps_2>;
838
859
  */
839
860
  declare const MenuItem: (<C = "button">(props: PolymorphicComponentProps<C, MenuItemProps>) => React.ReactElement) & Omit<FunctionComponent<((MenuItemProps & {
840
861
  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"> & {
862
+ }) & 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
863
  ref?: any;
843
864
  renderRoot?: (props: any) => any;
844
865
  }) | (MenuItemProps & {
@@ -900,7 +921,7 @@ declare type MenuSubDropdownProps = RecursicaOverStyled<MenuSubDropdownProps_2>;
900
921
  */
901
922
  declare const MenuSubItem: (<C = "button">(props: PolymorphicComponentProps<C, MenuSubItemProps>) => React.ReactElement) & Omit<FunctionComponent<((MenuSubItemProps & {
902
923
  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"> & {
924
+ }) & 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
925
  ref?: any;
905
926
  renderRoot?: (props: any) => any;
906
927
  }) | (MenuSubItemProps & {
@@ -1329,6 +1350,8 @@ declare namespace rawComponents {
1329
1350
  Dropdown_2 as Dropdown,
1330
1351
  FileInputProps,
1331
1352
  FileInput_2 as FileInput,
1353
+ RecursicaFileUploadItem,
1354
+ RecursicaFileUploadProps_2 as RecursicaFileUploadProps,
1332
1355
  FileUploadProps,
1333
1356
  FileUpload_2 as FileUpload,
1334
1357
  FlexProps,
@@ -1544,6 +1567,8 @@ export declare const RECURSICA_COMPONENTS: readonly ["Accordion", "AssistiveElem
1544
1567
  * Props for the Recursica Accordion Control component.
1545
1568
  */
1546
1569
  export declare interface RecursicaAccordionControlProps {
1570
+ /** The control's label content */
1571
+ children?: default_2.ReactNode;
1547
1572
  /** Leading icon displayed inside the control boundary */
1548
1573
  leftIcon?: default_2.ReactNode;
1549
1574
  }
@@ -1552,7 +1577,14 @@ export declare interface RecursicaAccordionControlProps {
1552
1577
  * Props for the Recursica Accordion Item component.
1553
1578
  */
1554
1579
  export declare interface RecursicaAccordionItemProps {
1555
- /** The text or element label for the item control */
1580
+ /**
1581
+ * When `title` is set, this is the panel content — the control and panel are constructed
1582
+ * automatically, with `children` becoming the panel body. When `title` is omitted, this is
1583
+ * expected to be a manually composed `Accordion.Control`/`Accordion.Panel` pair instead.
1584
+ */
1585
+ children?: default_2.ReactNode;
1586
+ /** The text or element label for the item control. When set, the control and panel are
1587
+ * constructed automatically; omit it to compose the control and panel manually instead. */
1556
1588
  title?: default_2.ReactNode;
1557
1589
  /** Leading icon for the item control */
1558
1590
  leftIcon?: default_2.ReactNode;
@@ -1560,14 +1592,30 @@ export declare interface RecursicaAccordionItemProps {
1560
1592
  divider?: boolean;
1561
1593
  /** Unique value identifier for this item */
1562
1594
  value?: string;
1595
+ /** Disables interaction with this item — it can't be expanded or collapsed, and is dimmed */
1596
+ disabled?: boolean;
1597
+ }
1598
+
1599
+ /**
1600
+ * Props for the Recursica Accordion Panel component.
1601
+ */
1602
+ export declare interface RecursicaAccordionPanelProps {
1603
+ /** The panel's content, shown when the item is expanded */
1604
+ children?: default_2.ReactNode;
1563
1605
  }
1564
1606
 
1565
1607
  /**
1566
1608
  * Props for the Recursica Accordion container component.
1567
1609
  */
1568
1610
  export declare interface RecursicaAccordionProps {
1569
- /** The styling variant of the accordion */
1570
- variant?: string;
1611
+ /** The `Accordion.Item` elements that make up the accordion */
1612
+ children?: default_2.ReactNode;
1613
+ /**
1614
+ * The styling variant of the accordion. `"default"` is the only variant with dedicated
1615
+ * Recursica styling today; any other string is accepted for advanced/custom theming but
1616
+ * has no guaranteed styling.
1617
+ */
1618
+ variant?: "default" | (string & {});
1571
1619
  /** Current expanded value(s) in controlled mode */
1572
1620
  value?: string | string[];
1573
1621
  /** Initial expanded value(s) in uncontrolled mode */
@@ -1576,7 +1624,8 @@ export declare interface RecursicaAccordionProps {
1576
1624
  onChange?: (value: string | string[] | null) => void;
1577
1625
  /** Allow multiple panels to be open simultaneously */
1578
1626
  multiple?: boolean;
1579
- /** Custom chevron icon to replace the default expand/collapse indicator */
1627
+ /** Custom chevron icon to replace the default expand/collapse indicator. Applies to every
1628
+ * item; a single item's control can still override it individually. */
1580
1629
  chevron?: default_2.ReactNode;
1581
1630
  }
1582
1631
 
@@ -1584,9 +1633,14 @@ export declare interface RecursicaAccordionProps {
1584
1633
  * Props for the Recursica AssistiveElement component.
1585
1634
  */
1586
1635
  export declare interface RecursicaAssistiveElementProps {
1587
- /** The semantic variant driving the icon and text colors */
1636
+ /** The helper or error text content */
1637
+ children?: default_2.ReactNode;
1638
+ /** The semantic variant driving the icon and text colors. `"error"` also defaults the
1639
+ * element's `role` to `"alert"` so assistive tech announces it as it appears or changes —
1640
+ * pass an explicit `role` to override. */
1588
1641
  assistiveVariant?: "help" | "error";
1589
- /** Explicitly toggle the rendering of the variant-specific SVG icon */
1642
+ /** Explicitly toggle the rendering of the variant-specific SVG icon. There is no slot for a
1643
+ * custom icon — the icon is always the fixed one belonging to the current `assistiveVariant`. */
1590
1644
  assistiveWithIcon?: boolean;
1591
1645
  }
1592
1646
 
@@ -1623,6 +1677,8 @@ export declare interface RecursicaAutocompleteProps {
1623
1677
  * Props for the Recursica Avatar component.
1624
1678
  */
1625
1679
  export declare interface RecursicaAvatarProps {
1680
+ /** Initials or other text fallback, shown when neither `src` nor `icon` is set */
1681
+ children?: default_2.ReactNode;
1626
1682
  /** Size of the avatar */
1627
1683
  size?: "small" | "default" | "large";
1628
1684
  /** Visual variant style */
@@ -1724,6 +1780,17 @@ export declare interface RecursicaChipProps {
1724
1780
  removeLabel?: string;
1725
1781
  /** Checked state for the chip (acts as a checkbox) */
1726
1782
  checked?: boolean;
1783
+ /**
1784
+ * Tab index for the remove (X) icon. Defaults to `0`. Lets a parent implement a roving-tabindex
1785
+ * pattern across a group of chips (e.g. FileUpload's file list) by setting this to `-1` on every
1786
+ * chip except the currently-active one.
1787
+ */
1788
+ removeTabIndex?: number;
1789
+ /**
1790
+ * Ref to the remove (X) icon element, so a parent can move focus to it imperatively — e.g.
1791
+ * arrow-key navigation across a group of chips.
1792
+ */
1793
+ removeIconRef?: default_2.Ref<HTMLSpanElement>;
1727
1794
  }
1728
1795
 
1729
1796
  /**
@@ -1777,6 +1844,100 @@ declare interface RecursicaDropdownProps_2 {
1777
1844
  placeholder?: string;
1778
1845
  }
1779
1846
 
1847
+ /**
1848
+ * A single file entry rendered as a removable chip in the FileUpload's file list.
1849
+ */
1850
+ export declare interface RecursicaFileUploadItem {
1851
+ /** The underlying browser File object. */
1852
+ file: File;
1853
+ /**
1854
+ * Stable identifier for this entry, used as the React key and passed back to
1855
+ * `onFileRemove`. Defaults to the file's `name` when not provided.
1856
+ */
1857
+ id?: string;
1858
+ }
1859
+
1860
+ /**
1861
+ * Props for the Recursica FileUpload component.
1862
+ */
1863
+ export declare interface RecursicaFileUploadProps {
1864
+ /**
1865
+ * Files currently selected, rendered as removable chips below the dropzone.
1866
+ * This is a controlled list — `onFilesAdded`/`onFileRemove` report changes, but
1867
+ * `FileUpload` never mutates this array itself; merge the reported changes into
1868
+ * your own state and pass the updated list back in.
1869
+ */
1870
+ files?: RecursicaFileUploadItem[];
1871
+ /**
1872
+ * Called with the files the user just dropped onto the dropzone or picked via
1873
+ * the browse button. Only the newly added files are passed — merge them into
1874
+ * `files` yourself (e.g. to assign an `id`, dedupe, or reject some of them).
1875
+ */
1876
+ onFilesAdded?: (files: File[]) => void;
1877
+ /**
1878
+ * Called when a file chip's remove (X) icon is activated, identified by its
1879
+ * `id` (or `file.name` when no `id` was given for that entry).
1880
+ */
1881
+ onFileRemove?: (id: string) => void;
1882
+ /**
1883
+ * Native `accept` attribute for the underlying file input (e.g. `".pdf,.png"`
1884
+ * or `"image/*"`) — constrains the browse-button file picker natively. Also
1885
+ * enforced against files dropped onto the dropzone: the browser only applies
1886
+ * `accept` to its own file-picker dialog, never to a `drop` event, so files
1887
+ * that don't match are rejected the same way (see `onFilesRejected`) rather
1888
+ * than silently bypassing the restriction.
1889
+ */
1890
+ accept?: string;
1891
+ /** Whether more than one file can be selected/dropped at once. Defaults to `true`. */
1892
+ multiple?: boolean;
1893
+ /**
1894
+ * Maximum size per file, in bytes. Files exceeding this are passed to
1895
+ * `onFilesRejected` instead of `onFilesAdded`.
1896
+ */
1897
+ maxSize?: number;
1898
+ /**
1899
+ * Maximum total number of files allowed in `files`. Once reached, further
1900
+ * dropped/picked files are passed to `onFilesRejected` instead of
1901
+ * `onFilesAdded`.
1902
+ */
1903
+ maxFiles?: number;
1904
+ /**
1905
+ * Called with any files rejected for exceeding `maxSize`/`maxFiles` or not
1906
+ * matching `accept`.
1907
+ */
1908
+ onFilesRejected?: (files: File[]) => void;
1909
+ /**
1910
+ * Error message shown (via the standard assistive-text error slot) when a
1911
+ * dropped/picked file's extension or MIME type doesn't match `accept`.
1912
+ * Defaults to `"File type not accepted"`.
1913
+ */
1914
+ invalidFileTypeMessage?: default_2.ReactNode;
1915
+ /**
1916
+ * Error message shown (via the standard assistive-text error slot) when a
1917
+ * dropped/picked file would exceed `maxFiles`. Defaults to
1918
+ * `"Maximum of {maxFiles} files allowed"`.
1919
+ */
1920
+ maxFilesMessage?: default_2.ReactNode;
1921
+ /** Icon shown above the dropzone label. Defaults to the built-in upload icon. */
1922
+ icon?: default_2.ReactNode;
1923
+ /** Text shown inside the dropzone. Defaults to `"Drag and drop files here to upload"`. */
1924
+ dropzoneLabel?: default_2.ReactNode;
1925
+ /** Label for the button that opens the native file picker. Defaults to `"Browse files"`. */
1926
+ browseButtonLabel?: default_2.ReactNode;
1927
+ /** Screen-reader label for each file chip's remove button. Defaults to `"Remove"`. */
1928
+ removeFileLabel?: string;
1929
+ /** Disables the dropzone, browse button, and every file chip's remove icon. */
1930
+ disabled?: boolean;
1931
+ /**
1932
+ * Renders `files` as a static list of chips with no remove icon, and omits
1933
+ * the dropzone/browse button entirely.
1934
+ */
1935
+ readOnly?: boolean;
1936
+ }
1937
+
1938
+ declare interface RecursicaFileUploadProps_2 extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "children" | "onDrop" | "onChange">, Pick<InputWrapperProps, "label" | "error" | "required" | "withAsterisk" | "id">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, RecursicaFileUploadProps {
1939
+ }
1940
+
1780
1941
  /**
1781
1942
  * Props for the Recursica Flex layout component.
1782
1943
  */
@@ -2073,8 +2234,13 @@ declare interface RecursicaRadioGroupProps_2 {
2073
2234
  value?: unknown;
2074
2235
  /** Initial selected value in uncontrolled mode */
2075
2236
  defaultValue?: unknown;
2076
- /** Callback triggered when active value changes */
2077
- onChange?: (event: any, value: string) => void;
2237
+ /**
2238
+ * Callback triggered when active value changes.
2239
+ * Single-argument by design (no event): matches Mantine's native RadioGroup
2240
+ * onChange, the cross-adapter source of truth. mui-adapter's RadioGroup
2241
+ * normalizes MUI's native two-argument (event, value) callback down to this.
2242
+ */
2243
+ onChange?: (value: string) => void;
2078
2244
  }
2079
2245
 
2080
2246
  /**
@@ -2206,12 +2372,12 @@ export declare interface RecursicaSwitchGroupProps extends Omit<SwitchGroupProps
2206
2372
  * Props for the Recursica SwitchGroup component.
2207
2373
  */
2208
2374
  declare interface RecursicaSwitchGroupProps_2 {
2209
- /** Checked values list in controlled mode */
2210
- value?: unknown[];
2375
+ /** Checked values list in controlled mode — each entry matches a child Switch's own `value` */
2376
+ value?: string[];
2211
2377
  /** Checked default values list in uncontrolled mode */
2212
- defaultValue?: unknown[];
2378
+ defaultValue?: string[];
2213
2379
  /** Callback triggered when any switch toggles state */
2214
- onChange?: (value: unknown[]) => void;
2380
+ onChange?: (value: string[]) => void;
2215
2381
  }
2216
2382
 
2217
2383
  /**