@recursica/mantine-adapter 0.11.0 → 0.13.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 +16 -0
- package/README.md +6 -28
- package/dist/mantine-adapter.cjs +1 -1
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +1175 -1033
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Avatar/Avatar.d.ts +16 -2
- package/dist/src/components/Badge/Badge.d.ts +14 -1
- package/dist/src/components/Button/Button.d.ts +19 -1
- package/dist/src/components/Card/Card.d.ts +21 -6
- package/dist/src/components/Flex/Flex.d.ts +19 -1
- package/dist/src/components/Menu/Menu.d.ts +115 -3
- package/dist/src/components/Text/Text.d.ts +16 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.tsx +30 -17
- package/src/components/Badge/Badge.tsx +9 -2
- package/src/components/Button/Button.tsx +96 -84
- package/src/components/Card/Card.tsx +27 -7
- package/src/components/Flex/Flex.tsx +14 -2
- package/src/components/Menu/MENU_IMPLEMENTATION_NOTES.md +78 -0
- package/src/components/Menu/Menu.module.css +244 -0
- package/src/components/Menu/Menu.stories.tsx +309 -5
- package/src/components/Menu/Menu.tsx +337 -4
- package/src/components/Text/Text.tsx +16 -6
|
@@ -2,6 +2,7 @@ import { forwardRef, type ReactNode } from "react";
|
|
|
2
2
|
import {
|
|
3
3
|
Text as MantineText,
|
|
4
4
|
type TextProps as MantineTextProps,
|
|
5
|
+
createPolymorphicComponent,
|
|
5
6
|
} from "@mantine/core";
|
|
6
7
|
import {
|
|
7
8
|
filterStylingProps,
|
|
@@ -26,11 +27,7 @@ export type RecursicaTextProps = Omit<MantineTextProps, "variant"> & {
|
|
|
26
27
|
|
|
27
28
|
export type TextProps = RecursicaOverStyled<RecursicaTextProps>;
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
* A generalized typographical wrapper limiting text properties to bounded Recursica UI-kit tokens inherently.
|
|
31
|
-
* Do not use for semantic headings; use the explicit `<Title>` component for `<h1>` - `<h6>`.
|
|
32
|
-
*/
|
|
33
|
-
export const Text = forwardRef<HTMLDivElement, TextProps>(function Text(
|
|
30
|
+
const _Text = forwardRef<HTMLDivElement, TextProps>(function Text(
|
|
34
31
|
{ overStyled = false, variant = "body", ...rest },
|
|
35
32
|
ref,
|
|
36
33
|
) {
|
|
@@ -51,4 +48,17 @@ export const Text = forwardRef<HTMLDivElement, TextProps>(function Text(
|
|
|
51
48
|
/>
|
|
52
49
|
);
|
|
53
50
|
});
|
|
54
|
-
|
|
51
|
+
_Text.displayName = "Text";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A generalized typographical wrapper limiting text properties to bounded Recursica UI-kit tokens inherently.
|
|
55
|
+
* Do not use for semantic headings; use the explicit `<Title>` component for `<h1>` - `<h6>`.
|
|
56
|
+
*
|
|
57
|
+
* Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <Text component="span">Inline text</Text>
|
|
61
|
+
* <Text component="label" htmlFor="input-id">Label text</Text>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export const Text = createPolymorphicComponent<"p", TextProps>(_Text);
|