@recursica/mui-adapter 0.1.0 → 0.3.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 (87) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/mui-adapter.cjs +1 -1
  3. package/dist/mui-adapter.cjs.map +1 -1
  4. package/dist/mui-adapter.css +1 -1
  5. package/dist/mui-adapter.js +249 -90
  6. package/dist/mui-adapter.js.map +1 -1
  7. package/dist/src/OverStyling.d.ts +1 -0
  8. package/dist/src/Version.d.ts +1 -0
  9. package/dist/src/components/Box/Box.d.ts +2 -3
  10. package/dist/src/components/Button/Button.d.ts +33 -2
  11. package/dist/src/components/Container/Container.d.ts +8 -2
  12. package/dist/src/components/Flex/Flex.d.ts +25 -2
  13. package/dist/src/components/Group/Group.d.ts +10 -2
  14. package/dist/src/components/Link/Link.d.ts +13 -2
  15. package/dist/src/components/Stack/Stack.d.ts +8 -2
  16. package/dist/src/components/Text/Text.d.ts +18 -2
  17. package/dist/src/components/Title/Title.d.ts +17 -2
  18. package/dist/src/components/Typography/Typography.d.ts +27 -0
  19. package/dist/src/utils/filterStylingProps.d.ts +3 -0
  20. package/package.json +5 -3
  21. package/src/Introduction.stories.tsx +183 -0
  22. package/src/{OverStyling.stories.tsx → OverStyling.tsx} +19 -34
  23. package/src/Version.tsx +37 -0
  24. package/src/components/Accordion/Accordion.stories.tsx +19 -0
  25. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +19 -0
  26. package/src/components/Avatar/Avatar.stories.tsx +19 -0
  27. package/src/components/Badge/Badge.stories.tsx +19 -0
  28. package/src/components/Box/Box.stories.tsx +19 -10
  29. package/src/components/Box/Box.tsx +11 -14
  30. package/src/components/Box/IMPLEMENTATION_NOTES.md +5 -0
  31. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +19 -0
  32. package/src/components/Button/BUTTON_IMPLEMENTATION_NOTES.md +17 -0
  33. package/src/components/Button/Button.module.css +300 -0
  34. package/src/components/Button/Button.stories.tsx +136 -5
  35. package/src/components/Button/Button.tsx +116 -5
  36. package/src/components/Card/Card.stories.tsx +19 -0
  37. package/src/components/Checkbox/Checkbox.stories.tsx +19 -0
  38. package/src/components/Chip/Chip.stories.tsx +19 -0
  39. package/src/components/Container/Container.stories.tsx +19 -0
  40. package/src/components/Container/Container.tsx +56 -5
  41. package/src/components/Container/IMPLEMENTATION_NOTES.md +5 -0
  42. package/src/components/DatePicker/DatePicker.stories.tsx +19 -0
  43. package/src/components/Dropdown/Dropdown.stories.tsx +19 -0
  44. package/src/components/FileInput/FileInput.stories.tsx +19 -0
  45. package/src/components/FileUpload/FileUpload.stories.tsx +19 -0
  46. package/src/components/Flex/Flex.stories.tsx +19 -0
  47. package/src/components/Flex/Flex.tsx +77 -5
  48. package/src/components/FormControlLayout/FormControlLayout.stories.tsx +19 -0
  49. package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +19 -0
  50. package/src/components/Group/Group.stories.tsx +133 -5
  51. package/src/components/Group/Group.tsx +57 -5
  52. package/src/components/HoverCard/HoverCard.stories.tsx +19 -0
  53. package/src/components/Label/Label.stories.tsx +19 -0
  54. package/src/components/Link/Link.module.css +133 -0
  55. package/src/components/Link/Link.stories.tsx +52 -4
  56. package/src/components/Link/Link.tsx +47 -5
  57. package/src/components/Loader/Loader.stories.tsx +19 -0
  58. package/src/components/Menu/Menu.stories.tsx +19 -0
  59. package/src/components/Modal/Modal.stories.tsx +19 -0
  60. package/src/components/NumberInput/NumberInput.stories.tsx +19 -0
  61. package/src/components/Pagination/Pagination.stories.tsx +19 -0
  62. package/src/components/Panel/Panel.stories.tsx +19 -0
  63. package/src/components/Radio/Radio.stories.tsx +19 -0
  64. package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +19 -0
  65. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +19 -0
  66. package/src/components/Slider/Slider.stories.tsx +19 -0
  67. package/src/components/Stack/Stack.stories.tsx +118 -5
  68. package/src/components/Stack/Stack.tsx +37 -5
  69. package/src/components/Stepper/Stepper.stories.tsx +19 -0
  70. package/src/components/Switch/Switch.stories.tsx +19 -0
  71. package/src/components/Table/Table.stories.tsx +19 -0
  72. package/src/components/Tabs/Tabs.stories.tsx +19 -0
  73. package/src/components/Text/Text.stories.tsx +87 -3
  74. package/src/components/Text/Text.tsx +27 -4
  75. package/src/components/TextArea/TextArea.stories.tsx +19 -0
  76. package/src/components/TextField/TextField.stories.tsx +19 -0
  77. package/src/components/TimePicker/TimePicker.stories.tsx +19 -0
  78. package/src/components/Timeline/Timeline.stories.tsx +19 -0
  79. package/src/components/Title/Title.stories.tsx +68 -3
  80. package/src/components/Title/Title.tsx +29 -5
  81. package/src/components/Toast/Toast.stories.tsx +19 -0
  82. package/src/components/Tooltip/Tooltip.stories.tsx +19 -0
  83. package/src/components/TransferList/TransferList.stories.tsx +19 -0
  84. package/src/components/Typography/Typography.tsx +42 -0
  85. package/src/utils/ColorSchemeWrapper.tsx +1 -5
  86. package/src/utils/filterStylingProps.ts +13 -1
  87. package/src/Version.stories.tsx +0 -56
@@ -1,3 +1,9 @@
1
1
  import { default as React } from 'react';
2
- export type ContainerProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Container: React.FC<ContainerProps>;
2
+ import { ContainerProps as MUIContainerProps } from '@mui/material';
3
+ import { RecursicaSpacing } from '../../utils/filterStylingProps';
4
+ export interface RecursicaContainerProps {
5
+ children?: React.ReactNode;
6
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | RecursicaSpacing | (string & {}) | number;
7
+ }
8
+ export type ContainerProps = Omit<MUIContainerProps, "maxWidth"> & RecursicaContainerProps;
9
+ export declare const Container: React.ForwardRefExoticComponent<Omit<ContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,26 @@
1
1
  import { default as React } from 'react';
2
- export type FlexProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Flex: React.FC<FlexProps>;
2
+ import { BoxProps as MUIBoxProps } from '@mui/material';
3
+ import { RecursicaSpacing, OmitSx } from '../../utils/filterStylingProps';
4
+ export interface RecursicaFlexProps {
5
+ /**
6
+ * Content to render inside the flex container.
7
+ */
8
+ children?: React.ReactNode;
9
+ /**
10
+ * The gap between flex items. Accepts standard MUI spacing or Recursica gap tokens
11
+ * (e.g. "rec-md").
12
+ */
13
+ gap?: string | number | RecursicaSpacing;
14
+ /**
15
+ * The vertical gap between flex items when wrapping. Accepts standard MUI spacing
16
+ * or Recursica gap tokens.
17
+ */
18
+ rowGap?: string | number | RecursicaSpacing;
19
+ /**
20
+ * The horizontal gap between flex items when wrapping. Accepts standard MUI spacing
21
+ * or Recursica gap tokens.
22
+ */
23
+ columnGap?: string | number | RecursicaSpacing;
24
+ }
25
+ export type FlexProps = OmitSx<MUIBoxProps & RecursicaFlexProps>;
26
+ export declare const Flex: React.ForwardRefExoticComponent<Omit<FlexProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,11 @@
1
1
  import { default as React } from 'react';
2
- export type GroupProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Group: React.FC<GroupProps>;
2
+ import { StackProps as MUIStackProps } from '@mui/material';
3
+ import { RecursicaSpacing, OmitSx } from '../../utils/filterStylingProps';
4
+ export interface RecursicaGroupProps {
5
+ children?: React.ReactNode;
6
+ gap?: MUIStackProps["spacing"] | RecursicaSpacing;
7
+ rowGap?: MUIStackProps["spacing"] | RecursicaSpacing;
8
+ columnGap?: MUIStackProps["spacing"] | RecursicaSpacing;
9
+ }
10
+ export type GroupProps = OmitSx<Omit<MUIStackProps, "spacing" | "direction"> & RecursicaGroupProps>;
11
+ export declare const Group: React.ForwardRefExoticComponent<Omit<GroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,14 @@
1
1
  import { default as React } from 'react';
2
- export type LinkProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Link: React.FC<LinkProps>;
2
+ import { LinkProps as MUILinkProps } from '@mui/material';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ export interface RecursicaLinkProps {
5
+ icon?: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ component?: React.ElementType;
8
+ }
9
+ export type LinkProps = RecursicaOverStyled<Omit<MUILinkProps, "underline"> & RecursicaLinkProps>;
10
+ export declare const Link: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MUILinkProps, "underline"> & RecursicaLinkProps, "style" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "backgroundColor" | "sx"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
11
+ overStyled?: false | undefined;
12
+ }, "ref"> | Omit<Omit<MUILinkProps, "underline"> & RecursicaLinkProps & {
13
+ overStyled: true;
14
+ }, "ref">) & React.RefAttributes<HTMLAnchorElement>>;
@@ -1,3 +1,9 @@
1
1
  import { default as React } from 'react';
2
- export type StackProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Stack: React.FC<StackProps>;
2
+ import { StackProps as MUIStackProps } from '@mui/material';
3
+ import { RecursicaSpacing, OmitSx } from '../../utils/filterStylingProps';
4
+ export interface RecursicaStackProps {
5
+ children?: React.ReactNode;
6
+ gap?: MUIStackProps["spacing"] | RecursicaSpacing;
7
+ }
8
+ export type StackProps = OmitSx<Omit<MUIStackProps, "spacing"> & RecursicaStackProps>;
9
+ export declare const Stack: React.ForwardRefExoticComponent<Omit<StackProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,19 @@
1
1
  import { default as React } from 'react';
2
- export type TextProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Text: React.FC<TextProps>;
2
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
3
+ import { TypographyProps as MuiTypographyProps } from '@mui/material';
4
+ export type TextVariant = "body" | "body-small" | "caption" | "overline" | "subtitle" | "subtitle-small";
5
+ export type RecursicaTextProps = Omit<MuiTypographyProps, "variant"> & {
6
+ variant?: TextVariant;
7
+ children?: React.ReactNode;
8
+ component?: React.ElementType;
9
+ };
10
+ export type TextProps = RecursicaOverStyled<RecursicaTextProps>;
11
+ export declare const Text: React.ForwardRefExoticComponent<(Omit<Omit<RecursicaTextProps, "style" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "backgroundColor" | "sx"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
12
+ overStyled?: false | undefined;
13
+ }, "ref"> | Omit<Omit<MuiTypographyProps, "variant"> & {
14
+ variant?: TextVariant;
15
+ children?: React.ReactNode;
16
+ component?: React.ElementType;
17
+ } & {
18
+ overStyled: true;
19
+ }, "ref">) & React.RefAttributes<HTMLElement>>;
@@ -1,3 +1,18 @@
1
1
  import { default as React } from 'react';
2
- export type TitleProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Title: React.FC<TitleProps>;
2
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
3
+ import { TypographyProps as MuiTypographyProps } from '@mui/material';
4
+ export type RecursicaTitleProps = Omit<MuiTypographyProps, "variant"> & {
5
+ order?: 1 | 2 | 3 | 4 | 5 | 6;
6
+ children?: React.ReactNode;
7
+ component?: React.ElementType;
8
+ };
9
+ export type TitleProps = RecursicaOverStyled<RecursicaTitleProps>;
10
+ export declare const Title: React.ForwardRefExoticComponent<(Omit<Omit<RecursicaTitleProps, "style" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "backgroundColor" | "sx"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
11
+ overStyled?: false | undefined;
12
+ }, "ref"> | Omit<Omit<MuiTypographyProps, "variant"> & {
13
+ order?: 1 | 2 | 3 | 4 | 5 | 6;
14
+ children?: React.ReactNode;
15
+ component?: React.ElementType;
16
+ } & {
17
+ overStyled: true;
18
+ }, "ref">) & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { TypographyProps as MuiTypographyProps } from '@mui/material';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ export type TypographyProps = RecursicaOverStyled<Omit<MuiTypographyProps, "variant"> & {
5
+ /**
6
+ * Internal typography class mapping
7
+ */
8
+ typographyClass: string;
9
+ component?: React.ElementType;
10
+ }>;
11
+ export declare const Typography: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiTypographyProps, "variant"> & {
12
+ /**
13
+ * Internal typography class mapping
14
+ */
15
+ typographyClass: string;
16
+ component?: React.ElementType;
17
+ }, "style" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "backgroundColor" | "sx"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
18
+ overStyled?: false | undefined;
19
+ }, "ref"> | Omit<Omit<MuiTypographyProps, "variant"> & {
20
+ /**
21
+ * Internal typography class mapping
22
+ */
23
+ typographyClass: string;
24
+ component?: React.ElementType;
25
+ } & {
26
+ overStyled: true;
27
+ }, "ref">) & React.RefAttributes<HTMLElement>>;
@@ -25,9 +25,12 @@ export declare const BLOCKED_STYLING_KEYS: readonly ["className", "classes", "st
25
25
  export type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];
26
26
  export type RecursicaSpacing = "rec-none" | "rec-sm" | "rec-default" | "rec-md" | "rec-lg" | "rec-xl" | "rec-2xl";
27
27
  export type RecursicaSize = "small" | "default" | "large";
28
+ export declare const SPACING_MAP: Record<string, string>;
28
29
  export type ForbiddenStyles = {
29
30
  [K in BlockedStylingKeys]?: never;
30
31
  };
32
+ export type OmitSx<T> = Omit<T, "sx">;
33
+ export declare function filterSxProp<T extends Record<string, unknown>>(props: T): Omit<T, "sx">;
31
34
  export type RecursicaOverStyled<T> = (Omit<T, BlockedStylingKeys> & ForbiddenStyles & {
32
35
  overStyled?: false | undefined;
33
36
  }) | (T & {
package/package.json CHANGED
@@ -4,14 +4,16 @@
4
4
  "private": false,
5
5
  "homepage": "https://github.com/borderux/recursica/tree/main/packages/mui-adapter",
6
6
  "author": "hi@borderux.com",
7
+ "license": "MIT",
7
8
  "bugs": {
8
9
  "url": "https://github.com/borderux/recursica/issues"
9
10
  },
10
11
  "repository": {
11
12
  "type": "git",
12
- "url": "git+https://github.com/borderux/recursica.git"
13
+ "url": "git+https://github.com/borderux/recursica.git",
14
+ "directory": "packages/mui-adapter"
13
15
  },
14
- "version": "0.1.0",
16
+ "version": "0.3.0",
15
17
  "publishConfig": {
16
18
  "access": "public"
17
19
  },
@@ -61,7 +63,6 @@
61
63
  "@storybook/addon-a11y": "^10.3.3",
62
64
  "@storybook/addon-docs": "^10.3.3",
63
65
  "@storybook/addon-mcp": "^0.4.2",
64
- "@storybook/addon-onboarding": "^10.3.3",
65
66
  "@storybook/addon-vitest": "^10.3.3",
66
67
  "@storybook/react-vite": "^10.3.3",
67
68
  "@types/react": "^19.1.2",
@@ -81,6 +82,7 @@
81
82
  "storybook": "^10.3.3",
82
83
  "storybook-dark-mode": "^5.0.0",
83
84
  "strip-literal": "^3.0.0",
85
+ "ts-morph": "^28.0.0",
84
86
  "typescript": "~5.8.3",
85
87
  "typescript-eslint": "^8.30.1",
86
88
  "vite": "^6.3.5",
@@ -0,0 +1,183 @@
1
+ import type { Meta } from "@storybook/react-vite";
2
+ import { AdaptersContent, MuiLogo } from "@recursica/storybook-template";
3
+ import { VersionInfo } from "./Version";
4
+ import { OverStylingInfo } from "./OverStyling";
5
+
6
+ const DOCS_URL = "https://recursica.com";
7
+ const FORGE_URL = "https://forge.recursica.com";
8
+
9
+ import { Container, Box, Group, Title, Text, Link } from "./components";
10
+
11
+ function IntroductionContent() {
12
+ return (
13
+ <Container size="md" style={{ padding: "32px 0", maxWidth: 640 }}>
14
+ <Group gap="rec-md" mb={2}>
15
+ <MuiLogo width={40} height={40} />
16
+ <Box>
17
+ <Title order={1} m={0}>
18
+ Recursica Design System (MUI Adapter)
19
+ </Title>
20
+ <Link href="https://mui.com" target="_blank" rel="noreferrer">
21
+ mui.com
22
+ </Link>
23
+ </Box>
24
+ </Group>
25
+ <Text mb={4}>
26
+ This Storybook showcases the Recursica design system implemented for the{" "}
27
+ <strong>Material UI (MUI) Kit</strong>. It provides reusable components
28
+ that map our design tokens to MUI's robust component layer.
29
+ </Text>
30
+
31
+ <Box component="section" sx={{ mb: 4 }}>
32
+ <Title order={2} mb={1}>
33
+ Looking for another UI Kit?
34
+ </Title>
35
+ <Text>
36
+ Are you using a different UI Kit (like Mantine)? Recursica provides
37
+ multiple adapters for different frameworks.
38
+ </Text>
39
+ <Box sx={{ mt: 2 }}>
40
+ <a
41
+ href="./?path=/story/introduction--adapters"
42
+ target="_parent"
43
+ className="adapter-btn"
44
+ style={{
45
+ display: "inline-flex",
46
+ alignItems: "center",
47
+ justifyContent: "center",
48
+ backgroundColor:
49
+ "var(--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_background)",
50
+ color:
51
+ "var(--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_text)",
52
+ textDecoration: "none",
53
+ borderRadius:
54
+ "var(--recursica_ui-kit_components_button_variants_sizes_default_properties_border-radius)",
55
+ height:
56
+ "var(--recursica_ui-kit_components_button_variants_sizes_default_properties_height)",
57
+ padding:
58
+ "0 var(--recursica_ui-kit_components_button_variants_sizes_default_properties_horizontal-padding)",
59
+ fontFamily:
60
+ "var(--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-family)",
61
+ fontSize:
62
+ "var(--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-size)",
63
+ fontWeight:
64
+ "var(--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-weight)",
65
+ boxShadow:
66
+ "var(--recursica_ui-kit_components_button_variants_styles_solid_properties_elevation)",
67
+ border:
68
+ "var(--recursica_ui-kit_components_button_variants_styles_solid_properties_border-size) solid var(--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_border-color)",
69
+ transition: "opacity 0.2s ease",
70
+ }}
71
+ onMouseOver={(e) => {
72
+ e.currentTarget.style.opacity = "0.85";
73
+ e.currentTarget.style.color =
74
+ "var(--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_text-hover)";
75
+ }}
76
+ onMouseOut={(e) => {
77
+ e.currentTarget.style.opacity = "1";
78
+ e.currentTarget.style.color =
79
+ "var(--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_text)";
80
+ }}
81
+ >
82
+ View Supported Adapters
83
+ </a>
84
+ </Box>
85
+ </Box>
86
+
87
+ <Box component="section" sx={{ mb: 4 }}>
88
+ <Title order={2} mb={1}>
89
+ Installation
90
+ </Title>
91
+ <Text>To install the MUI adapter in your project, run:</Text>
92
+ <Box
93
+ component="pre"
94
+ sx={{
95
+ p: 1.5,
96
+ bgcolor: "grey.100",
97
+ borderRadius: 1,
98
+ fontSize: 13,
99
+ mt: 1,
100
+ }}
101
+ >
102
+ <code>
103
+ npm install @recursica/mui-adapter @mui/material @emotion/react
104
+ @emotion/styled
105
+ </code>
106
+ </Box>
107
+ </Box>
108
+
109
+ <Box component="section" sx={{ mb: 4 }}>
110
+ <Title order={2} mb={1}>
111
+ Tokens
112
+ </Title>
113
+ <Text>
114
+ Raw design tokens (colors, sizes, font weights, opacities, etc.) that
115
+ feed the theme and components. These are the primitive values defined
116
+ in your token set and exposed as CSS custom properties.
117
+ </Text>
118
+ </Box>
119
+
120
+ <Box component="section" sx={{ mb: 4 }}>
121
+ <Title order={2} mb={1}>
122
+ Theme
123
+ </Title>
124
+ <Text>
125
+ Brand and theme layer built on top of tokens. Typography types,
126
+ dimensions, and layout grids are defined here. Theme uses the tokens
127
+ and exposes both CSS variables and helper classes (e.g. typography
128
+ classes) for consistent styling across the product.
129
+ </Text>
130
+ </Box>
131
+
132
+ <Box component="section" sx={{ mb: 4 }}>
133
+ <Title order={2} mb={1}>
134
+ Configuring Recursica
135
+ </Title>
136
+ <Text>
137
+ To modify the Recursica configuration (tokens, brand, theme), go to{" "}
138
+ <Link href={FORGE_URL} target="_blank" rel="noopener noreferrer">
139
+ {FORGE_URL}
140
+ </Link>
141
+ . Changes there drive the tokens and theme you see in this Storybook.
142
+ </Text>
143
+ </Box>
144
+
145
+ <Box component="section" sx={{ mb: 4 }}>
146
+ <Title order={2} mb={1}>
147
+ Documentation
148
+ </Title>
149
+ <Text>
150
+ For full documentation, guides, and API reference, visit{" "}
151
+ <Link href={DOCS_URL} target="_blank" rel="noopener noreferrer">
152
+ {DOCS_URL}
153
+ </Link>
154
+ .
155
+ </Text>
156
+ </Box>
157
+ </Container>
158
+ );
159
+ }
160
+
161
+ const meta = {
162
+ title: "Introduction",
163
+ } satisfies Meta;
164
+
165
+ export default meta;
166
+
167
+ export const Welcome = {
168
+ render: () => <IntroductionContent />,
169
+ };
170
+
171
+ export const Adapters = {
172
+ render: () => <AdaptersContent />,
173
+ };
174
+
175
+ export const OverStyling = {
176
+ name: "Over Styling",
177
+ render: () => <OverStylingInfo />,
178
+ };
179
+
180
+ export const VersionInfoStory = {
181
+ name: "Version Info",
182
+ render: () => <VersionInfo />,
183
+ };
@@ -1,21 +1,14 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import {
3
- Container,
4
- Paper,
5
- Typography as Text,
6
- Divider,
7
- Stack,
8
- Box,
9
- } from "@mui/material";
1
+ import { Paper, Divider } from "@mui/material";
2
+ import { Container, Stack, Box, Text, Title } from "./components";
10
3
  import { Button } from "./components/Button/Button";
11
4
 
12
- const OverStylingInfo = () => {
5
+ export const OverStylingInfo = () => {
13
6
  return (
14
- <Container maxWidth="md" sx={{ py: 4 }}>
7
+ <Container size="md" style={{ padding: "32px 0" }}>
15
8
  <Paper variant="outlined" sx={{ p: 4, borderRadius: 2 }}>
16
- <Text variant="h4" mb={2}>
9
+ <Title order={4} mb={2}>
17
10
  Over Styling (<code>overStyled</code>)
18
- </Text>
11
+ </Title>
19
12
  <Text mb={2}>
20
13
  By default, all Recursica components are strictly sandboxed. This
21
14
  means they are protected against arbitrary styling configurations
@@ -32,9 +25,9 @@ const OverStylingInfo = () => {
32
25
  <code>overStyled={`{true}`}</code>.
33
26
  </Text>
34
27
 
35
- <Text variant="h6" mb={1} mt={4}>
28
+ <Title order={6} mb={1} mt={4}>
36
29
  The Core Philosophy
37
- </Text>
30
+ </Title>
38
31
  <Text mb={1}>
39
32
  **You should not over-style components.** Using{" "}
40
33
  <code>overStyled</code> explicitly signifies that you are breaking
@@ -78,9 +71,9 @@ const OverStylingInfo = () => {
78
71
 
79
72
  <Divider sx={{ mb: 4 }} />
80
73
 
81
- <Text variant="h6" mb={1}>
74
+ <Title order={6} mb={1}>
82
75
  Permitted Layout Properties
83
- </Text>
76
+ </Title>
84
77
  <Text mb={1}>
85
78
  Unlike deep styling bounds (colors, typography, padding, dimensions),
86
79
  external <strong>layout spacing properties</strong> like Margins (
@@ -114,7 +107,7 @@ const OverStylingInfo = () => {
114
107
  </Text>
115
108
  </li>
116
109
  </Box>
117
- <Text mb={1} sx={{ fontWeight: 500 }}>
110
+ <Text mb={1} overStyled sx={{ fontWeight: 500 }}>
118
111
  Available Recursica Layout Tokens:
119
112
  </Text>
120
113
  <Box component="ul" sx={{ pl: 4, mb: 4 }}>
@@ -157,9 +150,9 @@ const OverStylingInfo = () => {
157
150
 
158
151
  <Divider sx={{ mb: 4 }} />
159
152
 
160
- <Text variant="h6" mb={1}>
153
+ <Title order={6} mb={1}>
161
154
  Primitive Layout Components Exemption
162
- </Text>
155
+ </Title>
163
156
  <Text mb={1}>
164
157
  Unlike complex UI components (Buttons, Tabs, Inputs) which are
165
158
  strictly protected, <strong>Primitive Layout Components</strong> (
@@ -179,9 +172,9 @@ const OverStylingInfo = () => {
179
172
 
180
173
  <Divider sx={{ mb: 4 }} />
181
174
 
182
- <Text variant="h6" mb={2}>
175
+ <Title order={6} mb={2}>
183
176
  Live Example
184
- </Text>
177
+ </Title>
185
178
  <Text mb={4}>
186
179
  Below is a side-by-side comparison. The first is a standard Recursica
187
180
  Button protected by the design tokens mapping. The second flagrantly
@@ -189,26 +182,27 @@ const OverStylingInfo = () => {
189
182
  styling generics to punch right through the sandbox layout.
190
183
  </Text>
191
184
 
192
- <Stack direction="row" spacing={4}>
185
+ <Stack direction="row" gap="rec-default">
193
186
  <Box>
194
187
  <Text
195
188
  variant="caption"
189
+ overStyled
196
190
  sx={{ color: "text.secondary", mb: 1, display: "block" }}
197
191
  >
198
192
  Strict Baseline (Default)
199
193
  </Text>
200
- {/* Note: In mui-adapter, Button is currently a stub so we just pass standard React props */}
201
194
  <Button>Standard UI Kit Button</Button>
202
195
  </Box>
203
196
  <Box>
204
197
  <Text
205
198
  variant="caption"
199
+ overStyled
206
200
  sx={{ color: "text.secondary", mb: 1, display: "block" }}
207
201
  >
208
202
  overStyled={`{true}`}
209
203
  </Text>
210
- {/* Note: Button props are just standard HTML div props for the stub */}
211
204
  <Button
205
+ overStyled={true}
212
206
  style={{
213
207
  backgroundColor: "pink",
214
208
  color: "black",
@@ -224,12 +218,3 @@ const OverStylingInfo = () => {
224
218
  </Container>
225
219
  );
226
220
  };
227
-
228
- const meta: Meta<typeof OverStylingInfo> = {
229
- title: "Introduction/Over Styling",
230
- component: OverStylingInfo,
231
- };
232
-
233
- export default meta;
234
-
235
- export const Default: StoryObj<typeof OverStylingInfo> = {};
@@ -0,0 +1,37 @@
1
+ import ReactMarkdown from "react-markdown";
2
+ import { Paper, Divider } from "@mui/material";
3
+ import { Container, Title, Group, Link, Box } from "./components";
4
+ import pkg from "../package.json";
5
+ import changelog from "../CHANGELOG.md?raw";
6
+
7
+ export const VersionInfo = () => {
8
+ return (
9
+ <Container size="md" style={{ padding: "32px 0" }}>
10
+ <Paper variant="outlined" sx={{ p: 4, borderRadius: 2 }}>
11
+ <Title order={1} mb={1}>
12
+ MUI Adapter v{pkg.version}
13
+ </Title>
14
+ <Group mb={4} gap="rec-md">
15
+ <Link
16
+ href="https://github.com/borderux/recursica"
17
+ target="_blank"
18
+ rel="noopener noreferrer"
19
+ >
20
+ GitHub Repository
21
+ </Link>
22
+ <Link
23
+ href="https://recursica.com"
24
+ target="_blank"
25
+ rel="noopener noreferrer"
26
+ >
27
+ Documentation & Website
28
+ </Link>
29
+ </Group>
30
+ <Divider sx={{ mb: 4 }} />
31
+ <Box className="markdown-body">
32
+ <ReactMarkdown>{changelog}</ReactMarkdown>
33
+ </Box>
34
+ </Paper>
35
+ </Container>
36
+ );
37
+ };
@@ -6,6 +6,25 @@ const meta: Meta<typeof Accordion> = {
6
6
  title: "UI-Kit/🚧 Accordion",
7
7
  component: Accordion,
8
8
  tags: ["autodocs"],
9
+ parameters: {
10
+ controls: {
11
+ include: [
12
+ "layer",
13
+ "withLayer",
14
+ "children",
15
+ "component",
16
+ "variant",
17
+ "size",
18
+ "icon",
19
+ "disabled",
20
+ "href",
21
+ "onClick",
22
+ "onChange",
23
+ "value",
24
+ "checked",
25
+ ],
26
+ },
27
+ },
9
28
  };
10
29
 
11
30
  export default meta;
@@ -6,6 +6,25 @@ const meta: Meta<typeof AssistiveElement> = {
6
6
  title: "UI-Kit/🚧 AssistiveElement",
7
7
  component: AssistiveElement,
8
8
  tags: ["autodocs"],
9
+ parameters: {
10
+ controls: {
11
+ include: [
12
+ "layer",
13
+ "withLayer",
14
+ "children",
15
+ "component",
16
+ "variant",
17
+ "size",
18
+ "icon",
19
+ "disabled",
20
+ "href",
21
+ "onClick",
22
+ "onChange",
23
+ "value",
24
+ "checked",
25
+ ],
26
+ },
27
+ },
9
28
  };
10
29
 
11
30
  export default meta;
@@ -6,6 +6,25 @@ const meta: Meta<typeof Avatar> = {
6
6
  title: "UI-Kit/🚧 Avatar",
7
7
  component: Avatar,
8
8
  tags: ["autodocs"],
9
+ parameters: {
10
+ controls: {
11
+ include: [
12
+ "layer",
13
+ "withLayer",
14
+ "children",
15
+ "component",
16
+ "variant",
17
+ "size",
18
+ "icon",
19
+ "disabled",
20
+ "href",
21
+ "onClick",
22
+ "onChange",
23
+ "value",
24
+ "checked",
25
+ ],
26
+ },
27
+ },
9
28
  };
10
29
 
11
30
  export default meta;