@recursica/adapter-mui-v7 1.0.4 → 1.3.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 +30 -0
- package/OVERSTYLING.md +1 -1
- package/SETUP.md +26 -3
- package/dist/adapter-mui-v7.cjs +64 -64
- package/dist/adapter-mui-v7.cjs.map +1 -1
- package/dist/adapter-mui-v7.css +1 -1
- package/dist/adapter-mui-v7.js +5869 -5645
- package/dist/adapter-mui-v7.js.map +1 -1
- package/dist/index.d.ts +123 -104
- package/llms.txt +1 -1
- package/package.json +4 -4
- package/recursica_brand.json +172 -235
- package/recursica_tokens.json +16 -127
- package/recursica_ui-kit.json +2195 -8127
- package/recursica_variables_scoped.css +4547 -9194
- package/src/components/Checkbox/Checkbox.module.css +1 -3
- package/src/components/Container/USAGE.md +0 -1
- package/src/components/FileInput/FileInput.module.css +8 -0
- package/src/components/FileUpload/FileUpload.module.css +1 -0
- package/src/components/FileUpload/FileUpload.tsx +1 -0
- package/src/components/Flex/USAGE.md +2 -1
- package/src/components/FormControlLayout/FormControlLayout.module.css +6 -3
- package/src/components/Group/USAGE.md +2 -1
- package/src/components/Heading/Heading.stories.tsx +62 -0
- package/src/components/Heading/Heading.tsx +6 -2
- package/src/components/Heading/USAGE.md +19 -1
- package/src/components/LayoutGrid/LAYOUT_GRID_IMPLEMENTATION_NOTES.md +82 -0
- package/src/components/LayoutGrid/LayoutGrid.columns.dom.test.tsx +78 -0
- package/src/components/{Grid/Grid.module.css → LayoutGrid/LayoutGrid.module.css} +13 -1
- package/src/components/LayoutGrid/LayoutGrid.stories.tsx +61 -0
- package/src/components/LayoutGrid/LayoutGrid.test.tsx +1 -0
- package/src/components/LayoutGrid/LayoutGrid.tsx +181 -0
- package/src/components/LayoutGrid/USAGE.md +79 -0
- package/src/components/LayoutGrid/index.ts +1 -0
- package/src/components/Menu/Menu.stories.tsx +0 -3
- package/src/components/Pagination/IMPLEMENTATION_NOTES.md +42 -38
- package/src/components/Pagination/Pagination.icons.tsx +0 -32
- package/src/components/Pagination/Pagination.manifest.dom.test.tsx +105 -0
- package/src/components/Pagination/Pagination.module.css +25 -164
- package/src/components/Pagination/Pagination.tsx +221 -97
- package/src/components/Pagination/USAGE.md +8 -1
- package/src/components/Panel/Panel.module.css +24 -1
- package/src/components/Panel/Panel.stories.tsx +4 -4
- package/src/components/Panel/Panel.tsx +10 -1
- package/src/components/Radio/Radio.module.css +2 -2
- package/src/components/SegmentedControl/SegmentedControl.module.css +18 -0
- package/src/components/Stack/USAGE.md +2 -1
- package/src/components/Stepper/Stepper.module.css +0 -21
- package/src/components/Text/Text.stories.tsx +52 -3
- package/src/components/Text/Text.tsx +13 -3
- package/src/components/Text/USAGE.md +20 -2
- package/src/components/Typography/Typography.module.css +39 -0
- package/src/components/index.ts +1 -1
- package/src/index.ts +1 -0
- package/src/utils/breakpointsFromRecManifest.test.ts +40 -0
- package/src/utils/breakpointsFromRecManifest.ts +72 -0
- package/src/utils/index.ts +1 -0
- package/src/components/Grid/Grid.stories.tsx +0 -161
- package/src/components/Grid/Grid.test.tsx +0 -1
- package/src/components/Grid/Grid.tsx +0 -155
- package/src/components/Grid/IMPLEMENTATION_NOTES.md +0 -24
- package/src/components/Grid/USAGE.md +0 -53
- package/src/components/Grid/index.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @recursica/adapter-mui-v7
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 07418dd: `Pagination` now renders Recursica Buttons whose style and size come from the Forge manifest, so `RecursicaThemeProvider` needs the `manifest` prop or Pagination throws; MUI's `Pagination` props are no longer passed through.
|
|
8
|
+
- 07418dd: `Grid` is now `LayoutGrid` (`LayoutGrid.Col`) and follows Forge's breakpoint-aware layout grids (columns, gutters, margin); it no longer accepts the `columns` prop. Use MUI's Grid directly for a fixed N-column grid.
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- 07418dd: New opt-in `breakpointsFromRecManifest` builds MUI `theme.breakpoints.values` from the Forge manifest's layout grids.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fbaba46: Updated @recursica/adapter-common, adapter-tester and storybook-template. FileUpload is capped at the form-field max-width, FileInput keeps a fixed height with a file, and vertical Stepper no longer adds extra step spacing.
|
|
17
|
+
|
|
18
|
+
Panel rounds only the corners facing the page and its width follows the Forge max-width token capped to the viewport. RadioGroup/CheckboxGroup side-by-side layouts stack vertically, vertical SegmentedControl uses a concentric container radius, and the Menu WithSubmenus story no longer forces a width.
|
|
19
|
+
|
|
20
|
+
## 1.1.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- 04b5efa: Text and Heading now support `color`/`emphasis` props; fixed FormControlLayout squeezing the whole label+control row (instead of just the control) when `controlMaxWidth`/`controlMinWidth` is set. Also synced the Forge token export to 0.28.2 and bumped `@recursica/adapter-tester` to `^5.2.0`.
|
|
25
|
+
- afb5d25: `Grid.Col`'s type now intersects with `RecursicaGridColProps` from `adapter-common`, laying the groundwork for a formal cross-adapter contract. No behavior or prop changes yet — `size`, `order`, `visibleFrom`, and `hiddenFrom` all stay on this adapter's own MUI-native typing for now; the shared contract only carries `children` until `adapter-common` picks those back up.
|
|
26
|
+
- afb5d25: `Grid` now wires the design system's `layout-grids` tokens: defaults to 6 columns with column-gutter/row-gutter/margin values applied automatically (previously an unstyled pass-through of MUI's own 12-column default). **Breaking:** `spacing`/`columnSpacing`/`rowSpacing` are no longer accepted — column-gutter/row-gutter/margin are design-system-managed, not integrator-configurable. `columns` remains the one Recursica-contract override, matching `Container.size`.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- afb5d25: Bumped `@recursica/adapter-common` to `^0.31.0`, which publishes `RecursicaGridProps`/`RecursicaGridColProps` (needed to wire the new Grid layout-grid tokens in this release).
|
|
31
|
+
- afb5d25: Updated `recursica_brand.json`/`recursica_tokens.json`/`recursica_ui-kit.json`/`recursica_variables_scoped.css` to the 2026-09-21 Forge export (see mantine-v8's `docs/migration/2026-09-21-forge-token-export.md` for the full findings). No component CSS changes required — confirmed zero layer violations and zero broken/missing variables.
|
|
32
|
+
|
|
3
33
|
## 1.0.4
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/OVERSTYLING.md
CHANGED
|
@@ -42,6 +42,6 @@ Available Recursica layout tokens:
|
|
|
42
42
|
|
|
43
43
|
## Primitive Layout Components Exemption
|
|
44
44
|
|
|
45
|
-
Unlike complex UI components (Buttons, Tabs, Inputs) which are strictly protected, **Primitive Layout Components** (`Flex`, `Stack`, `Group`, `Container`, `
|
|
45
|
+
Unlike complex UI components (Buttons, Tabs, Inputs) which are strictly protected, **Primitive Layout Components** (`Flex`, `Stack`, `Group`, `Container`, `LayoutGrid`) are entirely exempt from the `RecursicaOverStyled` gatekeeper.
|
|
46
46
|
|
|
47
47
|
Because the entire functional purpose of these components is structural layout composition, developers are free to pass any standard MUI width, height, padding, margin, gap, and alignment property directly to them without needing to flag `overStyled={true}`. The internal custom token mapper (such as converting `gap="rec-md"`) is still active natively on these wrappers.
|
package/SETUP.md
CHANGED
|
@@ -36,11 +36,12 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
36
36
|
```tsx
|
|
37
37
|
import { StyledEngineProvider } from "@mui/material/styles";
|
|
38
38
|
import { RecursicaThemeProvider } from "@recursica/adapter-mui-v7";
|
|
39
|
+
import manifest from "./path/to/recursica_manifest.json";
|
|
39
40
|
|
|
40
41
|
function App() {
|
|
41
42
|
return (
|
|
42
43
|
<StyledEngineProvider injectFirst>
|
|
43
|
-
<RecursicaThemeProvider theme="light">
|
|
44
|
+
<RecursicaThemeProvider theme="light" manifest={manifest}>
|
|
44
45
|
{/* Your App Components */}
|
|
45
46
|
</RecursicaThemeProvider>
|
|
46
47
|
</StyledEngineProvider>
|
|
@@ -48,13 +49,35 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
48
49
|
}
|
|
49
50
|
```
|
|
50
51
|
|
|
52
|
+
Pass the parsed `recursica_manifest.json` from your Forge export as `manifest`. Components that are configured by it (currently `Pagination`, for its Button variants) read it from here and throw if it's missing.
|
|
53
|
+
|
|
51
54
|
3. **Integrate Google Fonts**: Integrating custom fonts depends on how you load fonts in your project and which fonts are specified in your `recursica_variables_scoped.css` (since it is project-dependent). We suggest loading them via Google Fonts, as shown in this example:
|
|
52
55
|
|
|
53
56
|
```css
|
|
54
57
|
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
|
|
55
58
|
```
|
|
56
59
|
|
|
57
|
-
4. **
|
|
60
|
+
4. **Align MUI's breakpoints with Forge's (Optional but Recommended)**: Forge defines your layout grids (columns, gutters, margin) per breakpoint, and they switch via plain CSS `@media`. MUI's responsive props (`size={{ xs: 12, md: 6 }}`) switch at `theme.breakpoints` instead, which Forge never edits. If the two differ, a page changes layout at two different widths. `breakpointsFromRecManifest` builds breakpoint values from the `recursica_manifest.json` in your Forge export, so both switch at the same widths:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { ThemeProvider, createTheme } from "@mui/material/styles";
|
|
64
|
+
import { breakpointsFromRecManifest } from "@recursica/adapter-mui-v7";
|
|
65
|
+
import manifest from "./path/to/recursica_manifest.json";
|
|
66
|
+
|
|
67
|
+
// e.g. { mobile: 0, tablet: 481, default: 781 } when Forge defines extra grids
|
|
68
|
+
const theme = createTheme({
|
|
69
|
+
breakpoints: {
|
|
70
|
+
values: {
|
|
71
|
+
...createTheme().breakpoints.values,
|
|
72
|
+
...breakpointsFromRecManifest(manifest),
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Each non-default grid starts at its `min-width` (a grid with only a `max-width` starts at `0`), and the `default` grid is named `default` and starts one pixel past the widest `max-width`. If your manifest only defines the `default` grid (the stock export), it returns `{}` and your theme is unchanged. MUI's `values` replaces its defaults instead of merging, hence the spread of `createTheme().breakpoints.values`; use Forge's names (`mobile`, `tablet`, ...) in responsive props to switch where Forge does. TypeScript needs a module augmentation of MUI's `BreakpointOverrides` to accept custom names. The result is a plain object you can edit, and nothing applies it automatically. See the [LayoutGrid usage guide](src/components/LayoutGrid/USAGE.md).
|
|
79
|
+
|
|
80
|
+
5. **Configure PostCSS Plugin (Optional but Recommended)**: It is highly recommended (but optional) to install the `@recursica/recursica-postcss-vars` plugin to verify that Recursica CSS variables are properly connected in case they change.
|
|
58
81
|
|
|
59
82
|
Install the plugin as a dev dependency:
|
|
60
83
|
|
|
@@ -75,7 +98,7 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
75
98
|
};
|
|
76
99
|
```
|
|
77
100
|
|
|
78
|
-
|
|
101
|
+
6. **Configure ESLint Plugin (Optional but Recommended)**: It is highly recommended (but optional) to install `eslint-plugin-recursica`, which flags use of the `overStyled` escape-hatch prop so it stays easy to audit.
|
|
79
102
|
|
|
80
103
|
Install the plugin as a dev dependency:
|
|
81
104
|
|