@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.
- package/.storybook/commonArgTypes.ts +148 -0
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/index.d.ts +2 -0
- package/dist/mui-adapter.cjs +2 -0
- package/dist/mui-adapter.cjs.map +1 -0
- package/dist/mui-adapter.css +1 -0
- package/dist/mui-adapter.js +164 -0
- package/dist/mui-adapter.js.map +1 -0
- package/dist/src/components/Accordion/Accordion.d.ts +3 -0
- package/dist/src/components/Accordion/index.d.ts +1 -0
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +3 -0
- package/dist/src/components/AssistiveElement/index.d.ts +1 -0
- package/dist/src/components/Avatar/Avatar.d.ts +3 -0
- package/dist/src/components/Avatar/index.d.ts +1 -0
- package/dist/src/components/Badge/Badge.d.ts +3 -0
- package/dist/src/components/Badge/index.d.ts +1 -0
- package/dist/src/components/Box/Box.d.ts +9 -0
- package/dist/src/components/Box/index.d.ts +1 -0
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/src/components/Breadcrumb/index.d.ts +1 -0
- package/dist/src/components/Button/Button.d.ts +3 -0
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Card/Card.d.ts +3 -0
- package/dist/src/components/Card/index.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/src/components/Checkbox/index.d.ts +1 -0
- package/dist/src/components/Chip/Chip.d.ts +3 -0
- package/dist/src/components/Chip/index.d.ts +1 -0
- package/dist/src/components/Container/Container.d.ts +3 -0
- package/dist/src/components/Container/index.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/src/components/DatePicker/index.d.ts +1 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/src/components/Dropdown/index.d.ts +1 -0
- package/dist/src/components/FileInput/FileInput.d.ts +3 -0
- package/dist/src/components/FileInput/index.d.ts +1 -0
- package/dist/src/components/FileUpload/FileUpload.d.ts +3 -0
- package/dist/src/components/FileUpload/index.d.ts +1 -0
- package/dist/src/components/Flex/Flex.d.ts +3 -0
- package/dist/src/components/Flex/index.d.ts +1 -0
- package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +3 -0
- package/dist/src/components/FormControlLayout/index.d.ts +1 -0
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +3 -0
- package/dist/src/components/FormControlWrapper/index.d.ts +1 -0
- package/dist/src/components/Group/Group.d.ts +3 -0
- package/dist/src/components/Group/index.d.ts +1 -0
- package/dist/src/components/HoverCard/HoverCard.d.ts +3 -0
- package/dist/src/components/HoverCard/index.d.ts +1 -0
- package/dist/src/components/Label/Label.d.ts +3 -0
- package/dist/src/components/Label/index.d.ts +1 -0
- package/dist/src/components/Link/Link.d.ts +3 -0
- package/dist/src/components/Link/index.d.ts +1 -0
- package/dist/src/components/Loader/Loader.d.ts +3 -0
- package/dist/src/components/Loader/index.d.ts +1 -0
- package/dist/src/components/Menu/Menu.d.ts +3 -0
- package/dist/src/components/Menu/index.d.ts +1 -0
- package/dist/src/components/Modal/Modal.d.ts +3 -0
- package/dist/src/components/Modal/index.d.ts +1 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/src/components/NumberInput/index.d.ts +1 -0
- package/dist/src/components/Pagination/Pagination.d.ts +3 -0
- package/dist/src/components/Pagination/index.d.ts +1 -0
- package/dist/src/components/Panel/Panel.d.ts +3 -0
- package/dist/src/components/Panel/index.d.ts +1 -0
- package/dist/src/components/Radio/Radio.d.ts +3 -0
- package/dist/src/components/Radio/index.d.ts +1 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +3 -0
- package/dist/src/components/ReadOnlyField/index.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/dist/src/components/SegmentedControl/index.d.ts +1 -0
- package/dist/src/components/Slider/Slider.d.ts +3 -0
- package/dist/src/components/Slider/index.d.ts +1 -0
- package/dist/src/components/Stack/Stack.d.ts +3 -0
- package/dist/src/components/Stack/index.d.ts +1 -0
- package/dist/src/components/Stepper/Stepper.d.ts +3 -0
- package/dist/src/components/Stepper/index.d.ts +1 -0
- package/dist/src/components/Switch/Switch.d.ts +3 -0
- package/dist/src/components/Switch/index.d.ts +1 -0
- package/dist/src/components/Table/Table.d.ts +3 -0
- package/dist/src/components/Table/index.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.d.ts +3 -0
- package/dist/src/components/Tabs/index.d.ts +1 -0
- package/dist/src/components/Text/Text.d.ts +3 -0
- package/dist/src/components/Text/index.d.ts +1 -0
- package/dist/src/components/TextArea/TextArea.d.ts +3 -0
- package/dist/src/components/TextArea/index.d.ts +1 -0
- package/dist/src/components/TextField/TextField.d.ts +3 -0
- package/dist/src/components/TextField/index.d.ts +1 -0
- package/dist/src/components/TimePicker/TimePicker.d.ts +3 -0
- package/dist/src/components/TimePicker/index.d.ts +1 -0
- package/dist/src/components/Timeline/Timeline.d.ts +3 -0
- package/dist/src/components/Timeline/index.d.ts +1 -0
- package/dist/src/components/Title/Title.d.ts +3 -0
- package/dist/src/components/Title/index.d.ts +1 -0
- package/dist/src/components/Toast/Toast.d.ts +3 -0
- package/dist/src/components/Toast/index.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/src/components/Tooltip/index.d.ts +1 -0
- package/dist/src/components/TransferList/TransferList.d.ts +3 -0
- package/dist/src/components/TransferList/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +46 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types/index.d.ts +6 -0
- package/dist/src/utils/ColorSchemeWrapper.d.ts +3 -0
- package/dist/src/utils/RequireAccessibleLabel.d.ts +18 -0
- package/dist/src/utils/copyToClipboard.d.ts +8 -0
- package/dist/src/utils/filterStylingProps.d.ts +36 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/dist/vitest.workspace.d.ts +2 -0
- package/package.json +98 -0
- package/src/OverStyling.stories.tsx +235 -0
- package/src/Version.stories.tsx +56 -0
- package/src/components/Accordion/Accordion.stories.tsx +16 -0
- package/src/components/Accordion/Accordion.tsx +7 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +16 -0
- package/src/components/AssistiveElement/AssistiveElement.tsx +7 -0
- package/src/components/AssistiveElement/index.ts +1 -0
- package/src/components/Avatar/Avatar.stories.tsx +16 -0
- package/src/components/Avatar/Avatar.tsx +7 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Badge/Badge.stories.tsx +16 -0
- package/src/components/Badge/Badge.tsx +7 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Box/Box.stories.tsx +59 -0
- package/src/components/Box/Box.tsx +27 -0
- package/src/components/Box/index.ts +1 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +16 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +7 -0
- package/src/components/Breadcrumb/index.ts +1 -0
- package/src/components/Button/Button.stories.tsx +16 -0
- package/src/components/Button/Button.tsx +7 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Card/Card.stories.tsx +16 -0
- package/src/components/Card/Card.tsx +7 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +16 -0
- package/src/components/Checkbox/Checkbox.tsx +7 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/Chip.stories.tsx +16 -0
- package/src/components/Chip/Chip.tsx +7 -0
- package/src/components/Chip/index.ts +1 -0
- package/src/components/Container/Container.stories.tsx +16 -0
- package/src/components/Container/Container.tsx +7 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +16 -0
- package/src/components/DatePicker/DatePicker.tsx +7 -0
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +16 -0
- package/src/components/Dropdown/Dropdown.tsx +7 -0
- package/src/components/Dropdown/index.ts +1 -0
- package/src/components/FileInput/FileInput.stories.tsx +16 -0
- package/src/components/FileInput/FileInput.tsx +7 -0
- package/src/components/FileInput/index.ts +1 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +16 -0
- package/src/components/FileUpload/FileUpload.tsx +7 -0
- package/src/components/FileUpload/index.ts +1 -0
- package/src/components/Flex/Flex.stories.tsx +16 -0
- package/src/components/Flex/Flex.tsx +7 -0
- package/src/components/Flex/index.ts +1 -0
- package/src/components/FormControlLayout/FormControlLayout.stories.tsx +16 -0
- package/src/components/FormControlLayout/FormControlLayout.tsx +7 -0
- package/src/components/FormControlLayout/index.ts +1 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +16 -0
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +9 -0
- package/src/components/FormControlWrapper/index.ts +1 -0
- package/src/components/Group/Group.stories.tsx +16 -0
- package/src/components/Group/Group.tsx +7 -0
- package/src/components/Group/index.ts +1 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +16 -0
- package/src/components/HoverCard/HoverCard.tsx +7 -0
- package/src/components/HoverCard/index.ts +1 -0
- package/src/components/Label/Label.stories.tsx +16 -0
- package/src/components/Label/Label.tsx +7 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link/Link.stories.tsx +16 -0
- package/src/components/Link/Link.tsx +7 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Loader/Loader.stories.tsx +16 -0
- package/src/components/Loader/Loader.tsx +7 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Menu/Menu.stories.tsx +16 -0
- package/src/components/Menu/Menu.tsx +7 -0
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Modal/Modal.stories.tsx +16 -0
- package/src/components/Modal/Modal.tsx +7 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +16 -0
- package/src/components/NumberInput/NumberInput.tsx +7 -0
- package/src/components/NumberInput/index.ts +1 -0
- package/src/components/Pagination/Pagination.stories.tsx +16 -0
- package/src/components/Pagination/Pagination.tsx +7 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/Panel/Panel.stories.tsx +16 -0
- package/src/components/Panel/Panel.tsx +7 -0
- package/src/components/Panel/index.ts +1 -0
- package/src/components/Radio/Radio.stories.tsx +16 -0
- package/src/components/Radio/Radio.tsx +7 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +16 -0
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +7 -0
- package/src/components/ReadOnlyField/index.ts +1 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +16 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +7 -0
- package/src/components/SegmentedControl/index.ts +1 -0
- package/src/components/Slider/Slider.stories.tsx +16 -0
- package/src/components/Slider/Slider.tsx +7 -0
- package/src/components/Slider/index.ts +1 -0
- package/src/components/Stack/Stack.stories.tsx +16 -0
- package/src/components/Stack/Stack.tsx +7 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Stepper/Stepper.stories.tsx +16 -0
- package/src/components/Stepper/Stepper.tsx +7 -0
- package/src/components/Stepper/index.ts +1 -0
- package/src/components/Switch/Switch.stories.tsx +16 -0
- package/src/components/Switch/Switch.tsx +7 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Table/Table.stories.tsx +16 -0
- package/src/components/Table/Table.tsx +7 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Tabs/Tabs.stories.tsx +16 -0
- package/src/components/Tabs/Tabs.tsx +7 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Text/Text.stories.tsx +16 -0
- package/src/components/Text/Text.tsx +7 -0
- package/src/components/Text/index.ts +1 -0
- package/src/components/TextArea/TextArea.stories.tsx +16 -0
- package/src/components/TextArea/TextArea.tsx +7 -0
- package/src/components/TextArea/index.ts +1 -0
- package/src/components/TextField/TextField.stories.tsx +16 -0
- package/src/components/TextField/TextField.tsx +7 -0
- package/src/components/TextField/index.ts +1 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +16 -0
- package/src/components/TimePicker/TimePicker.tsx +7 -0
- package/src/components/TimePicker/index.ts +1 -0
- package/src/components/Timeline/Timeline.stories.tsx +16 -0
- package/src/components/Timeline/Timeline.tsx +7 -0
- package/src/components/Timeline/index.ts +1 -0
- package/src/components/Title/Title.stories.tsx +16 -0
- package/src/components/Title/Title.tsx +7 -0
- package/src/components/Title/index.ts +1 -0
- package/src/components/Toast/Toast.stories.tsx +16 -0
- package/src/components/Toast/Toast.tsx +7 -0
- package/src/components/Toast/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +16 -0
- package/src/components/Tooltip/Tooltip.tsx +7 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/TransferList/TransferList.stories.tsx +16 -0
- package/src/components/TransferList/TransferList.tsx +7 -0
- package/src/components/TransferList/index.ts +1 -0
- package/src/components/index.ts +46 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +3 -0
- package/src/types/index.ts +9 -0
- package/src/types/mantine.d.ts +7 -0
- package/src/types/scss-modules.d.ts +9 -0
- package/src/utils/ColorSchemeWrapper.tsx +27 -0
- package/src/utils/RequireAccessibleLabel.ts +12 -0
- package/src/utils/copyToClipboard.ts +36 -0
- package/src/utils/filterStylingProps.ts +139 -0
- package/src/utils/index.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Card';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Container';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DatePicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FileInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FileUpload';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Flex';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormControlLayout';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormControlWrapper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Group';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HoverCard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Label';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Link';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Loader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Pagination';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Panel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Radio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ReadOnlyField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SegmentedControl';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Slider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Stack';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Stepper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Table';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Text';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextArea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TimePicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Timeline';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Title';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toast';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TransferList';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './AssistiveElement';
|
|
3
|
+
export * from './Avatar';
|
|
4
|
+
export * from './Badge';
|
|
5
|
+
export * from './Box';
|
|
6
|
+
export * from './Breadcrumb';
|
|
7
|
+
export * from './Button';
|
|
8
|
+
export * from './Card';
|
|
9
|
+
export * from './Checkbox';
|
|
10
|
+
export * from './Chip';
|
|
11
|
+
export * from './Container';
|
|
12
|
+
export * from './DatePicker';
|
|
13
|
+
export * from './Dropdown';
|
|
14
|
+
export * from './FileInput';
|
|
15
|
+
export * from './FileUpload';
|
|
16
|
+
export * from './Flex';
|
|
17
|
+
export * from './FormControlLayout';
|
|
18
|
+
export * from './FormControlWrapper';
|
|
19
|
+
export * from './Group';
|
|
20
|
+
export * from './HoverCard';
|
|
21
|
+
export * from './Label';
|
|
22
|
+
export * from './Link';
|
|
23
|
+
export * from './Loader';
|
|
24
|
+
export * from './Menu';
|
|
25
|
+
export * from './Modal';
|
|
26
|
+
export * from './NumberInput';
|
|
27
|
+
export * from './Pagination';
|
|
28
|
+
export * from './Panel';
|
|
29
|
+
export * from './Radio';
|
|
30
|
+
export * from './ReadOnlyField';
|
|
31
|
+
export * from './SegmentedControl';
|
|
32
|
+
export * from './Slider';
|
|
33
|
+
export * from './Stack';
|
|
34
|
+
export * from './Stepper';
|
|
35
|
+
export * from './Switch';
|
|
36
|
+
export * from './Table';
|
|
37
|
+
export * from './Tabs';
|
|
38
|
+
export * from './Text';
|
|
39
|
+
export * from './TextArea';
|
|
40
|
+
export * from './TextField';
|
|
41
|
+
export * from './TimePicker';
|
|
42
|
+
export * from './Timeline';
|
|
43
|
+
export * from './Title';
|
|
44
|
+
export * from './Toast';
|
|
45
|
+
export * from './Tooltip';
|
|
46
|
+
export * from './TransferList';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Enforces accessibility by strictly requiring at least one form of labeling:
|
|
4
|
+
* either a visual \`label\`, an \`aria-label\`, or an \`aria-labelledby\`.
|
|
5
|
+
*/
|
|
6
|
+
export type RequireAccessibleLabel<T> = T & ({
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
"aria-labelledby"?: string;
|
|
10
|
+
} | {
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
"aria-label": string;
|
|
13
|
+
"aria-labelledby"?: string;
|
|
14
|
+
} | {
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
"aria-label"?: string;
|
|
17
|
+
"aria-labelledby": string;
|
|
18
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Helper function for copy text to clipboard
|
|
4
|
+
* @param {string} textToCopy The text string for copying to the clipboard
|
|
5
|
+
* @param {element|node} componentRef The ref of the component that we want to trigger the copy
|
|
6
|
+
*/
|
|
7
|
+
declare const copyToClipboard: (textToCopy: string, componentRef: React.RefObject<HTMLElement | null>) => Promise<void>;
|
|
8
|
+
export { copyToClipboard };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* filterStylingProps
|
|
3
|
+
*
|
|
4
|
+
* This utility acts as the central gatekeeper for strict design-system adherence across
|
|
5
|
+
* all Recursica components mapped over MUI.
|
|
6
|
+
*
|
|
7
|
+
* PHILOSOPHY:
|
|
8
|
+
* Recursica components are designed to be explicitly sandboxed tokens. Allowing external
|
|
9
|
+
* `className` or MUI style props (`sx`, `classes`, etc.) breaks the design system by
|
|
10
|
+
* allowing developers to leak arbitrary designs into components.
|
|
11
|
+
*
|
|
12
|
+
* By default (`overStyled=false`), this utility actively prevents developers from overriding
|
|
13
|
+
* internal component styles (such as background, colors, typography, or internal classes).
|
|
14
|
+
* It safely *permits* external layout overrides (like `margin` / `m`) so that components can
|
|
15
|
+
* easily be spaced alongside other DOM elements.
|
|
16
|
+
*
|
|
17
|
+
* If a developer passes `overStyled={true}`, this filter allows all styling properties to
|
|
18
|
+
* flow through to the underlying MUI component natively, at the developer's own risk.
|
|
19
|
+
*
|
|
20
|
+
* @param props - The raw component props passed down to the wrapper
|
|
21
|
+
* @param overStyled - Boolean toggle to allow raw external styling. Defaults to false.
|
|
22
|
+
* @returns Sanitized component props safe for internal styling merging
|
|
23
|
+
*/
|
|
24
|
+
export declare const BLOCKED_STYLING_KEYS: readonly ["className", "classes", "style", "sx", "color", "bgcolor", "backgroundColor", "typography", "fontFamily", "fontSize", "fontWeight", "lineHeight", "letterSpacing", "textAlign", "border", "borderTop", "borderBottom", "borderLeft", "borderRight", "borderColor", "borderRadius", "boxShadow", "display", "position", "zIndex"];
|
|
25
|
+
export type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];
|
|
26
|
+
export type RecursicaSpacing = "rec-none" | "rec-sm" | "rec-default" | "rec-md" | "rec-lg" | "rec-xl" | "rec-2xl";
|
|
27
|
+
export type RecursicaSize = "small" | "default" | "large";
|
|
28
|
+
export type ForbiddenStyles = {
|
|
29
|
+
[K in BlockedStylingKeys]?: never;
|
|
30
|
+
};
|
|
31
|
+
export type RecursicaOverStyled<T> = (Omit<T, BlockedStylingKeys> & ForbiddenStyles & {
|
|
32
|
+
overStyled?: false | undefined;
|
|
33
|
+
}) | (T & {
|
|
34
|
+
overStyled: true;
|
|
35
|
+
});
|
|
36
|
+
export declare function filterStylingProps<T extends Record<string, unknown>>(props: T, overStyled?: boolean): Partial<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './copyToClipboard';
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@recursica/mui-adapter",
|
|
3
|
+
"description": "Reusable UI components for Recursica applications based on Material UI (MUI) v7",
|
|
4
|
+
"private": false,
|
|
5
|
+
"homepage": "https://github.com/borderux/recursica/tree/main/packages/mui-adapter",
|
|
6
|
+
"author": "hi@borderux.com",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/borderux/recursica/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/borderux/recursica.git"
|
|
13
|
+
},
|
|
14
|
+
"version": "0.1.0",
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/mui-adapter.cjs",
|
|
20
|
+
"module": "./dist/mui-adapter.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/mui-adapter.js",
|
|
26
|
+
"require": "./dist/mui-adapter.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./style.css": "./dist/mui-adapter.css"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"src",
|
|
33
|
+
"CHANGELOG.md",
|
|
34
|
+
".storybook/commonArgTypes.ts"
|
|
35
|
+
],
|
|
36
|
+
"keywords": [
|
|
37
|
+
"react",
|
|
38
|
+
"ui",
|
|
39
|
+
"components",
|
|
40
|
+
"typescript",
|
|
41
|
+
"mui",
|
|
42
|
+
"material-ui",
|
|
43
|
+
"recursica",
|
|
44
|
+
"design system",
|
|
45
|
+
"design systems"
|
|
46
|
+
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "npm run storybook",
|
|
49
|
+
"build": "vite build --mode library",
|
|
50
|
+
"build-storybook": "storybook build -o storybook-static",
|
|
51
|
+
"lint": "eslint .",
|
|
52
|
+
"storybook": "storybook dev -p 6006"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@chromatic-com/storybook": "^5.1.1",
|
|
56
|
+
"@eslint/js": "^9.25.0",
|
|
57
|
+
"@recursica/adapter-common": "*",
|
|
58
|
+
"@recursica/recursica-postcss-vars": "*",
|
|
59
|
+
"@recursica/storybook-template": "*",
|
|
60
|
+
"@repo/typescript-config": "*",
|
|
61
|
+
"@storybook/addon-a11y": "^10.3.3",
|
|
62
|
+
"@storybook/addon-docs": "^10.3.3",
|
|
63
|
+
"@storybook/addon-mcp": "^0.4.2",
|
|
64
|
+
"@storybook/addon-onboarding": "^10.3.3",
|
|
65
|
+
"@storybook/addon-vitest": "^10.3.3",
|
|
66
|
+
"@storybook/react-vite": "^10.3.3",
|
|
67
|
+
"@types/react": "^19.1.2",
|
|
68
|
+
"@types/react-dom": "^19.1.2",
|
|
69
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
70
|
+
"@vitest/browser": "^3.2.4",
|
|
71
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
72
|
+
"eslint": "^9.25.0",
|
|
73
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
74
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
75
|
+
"eslint-plugin-storybook": "^10.3.3",
|
|
76
|
+
"globals": "^16.0.0",
|
|
77
|
+
"playwright": "^1.53.0",
|
|
78
|
+
"react-markdown": "^10.1.0",
|
|
79
|
+
"sass": "^1.89.2",
|
|
80
|
+
"sirv": "^3.0.2",
|
|
81
|
+
"storybook": "^10.3.3",
|
|
82
|
+
"storybook-dark-mode": "^5.0.0",
|
|
83
|
+
"strip-literal": "^3.0.0",
|
|
84
|
+
"typescript": "~5.8.3",
|
|
85
|
+
"typescript-eslint": "^8.30.1",
|
|
86
|
+
"vite": "^6.3.5",
|
|
87
|
+
"vite-plugin-dts": "^4.5.4",
|
|
88
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
89
|
+
"vitest": "^3.2.4"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"@emotion/react": "^11.14.0",
|
|
93
|
+
"@emotion/styled": "^11.14.0",
|
|
94
|
+
"@mui/material": "^7.3.0",
|
|
95
|
+
"react": ">=16.8.0",
|
|
96
|
+
"react-dom": ">=16.8.0"
|
|
97
|
+
}
|
|
98
|
+
}
|