@recursica/mui-adapter 0.39.1 → 0.39.2

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 (64) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.d.ts +30 -3
  3. package/dist/mui-adapter.cjs +64 -64
  4. package/dist/mui-adapter.cjs.map +1 -1
  5. package/dist/mui-adapter.css +1 -1
  6. package/dist/mui-adapter.js +7102 -6903
  7. package/dist/mui-adapter.js.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +44 -0
  10. package/src/components/Accordion/Accordion.module.css +15 -1
  11. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +3 -9
  12. package/src/components/AutoComplete/AutoComplete.module.css +15 -0
  13. package/src/components/AutoComplete/AutoComplete.tsx +8 -0
  14. package/src/components/AutoComplete/IMPLEMENTATION_NOTES.md +15 -0
  15. package/src/components/Avatar/Avatar.stories.tsx +0 -15
  16. package/src/components/Breadcrumb/BREADCRUMB_IMPLEMENTATION_NOTES.md +51 -0
  17. package/src/components/Breadcrumb/Breadcrumb.module.css +20 -0
  18. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +55 -5
  19. package/src/components/Breadcrumb/Breadcrumb.tsx +17 -3
  20. package/src/components/Button/BUTTON_IMPLEMENTATION_NOTES.md +35 -1
  21. package/src/components/Button/Button.module.css +19 -0
  22. package/src/components/Button/Button.tsx +13 -6
  23. package/src/components/Dropdown/DROPDOWN_IMPLEMENTATION_NOTES.md +25 -0
  24. package/src/components/Dropdown/Dropdown.module.css +19 -0
  25. package/src/components/Dropdown/Dropdown.tsx +6 -1
  26. package/src/components/Grid/IMPLEMENTATION_NOTES.md +8 -0
  27. package/src/components/Group/Group.tsx +42 -13
  28. package/src/components/Label/LABEL_IMPLEMENTATION_NOTES.md +27 -0
  29. package/src/components/Label/Label.module.css +5 -0
  30. package/src/components/Label/Label.tsx +11 -1
  31. package/src/components/Link/LINK_IMPLEMENTATION_NOTES.md +9 -0
  32. package/src/components/Link/Link.module.css +20 -0
  33. package/src/components/Modal/MODAL_IMPLEMENTATION_NOTES.md +19 -0
  34. package/src/components/Modal/Modal.module.css +24 -4
  35. package/src/components/NumberInput/NUMBER_INPUT_IMPLEMENTATION_NOTES.md +93 -0
  36. package/src/components/NumberInput/NumberInput.module.css +101 -82
  37. package/src/components/NumberInput/NumberInput.tsx +126 -33
  38. package/src/components/Pagination/IMPLEMENTATION_NOTES.md +37 -0
  39. package/src/components/Pagination/Pagination.module.css +9 -0
  40. package/src/components/Pagination/Pagination.tsx +53 -3
  41. package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +59 -0
  42. package/src/components/Panel/Panel.module.css +30 -8
  43. package/src/components/Panel/Panel.tsx +70 -14
  44. package/src/components/Stepper/IMPLEMENTATION_NOTES.md +62 -0
  45. package/src/components/Stepper/Stepper.module.css +31 -0
  46. package/src/components/Stepper/Stepper.stories.tsx +1 -5
  47. package/src/components/Switch/SWITCH_IMPLEMENTATION_NOTES.md +24 -0
  48. package/src/components/Switch/Switch.stories.tsx +1 -1
  49. package/src/components/Switch/Switch.tsx +1 -1
  50. package/src/components/Tabs/IMPLEMENTATION_NOTES.md +50 -0
  51. package/src/components/Tabs/Tabs.module.css +90 -23
  52. package/src/components/Text/TEXT_IMPLEMENTATION_NOTES.md +10 -0
  53. package/src/components/Text/Text.stories.tsx +1 -1
  54. package/src/components/TextArea/TEXTAREA_IMPLEMENTATION_NOTES.md +42 -0
  55. package/src/components/TextArea/TextArea.module.css +11 -0
  56. package/src/components/TimePicker/TIMEPICKER_IMPLEMENTATION_NOTES.md +14 -0
  57. package/src/components/TimePicker/TimePicker.module.css +10 -0
  58. package/src/components/Timeline/IMPLEMENTATION_NOTES.md +16 -0
  59. package/src/components/Timeline/Timeline.module.css +13 -0
  60. package/src/components/Toast/TOAST_IMPLEMENTATION_NOTES.md +37 -0
  61. package/src/components/Toast/Toast.module.css +17 -0
  62. package/src/components/Toast/Toast.tsx +4 -1
  63. package/src/components/Tree/IMPLEMENTATION_NOTES.md +2 -0
  64. package/src/components/Tree/Tree.module.css +8 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @recursica/mui-adapter
2
2
 
3
+ ## 0.39.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 46b123a: Breadcrumb now marks its last child `aria-current="page"` and, if it looks interactive (has `href`/`onClick`), strips both and drops it from the tab order — best-effort, not a guarantee for custom Link components with their own internal navigation. Backed by a CSS reset (no color/underline/pointer-events) and the current item now picks up Link's font-family. New shared `markCurrentPageItem` util in adapter-common. mui-adapter's story also gets parity with mantine-adapter's: the last crumb renders as plain text, not a `Link`.
8
+ - 39de7b2: mui-adapter: Dropdown now renders its `placeholder` prop and gains a matching `.placeholder` style; Autocomplete's open menu now has the same input-to-menu gap as mantine; TimePicker's leading icon is no longer offset too far right.
9
+ mantine-adapter: DatePicker's read-only value is now formatted via `valueFormat` instead of a raw `Date.toString()`; TimePicker's leading icon no longer overlaps the field text.
10
+ - 46b123a: Link now replaces the browser's native focus outline with the recursica focus ring (`--recursica_brand_states_focus_*`), matching Button/every other interactive component instead of falling back to the browser default. Fixes the same incorrect ring on Breadcrumb, since its items are typically Links.
11
+ - 39de7b2: Fix Accordion chevron not rotating on expand, Modal centering instead of anchoring near top, and Toast showing a default icon it shouldn't. Add missing Accordion LayerOne story and exclude the intentional Grid span/size naming divergence from story parity. Fix NumberInput's default MUI focus ring/non-numeric input/icon spacing-color/height/border-radius, and TextArea's oversized autosize height.
12
+ - 39de7b2: mui-adapter: Stepper's connector gap, description content, and button spacing now match mantine; Stepper vertical spacing now matches mantine; Timeline's connector now reaches the next bullet; Tree's chevron-to-label gap now uses the right token; Pagination is now fully wired up (circle size/colors/outline, chevron colors/hover, ripple removed, ellipsis centering, text labels).
13
+ mantine-adapter: Stepper's completed/current label and description colors now apply (were silently falling back to Mantine's own default gray/black).
14
+ - 39de7b2: mui-adapter: Switch's read-only label and static-variations spacing now match mantine; Label's right-alignment and optional-text parentheses now work; Button's loading state shows only a centered loader (no label); Text's static-variations spacing matches mantine; Tabs' `inverted` variant now actually renders the tab list below the content.
15
+ mantine-adapter: Button's loader color now matches its label text color; Tabs' `inverted` variant now actually renders the tab list below the content; Grid gains a `ResponsiveSizes` story mirroring mui-adapter's.
16
+ - Updated dependencies [46b123a]
17
+ - @recursica/adapter-common@0.28.2
18
+
3
19
  ## 0.39.1
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -41,6 +41,7 @@ import { MenuProps as MenuProps_2 } from '@mui/material';
41
41
  import { PaginationProps as PaginationProps_2 } from '@mui/material';
42
42
  import { RadioGroupProps as RadioGroupProps_2 } from '@mui/material';
43
43
  import { RadioProps } from '@mui/material';
44
+ import { ReactNode } from 'react';
44
45
  import { RefAttributes } from 'react';
45
46
  import { SelectProps } from '@mui/material';
46
47
  import { SliderProps } from '@mui/material';
@@ -275,6 +276,14 @@ export declare type BlockedStylingKeys = "className" | "classNames" | "classes"
275
276
 
276
277
  export declare const Breadcrumb: typeof rawComponents.Breadcrumb;
277
278
 
279
+ /**
280
+ * The last child should always be plain, non-interactive text (e.g. a `<span>`) — it represents
281
+ * the current page and shouldn't be a link. Breadcrumb tries to correct for a Link/anchor passed
282
+ * there anyway via `markCurrentPageItem` (aria-current, stripped href/onClick, CSS reset in
283
+ * Breadcrumb.module.css), but that's a best-effort safety net, not a guarantee — it can't stop a
284
+ * custom Link component (e.g. a router Link) that navigates from its own internal handler. See
285
+ * BREADCRUMB_IMPLEMENTATION_NOTES.md.
286
+ */
278
287
  declare const Breadcrumb_2: ForwardRefExoticComponent<(Omit<Omit<WithRecursicaSpacing<Omit<BreadcrumbsProps, "variant" | "size"> & RecursicaBreadcrumbProps>, BlockedStylingKeys> & ForbiddenStyles & {
279
288
  overStyled?: false | undefined;
280
289
  }, "ref"> | Omit<Omit<Omit<BreadcrumbsProps, "variant" | "size"> & RecursicaBreadcrumbProps, "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "gutter" | "spacing"> & {
@@ -794,6 +803,18 @@ declare const Loader_2: default_2.ForwardRefExoticComponent<LoaderProps & defaul
794
803
 
795
804
  declare type LoaderProps = RecursicaOverStyled<default_2.HTMLAttributes<HTMLSpanElement> & RecursicaLoaderProps>;
796
805
 
806
+ /**
807
+ * Marks the last Breadcrumb child as the current page: adds `aria-current="page"`, and — if the
808
+ * element looks interactive (has `href` or `onClick`) — strips those props and sets `tabIndex={-1}`
809
+ * so it drops out of the tab order.
810
+ *
811
+ * This is best-effort, not a guarantee. `cloneElement` can only override props the element
812
+ * actually reads. A custom Link component (e.g. React Router's) that drives navigation from its
813
+ * own internal handler rather than a passed-through `onClick` will keep navigating regardless.
814
+ * The last crumb should really just be plain text — see BREADCRUMB_IMPLEMENTATION_NOTES.md.
815
+ */
816
+ export declare function markCurrentPageItem(children: ReactNode): ReactNode;
817
+
797
818
  export declare const Menu: typeof rawComponents.Menu;
798
819
 
799
820
  declare const Menu_2: ForwardRefExoticComponent<(Omit<Omit<WithRecursicaSpacing<MenuProps_2 & RecursicaMenuProps>, BlockedStylingKeys> & ForbiddenStyles & {
@@ -1108,7 +1129,7 @@ declare const Panel_2: PanelComponent;
1108
1129
  * - `Panel.Stack` — Stacked drawer context
1109
1130
  */
1110
1131
  declare const PanelBase: {
1111
- ({ overStyled, placement, keepMounted, wrapHeaderText, opened, ...rest }: PanelProps): JSX.Element;
1132
+ ({ overStyled, placement, keepMounted, wrapHeaderText, opened, title, withOverlay, withCloseButton, onClose, children, ...rest }: PanelProps): JSX.Element;
1112
1133
  displayName: string;
1113
1134
  };
1114
1135
 
@@ -2187,7 +2208,7 @@ export declare interface RecursicaModalProps {
2187
2208
  title?: default_2.ReactNode;
2188
2209
  }
2189
2210
 
2190
- export declare interface RecursicaNumberInputProps extends Omit<TextFieldProps, "size" | "variant" | "radius" | "wrapperProps" | "classNames" | "styles">, Pick<RecursicaFormControlWrapperProps, "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps, RecursicaNumberInputProps_2 {
2211
+ export declare interface RecursicaNumberInputProps extends Omit<InputBaseProps, "color" | "size" | "startAdornment" | "endAdornment" | "autoComplete" | "error">, Pick<RecursicaFormControlWrapperProps, "label" | "error" | "required" | "id" | "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps, RecursicaNumberInputProps_2 {
2191
2212
  }
2192
2213
 
2193
2214
  /**
@@ -2250,7 +2271,13 @@ export declare interface RecursicaPanelProps {
2250
2271
  /**
2251
2272
  * Recursica Panel root props. Extends Mui Drawer.
2252
2273
  */
2253
- declare interface RecursicaPanelProps_2 extends Omit<DrawerProps, "classes" | "position" | "style" | "anchor" | "open">, RecursicaPanelProps {
2274
+ declare interface RecursicaPanelProps_2 extends Omit<DrawerProps, "classes" | "position" | "style" | "anchor" | "open" | "title">, RecursicaPanelProps {
2275
+ /** Panel header title label. */
2276
+ title?: ReactNode;
2277
+ /** Whether to display a background overlay. Default true. */
2278
+ withOverlay?: boolean;
2279
+ /** Whether to display the close button in the header. Default true. */
2280
+ withCloseButton?: boolean;
2254
2281
  }
2255
2282
 
2256
2283
  /**