@recursica/mantine-adapter 0.51.0 → 0.52.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/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.51.0",
16
+ "version": "0.52.0",
17
17
  "type": "module",
18
18
  "main": "./dist/mantine-adapter.cjs",
19
19
  "module": "./dist/mantine-adapter.js",
@@ -95,7 +95,7 @@
95
95
  "vitest": "^3.2.4"
96
96
  },
97
97
  "dependencies": {
98
- "@recursica/adapter-common": "^0.25.1",
98
+ "@recursica/adapter-common": "^0.26.0",
99
99
  "@recursica/official-release": "^2.8.0"
100
100
  },
101
101
  "peerDependencies": {
@@ -6,7 +6,7 @@ import {
6
6
  Container,
7
7
  Stack,
8
8
  Group,
9
- Title,
9
+ Heading,
10
10
  Text,
11
11
  Link,
12
12
  Button,
@@ -21,9 +21,9 @@ function IntroductionContent() {
21
21
  <Group gap="rec-md" mb="rec-xl" align="flex-start" wrap="nowrap">
22
22
  <MantineLogo width={80} height={80} />
23
23
  <Stack gap={0}>
24
- <Title order={1} m={0}>
24
+ <Heading order={1} m={0}>
25
25
  Recursica Design System (Mantine Adapter)
26
- </Title>
26
+ </Heading>
27
27
  <Link href="https://mantine.dev" target="_blank" rel="noreferrer">
28
28
  mantine.dev
29
29
  </Link>
@@ -36,9 +36,9 @@ function IntroductionContent() {
36
36
  </Text>
37
37
 
38
38
  <Stack mb="rec-xl">
39
- <Title order={2} mb="rec-md">
39
+ <Heading order={2} mb="rec-md">
40
40
  Looking for another UI Kit?
41
- </Title>
41
+ </Heading>
42
42
  <Text mb="rec-md">
43
43
  Are you using a different UI Kit (like Material UI)? Recursica
44
44
  provides multiple adapters for different frameworks.
@@ -56,9 +56,9 @@ function IntroductionContent() {
56
56
  </Stack>
57
57
 
58
58
  <Stack mb="rec-xl">
59
- <Title order={2} mb="rec-md">
59
+ <Heading order={2} mb="rec-md">
60
60
  Installation
61
- </Title>
61
+ </Heading>
62
62
  <Text mb="rec-md">
63
63
  To install the Mantine adapter in your project, run:
64
64
  </Text>
@@ -78,9 +78,9 @@ function IntroductionContent() {
78
78
  </Stack>
79
79
 
80
80
  <Stack mb="rec-xl">
81
- <Title order={2} mb="rec-md">
81
+ <Heading order={2} mb="rec-md">
82
82
  Tokens
83
- </Title>
83
+ </Heading>
84
84
  <Text mb="rec-md">
85
85
  Raw design tokens (colors, sizes, font weights, opacities, etc.) that
86
86
  feed the theme and components. These are the primitive values defined
@@ -89,9 +89,9 @@ function IntroductionContent() {
89
89
  </Stack>
90
90
 
91
91
  <Stack mb="rec-xl">
92
- <Title order={2} mb="rec-md">
92
+ <Heading order={2} mb="rec-md">
93
93
  Theme
94
- </Title>
94
+ </Heading>
95
95
  <Text mb="rec-md">
96
96
  Brand and theme layer built on top of tokens. Typography types,
97
97
  dimensions, and layout grids are defined here. Theme uses the tokens
@@ -101,9 +101,9 @@ function IntroductionContent() {
101
101
  </Stack>
102
102
 
103
103
  <Stack mb="rec-xl">
104
- <Title order={2} mb="rec-md">
104
+ <Heading order={2} mb="rec-md">
105
105
  Configuring Recursica
106
- </Title>
106
+ </Heading>
107
107
  <Text mb="rec-md">
108
108
  To modify the Recursica configuration (tokens, brand, theme), go to{" "}
109
109
  <Link href={FORGE_URL} target="_blank" rel="noopener noreferrer">
@@ -114,9 +114,9 @@ function IntroductionContent() {
114
114
  </Stack>
115
115
 
116
116
  <Stack mb="rec-xl">
117
- <Title order={2} mb="rec-md">
117
+ <Heading order={2} mb="rec-md">
118
118
  Documentation
119
- </Title>
119
+ </Heading>
120
120
  <Text mb="rec-md">
121
121
  For full documentation, guides, and API reference, visit{" "}
122
122
  <Link href={DOCS_URL} target="_blank" rel="noopener noreferrer">
@@ -3,7 +3,7 @@ import { TypographyStylesProvider } from "@mantine/core";
3
3
  import {
4
4
  Container,
5
5
  Card,
6
- Title,
6
+ Heading,
7
7
  Text as RawText,
8
8
  Group,
9
9
  Stack,
@@ -36,9 +36,9 @@ export const OverStylingInfo = () => {
36
36
  my="rec-xl"
37
37
  />
38
38
 
39
- <Title order={3} mb="rec-md">
39
+ <Heading order={3} mb="rec-md">
40
40
  Try It Yourself
41
- </Title>
41
+ </Heading>
42
42
 
43
43
  <Group mb="rec-xl">
44
44
  <Switch
@@ -22,7 +22,7 @@ export default function Demo() {
22
22
  return (
23
23
  <Card>
24
24
  <Card.Header>
25
- <Title order={3}>Card Title</Title>
25
+ <Heading order={3}>Card Title</Heading>
26
26
  </Card.Header>
27
27
  <Card.Content>
28
28
  <Text>
@@ -1,8 +1,14 @@
1
- # Title – Implementation Notes
1
+ # Heading – Implementation Notes
2
+
3
+ ## Renamed from `Title` (Matt Massey, 2026-08-28)
4
+
5
+ **Decision:** Renamed the component from `Title` to `Heading` — designers refer to semantic tags
6
+ (`h1`-`h6`, `span`, `p`), and "Title" wasn't part of that vocabulary. `Heading` + `Text` are now
7
+ Recursica's common typography component names across all adapters. No behavior change.
2
8
 
3
9
  ## `.root` `text-wrap: balance` (Matt Massey, 2026-08-28)
4
10
 
5
- **Decision:** Added `text-wrap: balance` via a new `Title.module.css` `.root` class, merged onto
11
+ **Decision:** Added `text-wrap: balance` via a new `Heading.module.css` `.root` class, merged onto
6
12
  the typography class for every `order` (h1–h6), alongside the caller's own `className`.
7
13
 
8
14
  **Implementation:** UX asked for more evenly balanced multi-line wrapping instead of a ragged last
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * HARDCODED VALUES
3
3
  * - `.root` `text-wrap: balance` — not a design token; a layout algorithm choice requested by
4
- * UX (Matt Massey, 2026-08-28) to even out wrapped line lengths. See TEXT_IMPLEMENTATION_NOTES.md.
4
+ * UX (Matt Massey, 2026-08-28) to even out wrapped line lengths. See HEADING_IMPLEMENTATION_NOTES.md.
5
5
  */
6
6
 
7
7
  .root {
@@ -1,15 +1,15 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react";
2
- import { Title } from "./Title";
2
+ import { Heading } from "./Heading";
3
3
 
4
- const meta: Meta<typeof Title> = {
5
- title: "UI-Kit/Title",
6
- component: Title,
4
+ const meta: Meta<typeof Heading> = {
5
+ title: "UI-Kit/Heading",
6
+ component: Heading,
7
7
  tags: ["autodocs"],
8
8
  parameters: {
9
9
  docs: {
10
10
  description: {
11
11
  component:
12
- "The semantic `<Title>` abstraction intrinsically links pure `h1-h6` tag generation with exact Recursica design boundaries to preserve SEO and screen reader trees uniformly globally.",
12
+ "The semantic `<Heading>` abstraction intrinsically links pure `h1-h6` tag generation with exact Recursica design boundaries to preserve SEO and screen reader trees uniformly globally.",
13
13
  },
14
14
  },
15
15
  },
@@ -25,26 +25,26 @@ const meta: Meta<typeof Title> = {
25
25
 
26
26
  export default meta;
27
27
 
28
- type Story = StoryObj<typeof Title>;
28
+ type Story = StoryObj<typeof Heading>;
29
29
 
30
30
  export const Default: Story = {
31
31
  args: {
32
32
  order: 1,
33
33
  children: "Semantic H1 Document Boundary",
34
34
  },
35
- render: ({ ...args }) => <Title {...args} />,
35
+ render: ({ ...args }) => <Heading {...args} />,
36
36
  };
37
37
 
38
38
  export const StaticVariations: Story = {
39
39
  args: {},
40
40
  render: () => (
41
41
  <div style={{ display: "flex", flexDirection: "column", gap: "24px" }}>
42
- <Title order={1}>H1 Title</Title>
43
- <Title order={2}>H2 Title</Title>
44
- <Title order={3}>H3 Title</Title>
45
- <Title order={4}>H4 Title</Title>
46
- <Title order={5}>H5 Title</Title>
47
- <Title order={6}>H6 Title</Title>
42
+ <Heading order={1}>H1 Heading</Heading>
43
+ <Heading order={2}>H2 Heading</Heading>
44
+ <Heading order={3}>H3 Heading</Heading>
45
+ <Heading order={4}>H4 Heading</Heading>
46
+ <Heading order={5}>H5 Heading</Heading>
47
+ <Heading order={6}>H6 Heading</Heading>
48
48
  </div>
49
49
  ),
50
50
  };
@@ -0,0 +1 @@
1
+ // Placeholder for future Heading component tests. Add tests here if/when needed.
@@ -0,0 +1,52 @@
1
+ import { forwardRef } from "react";
2
+ import {
3
+ Title as MantineTitle,
4
+ type TitleProps as MantineTitleProps,
5
+ } from "@mantine/core";
6
+ import {
7
+ filterStylingProps,
8
+ omitUnsupportedProps,
9
+ type RecursicaOverStyled,
10
+ } from "../../utils/filterStylingProps";
11
+
12
+ import { type RecursicaHeadingProps } from "@recursica/adapter-common";
13
+ import styles from "./Heading.module.css";
14
+
15
+ export type HeadingProps = RecursicaOverStyled<
16
+ Omit<MantineTitleProps, "size"> & RecursicaHeadingProps
17
+ >;
18
+
19
+ /**
20
+ * Enforces highly accessible structural markup utilizing semantic `<h1>` through `<h6>` tags securely bound directly to Recursica typographic scales.
21
+ */
22
+ export const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(
23
+ function Heading({ overStyled = false, order = 1, ...rest }, ref) {
24
+ // Props this component intentionally doesn't support — deleted at runtime so they can't leak
25
+ // through even if a caller forces them via plain JavaScript, bypassing the `Omit<>` above.
26
+ const UNSUPPORTED_PROPS = [
27
+ "size", // Recursica controls Heading sizing via the `order` prop + typography tokens, not Mantine's native `size`.
28
+ ] as const satisfies readonly (keyof MantineTitleProps)[];
29
+
30
+ const sanitizedProps = omitUnsupportedProps(
31
+ filterStylingProps(rest, overStyled),
32
+ UNSUPPORTED_PROPS,
33
+ );
34
+ const classNameProp = (sanitizedProps as Record<string, unknown>)
35
+ .className as string | undefined;
36
+
37
+ const typographyClass = `recursica_brand_typography_h${order}`;
38
+ const mergedClassName = [typographyClass, styles.root, classNameProp]
39
+ .filter(Boolean)
40
+ .join(" ");
41
+
42
+ return (
43
+ <MantineTitle
44
+ ref={ref}
45
+ {...(sanitizedProps as unknown as MantineTitleProps)}
46
+ order={order}
47
+ className={mergedClassName}
48
+ />
49
+ );
50
+ },
51
+ );
52
+ Heading.displayName = "Heading";
@@ -1,13 +1,13 @@
1
- # Title - Usage Guide
1
+ # Heading - Usage Guide
2
2
 
3
- This document describes how to integrate and use the `Title` component in your projects using `@recursica/mantine-adapter`.
3
+ This document describes how to integrate and use the `Heading` component in your projects using `@recursica/mantine-adapter`.
4
4
 
5
5
  ---
6
6
 
7
7
  ## 1. Import Reference
8
8
 
9
9
  ```tsx
10
- import { Title } from "@recursica/mantine-adapter";
10
+ import { Heading } from "@recursica/mantine-adapter";
11
11
  ```
12
12
 
13
13
  ---
@@ -16,10 +16,10 @@ import { Title } from "@recursica/mantine-adapter";
16
16
 
17
17
  ```tsx
18
18
  import React from "react";
19
- import { Title } from "@recursica/mantine-adapter";
19
+ import { Heading } from "@recursica/mantine-adapter";
20
20
 
21
21
  export default function Demo() {
22
- return <Title order={1}>This is a Heading 1</Title>;
22
+ return <Heading order={1}>This is a Heading 1</Heading>;
23
23
  }
24
24
  ```
25
25
 
@@ -9,7 +9,7 @@ const meta: Meta<typeof Text> = {
9
9
  docs: {
10
10
  description: {
11
11
  component:
12
- "The standard `<Text>` component controls common body sizing scales and implicit paragraphs governed by the active theme layer. For semantic headings (`h1` through `h6`), use `<Title>` instead.",
12
+ "The standard `<Text>` component controls common body sizing scales and implicit paragraphs governed by the active theme layer. For semantic headings (`h1` through `h6`), use `<Heading>` instead.",
13
13
  },
14
14
  },
15
15
  },
@@ -41,7 +41,7 @@ _Text.displayName = "Text";
41
41
 
42
42
  /**
43
43
  * A generalized typographical wrapper limiting text properties to bounded Recursica UI-kit tokens inherently.
44
- * Do not use for semantic headings; use the explicit `<Title>` component for `<h1>` - `<h6>`.
44
+ * Do not use for semantic headings; use the explicit `<Heading>` component for `<h1>` - `<h6>`.
45
45
  *
46
46
  * Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
47
47
  * @example
@@ -18,6 +18,7 @@ export * from "./Flex/Flex";
18
18
  export * from "./FormControlLayout/FormControlLayout";
19
19
  export * from "./Grid/Grid";
20
20
  export * from "./Group/Group";
21
+ export * from "./Heading/Heading";
21
22
  export * from "./HoverCard/HoverCard";
22
23
  export * from "./Link/Link";
23
24
  export * from "./Loader/Loader";
@@ -45,7 +46,6 @@ export * from "./TextField/TextField";
45
46
  export * from "./TimePicker/TimePicker";
46
47
  export * from "./Timeline/Timeline";
47
48
  export * from "./Timeline/TimelineItem";
48
- export * from "./Title/Title";
49
49
  export * from "./Toast";
50
50
  export * from "./Tooltip/Tooltip";
51
51
  export * from "./TransferList/TransferList";
package/src/index.ts CHANGED
@@ -72,6 +72,9 @@ export const FileUpload = wrapComponent(
72
72
  export const FormControlLayout = wrapComponent(
73
73
  rawComponents.FormControlLayout,
74
74
  ) as typeof rawComponents.FormControlLayout;
75
+ export const Heading = wrapComponent(
76
+ rawComponents.Heading,
77
+ ) as typeof rawComponents.Heading;
75
78
  export const HoverCard = wrapComponent(
76
79
  rawComponents.HoverCard,
77
80
  ) as typeof rawComponents.HoverCard;
@@ -147,9 +150,6 @@ export const Timeline = wrapComponent(
147
150
  export const TimelineItem = wrapComponent(
148
151
  rawComponents.TimelineItem,
149
152
  ) as typeof rawComponents.TimelineItem;
150
- export const Title = wrapComponent(
151
- rawComponents.Title,
152
- ) as typeof rawComponents.Title;
153
153
  export const Toast = wrapComponent(
154
154
  rawComponents.Toast,
155
155
  ) as typeof rawComponents.Toast;
@@ -1 +0,0 @@
1
- // Placeholder for future Title component tests. Add tests here if/when needed.
@@ -1,53 +0,0 @@
1
- import { forwardRef } from "react";
2
- import {
3
- Title as MantineTitle,
4
- type TitleProps as MantineTitleProps,
5
- } from "@mantine/core";
6
- import {
7
- filterStylingProps,
8
- omitUnsupportedProps,
9
- type RecursicaOverStyled,
10
- } from "../../utils/filterStylingProps";
11
-
12
- import { type RecursicaTitleProps } from "@recursica/adapter-common";
13
- import styles from "./Title.module.css";
14
-
15
- export type TitleProps = RecursicaOverStyled<
16
- Omit<MantineTitleProps, "size"> & RecursicaTitleProps
17
- >;
18
-
19
- /**
20
- * Enforces highly accessible structural markup utilizing semantic `<h1>` through `<h6>` tags securely bound directly to Recursica typographic scales.
21
- */
22
- export const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(
23
- { overStyled = false, order = 1, ...rest },
24
- ref,
25
- ) {
26
- // Props this component intentionally doesn't support — deleted at runtime so they can't leak
27
- // through even if a caller forces them via plain JavaScript, bypassing the `Omit<>` above.
28
- const UNSUPPORTED_PROPS = [
29
- "size", // Recursica controls Title sizing via the `order` prop + typography tokens, not Mantine's native `size`.
30
- ] as const satisfies readonly (keyof MantineTitleProps)[];
31
-
32
- const sanitizedProps = omitUnsupportedProps(
33
- filterStylingProps(rest, overStyled),
34
- UNSUPPORTED_PROPS,
35
- );
36
- const classNameProp = (sanitizedProps as Record<string, unknown>)
37
- .className as string | undefined;
38
-
39
- const typographyClass = `recursica_brand_typography_h${order}`;
40
- const mergedClassName = [typographyClass, styles.root, classNameProp]
41
- .filter(Boolean)
42
- .join(" ");
43
-
44
- return (
45
- <MantineTitle
46
- ref={ref}
47
- {...(sanitizedProps as unknown as MantineTitleProps)}
48
- order={order}
49
- className={mergedClassName}
50
- />
51
- );
52
- });
53
- Title.displayName = "Title";