@recursica/adapter-mui-v7 1.0.1 → 1.0.2

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
@@ -12,7 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/borderux/recursica-adapter-mui-v7.git"
14
14
  },
15
- "version": "1.0.1",
15
+ "version": "1.0.2",
16
16
  "publishConfig": {
17
17
  "access": "public"
18
18
  },
@@ -1,7 +1,6 @@
1
1
  import type { Meta } from "@storybook/react-vite";
2
2
  import { AdaptersContent, MuiLogo } from "@recursica/storybook-template";
3
3
  import { VersionInfo } from "./Version";
4
- import { OverStylingInfo } from "./OverStyling";
5
4
 
6
5
  const DOCS_URL = "https://recursica.com";
7
6
  const FORGE_URL = "https://forge.recursica.com";
@@ -173,11 +172,6 @@ export const Adapters = {
173
172
  render: () => <AdaptersContent />,
174
173
  };
175
174
 
176
- export const OverStyling = {
177
- name: "Over Styling",
178
- render: () => <OverStylingInfo />,
179
- };
180
-
181
175
  export const VersionInfoStory = {
182
176
  name: "Version Info",
183
177
  render: () => <VersionInfo />,
@@ -52,9 +52,3 @@ import { RecursicaThemeProvider, Layer } from "@recursica/adapter-mui-v7";
52
52
  > - **Required for setup**: `RecursicaThemeProvider` must wrap your entire application, once, near the root, inside `<StyledEngineProvider injectFirst>`. See [SETUP.md](../../../SETUP.md) for the full setup sequence.
53
53
  > - **`initLayer0` (default `true`)**: Automatically wraps `children` in a layer-0 [`Layer`](../Layer/USAGE.md). `RecursicaThemeProvider` itself only sets `data-recursica-theme` (`"light"` or `"dark"`, defaults to `"light"`) on `document.documentElement` — without a `Layer` in the tree (either the automatic one or one you add yourself with `initLayer0={false}`), none of Recursica's surface CSS variables resolve.
54
54
  > - **Runtime theme switching**: Changing the `theme` prop re-runs the effect and updates `data-recursica-theme` immediately, so you can drive light/dark switching from application state.
55
-
56
- ---
57
-
58
- ## 4. Key Integration Features & Constraints
59
-
60
- `RecursicaThemeProvider` also wires up the `overStyled` development-mode visual auditing helper (see [OVERSTYLING.md](../../../OVERSTYLING.md)) — `recursica.toggleOverStyled()` in the browser console only works once this provider has mounted.
@@ -1,6 +1,9 @@
1
+ export * from "@recursica/adapter-common";
2
+
1
3
  export * from "./Accordion";
2
4
  export * from "./AssistiveElement";
3
5
  export * from "./AutoComplete";
6
+ export type { RecursicaAutocompleteProps } from "./AutoComplete";
4
7
  export * from "./Avatar";
5
8
  export * from "./Badge";
6
9
  export * from "./Breadcrumb";
@@ -10,12 +13,17 @@ export * from "./Checkbox";
10
13
  export * from "./Chip";
11
14
  export * from "./Container";
12
15
  export * from "./DatePicker";
16
+ export type { RecursicaDatePickerProps } from "./DatePicker";
13
17
  export * from "./Dropdown";
18
+ export type { RecursicaDropdownProps } from "./Dropdown";
14
19
  export * from "./FileInput";
20
+ export type { RecursicaFileInputProps } from "./FileInput";
15
21
  export * from "./FileUpload";
22
+ export type { RecursicaFileUploadProps } from "./FileUpload";
16
23
  export * from "./Flex";
17
24
  export * from "./FormControlLayout";
18
25
  export * from "./FormControlWrapper";
26
+ export type { RecursicaFormControlWrapperProps } from "./FormControlWrapper";
19
27
  export * from "./Grid";
20
28
  export * from "./Group";
21
29
  export * from "./Heading";
@@ -26,25 +34,35 @@ export * from "./Loader";
26
34
  export * from "./Menu";
27
35
  export * from "./Modal";
28
36
  export * from "./NumberInput";
37
+ export type { RecursicaNumberInputProps } from "./NumberInput";
29
38
  export * from "./Pagination";
30
39
  export * from "./Panel";
40
+ export type { RecursicaPanelProps } from "./Panel";
31
41
  export * from "./Popover";
32
42
  export * from "./Radio";
43
+ export type { RecursicaRadioGroupProps } from "./Radio";
33
44
  export * from "./ReadOnlyField";
34
45
  export * from "./SegmentedControl";
35
46
  export * from "./Slider";
47
+ export type { RecursicaSliderProps } from "./Slider";
36
48
  export * from "./Stack";
37
49
  export * from "./Stepper";
38
50
  export * from "./Switch";
51
+ export type { RecursicaSwitchGroupProps } from "./Switch";
39
52
  export * from "./Table";
40
53
  export * from "./Tabs";
41
54
  export * from "./Text";
42
55
  export * from "./TextArea";
56
+ export type { RecursicaTextAreaProps } from "./TextArea";
43
57
  export * from "./TextField";
58
+ export type { RecursicaTextFieldProps } from "./TextField";
44
59
  export * from "./TimePicker";
60
+ export type { RecursicaTimePickerProps } from "./TimePicker";
45
61
  export * from "./Timeline";
46
62
  export * from "./Toast";
63
+ export type { RecursicaToastProps } from "./Toast";
47
64
  export * from "./Tooltip";
48
65
  export * from "./TransferList";
66
+ export type { RecursicaTransferListProps } from "./TransferList";
49
67
  export * from "./Typography";
50
68
  export * from "./Tree";
package/src/index.ts CHANGED
@@ -1,194 +1,3 @@
1
1
  import "@recursica/adapter-common/style.css";
2
- import * as rawComponents from "./components";
3
- import { wrapComponent } from "@recursica/adapter-common";
4
2
 
5
- export * from "@recursica/adapter-common";
6
-
7
- // Expose unwrapped structural layout primitives to preserve their polymorphic types
8
- export const Flex = rawComponents.Flex;
9
- export const Grid = rawComponents.Grid;
10
- export const GridCol = rawComponents.GridCol;
11
- export const Group = rawComponents.Group;
12
- export const Stack = rawComponents.Stack;
13
- export const Container = rawComponents.Container;
14
- export const Typography = rawComponents.Typography;
15
-
16
- // Statically wrap and export components to inject overStyled visual highlight in dev mode
17
- export const Accordion = wrapComponent(
18
- rawComponents.Accordion,
19
- ) as typeof rawComponents.Accordion;
20
- export const AccordionItem = wrapComponent(
21
- rawComponents.AccordionItem,
22
- ) as typeof rawComponents.AccordionItem;
23
- export const AccordionControl = wrapComponent(
24
- rawComponents.AccordionControl,
25
- ) as typeof rawComponents.AccordionControl;
26
- export const AccordionPanel = wrapComponent(
27
- rawComponents.AccordionPanel,
28
- ) as typeof rawComponents.AccordionPanel;
29
- export const AssistiveElement = wrapComponent(
30
- rawComponents.AssistiveElement,
31
- ) as typeof rawComponents.AssistiveElement;
32
- export const AutoComplete = wrapComponent(
33
- rawComponents.AutoComplete,
34
- ) as typeof rawComponents.AutoComplete;
35
- export const Avatar = wrapComponent(
36
- rawComponents.Avatar,
37
- ) as typeof rawComponents.Avatar;
38
- export const Badge = wrapComponent(
39
- rawComponents.Badge,
40
- ) as typeof rawComponents.Badge;
41
- export const Breadcrumb = wrapComponent(
42
- rawComponents.Breadcrumb,
43
- ) as typeof rawComponents.Breadcrumb;
44
- export const Button = wrapComponent(
45
- rawComponents.Button,
46
- ) as typeof rawComponents.Button;
47
- export const Card = wrapComponent(
48
- rawComponents.Card,
49
- ) as typeof rawComponents.Card;
50
- export const Checkbox = wrapComponent(
51
- rawComponents.Checkbox,
52
- ) as typeof rawComponents.Checkbox;
53
- export const CheckboxGroup = wrapComponent(
54
- rawComponents.CheckboxGroup,
55
- ) as typeof rawComponents.CheckboxGroup;
56
- export const Chip = wrapComponent(
57
- rawComponents.Chip,
58
- ) as typeof rawComponents.Chip;
59
- export const DatePicker = wrapComponent(
60
- rawComponents.DatePicker,
61
- ) as typeof rawComponents.DatePicker;
62
- export const Dropdown = wrapComponent(
63
- rawComponents.Dropdown,
64
- ) as typeof rawComponents.Dropdown;
65
- export const FileInput = wrapComponent(
66
- rawComponents.FileInput,
67
- ) as typeof rawComponents.FileInput;
68
- export const FileUpload = wrapComponent(
69
- rawComponents.FileUpload,
70
- ) as typeof rawComponents.FileUpload;
71
- export const FormControlLayout = wrapComponent(
72
- rawComponents.FormControlLayout,
73
- ) as typeof rawComponents.FormControlLayout;
74
- export const FormControlWrapper = wrapComponent(
75
- rawComponents.FormControlWrapper,
76
- ) as typeof rawComponents.FormControlWrapper;
77
- export const Heading = wrapComponent(
78
- rawComponents.Heading,
79
- ) as typeof rawComponents.Heading;
80
- export const HoverCard = wrapComponent(
81
- rawComponents.HoverCard,
82
- ) as typeof rawComponents.HoverCard;
83
- export const Label = wrapComponent(
84
- rawComponents.Label,
85
- ) as typeof rawComponents.Label;
86
- export const Link = wrapComponent(
87
- rawComponents.Link,
88
- ) as typeof rawComponents.Link;
89
- export const Loader = wrapComponent(
90
- rawComponents.Loader,
91
- ) as typeof rawComponents.Loader;
92
- export const Menu = wrapComponent(
93
- rawComponents.Menu,
94
- ) as typeof rawComponents.Menu;
95
- export const MenuItem = wrapComponent(
96
- rawComponents.MenuItem,
97
- ) as typeof rawComponents.MenuItem;
98
- export const MenuDivider = wrapComponent(
99
- rawComponents.MenuDivider,
100
- ) as typeof rawComponents.MenuDivider;
101
- export const Modal = wrapComponent(
102
- rawComponents.Modal,
103
- ) as typeof rawComponents.Modal;
104
- export const NumberInput = wrapComponent(
105
- rawComponents.NumberInput,
106
- ) as typeof rawComponents.NumberInput;
107
- export const Pagination = wrapComponent(
108
- rawComponents.Pagination,
109
- ) as typeof rawComponents.Pagination;
110
- export const Panel = wrapComponent(
111
- rawComponents.Panel,
112
- ) as typeof rawComponents.Panel;
113
- export const PanelFooter = wrapComponent(
114
- rawComponents.PanelFooter,
115
- ) as typeof rawComponents.PanelFooter;
116
- export const Popover = wrapComponent(
117
- rawComponents.Popover,
118
- ) as typeof rawComponents.Popover;
119
- export const Radio = wrapComponent(
120
- rawComponents.Radio,
121
- ) as typeof rawComponents.Radio;
122
- export const RadioGroup = wrapComponent(
123
- rawComponents.RadioGroup,
124
- ) as typeof rawComponents.RadioGroup;
125
- export const ReadOnlyField = wrapComponent(
126
- rawComponents.ReadOnlyField,
127
- ) as typeof rawComponents.ReadOnlyField;
128
- export const SegmentedControl = wrapComponent(
129
- rawComponents.SegmentedControl,
130
- ) as typeof rawComponents.SegmentedControl;
131
- export const Slider = wrapComponent(
132
- rawComponents.Slider,
133
- ) as typeof rawComponents.Slider;
134
- export const Stepper = wrapComponent(
135
- rawComponents.Stepper,
136
- ) as typeof rawComponents.Stepper;
137
- export const Switch = wrapComponent(
138
- rawComponents.Switch,
139
- ) as typeof rawComponents.Switch;
140
- export const SwitchGroup = wrapComponent(
141
- rawComponents.SwitchGroup,
142
- ) as typeof rawComponents.SwitchGroup;
143
- export const Table = wrapComponent(
144
- rawComponents.Table,
145
- ) as typeof rawComponents.Table;
146
- export const Tab = wrapComponent(rawComponents.Tab) as typeof rawComponents.Tab;
147
- export const TabPanel = wrapComponent(
148
- rawComponents.TabPanel,
149
- ) as typeof rawComponents.TabPanel;
150
- export const Tabs = wrapComponent(
151
- rawComponents.Tabs,
152
- ) as typeof rawComponents.Tabs;
153
- export const Text = wrapComponent(
154
- rawComponents.Text,
155
- ) as typeof rawComponents.Text;
156
- export const TextArea = wrapComponent(
157
- rawComponents.TextArea,
158
- ) as typeof rawComponents.TextArea;
159
- export const TextField = wrapComponent(
160
- rawComponents.TextField,
161
- ) as typeof rawComponents.TextField;
162
- export const TimePicker = wrapComponent(
163
- rawComponents.TimePicker,
164
- ) as typeof rawComponents.TimePicker;
165
- export const Timeline = wrapComponent(
166
- rawComponents.Timeline,
167
- ) as typeof rawComponents.Timeline;
168
- export const TimelineItem = wrapComponent(
169
- rawComponents.TimelineItem,
170
- ) as typeof rawComponents.TimelineItem;
171
- export const Toast = wrapComponent(
172
- rawComponents.Toast,
173
- ) as typeof rawComponents.Toast;
174
- export const Tooltip = wrapComponent(
175
- rawComponents.Tooltip,
176
- ) as typeof rawComponents.Tooltip;
177
- export const TransferList = wrapComponent(
178
- rawComponents.TransferList,
179
- ) as typeof rawComponents.TransferList;
180
- export const Tree = wrapComponent(
181
- rawComponents.Tree,
182
- ) as typeof rawComponents.Tree;
183
-
184
- export type {
185
- RecursicaAutocompleteProps,
186
- RecursicaDropdownProps,
187
- RecursicaFormControlWrapperProps,
188
- RecursicaNumberInputProps,
189
- RecursicaSliderProps,
190
- RecursicaTextAreaProps,
191
- RecursicaTextFieldProps,
192
- RecursicaTimePickerProps,
193
- RecursicaToastProps,
194
- } from "./components";
3
+ export * from "./components";
@@ -1,87 +0,0 @@
1
- import ReactMarkdown from "react-markdown";
2
- import { Box, Paper, Divider } from "@mui/material";
3
- import {
4
- Container,
5
- Stack,
6
- Text as RawText,
7
- Heading,
8
- Switch as RawSwitch,
9
- } from "./components";
10
- import { Button as RawButton } from "./components/Button/Button";
11
- import {
12
- useGlobalOverStyled,
13
- toggleGlobalOverStyled,
14
- wrapComponent,
15
- } from "@recursica/adapter-common";
16
- import overStylingDoc from "../OVERSTYLING.md?raw";
17
-
18
- const Button = wrapComponent(RawButton);
19
- const Text = wrapComponent(RawText);
20
- const Switch = wrapComponent(RawSwitch);
21
-
22
- export const OverStylingInfo = () => {
23
- const isHighlightActive = useGlobalOverStyled();
24
- return (
25
- <Container size="md" style={{ padding: "32px 0" }}>
26
- <Paper variant="outlined" sx={{ p: 4, borderRadius: 2 }}>
27
- <Box className="markdown-body">
28
- <ReactMarkdown>{overStylingDoc}</ReactMarkdown>
29
- </Box>
30
-
31
- <Divider sx={{ my: 4 }} />
32
-
33
- <Heading order={6} mb={2}>
34
- Try It Yourself
35
- </Heading>
36
-
37
- <Stack direction="row" alignItems="center" spacing="rec-sm" mb="rec-md">
38
- <Switch
39
- label="Highlight Over-Styled Components"
40
- checked={isHighlightActive}
41
- onChange={() => toggleGlobalOverStyled()}
42
- />
43
- </Stack>
44
-
45
- <Text mb={4}>
46
- Below is a side-by-side comparison. The first is a standard Recursica
47
- Button protected by the design tokens mapping. The second flagrantly
48
- forces <code>overStyled={`{true}`}</code>, allowing MUI's native
49
- styling generics to punch right through the sandbox layout.
50
- </Text>
51
-
52
- <Stack direction="row" spacing="rec-default">
53
- <Box>
54
- <Text
55
- variant="caption"
56
- overStyled
57
- sx={{ color: "text.secondary", mb: 1, display: "block" }}
58
- >
59
- Strict Baseline (Default)
60
- </Text>
61
- <Button>Standard UI Kit Button</Button>
62
- </Box>
63
- <Box>
64
- <Text
65
- variant="caption"
66
- overStyled
67
- sx={{ color: "text.secondary", mb: 1, display: "block" }}
68
- >
69
- overStyled={`{true}`}
70
- </Text>
71
- <Button
72
- overStyled={true}
73
- style={{
74
- backgroundColor: "pink",
75
- color: "black",
76
- borderRadius: "24px",
77
- padding: "8px 16px",
78
- }}
79
- >
80
- Unsafe Pink Marketing Button
81
- </Button>
82
- </Box>
83
- </Stack>
84
- </Paper>
85
- </Container>
86
- );
87
- };