@recursica/adapter-mantine-v8 1.2.2 → 1.3.1
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 +23 -0
- package/OVERSTYLING.md +1 -1
- package/SETUP.md +34 -3
- package/dist/adapter-mantine-v8.cjs +2 -2
- package/dist/adapter-mantine-v8.cjs.map +1 -1
- package/dist/adapter-mantine-v8.css +1 -1
- package/dist/adapter-mantine-v8.js +3171 -3010
- package/dist/adapter-mantine-v8.js.map +1 -1
- package/dist/index.d.ts +191 -164
- package/llms.txt +1 -1
- package/package.json +4 -4
- package/recursica_brand.json +2 -2
- package/recursica_tokens.json +2 -2
- package/recursica_ui-kit.json +2 -2
- package/recursica_variables_scoped.css +7 -3
- 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/Group/USAGE.md +2 -1
- package/src/components/LayoutGrid/LAYOUT_GRID_IMPLEMENTATION_NOTES.md +88 -0
- package/src/components/LayoutGrid/LayoutGrid.columns.dom.test.tsx +66 -0
- package/src/components/LayoutGrid/LayoutGrid.module.css +48 -0
- package/src/components/LayoutGrid/LayoutGrid.stories.tsx +61 -0
- package/src/components/LayoutGrid/LayoutGrid.test.tsx +1 -0
- package/src/components/LayoutGrid/LayoutGrid.tsx +309 -0
- package/src/components/LayoutGrid/USAGE.md +76 -0
- package/src/components/Menu/Menu.stories.tsx +0 -1
- package/src/components/Pagination/IMPLEMENTATION_NOTES.md +29 -8
- package/src/components/Pagination/Pagination.icons.tsx +0 -32
- package/src/components/Pagination/Pagination.manifest.dom.test.tsx +108 -0
- package/src/components/Pagination/Pagination.module.css +25 -155
- package/src/components/Pagination/Pagination.tsx +328 -197
- package/src/components/Pagination/USAGE.md +1 -0
- package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +8 -0
- package/src/components/Panel/Panel.module.css +27 -2
- 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 +26 -0
- package/src/components/Stack/USAGE.md +2 -1
- package/src/components/Stepper/Stepper.module.css +15 -0
- package/src/components/Switch/Switch.module.css +5 -0
- package/src/components/Tabs/Tabs.module.css +5 -0
- package/src/components/Tabs/Tabs.tsx +1 -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 +75 -0
- package/src/utils/index.ts +1 -0
- package/src/components/Grid/GRID_IMPLEMENTATION_NOTES.md +0 -85
- package/src/components/Grid/Grid.module.css +0 -41
- package/src/components/Grid/Grid.stories.tsx +0 -200
- package/src/components/Grid/Grid.test.tsx +0 -1
- package/src/components/Grid/Grid.tsx +0 -179
- package/src/components/Grid/USAGE.md +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @recursica/adapter-mantine-v8
|
|
2
2
|
|
|
3
|
+
## 1.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4e1ecc2: Updated @recursica/adapter-common, adapter-tester and storybook-template to their latest releases.
|
|
8
|
+
- 4e1ecc2: FileUpload is now capped at the global form-field max-width instead of filling its whole container.
|
|
9
|
+
- 4e1ecc2: FileInput keeps a fixed height when a file is added, FileUpload width is also enforced at the layout level, and vertical Stepper, Tabs and Switch no longer add Mantine spacing on top of the Recursica gap tokens.
|
|
10
|
+
- 4e1ecc2: Menu WithSubmenus story no longer forces a 200px width, so it uses the Recursica menu min-width token.
|
|
11
|
+
- 4e1ecc2: Panel rounds only the corners facing the page, and RadioGroup/CheckboxGroup `side-by-side` layouts now stack vertically instead of wrapping in a row.
|
|
12
|
+
- 4e1ecc2: Panel width now follows the Forge `max-width` token (capped at the viewport width) instead of Mantine's 440px default.
|
|
13
|
+
- 4e1ecc2: Vertical SegmentedControl now uses a container radius concentric with its items and a correct horizontal divider between items.
|
|
14
|
+
|
|
15
|
+
## 1.3.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- 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.
|
|
20
|
+
- 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.
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- 31bb5be: New opt-in `breakpointsFromRecManifest` builds a Mantine `theme.breakpoints` object from the Forge manifest's layout grids.
|
|
25
|
+
|
|
3
26
|
## 1.2.2
|
|
4
27
|
|
|
5
28
|
### 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`, `
|
|
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
|
-
|
|
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,7 +107,7 @@ Before consuming Recursica components, integrate the CSS and design tokens into
|
|
|
76
107
|
};
|
|
77
108
|
```
|
|
78
109
|
|
|
79
|
-
|
|
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
|
|