@recursica/mantine-adapter 0.51.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @recursica/mantine-adapter
2
2
 
3
+ ## 0.53.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 786d870: Version bumped
8
+
9
+ ## 0.52.0
10
+
11
+ ### Minor Changes
12
+
13
+ - f618b38: Renamed the `Title` component to `Heading` (and `RecursicaTitleProps` to `RecursicaHeadingProps`) to match designers' semantic vocabulary. `Text` is unchanged. Breaking: update imports from `Title`/`TitleProps` to `Heading`/`HeadingProps`.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [f618b38]
18
+ - @recursica/adapter-common@0.26.0
19
+
3
20
  ## 0.51.0
4
21
 
5
22
  ### Minor Changes
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. **Theme Files Setup**: When you install `@recursica/mantine-adapter`, a postinstall script automatically creates default theme files (including `recursica_variables_scoped.css` and JSON config files) in your project root. If they are missing, simply run `npm install` to create them. To customize or update these variables, you should use [Forge Recursica](https://forge.recursica.com) to export the updated theme files into your project.
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
- 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:
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
- 4. **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:
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
- 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
+ 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/dist/index.d.ts CHANGED
@@ -99,7 +99,7 @@ import { TextProps as TextProps_2 } from '@mantine/core';
99
99
  import { TimelineItemProps as TimelineItemProps_2 } from '@mantine/core';
100
100
  import { TimelineProps as TimelineProps_2 } from '@mantine/core';
101
101
  import { TimePickerProps } from '@mantine/dates';
102
- import { TitleProps as TitleProps_2 } from '@mantine/core';
102
+ import { TitleProps } from '@mantine/core';
103
103
  import { Tooltip as Tooltip_3 } from '@mantine/core';
104
104
  import { TooltipFloatingProps as TooltipFloatingProps_2 } from '@mantine/core';
105
105
  import { TooltipProps as TooltipProps_2 } from '@mantine/core';
@@ -757,6 +757,15 @@ spacing?: string | number | RecursicaSpacing;
757
757
  */
758
758
  declare type GroupProps = WithRecursicaSpacing<GroupProps_2>;
759
759
 
760
+ export declare const Heading: typeof rawComponents.Heading;
761
+
762
+ /**
763
+ * Enforces highly accessible structural markup utilizing semantic `<h1>` through `<h6>` tags securely bound directly to Recursica typographic scales.
764
+ */
765
+ declare const Heading_2: ForwardRefExoticComponent<HeadingProps & RefAttributes<HTMLHeadingElement>>;
766
+
767
+ declare type HeadingProps = RecursicaOverStyled<Omit<TitleProps, "size"> & RecursicaHeadingProps>;
768
+
760
769
  export declare const HoverCard: typeof rawComponents.HoverCard;
761
770
 
762
771
  declare const HoverCard_2: HoverCardComponent;
@@ -1488,6 +1497,8 @@ declare namespace rawComponents {
1488
1497
  Grid_2 as Grid,
1489
1498
  GroupProps,
1490
1499
  Group_2 as Group,
1500
+ HeadingProps,
1501
+ Heading_2 as Heading,
1491
1502
  HoverCardProps,
1492
1503
  HoverCardTargetProps,
1493
1504
  HoverCardDropdownProps,
@@ -1625,8 +1636,6 @@ declare namespace rawComponents {
1625
1636
  Timeline_2 as Timeline,
1626
1637
  TimelineItemProps,
1627
1638
  TimelineItem_2 as TimelineItem,
1628
- TitleProps,
1629
- Title_2 as Title,
1630
1639
  ToastProps,
1631
1640
  Toast_2 as Toast,
1632
1641
  TooltipProps,
@@ -1689,7 +1698,7 @@ declare type ReadOnlyTextFieldProps = RecursicaOverStyled<RecursicaReadOnlyTextF
1689
1698
  /**
1690
1699
  * Official list of all components in Recursica.
1691
1700
  */
1692
- export declare const RECURSICA_COMPONENTS: readonly ["Accordion", "AssistiveElement", "Autocomplete", "Avatar", "Badge", "Box", "Breadcrumb", "Button", "Card", "Checkbox", "CheckboxGroup", "Chip", "Container", "DatePicker", "Dropdown", "EmptyValueRenderer", "FileInput", "FileUpload", "Flex", "FormControlLayout", "FormControlWrapper", "Grid", "Group", "HoverCard", "Label", "Layer", "Link", "Loader", "Menu", "Modal", "NumberInput", "Pagination", "Panel", "Popover", "Radio", "ReadOnlyField", "SegmentedControl", "Slider", "Stack", "Stepper", "Switch", "Table", "Tabs", "Text", "TextArea", "TextField", "TimePicker", "Timeline", "Title", "Toast", "Tooltip", "TransferList", "Tree", "Typography"];
1701
+ export declare const RECURSICA_COMPONENTS: readonly ["Accordion", "AssistiveElement", "Autocomplete", "Avatar", "Badge", "Box", "Breadcrumb", "Button", "Card", "Checkbox", "CheckboxGroup", "Chip", "Container", "DatePicker", "Dropdown", "EmptyValueRenderer", "FileInput", "FileUpload", "Flex", "FormControlLayout", "FormControlWrapper", "Grid", "Group", "Heading", "HoverCard", "Label", "Layer", "Link", "Loader", "Menu", "Modal", "NumberInput", "Pagination", "Panel", "Popover", "Radio", "ReadOnlyField", "SegmentedControl", "Slider", "Stack", "Stepper", "Switch", "Table", "Tabs", "Text", "TextArea", "TextField", "TimePicker", "Timeline", "Toast", "Tooltip", "TransferList", "Tree", "Typography"];
1693
1702
 
1694
1703
  /**
1695
1704
  * Props for the Recursica Accordion Control component.
@@ -2223,6 +2232,18 @@ export declare interface RecursicaFormControlWrapperProps extends RecursicaLabel
2223
2232
  controlMinWidth?: string | undefined;
2224
2233
  }
2225
2234
 
2235
+ /**
2236
+ * Props for the Recursica Heading component.
2237
+ */
2238
+ export declare interface RecursicaHeadingProps extends default_2.HTMLAttributes<HTMLHeadingElement> {
2239
+ /** Heading ordering hierarchies (1 represents H1, 6 represents H6) */
2240
+ order?: 1 | 2 | 3 | 4 | 5 | 6;
2241
+ /** Heading contents */
2242
+ children?: default_2.ReactNode;
2243
+ /** Polymorphic component override */
2244
+ component?: default_2.ElementType;
2245
+ }
2246
+
2226
2247
  /**
2227
2248
  * Props for the Recursica HoverCard component.
2228
2249
  */
@@ -2728,18 +2749,6 @@ declare interface RecursicaTimePickerProps_2 {
2728
2749
  maxTime?: string;
2729
2750
  }
2730
2751
 
2731
- /**
2732
- * Props for the Recursica Title component.
2733
- */
2734
- export declare interface RecursicaTitleProps extends default_2.HTMLAttributes<HTMLHeadingElement> {
2735
- /** Heading ordering hierarchies (1 represents H1, 6 represents H6) */
2736
- order?: 1 | 2 | 3 | 4 | 5 | 6;
2737
- /** Title contents */
2738
- children?: default_2.ReactNode;
2739
- /** Polymorphic component override */
2740
- component?: default_2.ElementType;
2741
- }
2742
-
2743
2752
  /**
2744
2753
  * Props for the Recursica Toast notification component.
2745
2754
  */
@@ -3108,7 +3117,7 @@ export { Text_2 as Text }
3108
3117
 
3109
3118
  /**
3110
3119
  * A generalized typographical wrapper limiting text properties to bounded Recursica UI-kit tokens inherently.
3111
- * Do not use for semantic headings; use the explicit `<Title>` component for `<h1>` - `<h6>`.
3120
+ * Do not use for semantic headings; use the explicit `<Heading>` component for `<h1>` - `<h6>`.
3112
3121
  *
3113
3122
  * Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
3114
3123
  * @example
@@ -3181,15 +3190,6 @@ declare const TimePicker_2: default_2.ForwardRefExoticComponent<TimePickerProps_
3181
3190
 
3182
3191
  declare type TimePickerProps_2 = RecursicaOverStyled<RecursicaTimePickerProps>;
3183
3192
 
3184
- export declare const Title: typeof rawComponents.Title;
3185
-
3186
- /**
3187
- * Enforces highly accessible structural markup utilizing semantic `<h1>` through `<h6>` tags securely bound directly to Recursica typographic scales.
3188
- */
3189
- declare const Title_2: ForwardRefExoticComponent<TitleProps & RefAttributes<HTMLHeadingElement>>;
3190
-
3191
- declare type TitleProps = RecursicaOverStyled<Omit<TitleProps_2, "size"> & RecursicaTitleProps>;
3192
-
3193
3193
  export declare const Toast: typeof rawComponents.Toast;
3194
3194
 
3195
3195
  declare const Toast_2: default_2.ForwardRefExoticComponent<ToastProps & default_2.RefAttributes<HTMLDivElement>>;