@recursica/mantine-adapter 0.50.6 → 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.
Files changed (37) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/index.d.ts +26 -26
  3. package/dist/mantine-adapter.cjs +2 -2
  4. package/dist/mantine-adapter.cjs.map +1 -1
  5. package/dist/mantine-adapter.css +1 -1
  6. package/dist/mantine-adapter.js +779 -773
  7. package/dist/mantine-adapter.js.map +1 -1
  8. package/package.json +2 -2
  9. package/src/Introduction.stories.tsx +15 -15
  10. package/src/OverStyling.tsx +3 -3
  11. package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +10 -0
  12. package/src/components/Accordion/Accordion.module.css +5 -1
  13. package/src/components/AutoComplete/AUTOCOMPLETE_IMPLEMENTATION_NOTES.md +6 -1
  14. package/src/components/AutoComplete/AutoComplete.module.css +4 -1
  15. package/src/components/Button/Button.module.css +4 -1
  16. package/src/components/Button/IMPLEMENTATION_NOTES.md +12 -0
  17. package/src/components/Card/USAGE.md +1 -1
  18. package/src/components/Dropdown/DROPDOWN_IMPLEMENTATION_NOTES.md +1 -1
  19. package/src/components/Dropdown/Dropdown.module.css +4 -1
  20. package/src/components/Heading/HEADING_IMPLEMENTATION_NOTES.md +18 -0
  21. package/src/components/Heading/Heading.module.css +13 -0
  22. package/src/components/{Title/Title.stories.tsx → Heading/Heading.stories.tsx} +13 -13
  23. package/src/components/Heading/Heading.test.tsx +1 -0
  24. package/src/components/Heading/Heading.tsx +52 -0
  25. package/src/components/{Title → Heading}/USAGE.md +5 -5
  26. package/src/components/Modal/MODAL_IMPLEMENTATION_NOTES.md +6 -1
  27. package/src/components/Modal/Modal.module.css +4 -1
  28. package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +10 -0
  29. package/src/components/Panel/Panel.module.css +4 -1
  30. package/src/components/Text/TEXT_IMPLEMENTATION_NOTES.md +12 -0
  31. package/src/components/Text/Text.module.css +13 -0
  32. package/src/components/Text/Text.stories.tsx +1 -1
  33. package/src/components/Text/Text.tsx +5 -4
  34. package/src/components/index.ts +1 -1
  35. package/src/index.ts +3 -3
  36. package/src/components/Title/Title.test.tsx +0 -1
  37. package/src/components/Title/Title.tsx +0 -52
@@ -1,52 +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
-
14
- export type TitleProps = RecursicaOverStyled<
15
- Omit<MantineTitleProps, "size"> & RecursicaTitleProps
16
- >;
17
-
18
- /**
19
- * Enforces highly accessible structural markup utilizing semantic `<h1>` through `<h6>` tags securely bound directly to Recursica typographic scales.
20
- */
21
- export const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(
22
- { overStyled = false, order = 1, ...rest },
23
- ref,
24
- ) {
25
- // Props this component intentionally doesn't support — deleted at runtime so they can't leak
26
- // through even if a caller forces them via plain JavaScript, bypassing the `Omit<>` above.
27
- const UNSUPPORTED_PROPS = [
28
- "size", // Recursica controls Title sizing via the `order` prop + typography tokens, not Mantine's native `size`.
29
- ] as const satisfies readonly (keyof MantineTitleProps)[];
30
-
31
- const sanitizedProps = omitUnsupportedProps(
32
- filterStylingProps(rest, overStyled),
33
- UNSUPPORTED_PROPS,
34
- );
35
- const classNameProp = (sanitizedProps as Record<string, unknown>)
36
- .className as string | undefined;
37
-
38
- const typographyClass = `recursica_brand_typography_h${order}`;
39
- const mergedClassName = classNameProp
40
- ? `${typographyClass} ${classNameProp}`
41
- : typographyClass;
42
-
43
- return (
44
- <MantineTitle
45
- ref={ref}
46
- {...(sanitizedProps as unknown as MantineTitleProps)}
47
- order={order}
48
- className={mergedClassName}
49
- />
50
- );
51
- });
52
- Title.displayName = "Title";