@recursica/mui-adapter 0.1.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 (265) hide show
  1. package/.storybook/commonArgTypes.ts +148 -0
  2. package/CHANGELOG.md +13 -0
  3. package/LICENSE +21 -0
  4. package/README.md +70 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/mui-adapter.cjs +2 -0
  7. package/dist/mui-adapter.cjs.map +1 -0
  8. package/dist/mui-adapter.css +1 -0
  9. package/dist/mui-adapter.js +164 -0
  10. package/dist/mui-adapter.js.map +1 -0
  11. package/dist/src/components/Accordion/Accordion.d.ts +3 -0
  12. package/dist/src/components/Accordion/index.d.ts +1 -0
  13. package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +3 -0
  14. package/dist/src/components/AssistiveElement/index.d.ts +1 -0
  15. package/dist/src/components/Avatar/Avatar.d.ts +3 -0
  16. package/dist/src/components/Avatar/index.d.ts +1 -0
  17. package/dist/src/components/Badge/Badge.d.ts +3 -0
  18. package/dist/src/components/Badge/index.d.ts +1 -0
  19. package/dist/src/components/Box/Box.d.ts +9 -0
  20. package/dist/src/components/Box/index.d.ts +1 -0
  21. package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +3 -0
  22. package/dist/src/components/Breadcrumb/index.d.ts +1 -0
  23. package/dist/src/components/Button/Button.d.ts +3 -0
  24. package/dist/src/components/Button/index.d.ts +1 -0
  25. package/dist/src/components/Card/Card.d.ts +3 -0
  26. package/dist/src/components/Card/index.d.ts +1 -0
  27. package/dist/src/components/Checkbox/Checkbox.d.ts +3 -0
  28. package/dist/src/components/Checkbox/index.d.ts +1 -0
  29. package/dist/src/components/Chip/Chip.d.ts +3 -0
  30. package/dist/src/components/Chip/index.d.ts +1 -0
  31. package/dist/src/components/Container/Container.d.ts +3 -0
  32. package/dist/src/components/Container/index.d.ts +1 -0
  33. package/dist/src/components/DatePicker/DatePicker.d.ts +3 -0
  34. package/dist/src/components/DatePicker/index.d.ts +1 -0
  35. package/dist/src/components/Dropdown/Dropdown.d.ts +3 -0
  36. package/dist/src/components/Dropdown/index.d.ts +1 -0
  37. package/dist/src/components/FileInput/FileInput.d.ts +3 -0
  38. package/dist/src/components/FileInput/index.d.ts +1 -0
  39. package/dist/src/components/FileUpload/FileUpload.d.ts +3 -0
  40. package/dist/src/components/FileUpload/index.d.ts +1 -0
  41. package/dist/src/components/Flex/Flex.d.ts +3 -0
  42. package/dist/src/components/Flex/index.d.ts +1 -0
  43. package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +3 -0
  44. package/dist/src/components/FormControlLayout/index.d.ts +1 -0
  45. package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +3 -0
  46. package/dist/src/components/FormControlWrapper/index.d.ts +1 -0
  47. package/dist/src/components/Group/Group.d.ts +3 -0
  48. package/dist/src/components/Group/index.d.ts +1 -0
  49. package/dist/src/components/HoverCard/HoverCard.d.ts +3 -0
  50. package/dist/src/components/HoverCard/index.d.ts +1 -0
  51. package/dist/src/components/Label/Label.d.ts +3 -0
  52. package/dist/src/components/Label/index.d.ts +1 -0
  53. package/dist/src/components/Link/Link.d.ts +3 -0
  54. package/dist/src/components/Link/index.d.ts +1 -0
  55. package/dist/src/components/Loader/Loader.d.ts +3 -0
  56. package/dist/src/components/Loader/index.d.ts +1 -0
  57. package/dist/src/components/Menu/Menu.d.ts +3 -0
  58. package/dist/src/components/Menu/index.d.ts +1 -0
  59. package/dist/src/components/Modal/Modal.d.ts +3 -0
  60. package/dist/src/components/Modal/index.d.ts +1 -0
  61. package/dist/src/components/NumberInput/NumberInput.d.ts +3 -0
  62. package/dist/src/components/NumberInput/index.d.ts +1 -0
  63. package/dist/src/components/Pagination/Pagination.d.ts +3 -0
  64. package/dist/src/components/Pagination/index.d.ts +1 -0
  65. package/dist/src/components/Panel/Panel.d.ts +3 -0
  66. package/dist/src/components/Panel/index.d.ts +1 -0
  67. package/dist/src/components/Radio/Radio.d.ts +3 -0
  68. package/dist/src/components/Radio/index.d.ts +1 -0
  69. package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +3 -0
  70. package/dist/src/components/ReadOnlyField/index.d.ts +1 -0
  71. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +3 -0
  72. package/dist/src/components/SegmentedControl/index.d.ts +1 -0
  73. package/dist/src/components/Slider/Slider.d.ts +3 -0
  74. package/dist/src/components/Slider/index.d.ts +1 -0
  75. package/dist/src/components/Stack/Stack.d.ts +3 -0
  76. package/dist/src/components/Stack/index.d.ts +1 -0
  77. package/dist/src/components/Stepper/Stepper.d.ts +3 -0
  78. package/dist/src/components/Stepper/index.d.ts +1 -0
  79. package/dist/src/components/Switch/Switch.d.ts +3 -0
  80. package/dist/src/components/Switch/index.d.ts +1 -0
  81. package/dist/src/components/Table/Table.d.ts +3 -0
  82. package/dist/src/components/Table/index.d.ts +1 -0
  83. package/dist/src/components/Tabs/Tabs.d.ts +3 -0
  84. package/dist/src/components/Tabs/index.d.ts +1 -0
  85. package/dist/src/components/Text/Text.d.ts +3 -0
  86. package/dist/src/components/Text/index.d.ts +1 -0
  87. package/dist/src/components/TextArea/TextArea.d.ts +3 -0
  88. package/dist/src/components/TextArea/index.d.ts +1 -0
  89. package/dist/src/components/TextField/TextField.d.ts +3 -0
  90. package/dist/src/components/TextField/index.d.ts +1 -0
  91. package/dist/src/components/TimePicker/TimePicker.d.ts +3 -0
  92. package/dist/src/components/TimePicker/index.d.ts +1 -0
  93. package/dist/src/components/Timeline/Timeline.d.ts +3 -0
  94. package/dist/src/components/Timeline/index.d.ts +1 -0
  95. package/dist/src/components/Title/Title.d.ts +3 -0
  96. package/dist/src/components/Title/index.d.ts +1 -0
  97. package/dist/src/components/Toast/Toast.d.ts +3 -0
  98. package/dist/src/components/Toast/index.d.ts +1 -0
  99. package/dist/src/components/Tooltip/Tooltip.d.ts +3 -0
  100. package/dist/src/components/Tooltip/index.d.ts +1 -0
  101. package/dist/src/components/TransferList/TransferList.d.ts +3 -0
  102. package/dist/src/components/TransferList/index.d.ts +1 -0
  103. package/dist/src/components/index.d.ts +46 -0
  104. package/dist/src/index.d.ts +2 -0
  105. package/dist/src/types/index.d.ts +6 -0
  106. package/dist/src/utils/ColorSchemeWrapper.d.ts +3 -0
  107. package/dist/src/utils/RequireAccessibleLabel.d.ts +18 -0
  108. package/dist/src/utils/copyToClipboard.d.ts +8 -0
  109. package/dist/src/utils/filterStylingProps.d.ts +36 -0
  110. package/dist/src/utils/index.d.ts +1 -0
  111. package/dist/vite.config.d.ts +2 -0
  112. package/dist/vite.svg +1 -0
  113. package/dist/vitest.workspace.d.ts +2 -0
  114. package/package.json +98 -0
  115. package/src/OverStyling.stories.tsx +235 -0
  116. package/src/Version.stories.tsx +56 -0
  117. package/src/components/Accordion/Accordion.stories.tsx +16 -0
  118. package/src/components/Accordion/Accordion.tsx +7 -0
  119. package/src/components/Accordion/index.ts +1 -0
  120. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +16 -0
  121. package/src/components/AssistiveElement/AssistiveElement.tsx +7 -0
  122. package/src/components/AssistiveElement/index.ts +1 -0
  123. package/src/components/Avatar/Avatar.stories.tsx +16 -0
  124. package/src/components/Avatar/Avatar.tsx +7 -0
  125. package/src/components/Avatar/index.ts +1 -0
  126. package/src/components/Badge/Badge.stories.tsx +16 -0
  127. package/src/components/Badge/Badge.tsx +7 -0
  128. package/src/components/Badge/index.ts +1 -0
  129. package/src/components/Box/Box.stories.tsx +59 -0
  130. package/src/components/Box/Box.tsx +27 -0
  131. package/src/components/Box/index.ts +1 -0
  132. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +16 -0
  133. package/src/components/Breadcrumb/Breadcrumb.tsx +7 -0
  134. package/src/components/Breadcrumb/index.ts +1 -0
  135. package/src/components/Button/Button.stories.tsx +16 -0
  136. package/src/components/Button/Button.tsx +7 -0
  137. package/src/components/Button/index.ts +1 -0
  138. package/src/components/Card/Card.stories.tsx +16 -0
  139. package/src/components/Card/Card.tsx +7 -0
  140. package/src/components/Card/index.ts +1 -0
  141. package/src/components/Checkbox/Checkbox.stories.tsx +16 -0
  142. package/src/components/Checkbox/Checkbox.tsx +7 -0
  143. package/src/components/Checkbox/index.ts +1 -0
  144. package/src/components/Chip/Chip.stories.tsx +16 -0
  145. package/src/components/Chip/Chip.tsx +7 -0
  146. package/src/components/Chip/index.ts +1 -0
  147. package/src/components/Container/Container.stories.tsx +16 -0
  148. package/src/components/Container/Container.tsx +7 -0
  149. package/src/components/Container/index.ts +1 -0
  150. package/src/components/DatePicker/DatePicker.stories.tsx +16 -0
  151. package/src/components/DatePicker/DatePicker.tsx +7 -0
  152. package/src/components/DatePicker/index.ts +1 -0
  153. package/src/components/Dropdown/Dropdown.stories.tsx +16 -0
  154. package/src/components/Dropdown/Dropdown.tsx +7 -0
  155. package/src/components/Dropdown/index.ts +1 -0
  156. package/src/components/FileInput/FileInput.stories.tsx +16 -0
  157. package/src/components/FileInput/FileInput.tsx +7 -0
  158. package/src/components/FileInput/index.ts +1 -0
  159. package/src/components/FileUpload/FileUpload.stories.tsx +16 -0
  160. package/src/components/FileUpload/FileUpload.tsx +7 -0
  161. package/src/components/FileUpload/index.ts +1 -0
  162. package/src/components/Flex/Flex.stories.tsx +16 -0
  163. package/src/components/Flex/Flex.tsx +7 -0
  164. package/src/components/Flex/index.ts +1 -0
  165. package/src/components/FormControlLayout/FormControlLayout.stories.tsx +16 -0
  166. package/src/components/FormControlLayout/FormControlLayout.tsx +7 -0
  167. package/src/components/FormControlLayout/index.ts +1 -0
  168. package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +16 -0
  169. package/src/components/FormControlWrapper/FormControlWrapper.tsx +9 -0
  170. package/src/components/FormControlWrapper/index.ts +1 -0
  171. package/src/components/Group/Group.stories.tsx +16 -0
  172. package/src/components/Group/Group.tsx +7 -0
  173. package/src/components/Group/index.ts +1 -0
  174. package/src/components/HoverCard/HoverCard.stories.tsx +16 -0
  175. package/src/components/HoverCard/HoverCard.tsx +7 -0
  176. package/src/components/HoverCard/index.ts +1 -0
  177. package/src/components/Label/Label.stories.tsx +16 -0
  178. package/src/components/Label/Label.tsx +7 -0
  179. package/src/components/Label/index.ts +1 -0
  180. package/src/components/Link/Link.stories.tsx +16 -0
  181. package/src/components/Link/Link.tsx +7 -0
  182. package/src/components/Link/index.ts +1 -0
  183. package/src/components/Loader/Loader.stories.tsx +16 -0
  184. package/src/components/Loader/Loader.tsx +7 -0
  185. package/src/components/Loader/index.ts +1 -0
  186. package/src/components/Menu/Menu.stories.tsx +16 -0
  187. package/src/components/Menu/Menu.tsx +7 -0
  188. package/src/components/Menu/index.ts +1 -0
  189. package/src/components/Modal/Modal.stories.tsx +16 -0
  190. package/src/components/Modal/Modal.tsx +7 -0
  191. package/src/components/Modal/index.ts +1 -0
  192. package/src/components/NumberInput/NumberInput.stories.tsx +16 -0
  193. package/src/components/NumberInput/NumberInput.tsx +7 -0
  194. package/src/components/NumberInput/index.ts +1 -0
  195. package/src/components/Pagination/Pagination.stories.tsx +16 -0
  196. package/src/components/Pagination/Pagination.tsx +7 -0
  197. package/src/components/Pagination/index.ts +1 -0
  198. package/src/components/Panel/Panel.stories.tsx +16 -0
  199. package/src/components/Panel/Panel.tsx +7 -0
  200. package/src/components/Panel/index.ts +1 -0
  201. package/src/components/Radio/Radio.stories.tsx +16 -0
  202. package/src/components/Radio/Radio.tsx +7 -0
  203. package/src/components/Radio/index.ts +1 -0
  204. package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +16 -0
  205. package/src/components/ReadOnlyField/ReadOnlyField.tsx +7 -0
  206. package/src/components/ReadOnlyField/index.ts +1 -0
  207. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +16 -0
  208. package/src/components/SegmentedControl/SegmentedControl.tsx +7 -0
  209. package/src/components/SegmentedControl/index.ts +1 -0
  210. package/src/components/Slider/Slider.stories.tsx +16 -0
  211. package/src/components/Slider/Slider.tsx +7 -0
  212. package/src/components/Slider/index.ts +1 -0
  213. package/src/components/Stack/Stack.stories.tsx +16 -0
  214. package/src/components/Stack/Stack.tsx +7 -0
  215. package/src/components/Stack/index.ts +1 -0
  216. package/src/components/Stepper/Stepper.stories.tsx +16 -0
  217. package/src/components/Stepper/Stepper.tsx +7 -0
  218. package/src/components/Stepper/index.ts +1 -0
  219. package/src/components/Switch/Switch.stories.tsx +16 -0
  220. package/src/components/Switch/Switch.tsx +7 -0
  221. package/src/components/Switch/index.ts +1 -0
  222. package/src/components/Table/Table.stories.tsx +16 -0
  223. package/src/components/Table/Table.tsx +7 -0
  224. package/src/components/Table/index.ts +1 -0
  225. package/src/components/Tabs/Tabs.stories.tsx +16 -0
  226. package/src/components/Tabs/Tabs.tsx +7 -0
  227. package/src/components/Tabs/index.ts +1 -0
  228. package/src/components/Text/Text.stories.tsx +16 -0
  229. package/src/components/Text/Text.tsx +7 -0
  230. package/src/components/Text/index.ts +1 -0
  231. package/src/components/TextArea/TextArea.stories.tsx +16 -0
  232. package/src/components/TextArea/TextArea.tsx +7 -0
  233. package/src/components/TextArea/index.ts +1 -0
  234. package/src/components/TextField/TextField.stories.tsx +16 -0
  235. package/src/components/TextField/TextField.tsx +7 -0
  236. package/src/components/TextField/index.ts +1 -0
  237. package/src/components/TimePicker/TimePicker.stories.tsx +16 -0
  238. package/src/components/TimePicker/TimePicker.tsx +7 -0
  239. package/src/components/TimePicker/index.ts +1 -0
  240. package/src/components/Timeline/Timeline.stories.tsx +16 -0
  241. package/src/components/Timeline/Timeline.tsx +7 -0
  242. package/src/components/Timeline/index.ts +1 -0
  243. package/src/components/Title/Title.stories.tsx +16 -0
  244. package/src/components/Title/Title.tsx +7 -0
  245. package/src/components/Title/index.ts +1 -0
  246. package/src/components/Toast/Toast.stories.tsx +16 -0
  247. package/src/components/Toast/Toast.tsx +7 -0
  248. package/src/components/Toast/index.ts +1 -0
  249. package/src/components/Tooltip/Tooltip.stories.tsx +16 -0
  250. package/src/components/Tooltip/Tooltip.tsx +7 -0
  251. package/src/components/Tooltip/index.ts +1 -0
  252. package/src/components/TransferList/TransferList.stories.tsx +16 -0
  253. package/src/components/TransferList/TransferList.tsx +7 -0
  254. package/src/components/TransferList/index.ts +1 -0
  255. package/src/components/index.ts +46 -0
  256. package/src/env.d.ts +7 -0
  257. package/src/index.ts +3 -0
  258. package/src/types/index.ts +9 -0
  259. package/src/types/mantine.d.ts +7 -0
  260. package/src/types/scss-modules.d.ts +9 -0
  261. package/src/utils/ColorSchemeWrapper.tsx +27 -0
  262. package/src/utils/RequireAccessibleLabel.ts +12 -0
  263. package/src/utils/copyToClipboard.ts +36 -0
  264. package/src/utils/filterStylingProps.ts +139 -0
  265. package/src/utils/index.ts +1 -0
@@ -0,0 +1,235 @@
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";
10
+ import { Button } from "./components/Button/Button";
11
+
12
+ const OverStylingInfo = () => {
13
+ return (
14
+ <Container maxWidth="md" sx={{ py: 4 }}>
15
+ <Paper variant="outlined" sx={{ p: 4, borderRadius: 2 }}>
16
+ <Text variant="h4" mb={2}>
17
+ Over Styling (<code>overStyled</code>)
18
+ </Text>
19
+ <Text mb={2}>
20
+ By default, all Recursica components are strictly sandboxed. This
21
+ means they are protected against arbitrary styling configurations
22
+ (like passing generic React <code>style</code> objects, custom{" "}
23
+ <code>className</code> injections, or using deep MUI layout props like{" "}
24
+ <code>sx</code>). This strict compile-time and run-time enforcement
25
+ guarantees that your design system tokens remain true across your
26
+ application.
27
+ </Text>
28
+ <Text mb={2}>
29
+ However, there may be edge cases where a developer absolutely must
30
+ modify a component beyond what the design tokens natively allow. For
31
+ this, we provide the <strong>escape hatch</strong> property:{" "}
32
+ <code>overStyled={`{true}`}</code>.
33
+ </Text>
34
+
35
+ <Text variant="h6" mb={1} mt={4}>
36
+ The Core Philosophy
37
+ </Text>
38
+ <Text mb={1}>
39
+ **You should not over-style components.** Using{" "}
40
+ <code>overStyled</code> explicitly signifies that you are breaking
41
+ design system rules.
42
+ </Text>
43
+ <Box component="ol" sx={{ pl: 4, mb: 4 }}>
44
+ <li>
45
+ <Text>
46
+ <strong>Technical Debt:</strong> If over-styling is required, it
47
+ should be treated as a short-term workaround. Ideally, the
48
+ component will be refactored once the required layouts or variants
49
+ are officially integrated into the core Recursica component
50
+ library.
51
+ </Text>
52
+ </li>
53
+ <li>
54
+ <Text>
55
+ <strong>Auditing & Searching:</strong> Because this pattern
56
+ creates technical debt, we enforce the explicit{" "}
57
+ <code>overStyled</code> boolean. This provides a highly auditable,
58
+ easily searchable string. Product managers and engineers can
59
+ quickly grep the codebase for <code>overStyled</code> (or the{" "}
60
+ <code>RecursicaOverStyled</code> typings) to hunt down components
61
+ that don't match standard patterns.
62
+ </Text>
63
+ </li>
64
+ <li>
65
+ <Text>
66
+ <strong>Highly Custom Components:</strong> If your application
67
+ genuinely requires massive custom layouts that the UI kit cannot
68
+ support, <strong>do not hack the Recursica component</strong>.
69
+ Instead, it is highly encouraged that you import the underlying
70
+ primitive component directly from <code>@mui/material</code> and
71
+ construct your independent feature there. While you can utilize
72
+ raw Recursica CSS variables on these custom components, note that
73
+ they are not guaranteed to be accurately maintained as Recursica
74
+ evolves. Keep strict components strict!
75
+ </Text>
76
+ </li>
77
+ </Box>
78
+
79
+ <Divider sx={{ mb: 4 }} />
80
+
81
+ <Text variant="h6" mb={1}>
82
+ Permitted Layout Properties
83
+ </Text>
84
+ <Text mb={1}>
85
+ Unlike deep styling bounds (colors, typography, padding, dimensions),
86
+ external <strong>layout spacing properties</strong> like Margins (
87
+ <code>m</code>, <code>mt</code>, <code>mb</code>, <code>mx</code>) are
88
+ safely <strong>permitted by default</strong>. This allows integrators
89
+ to structurally compose components alongside siblings without
90
+ breaching internal token boundaries.
91
+ </Text>
92
+ <Text mb={3}>
93
+ When using layout properties, you have the flexibility to use either
94
+ ecosystem seamlessly:
95
+ </Text>
96
+ <Box component="ol" sx={{ pl: 4, mb: 2 }}>
97
+ <li>
98
+ <Text>
99
+ <strong>MUI Core Values:</strong> Passing standard MUI sizes (like{" "}
100
+ <code>mt={"{2}"}</code>) passes straight through to MUI natively,
101
+ allowing you to interface completely normally with a parent
102
+ application's existing MUI Theme setup that might fall outside
103
+ Recursica's scope.
104
+ </Text>
105
+ </li>
106
+ <li>
107
+ <Text>
108
+ <strong>Recursica Strict Tokens:</strong> Passing our custom
109
+ prefixed tokens (like <code>mt="rec-md"</code>) signals our
110
+ internal layout interceptor to securely translate the value
111
+ directly to our native <code>--recursica_brand_dimensions_*</code>{" "}
112
+ CSS variables. This ensures strict design token measurements while
113
+ sharing the exact same prop interface!
114
+ </Text>
115
+ </li>
116
+ </Box>
117
+ <Text mb={1} sx={{ fontWeight: 500 }}>
118
+ Available Recursica Layout Tokens:
119
+ </Text>
120
+ <Box component="ul" sx={{ pl: 4, mb: 4 }}>
121
+ <li>
122
+ <Text>
123
+ <code>rec-none</code> (0px limit)
124
+ </Text>
125
+ </li>
126
+ <li>
127
+ <Text>
128
+ <code>rec-sm</code> (0.5x scaling)
129
+ </Text>
130
+ </li>
131
+ <li>
132
+ <Text>
133
+ <code>rec-default</code> (1.0x scaling)
134
+ </Text>
135
+ </li>
136
+ <li>
137
+ <Text>
138
+ <code>rec-md</code> (1.5x scaling)
139
+ </Text>
140
+ </li>
141
+ <li>
142
+ <Text>
143
+ <code>rec-lg</code> (2.0x scaling)
144
+ </Text>
145
+ </li>
146
+ <li>
147
+ <Text>
148
+ <code>rec-xl</code> (3.0x scaling)
149
+ </Text>
150
+ </li>
151
+ <li>
152
+ <Text>
153
+ <code>rec-2xl</code> (4.0x scaling)
154
+ </Text>
155
+ </li>
156
+ </Box>
157
+
158
+ <Divider sx={{ mb: 4 }} />
159
+
160
+ <Text variant="h6" mb={1}>
161
+ Primitive Layout Components Exemption
162
+ </Text>
163
+ <Text mb={1}>
164
+ Unlike complex UI components (Buttons, Tabs, Inputs) which are
165
+ strictly protected, <strong>Primitive Layout Components</strong> (
166
+ <code>Flex</code>,<code>Stack</code>, <code>Group</code>,{" "}
167
+ <code>Container</code>) are entirely exempt from the{" "}
168
+ <code>RecursicaOverStyled</code> gatekeeper.
169
+ </Text>
170
+ <Text mb={4}>
171
+ Because the entire functional purpose of these components is
172
+ structural layout composition, developers are free to pass any
173
+ standard MUI width, height, padding, margin, gap, and alignment
174
+ property directly to them without needing to flag{" "}
175
+ <code>overStyled={`{true}`}</code>. The internal custom token mapper
176
+ (such as converting <code>gap="rec-md"</code>) is still active
177
+ natively on these wrappers.
178
+ </Text>
179
+
180
+ <Divider sx={{ mb: 4 }} />
181
+
182
+ <Text variant="h6" mb={2}>
183
+ Live Example
184
+ </Text>
185
+ <Text mb={4}>
186
+ Below is a side-by-side comparison. The first is a standard Recursica
187
+ Button protected by the design tokens mapping. The second flagrantly
188
+ forces <code>overStyled={`{true}`}</code>, allowing MUI's native
189
+ styling generics to punch right through the sandbox layout.
190
+ </Text>
191
+
192
+ <Stack direction="row" spacing={4}>
193
+ <Box>
194
+ <Text
195
+ variant="caption"
196
+ sx={{ color: "text.secondary", mb: 1, display: "block" }}
197
+ >
198
+ Strict Baseline (Default)
199
+ </Text>
200
+ {/* Note: In mui-adapter, Button is currently a stub so we just pass standard React props */}
201
+ <Button>Standard UI Kit Button</Button>
202
+ </Box>
203
+ <Box>
204
+ <Text
205
+ variant="caption"
206
+ sx={{ color: "text.secondary", mb: 1, display: "block" }}
207
+ >
208
+ overStyled={`{true}`}
209
+ </Text>
210
+ {/* Note: Button props are just standard HTML div props for the stub */}
211
+ <Button
212
+ style={{
213
+ backgroundColor: "pink",
214
+ color: "black",
215
+ borderRadius: "24px",
216
+ padding: "8px 16px",
217
+ }}
218
+ >
219
+ Unsafe Pink Marketing Button
220
+ </Button>
221
+ </Box>
222
+ </Stack>
223
+ </Paper>
224
+ </Container>
225
+ );
226
+ };
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,56 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import ReactMarkdown from "react-markdown";
3
+ import {
4
+ Container,
5
+ Paper,
6
+ Title,
7
+ TypographyStylesProvider,
8
+ Group,
9
+ Anchor,
10
+ Divider,
11
+ } from "@mantine/core";
12
+ import pkg from "../package.json";
13
+ import changelog from "../CHANGELOG.md?raw";
14
+
15
+ const VersionInfo = () => {
16
+ return (
17
+ <Container size="md" py="xl">
18
+ <Paper withBorder p="xl" radius="md">
19
+ <Title order={1} mb="xs">
20
+ Mantine Adapter v{pkg.version}
21
+ </Title>
22
+ <Group mb="xl" gap="md">
23
+ <Anchor
24
+ href="https://github.com/borderux/recursica"
25
+ target="_blank"
26
+ rel="noopener noreferrer"
27
+ >
28
+ GitHub Repository
29
+ </Anchor>
30
+ <Anchor
31
+ href="https://recursica.com"
32
+ target="_blank"
33
+ rel="noopener noreferrer"
34
+ >
35
+ Documentation & Website
36
+ </Anchor>
37
+ </Group>
38
+ <Divider mb="xl" />
39
+ <TypographyStylesProvider>
40
+ <ReactMarkdown>{changelog}</ReactMarkdown>
41
+ </TypographyStylesProvider>
42
+ </Paper>
43
+ </Container>
44
+ );
45
+ };
46
+
47
+ const meta: Meta<typeof VersionInfo> = {
48
+ title: "Introduction/Version Info",
49
+ component: VersionInfo,
50
+ };
51
+
52
+ export default meta;
53
+
54
+ type Story = StoryObj<typeof VersionInfo>;
55
+
56
+ export const Default: Story = {};
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Accordion } from "./Accordion";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Accordion> = {
6
+ title: "UI-Kit/🚧 Accordion",
7
+ component: Accordion,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Accordion>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Accordion" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type AccordionProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Accordion: React.FC<AccordionProps> = (props) => {
6
+ return <div {...props}>Accordion</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Accordion";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { AssistiveElement } from "./AssistiveElement";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof AssistiveElement> = {
6
+ title: "UI-Kit/🚧 AssistiveElement",
7
+ component: AssistiveElement,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof AssistiveElement>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="AssistiveElement" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type AssistiveElementProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const AssistiveElement: React.FC<AssistiveElementProps> = (props) => {
6
+ return <div {...props}>AssistiveElement</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./AssistiveElement";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Avatar } from "./Avatar";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Avatar> = {
6
+ title: "UI-Kit/🚧 Avatar",
7
+ component: Avatar,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Avatar>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Avatar" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type AvatarProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Avatar: React.FC<AvatarProps> = (props) => {
6
+ return <div {...props}>Avatar</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Avatar";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Badge } from "./Badge";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Badge> = {
6
+ title: "UI-Kit/🚧 Badge",
7
+ component: Badge,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Badge>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Badge" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type BadgeProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Badge: React.FC<BadgeProps> = (props) => {
6
+ return <div {...props}>Badge</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Badge";
@@ -0,0 +1,59 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Box } from "./Box";
3
+
4
+ const meta: Meta<typeof Box> = {
5
+ title: "UI-Kit/Box",
6
+ component: Box,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component:
12
+ "The `Box` component is the foundational layout primitive. It accepts all standard MUI layout properties (like `m`, `mt`, `p`, `px`, etc.), but natively intercepts **Recursica Spacing Tokens** (e.g., `rec-none`, `rec-sm`, `rec-default`, `rec-md`, `rec-lg`, `rec-xl`, `rec-2xl`). This allows developers to use Recursica's strict design tokens seamlessly alongside standard MUI spacing.",
13
+ },
14
+ },
15
+ },
16
+ };
17
+
18
+ export default meta;
19
+ type Story = StoryObj<typeof Box>;
20
+
21
+ export const Default: Story = {
22
+ args: {
23
+ children: "This is a standard Box",
24
+ m: "20px",
25
+ },
26
+ render: (args) => (
27
+ <Box
28
+ {...args}
29
+ style={{ border: "1px solid gray", padding: "10px" }}
30
+ overStyled={true}
31
+ />
32
+ ),
33
+ };
34
+
35
+ export const WithRecursicaTokens: Story = {
36
+ args: {
37
+ children: "This Box uses Recursica layout tokens",
38
+ m: "rec-xl",
39
+ p: "rec-md",
40
+ },
41
+ render: (args) => (
42
+ <div style={{ border: "1px dashed #ccc", display: "inline-block" }}>
43
+ <Box
44
+ {...args}
45
+ style={{ backgroundColor: "rgba(0,0,0,0.1)" }}
46
+ overStyled={true}
47
+ />
48
+ </div>
49
+ ),
50
+ };
51
+
52
+ export const Polymorphic: Story = {
53
+ args: {
54
+ component: "section",
55
+ children: "This Box is rendered as a <section> element",
56
+ m: "rec-default",
57
+ p: "rec-lg",
58
+ },
59
+ };
@@ -0,0 +1,27 @@
1
+ import React, { forwardRef } from "react";
2
+ import { Box as MUIBox, type BoxProps as MUIBoxProps } from "@mui/material";
3
+ import {
4
+ filterStylingProps,
5
+ type RecursicaOverStyled,
6
+ } from "../../utils/filterStylingProps";
7
+
8
+ export type BoxProps<C extends React.ElementType = "div"> = RecursicaOverStyled<
9
+ MUIBoxProps<C, { component?: C }>
10
+ >;
11
+
12
+ export const Box = forwardRef(function Box<C extends React.ElementType = "div">(
13
+ props: BoxProps<C>,
14
+ ref: React.Ref<Element>,
15
+ ) {
16
+ const { overStyled = false, ...rest } = props;
17
+
18
+ const sanitizedProps = filterStylingProps(
19
+ rest as Record<string, unknown>,
20
+ overStyled,
21
+ );
22
+
23
+ return <MUIBox ref={ref} {...sanitizedProps} />;
24
+ }) as <C extends React.ElementType = "div">(
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ props: BoxProps<C> & { ref?: React.ForwardedRef<any> },
27
+ ) => React.ReactElement | null;
@@ -0,0 +1 @@
1
+ export * from "./Box";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Breadcrumb } from "./Breadcrumb";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Breadcrumb> = {
6
+ title: "UI-Kit/🚧 Breadcrumb",
7
+ component: Breadcrumb,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Breadcrumb>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Breadcrumb" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type BreadcrumbProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Breadcrumb: React.FC<BreadcrumbProps> = (props) => {
6
+ return <div {...props}>Breadcrumb</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Breadcrumb";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Button } from "./Button";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Button> = {
6
+ title: "UI-Kit/🚧 Button",
7
+ component: Button,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Button>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Button" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type ButtonProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Button: React.FC<ButtonProps> = (props) => {
6
+ return <div {...props}>Button</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Button";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Card } from "./Card";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Card> = {
6
+ title: "UI-Kit/🚧 Card",
7
+ component: Card,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Card>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Card" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type CardProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Card: React.FC<CardProps> = (props) => {
6
+ return <div {...props}>Card</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Card";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Checkbox } from "./Checkbox";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Checkbox> = {
6
+ title: "UI-Kit/🚧 Checkbox",
7
+ component: Checkbox,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Checkbox>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Checkbox" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type CheckboxProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Checkbox: React.FC<CheckboxProps> = (props) => {
6
+ return <div {...props}>Checkbox</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Checkbox";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Chip } from "./Chip";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Chip> = {
6
+ title: "UI-Kit/🚧 Chip",
7
+ component: Chip,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Chip>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Chip" />,
16
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ export type ChipProps = React.HTMLAttributes<HTMLDivElement>;
4
+
5
+ export const Chip: React.FC<ChipProps> = (props) => {
6
+ return <div {...props}>Chip</div>;
7
+ };
@@ -0,0 +1 @@
1
+ export * from "./Chip";
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Container } from "./Container";
3
+ import { ComingSoon } from "@recursica/storybook-template";
4
+
5
+ const meta: Meta<typeof Container> = {
6
+ title: "UI-Kit/🚧 Container",
7
+ component: Container,
8
+ tags: ["autodocs"],
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Container>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <ComingSoon componentName="Container" />,
16
+ };