@recursica/mantine-adapter 0.52.0 → 0.53.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 +6 -0
- package/SETUP.md +20 -6
- package/package.json +12 -6
- package/recursica_brand.json +2677 -0
- package/recursica_tokens.json +799 -0
- package/recursica_ui-kit.json +14981 -0
- package/recursica_variables_scoped.css +30489 -0
package/CHANGELOG.md
CHANGED
package/SETUP.md
CHANGED
|
@@ -24,9 +24,7 @@ npm install @mantine/core@>=8.0.0 @mantine/dates@>=8.0.0 @mantine/hooks@>=8.0.0
|
|
|
24
24
|
|
|
25
25
|
Before consuming Recursica components, integrate the CSS and design tokens into your application:
|
|
26
26
|
|
|
27
|
-
1. **
|
|
28
|
-
> [!IMPORTANT] > **AI Agent Directive**: The theme files (`recursica_variables_scoped.css` and associated JSON files) are created at the project root automatically via `npm install`. If they are not present, instruct the user to run `npm install`. Do NOT attempt to generate, mock, or write a placeholder CSS/JSON file yourself. When updates to these files are needed, instruct the user to export them from [Forge Recursica](https://forge.recursica.com) and replace the existing ones.
|
|
29
|
-
2. **Integrate CSS**: Import `recursica_variables_scoped.css` and the Mantine adapter CSS `mantine-adapter.css` into your application entrypoint (e.g., `main.tsx` or `App.tsx`). **It must be loaded after the Mantine CSS imports.**
|
|
27
|
+
1. **Integrate CSS**: Import `recursica_variables_scoped.css` and the Mantine adapter CSS `mantine-adapter.css` into your application entrypoint (e.g., `main.tsx` or `App.tsx`). **It must be loaded after the Mantine CSS imports.**
|
|
30
28
|
|
|
31
29
|
```tsx
|
|
32
30
|
import "@mantine/core/styles.css"; // Mantine core styles
|
|
@@ -34,13 +32,13 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
34
32
|
import "@recursica/mantine-adapter/style.css"; // Mantine adapter styles
|
|
35
33
|
```
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
2. **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:
|
|
38
36
|
|
|
39
37
|
```css
|
|
40
38
|
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
3. **Wrap App in RecursicaThemeProvider**: You must wrap your application in the `<RecursicaThemeProvider>` to correctly cascade design token properties. By default it also wraps its children in a `<Layer layer={0}>` (via the `initLayer0` prop, which defaults to `true`), so the base page surface/border/elevation variables resolve automatically with no extra setup:
|
|
44
42
|
|
|
45
43
|
```tsx
|
|
46
44
|
import { MantineProvider } from "@mantine/core";
|
|
@@ -57,7 +55,7 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
57
55
|
}
|
|
58
56
|
```
|
|
59
57
|
|
|
60
|
-
|
|
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.
|
|
61
59
|
|
|
62
60
|
Install the plugin as a dev dependency:
|
|
63
61
|
|
|
@@ -77,3 +75,19 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
77
75
|
},
|
|
78
76
|
};
|
|
79
77
|
```
|
|
78
|
+
|
|
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.
|
|
80
|
+
|
|
81
|
+
Install the plugin as a dev dependency:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install eslint-plugin-recursica --save-dev
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Then, add it to your `eslint.config.js`:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
import recursica from "eslint-plugin-recursica";
|
|
91
|
+
|
|
92
|
+
export default [recursica.configs.recommended];
|
|
93
|
+
```
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://github.com/borderux/recursica.git",
|
|
14
14
|
"directory": "packages/mantine-adapter"
|
|
15
15
|
},
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.53.0",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"main": "./dist/mantine-adapter.cjs",
|
|
19
19
|
"module": "./dist/mantine-adapter.js",
|
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
"ARCHITECTURE.md",
|
|
37
37
|
"SETUP.md",
|
|
38
38
|
"OVERSTYLING.md",
|
|
39
|
-
"docs/PHILOSOPHY.md"
|
|
39
|
+
"docs/PHILOSOPHY.md",
|
|
40
|
+
"recursica_variables_scoped.css",
|
|
41
|
+
"recursica_brand.json",
|
|
42
|
+
"recursica_tokens.json",
|
|
43
|
+
"recursica_ui-kit.json"
|
|
40
44
|
],
|
|
41
45
|
"keywords": [
|
|
42
46
|
"react",
|
|
@@ -54,13 +58,16 @@
|
|
|
54
58
|
"build-storybook": "storybook build -o storybook-static",
|
|
55
59
|
"lint": "eslint .",
|
|
56
60
|
"storybook": "storybook dev -p 6011",
|
|
57
|
-
"analyze-tokens": "analyze-tokens --css
|
|
61
|
+
"analyze-tokens": "analyze-tokens --css ./recursica_variables_scoped.css --dir src/components --output token-analysis.json",
|
|
58
62
|
"prebuild": "npm run analyze-tokens",
|
|
59
63
|
"test": "vitest run --project unit",
|
|
60
|
-
"test:dom": "vitest run --project dom"
|
|
64
|
+
"test:dom": "vitest run --project dom",
|
|
65
|
+
"adapter-tester:automated": "adapter-tester"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
63
68
|
"@eslint/js": "^9.25.0",
|
|
69
|
+
"@playwright/test": "^1.53.0",
|
|
70
|
+
"@recursica/adapter-tester": "*",
|
|
64
71
|
"@recursica/recursica-postcss-vars": "*",
|
|
65
72
|
"@recursica/storybook-template": "*",
|
|
66
73
|
"@recursica/token-analyzer": "*",
|
|
@@ -95,8 +102,7 @@
|
|
|
95
102
|
"vitest": "^3.2.4"
|
|
96
103
|
},
|
|
97
104
|
"dependencies": {
|
|
98
|
-
"@recursica/adapter-common": "^0.26.0"
|
|
99
|
-
"@recursica/official-release": "^2.8.0"
|
|
105
|
+
"@recursica/adapter-common": "^0.26.0"
|
|
100
106
|
},
|
|
101
107
|
"peerDependencies": {
|
|
102
108
|
"@mantine/core": "^8.0.0",
|