@recursica/adapter-mantine-v8 1.2.1 → 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.
Files changed (43) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/OVERSTYLING.md +1 -1
  3. package/SETUP.md +36 -5
  4. package/dist/adapter-mantine-v8.cjs +2 -2
  5. package/dist/adapter-mantine-v8.cjs.map +1 -1
  6. package/dist/adapter-mantine-v8.css +1 -1
  7. package/dist/adapter-mantine-v8.js +3157 -3002
  8. package/dist/adapter-mantine-v8.js.map +1 -1
  9. package/dist/index.d.ts +191 -164
  10. package/llms.txt +1 -1
  11. package/package.json +3 -3
  12. package/recursica_brand.json +2 -2
  13. package/recursica_tokens.json +2 -2
  14. package/recursica_ui-kit.json +2 -2
  15. package/recursica_variables_scoped.css +7 -3
  16. package/src/components/Container/USAGE.md +0 -1
  17. package/src/components/Flex/USAGE.md +2 -1
  18. package/src/components/Group/USAGE.md +2 -1
  19. package/src/components/LayoutGrid/LAYOUT_GRID_IMPLEMENTATION_NOTES.md +88 -0
  20. package/src/components/LayoutGrid/LayoutGrid.columns.dom.test.tsx +66 -0
  21. package/src/components/LayoutGrid/LayoutGrid.module.css +48 -0
  22. package/src/components/LayoutGrid/LayoutGrid.stories.tsx +61 -0
  23. package/src/components/LayoutGrid/LayoutGrid.test.tsx +1 -0
  24. package/src/components/LayoutGrid/LayoutGrid.tsx +309 -0
  25. package/src/components/LayoutGrid/USAGE.md +76 -0
  26. package/src/components/Pagination/IMPLEMENTATION_NOTES.md +29 -8
  27. package/src/components/Pagination/Pagination.icons.tsx +0 -32
  28. package/src/components/Pagination/Pagination.manifest.dom.test.tsx +108 -0
  29. package/src/components/Pagination/Pagination.module.css +25 -155
  30. package/src/components/Pagination/Pagination.tsx +328 -197
  31. package/src/components/Pagination/USAGE.md +1 -0
  32. package/src/components/Stack/USAGE.md +2 -1
  33. package/src/components/index.ts +1 -1
  34. package/src/index.ts +1 -0
  35. package/src/utils/breakpointsFromRecManifest.test.ts +40 -0
  36. package/src/utils/breakpointsFromRecManifest.ts +75 -0
  37. package/src/utils/index.ts +1 -0
  38. package/src/components/Grid/GRID_IMPLEMENTATION_NOTES.md +0 -85
  39. package/src/components/Grid/Grid.module.css +0 -41
  40. package/src/components/Grid/Grid.stories.tsx +0 -200
  41. package/src/components/Grid/Grid.test.tsx +0 -1
  42. package/src/components/Grid/Grid.tsx +0 -179
  43. package/src/components/Grid/USAGE.md +0 -61
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @recursica/adapter-mantine-v8
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Major Changes
6
+
7
+ - 31bb5be: `Pagination` now renders Recursica Buttons whose style and size come from the Forge manifest, so `RecursicaThemeProvider` needs the `manifest` prop or Pagination throws; its compound parts are rebuilt on `usePagination` and Mantine's `Pagination` props are no longer passed through.
8
+ - 31bb5be: `Grid` is now `LayoutGrid` (`LayoutGrid.Col`) and follows Forge's breakpoint-aware layout grids (columns, gutters, margin, including breakpoint-map spans); it no longer accepts the `columns` prop. Use Mantine's Grid directly for a fixed N-column grid.
9
+
10
+ ### Minor Changes
11
+
12
+ - 31bb5be: New opt-in `breakpointsFromRecManifest` builds a Mantine `theme.breakpoints` object from the Forge manifest's layout grids.
13
+
14
+ ## 1.2.2
15
+
16
+ ### Patch Changes
17
+
18
+ - 20bcf0b: Minor fixes to CSS and Recursica JSON
19
+ - 20bcf0b: Fix to docs
20
+
3
21
  ## 1.2.1
4
22
 
5
23
  ### Patch Changes
package/OVERSTYLING.md CHANGED
@@ -39,6 +39,6 @@ Available Recursica layout tokens:
39
39
 
40
40
  ## Primitive Layout Components Exemption
41
41
 
42
- Unlike complex UI components (Buttons, Tabs, Inputs) which are strictly protected, **Primitive Layout Components** (`Flex`, `Stack`, `Group`, `Container`, `Grid`) are entirely exempt from the `RecursicaOverStyled` gatekeeper.
42
+ 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.
43
43
 
44
44
  Because the entire functional purpose of these components is structural layout composition, developers are free to pass any standard Mantine 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
@@ -43,11 +43,12 @@ Before consuming Recursica components, integrate the CSS and design tokens into
43
43
  ```tsx
44
44
  import { MantineProvider } from "@mantine/core";
45
45
  import { RecursicaThemeProvider } from "@recursica/adapter-mantine-v8";
46
+ import manifest from "./path/to/recursica_manifest.json";
46
47
 
47
48
  function App() {
48
49
  return (
49
50
  <MantineProvider>
50
- <RecursicaThemeProvider theme="light">
51
+ <RecursicaThemeProvider theme="light" manifest={manifest}>
51
52
  {/* Your App Components */}
52
53
  </RecursicaThemeProvider>
53
54
  </MantineProvider>
@@ -55,7 +56,37 @@ Before consuming Recursica components, integrate the CSS and design tokens into
55
56
  }
56
57
  ```
57
58
 
58
- 4. **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.
59
+ 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.
60
+
61
+ 4. **Align Mantine'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`. Mantine's responsive props (`span={{ base: 12, md: 6 }}`, `visibleFrom`, and Flex/Stack/Group props) switch at `theme.breakpoints` instead, which Forge never edits. If the two differ, a page changes layout at two different widths. `breakpointsFromRecManifest` builds a `theme.breakpoints` object from the `recursica_manifest.json` in your Forge export, so both switch at the same widths:
62
+
63
+ ```tsx
64
+ import { MantineProvider, createTheme } from "@mantine/core";
65
+ import {
66
+ RecursicaThemeProvider,
67
+ breakpointsFromRecManifest,
68
+ } from "@recursica/adapter-mantine-v8";
69
+ import manifest from "./path/to/recursica_manifest.json";
70
+
71
+ // e.g. { mobile: "0px", tablet: "481px", default: "781px" } when Forge defines extra grids
72
+ const theme = createTheme({
73
+ breakpoints: breakpointsFromRecManifest(manifest),
74
+ });
75
+
76
+ function App() {
77
+ return (
78
+ <MantineProvider theme={theme}>
79
+ <RecursicaThemeProvider theme="light" manifest={manifest}>
80
+ {/* Your App Components */}
81
+ </RecursicaThemeProvider>
82
+ </MantineProvider>
83
+ );
84
+ }
85
+ ```
86
+
87
+ Each non-default grid starts at its `min-width` (a grid with only a `max-width` starts at `0px`), 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. Mantine merges these with its defaults, so `xs`–`xl` still exist at Mantine's widths; use Forge's names (`mobile`, `tablet`, ...) in responsive props to switch where Forge does. The result is a plain object you can edit, and nothing applies it automatically. See the [LayoutGrid usage guide](src/components/LayoutGrid/USAGE.md).
88
+
89
+ 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.
59
90
 
60
91
  Install the plugin as a dev dependency:
61
92
 
@@ -76,18 +107,18 @@ Before consuming Recursica components, integrate the CSS and design tokens into
76
107
  };
77
108
  ```
78
109
 
79
- 5. **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.
110
+ 6. **Configure ESLint Plugin (Optional but Recommended)**: It is highly recommended (but optional) to install `@recursica/eslint-plugin`, which flags use of the `overStyled` escape-hatch prop so it stays easy to audit.
80
111
 
81
112
  Install the plugin as a dev dependency:
82
113
 
83
114
  ```bash
84
- npm install eslint-plugin-recursica --save-dev
115
+ npm install @recursica/eslint-plugin --save-dev
85
116
  ```
86
117
 
87
118
  Then, add it to your `eslint.config.js`:
88
119
 
89
120
  ```javascript
90
- import recursica from "eslint-plugin-recursica";
121
+ import recursica from "@recursica/eslint-plugin";
91
122
 
92
123
  export default [recursica.configs.recommended];
93
124
  ```