@recursica/mantine-adapter 0.34.0 → 0.35.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.
@@ -0,0 +1,47 @@
1
+ # Grid - Usage Guide
2
+
3
+ This document describes how to integrate and use the `Grid` component in your projects using `@recursica/mantine-adapter`.
4
+
5
+ ---
6
+
7
+ ## 1. Import Reference
8
+
9
+ ```tsx
10
+ import { Grid } from "@recursica/mantine-adapter";
11
+ ```
12
+
13
+ ---
14
+
15
+ ## 2. Basic Example
16
+
17
+ ```tsx
18
+ import React from "react";
19
+ import { Grid } from "@recursica/mantine-adapter";
20
+
21
+ export default function Demo() {
22
+ return (
23
+ <Grid gap="rec-default">
24
+ <Grid.Col span={6}>Half width</Grid.Col>
25
+ <Grid.Col span={{ base: 12, sm: 6, md: 3 }}>Responsive width</Grid.Col>
26
+ </Grid>
27
+ );
28
+ }
29
+ ```
30
+
31
+ ---
32
+
33
+ ## 3. Design System Integration
34
+
35
+ All Recursica components in the `@recursica/mantine-adapter` package adhere strictly to design system spacing, scaling, and behavior patterns.
36
+
37
+ > [!IMPORTANT]
38
+ >
39
+ > - **Anti-override protection**: `Grid` is a primitive layout component (see [OVERSTYLING.md](../../../OVERSTYLING.md)) and is exempt from the `RecursicaOverStyled` gatekeeper, so standard Mantine layout props pass through freely.
40
+ > - **No Direct Layers**: Do not pass a `layer` prop to this component. To place it on a specific visual layer, wrap it in a `<Layer layer={0|1|2|3}>` component natively.
41
+ > - **Variables and Theming**: Spacing is entirely determined by the `rec-*` token scale, mapped transparently to standard Mantine gutter values.
42
+
43
+ ---
44
+
45
+ ## 4. Key Integration Features & Constraints
46
+
47
+ The `Grid` component maps directly to Mantine's `Grid`/`Grid.Col`. The one deviation from Mantine's native API: the prop for spacing between columns is named `gap` (not Mantine's `gutter`), for consistency with `Flex`, `Stack`, and `Group`. Everything else — `columns`, `grow`, `justify`, `align` on `Grid`, and `span`, `offset`, `order`, `visibleFrom`, `hiddenFrom` on `Grid.Col` — matches Mantine's own naming and accepts the same shapes, including per-breakpoint objects (`{ base, xs, sm, md, lg, xl }`).
@@ -15,6 +15,7 @@ export * from "./FileInput/FileInput";
15
15
  export * from "./FileUpload/FileUpload";
16
16
  export * from "./Flex/Flex";
17
17
  export * from "./FormControlLayout/FormControlLayout";
18
+ export * from "./Grid/Grid";
18
19
  export * from "./Group/Group";
19
20
  export * from "./HoverCard/HoverCard";
20
21
  export * from "./Link/Link";
package/src/index.ts CHANGED
@@ -6,6 +6,8 @@ export * from "@recursica/adapter-common";
6
6
 
7
7
  // Expose unwrapped structural layout primitives to preserve their polymorphic types
8
8
  export const Flex = rawComponents.Flex;
9
+ export const Grid = rawComponents.Grid;
10
+ export const GridCol = rawComponents.GridCol;
9
11
  export const Group = rawComponents.Group;
10
12
  export const Stack = rawComponents.Stack;
11
13
  export const Container = rawComponents.Container;