@recursica/adapter-mui-v7 1.0.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/ARCHITECTURE.md +18 -0
- package/CHANGELOG.md +582 -0
- package/LICENSE +21 -0
- package/OVERSTYLING.md +59 -0
- package/README.md +70 -0
- package/SETUP.md +92 -0
- package/USAGE.md +57 -0
- package/dist/adapter-mui-v7.cjs +292 -0
- package/dist/adapter-mui-v7.cjs.map +1 -0
- package/dist/adapter-mui-v7.css +1 -0
- package/dist/adapter-mui-v7.js +40757 -0
- package/dist/adapter-mui-v7.js.map +1 -0
- package/dist/index.d.ts +2350 -0
- package/dist/vite.svg +1 -0
- package/docs/PHILOSOPHY.md +39 -0
- package/llms.txt +76 -0
- package/package.json +151 -0
- package/recursica_brand.json +2677 -0
- package/recursica_tokens.json +799 -0
- package/recursica_ui-kit.json +14981 -0
- package/recursica_variables_scoped.css +30489 -0
- package/src/GlobalExemptions.modules.css +7 -0
- package/src/Introduction.stories.tsx +184 -0
- package/src/OverStyling.tsx +87 -0
- package/src/Version.tsx +37 -0
- package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +107 -0
- package/src/components/Accordion/Accordion.module.css +362 -0
- package/src/components/Accordion/Accordion.stories.tsx +198 -0
- package/src/components/Accordion/Accordion.test.tsx +1 -0
- package/src/components/Accordion/Accordion.tsx +285 -0
- package/src/components/Accordion/USAGE.md +43 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AssistiveElement/ASSISTIVEELEMENT_IMPLEMENTATION_NOTES.md +59 -0
- package/src/components/AssistiveElement/AssistiveElement.module.css +121 -0
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +68 -0
- package/src/components/AssistiveElement/AssistiveElement.test.tsx +1 -0
- package/src/components/AssistiveElement/AssistiveElement.tsx +94 -0
- package/src/components/AssistiveElement/USAGE.md +36 -0
- package/src/components/AssistiveElement/index.ts +1 -0
- package/src/components/AutoComplete/AutoComplete.module.css +456 -0
- package/src/components/AutoComplete/AutoComplete.stories.tsx +336 -0
- package/src/components/AutoComplete/AutoComplete.test.tsx +1 -0
- package/src/components/AutoComplete/AutoComplete.tsx +266 -0
- package/src/components/AutoComplete/IMPLEMENTATION_NOTES.md +37 -0
- package/src/components/AutoComplete/USAGE.md +68 -0
- package/src/components/AutoComplete/index.ts +1 -0
- package/src/components/Avatar/AVATAR_IMPLEMENTATION_NOTES.md +36 -0
- package/src/components/Avatar/Avatar.module.css +336 -0
- package/src/components/Avatar/Avatar.stories.tsx +92 -0
- package/src/components/Avatar/Avatar.test.tsx +1 -0
- package/src/components/Avatar/Avatar.tsx +88 -0
- package/src/components/Avatar/USAGE.md +38 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Badge/Badge.module.css +115 -0
- package/src/components/Badge/Badge.stories.tsx +78 -0
- package/src/components/Badge/Badge.test.tsx +1 -0
- package/src/components/Badge/Badge.tsx +61 -0
- package/src/components/Badge/USAGE.md +40 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Breadcrumb/BREADCRUMB_IMPLEMENTATION_NOTES.md +51 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css +51 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +114 -0
- package/src/components/Breadcrumb/Breadcrumb.test.tsx +1 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +70 -0
- package/src/components/Breadcrumb/USAGE.md +42 -0
- package/src/components/Breadcrumb/index.ts +1 -0
- package/src/components/Button/BUTTON_IMPLEMENTATION_NOTES.md +123 -0
- package/src/components/Button/Button.module.css +413 -0
- package/src/components/Button/Button.stories.tsx +196 -0
- package/src/components/Button/Button.styleIsolation.dom.test.tsx +98 -0
- package/src/components/Button/Button.tsx +156 -0
- package/src/components/Button/USAGE.md +46 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Card/CARD_IMPLEMENTATION_NOTES.md +15 -0
- package/src/components/Card/Card.module.css +155 -0
- package/src/components/Card/Card.stories.tsx +131 -0
- package/src/components/Card/Card.test.tsx +1 -0
- package/src/components/Card/Card.tsx +202 -0
- package/src/components/Card/USAGE.md +57 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Checkbox/CHECKBOX_IMPLEMENTATION_NOTES.md +14 -0
- package/src/components/Checkbox/Checkbox.module.css +286 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +97 -0
- package/src/components/Checkbox/Checkbox.test.tsx +1 -0
- package/src/components/Checkbox/Checkbox.tsx +259 -0
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +139 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +148 -0
- package/src/components/Checkbox/USAGE.md +36 -0
- package/src/components/Checkbox/index.ts +6 -0
- package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +102 -0
- package/src/components/Chip/Chip.module.css +283 -0
- package/src/components/Chip/Chip.stories.tsx +154 -0
- package/src/components/Chip/Chip.test.tsx +1 -0
- package/src/components/Chip/Chip.tsx +168 -0
- package/src/components/Chip/USAGE.md +55 -0
- package/src/components/Chip/index.ts +1 -0
- package/src/components/Container/Container.stories.tsx +118 -0
- package/src/components/Container/Container.test.tsx +1 -0
- package/src/components/Container/Container.tsx +51 -0
- package/src/components/Container/IMPLEMENTATION_NOTES.md +5 -0
- package/src/components/Container/USAGE.md +48 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/DatePicker/DATEPICKER_IMPLEMENTATION_NOTES.md +29 -0
- package/src/components/DatePicker/DatePicker.icons.tsx +35 -0
- package/src/components/DatePicker/DatePicker.module.css +464 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +163 -0
- package/src/components/DatePicker/DatePicker.test.tsx +1 -0
- package/src/components/DatePicker/DatePicker.tsx +229 -0
- package/src/components/DatePicker/USAGE.md +49 -0
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/Dropdown/BareDropdown.tsx +168 -0
- package/src/components/Dropdown/DROPDOWN_IMPLEMENTATION_NOTES.md +45 -0
- package/src/components/Dropdown/Dropdown.icons.tsx +33 -0
- package/src/components/Dropdown/Dropdown.module.css +535 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +252 -0
- package/src/components/Dropdown/Dropdown.test.tsx +1 -0
- package/src/components/Dropdown/Dropdown.tsx +319 -0
- package/src/components/Dropdown/USAGE.md +68 -0
- package/src/components/Dropdown/index.ts +1 -0
- package/src/components/FileInput/FILEINPUT_IMPLEMENTATION_NOTES.md +153 -0
- package/src/components/FileInput/FileInput.module.css +268 -0
- package/src/components/FileInput/FileInput.stories.tsx +313 -0
- package/src/components/FileInput/FileInput.test.tsx +1 -0
- package/src/components/FileInput/FileInput.tsx +415 -0
- package/src/components/FileInput/USAGE.md +145 -0
- package/src/components/FileInput/index.ts +1 -0
- package/src/components/FileUpload/FILEUPLOAD_IMPLEMENTATION_NOTES.md +249 -0
- package/src/components/FileUpload/FileUpload.module.css +200 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +362 -0
- package/src/components/FileUpload/FileUpload.test.tsx +1 -0
- package/src/components/FileUpload/FileUpload.tsx +352 -0
- package/src/components/FileUpload/USAGE.md +199 -0
- package/src/components/FileUpload/index.ts +1 -0
- package/src/components/Flex/Flex.stories.tsx +128 -0
- package/src/components/Flex/Flex.test.tsx +1 -0
- package/src/components/Flex/Flex.tsx +89 -0
- package/src/components/Flex/USAGE.md +41 -0
- package/src/components/Flex/index.ts +1 -0
- package/src/components/FormControlLayout/FormControlLayout.module.css +92 -0
- package/src/components/FormControlLayout/FormControlLayout.stories.tsx +118 -0
- package/src/components/FormControlLayout/FormControlLayout.test.tsx +1 -0
- package/src/components/FormControlLayout/FormControlLayout.tsx +72 -0
- package/src/components/FormControlLayout/USAGE.md +40 -0
- package/src/components/FormControlLayout/index.ts +1 -0
- package/src/components/FormControlWrapper/FORMCONTROLWRAPPER_IMPLEMENTATION_NOTES.md +35 -0
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +87 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +129 -0
- package/src/components/FormControlWrapper/FormControlWrapper.test.tsx +1 -0
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +149 -0
- package/src/components/FormControlWrapper/USAGE.md +40 -0
- package/src/components/FormControlWrapper/index.ts +1 -0
- package/src/components/Grid/Grid.module.css +72 -0
- package/src/components/Grid/Grid.stories.tsx +161 -0
- package/src/components/Grid/Grid.test.tsx +1 -0
- package/src/components/Grid/Grid.tsx +155 -0
- package/src/components/Grid/IMPLEMENTATION_NOTES.md +24 -0
- package/src/components/Grid/USAGE.md +53 -0
- package/src/components/Grid/index.ts +1 -0
- package/src/components/Group/Group.stories.tsx +120 -0
- package/src/components/Group/Group.test.tsx +1 -0
- package/src/components/Group/Group.tsx +116 -0
- package/src/components/Group/USAGE.md +41 -0
- package/src/components/Group/index.ts +1 -0
- package/src/components/Heading/Heading.stories.tsx +50 -0
- package/src/components/Heading/Heading.test.tsx +1 -0
- package/src/components/Heading/Heading.tsx +28 -0
- package/src/components/Heading/USAGE.md +36 -0
- package/src/components/Heading/index.ts +1 -0
- package/src/components/HoverCard/HoverCard.module.css +107 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +172 -0
- package/src/components/HoverCard/HoverCard.test.tsx +1 -0
- package/src/components/HoverCard/HoverCard.tsx +145 -0
- package/src/components/HoverCard/USAGE.md +45 -0
- package/src/components/HoverCard/index.ts +1 -0
- package/src/components/Label/LABEL_IMPLEMENTATION_NOTES.md +27 -0
- package/src/components/Label/Label.module.css +169 -0
- package/src/components/Label/Label.stories.tsx +131 -0
- package/src/components/Label/Label.test.tsx +1 -0
- package/src/components/Label/Label.tsx +96 -0
- package/src/components/Label/USAGE.md +36 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Layer/USAGE.md +50 -0
- package/src/components/Link/LINK_IMPLEMENTATION_NOTES.md +9 -0
- package/src/components/Link/Link.module.css +105 -0
- package/src/components/Link/Link.stories.tsx +58 -0
- package/src/components/Link/Link.test.tsx +1 -0
- package/src/components/Link/Link.tsx +45 -0
- package/src/components/Link/USAGE.md +40 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Loader/LOADER_IMPLEMENTATION_NOTES.md +25 -0
- package/src/components/Loader/Loader.animate.dom.test.tsx +72 -0
- package/src/components/Loader/Loader.module.css +175 -0
- package/src/components/Loader/Loader.stories.tsx +123 -0
- package/src/components/Loader/Loader.test.tsx +1 -0
- package/src/components/Loader/Loader.tsx +72 -0
- package/src/components/Loader/USAGE.md +42 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Menu/IMPLEMENTATION_NOTES.md +5 -0
- package/src/components/Menu/Menu.module.css +283 -0
- package/src/components/Menu/Menu.stories.tsx +405 -0
- package/src/components/Menu/Menu.test.tsx +1 -0
- package/src/components/Menu/Menu.tsx +103 -0
- package/src/components/Menu/USAGE.md +53 -0
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Modal/MODAL_IMPLEMENTATION_NOTES.md +31 -0
- package/src/components/Modal/Modal.module.css +302 -0
- package/src/components/Modal/Modal.stories.tsx +105 -0
- package/src/components/Modal/Modal.test.tsx +1 -0
- package/src/components/Modal/Modal.tsx +231 -0
- package/src/components/Modal/USAGE.md +40 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/NumberInput/NUMBER_INPUT_IMPLEMENTATION_NOTES.md +93 -0
- package/src/components/NumberInput/NumberInput.module.css +303 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +96 -0
- package/src/components/NumberInput/NumberInput.test.tsx +1 -0
- package/src/components/NumberInput/NumberInput.tsx +273 -0
- package/src/components/NumberInput/USAGE.md +36 -0
- package/src/components/NumberInput/index.ts +1 -0
- package/src/components/Pagination/IMPLEMENTATION_NOTES.md +40 -0
- package/src/components/Pagination/Pagination.icons.tsx +66 -0
- package/src/components/Pagination/Pagination.module.css +197 -0
- package/src/components/Pagination/Pagination.stories.tsx +48 -0
- package/src/components/Pagination/Pagination.test.tsx +1 -0
- package/src/components/Pagination/Pagination.tsx +123 -0
- package/src/components/Pagination/USAGE.md +36 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +133 -0
- package/src/components/Panel/Panel.module.css +231 -0
- package/src/components/Panel/Panel.stories.tsx +227 -0
- package/src/components/Panel/Panel.test.tsx +1 -0
- package/src/components/Panel/Panel.tsx +186 -0
- package/src/components/Panel/USAGE.md +46 -0
- package/src/components/Panel/index.ts +1 -0
- package/src/components/Popover/IMPLEMENTATION_NOTES.md +22 -0
- package/src/components/Popover/Popover.module.css +118 -0
- package/src/components/Popover/Popover.stories.tsx +133 -0
- package/src/components/Popover/Popover.test.tsx +1 -0
- package/src/components/Popover/Popover.tsx +267 -0
- package/src/components/Popover/USAGE.md +69 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/Radio/RADIO_IMPLEMENTATION_NOTES.md +12 -0
- package/src/components/Radio/Radio.module.css +247 -0
- package/src/components/Radio/Radio.stories.tsx +93 -0
- package/src/components/Radio/Radio.test.tsx +1 -0
- package/src/components/Radio/Radio.tsx +223 -0
- package/src/components/Radio/RadioGroup.stories.tsx +117 -0
- package/src/components/Radio/RadioGroup.tsx +122 -0
- package/src/components/Radio/USAGE.md +36 -0
- package/src/components/Radio/index.ts +2 -0
- package/src/components/ReadOnlyField/ReadOnlyBooleanField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +54 -0
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +163 -0
- package/src/components/ReadOnlyField/ReadOnlyField.test.tsx +1 -0
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +108 -0
- package/src/components/ReadOnlyField/ReadOnlySwitchField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +48 -0
- package/src/components/ReadOnlyField/USAGE.md +36 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +93 -0
- package/src/components/ReadOnlyField/index.ts +2 -0
- package/src/components/RecursicaThemeProvider/USAGE.md +60 -0
- package/src/components/SegmentedControl/IMPLEMENTATION_NOTES.md +14 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +201 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +106 -0
- package/src/components/SegmentedControl/SegmentedControl.test.tsx +1 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +149 -0
- package/src/components/SegmentedControl/USAGE.md +49 -0
- package/src/components/SegmentedControl/index.ts +1 -0
- package/src/components/Slider/IMPLEMENTATION_NOTES.md +55 -0
- package/src/components/Slider/Slider.module.css +635 -0
- package/src/components/Slider/Slider.stories.tsx +282 -0
- package/src/components/Slider/Slider.test.tsx +1 -0
- package/src/components/Slider/Slider.tsx +435 -0
- package/src/components/Slider/USAGE.md +56 -0
- package/src/components/Slider/index.ts +1 -0
- package/src/components/Stack/Stack.stories.tsx +108 -0
- package/src/components/Stack/Stack.test.tsx +1 -0
- package/src/components/Stack/Stack.tsx +43 -0
- package/src/components/Stack/USAGE.md +41 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Stepper/IMPLEMENTATION_NOTES.md +120 -0
- package/src/components/Stepper/Stepper.module.css +474 -0
- package/src/components/Stepper/Stepper.stories.tsx +157 -0
- package/src/components/Stepper/Stepper.test.tsx +1 -0
- package/src/components/Stepper/Stepper.tsx +240 -0
- package/src/components/Stepper/USAGE.md +45 -0
- package/src/components/Stepper/index.ts +1 -0
- package/src/components/Switch/SWITCH_IMPLEMENTATION_NOTES.md +147 -0
- package/src/components/Switch/Switch.module.css +346 -0
- package/src/components/Switch/Switch.stories.tsx +114 -0
- package/src/components/Switch/Switch.test.tsx +1 -0
- package/src/components/Switch/Switch.tsx +294 -0
- package/src/components/Switch/SwitchGroup.stories.tsx +132 -0
- package/src/components/Switch/SwitchGroup.tsx +156 -0
- package/src/components/Switch/USAGE.md +36 -0
- package/src/components/Switch/index.ts +2 -0
- package/src/components/Table/TABLE_IMPLEMENTATION_NOTES.md +75 -0
- package/src/components/Table/Table.module.css +462 -0
- package/src/components/Table/Table.stories.tsx +154 -0
- package/src/components/Table/Table.test.tsx +1 -0
- package/src/components/Table/Table.tsx +250 -0
- package/src/components/Table/USAGE.md +90 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Tabs/IMPLEMENTATION_NOTES.md +76 -0
- package/src/components/Tabs/Tabs.module.css +801 -0
- package/src/components/Tabs/Tabs.stories.tsx +174 -0
- package/src/components/Tabs/Tabs.test.tsx +1 -0
- package/src/components/Tabs/Tabs.tsx +103 -0
- package/src/components/Tabs/USAGE.md +61 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Text/TEXT_IMPLEMENTATION_NOTES.md +10 -0
- package/src/components/Text/Text.stories.tsx +75 -0
- package/src/components/Text/Text.test.tsx +1 -0
- package/src/components/Text/Text.tsx +19 -0
- package/src/components/Text/USAGE.md +40 -0
- package/src/components/Text/index.ts +1 -0
- package/src/components/TextArea/TEXTAREA_IMPLEMENTATION_NOTES.md +42 -0
- package/src/components/TextArea/TextArea.module.css +203 -0
- package/src/components/TextArea/TextArea.stories.tsx +94 -0
- package/src/components/TextArea/TextArea.test.tsx +1 -0
- package/src/components/TextArea/TextArea.tsx +162 -0
- package/src/components/TextArea/USAGE.md +38 -0
- package/src/components/TextArea/index.ts +1 -0
- package/src/components/TextField/TextField.module.css +271 -0
- package/src/components/TextField/TextField.stories.tsx +162 -0
- package/src/components/TextField/TextField.test.tsx +1 -0
- package/src/components/TextField/TextField.tsx +182 -0
- package/src/components/TextField/USAGE.md +38 -0
- package/src/components/TextField/index.ts +1 -0
- package/src/components/TimePicker/TIMEPICKER_IMPLEMENTATION_NOTES.md +89 -0
- package/src/components/TimePicker/TimePicker.module.css +262 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +155 -0
- package/src/components/TimePicker/TimePicker.test.tsx +1 -0
- package/src/components/TimePicker/TimePicker.tsx +277 -0
- package/src/components/TimePicker/USAGE.md +61 -0
- package/src/components/TimePicker/index.ts +1 -0
- package/src/components/Timeline/IMPLEMENTATION_NOTES.md +42 -0
- package/src/components/Timeline/Timeline.module.css +363 -0
- package/src/components/Timeline/Timeline.stories.tsx +128 -0
- package/src/components/Timeline/Timeline.test.tsx +1 -0
- package/src/components/Timeline/Timeline.tsx +90 -0
- package/src/components/Timeline/TimelineItem.tsx +95 -0
- package/src/components/Timeline/USAGE.md +41 -0
- package/src/components/Timeline/index.ts +2 -0
- package/src/components/Toast/TOAST_IMPLEMENTATION_NOTES.md +37 -0
- package/src/components/Toast/Toast.module.css +193 -0
- package/src/components/Toast/Toast.stories.tsx +67 -0
- package/src/components/Toast/Toast.test.tsx +1 -0
- package/src/components/Toast/Toast.tsx +121 -0
- package/src/components/Toast/USAGE.md +42 -0
- package/src/components/Toast/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.module.css +83 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +165 -0
- package/src/components/Tooltip/Tooltip.test.tsx +1 -0
- package/src/components/Tooltip/Tooltip.tsx +78 -0
- package/src/components/Tooltip/USAGE.md +40 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/TransferList/TRANSFERLIST_IMPLEMENTATION_NOTES.md +140 -0
- package/src/components/TransferList/TransferList.module.css +174 -0
- package/src/components/TransferList/TransferList.stories.tsx +121 -0
- package/src/components/TransferList/TransferList.test.tsx +1 -0
- package/src/components/TransferList/TransferList.tsx +419 -0
- package/src/components/TransferList/USAGE.md +77 -0
- package/src/components/TransferList/index.ts +1 -0
- package/src/components/Tree/IMPLEMENTATION_NOTES.md +53 -0
- package/src/components/Tree/Tree.module.css +272 -0
- package/src/components/Tree/Tree.stories.tsx +104 -0
- package/src/components/Tree/Tree.test.tsx +1 -0
- package/src/components/Tree/Tree.tsx +298 -0
- package/src/components/Tree/USAGE.md +99 -0
- package/src/components/Tree/index.ts +1 -0
- package/src/components/Typography/TYPOGRAPHY_IMPLEMENTATION_NOTES.md +17 -0
- package/src/components/Typography/Typography.module.css +13 -0
- package/src/components/Typography/Typography.test.tsx +1 -0
- package/src/components/Typography/Typography.tsx +43 -0
- package/src/components/Typography/USAGE.md +40 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/index.ts +50 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +194 -0
- package/src/types/index.ts +9 -0
- package/src/types/scss-modules.d.ts +9 -0
- package/src/utils/ColorSchemeWrapper.tsx +23 -0
- package/src/utils/RequireAccessibleLabel.ts +1 -0
- package/src/utils/copyToClipboard.ts +36 -0
- package/src/utils/filterStylingProps.test.ts +85 -0
- package/src/utils/filterStylingProps.ts +143 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/renderRichOption.tsx +51 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Tabs, Tab, TabPanel } from "./Tabs";
|
|
4
|
+
import { TabContext } from "@mui/lab";
|
|
5
|
+
import { Flex } from "../Flex/Flex";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Tabs> = {
|
|
8
|
+
title: "UI-Kit/Tabs",
|
|
9
|
+
component: Tabs,
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: "centered",
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
variant: {
|
|
16
|
+
control: "radio",
|
|
17
|
+
options: ["default", "outline", "pills"],
|
|
18
|
+
},
|
|
19
|
+
orientation: {
|
|
20
|
+
control: "radio",
|
|
21
|
+
options: ["horizontal", "vertical"],
|
|
22
|
+
},
|
|
23
|
+
// @ts-expect-error Custom prop not in native TabsProps
|
|
24
|
+
disabled: {
|
|
25
|
+
control: "boolean",
|
|
26
|
+
},
|
|
27
|
+
defaultChecked: {
|
|
28
|
+
table: {
|
|
29
|
+
disable: true,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof Tabs>;
|
|
37
|
+
|
|
38
|
+
const InteractiveTabs = (
|
|
39
|
+
args: React.ComponentProps<typeof Tabs> & {
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
inverted?: boolean;
|
|
42
|
+
},
|
|
43
|
+
) => {
|
|
44
|
+
const [value, setValue] = useState("gallery");
|
|
45
|
+
|
|
46
|
+
const handleChange = (_event: React.SyntheticEvent, newValue: string) => {
|
|
47
|
+
setValue(newValue);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Flex
|
|
52
|
+
direction={args.orientation === "vertical" ? "row" : "column"}
|
|
53
|
+
style={{ width: 600, height: 300 }}
|
|
54
|
+
>
|
|
55
|
+
<TabContext value={value}>
|
|
56
|
+
<Tabs value={value} onChange={handleChange} {...args}>
|
|
57
|
+
<Tab
|
|
58
|
+
value="gallery"
|
|
59
|
+
label="Gallery"
|
|
60
|
+
disabled={args.disabled}
|
|
61
|
+
icon={
|
|
62
|
+
<svg
|
|
63
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
64
|
+
viewBox="0 0 24 24"
|
|
65
|
+
fill="none"
|
|
66
|
+
stroke="currentColor"
|
|
67
|
+
strokeWidth="2"
|
|
68
|
+
strokeLinecap="round"
|
|
69
|
+
strokeLinejoin="round"
|
|
70
|
+
width={16}
|
|
71
|
+
height={16}
|
|
72
|
+
>
|
|
73
|
+
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
74
|
+
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
75
|
+
<polyline points="21 15 16 10 5 21"></polyline>
|
|
76
|
+
</svg>
|
|
77
|
+
}
|
|
78
|
+
iconPosition="start"
|
|
79
|
+
/>
|
|
80
|
+
<Tab
|
|
81
|
+
value="messages"
|
|
82
|
+
label="Messages"
|
|
83
|
+
disabled={args.disabled}
|
|
84
|
+
icon={
|
|
85
|
+
<svg
|
|
86
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
87
|
+
viewBox="0 0 24 24"
|
|
88
|
+
fill="none"
|
|
89
|
+
stroke="currentColor"
|
|
90
|
+
strokeWidth="2"
|
|
91
|
+
strokeLinecap="round"
|
|
92
|
+
strokeLinejoin="round"
|
|
93
|
+
width={16}
|
|
94
|
+
height={16}
|
|
95
|
+
>
|
|
96
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
97
|
+
</svg>
|
|
98
|
+
}
|
|
99
|
+
iconPosition="start"
|
|
100
|
+
/>
|
|
101
|
+
<Tab
|
|
102
|
+
value="settings"
|
|
103
|
+
label="Settings"
|
|
104
|
+
disabled={args.disabled}
|
|
105
|
+
icon={
|
|
106
|
+
<svg
|
|
107
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
108
|
+
viewBox="0 0 24 24"
|
|
109
|
+
fill="none"
|
|
110
|
+
stroke="currentColor"
|
|
111
|
+
strokeWidth="2"
|
|
112
|
+
strokeLinecap="round"
|
|
113
|
+
strokeLinejoin="round"
|
|
114
|
+
width={16}
|
|
115
|
+
height={16}
|
|
116
|
+
>
|
|
117
|
+
<circle cx="12" cy="12" r="3"></circle>
|
|
118
|
+
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
|
|
119
|
+
</svg>
|
|
120
|
+
}
|
|
121
|
+
iconPosition="start"
|
|
122
|
+
/>
|
|
123
|
+
</Tabs>
|
|
124
|
+
|
|
125
|
+
<TabPanel value="gallery">Gallery tab content</TabPanel>
|
|
126
|
+
|
|
127
|
+
<TabPanel value="messages">Messages tab content</TabPanel>
|
|
128
|
+
|
|
129
|
+
<TabPanel value="settings">Settings tab content</TabPanel>
|
|
130
|
+
</TabContext>
|
|
131
|
+
</Flex>
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const Default: Story = {
|
|
136
|
+
render: (args) => <InteractiveTabs {...args} />,
|
|
137
|
+
args: {
|
|
138
|
+
variant: "default",
|
|
139
|
+
orientation: "horizontal",
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export const Outline: Story = {
|
|
144
|
+
render: (args) => <InteractiveTabs {...args} />,
|
|
145
|
+
args: {
|
|
146
|
+
variant: "outline",
|
|
147
|
+
orientation: "horizontal",
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const Pills: Story = {
|
|
152
|
+
render: (args) => <InteractiveTabs {...args} />,
|
|
153
|
+
args: {
|
|
154
|
+
variant: "pills",
|
|
155
|
+
orientation: "horizontal",
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export const Vertical: Story = {
|
|
160
|
+
render: (args) => <InteractiveTabs {...args} />,
|
|
161
|
+
args: {
|
|
162
|
+
variant: "default",
|
|
163
|
+
orientation: "vertical",
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export const Inverted: Story = {
|
|
168
|
+
render: (args) => <InteractiveTabs {...args} />,
|
|
169
|
+
args: {
|
|
170
|
+
variant: "default",
|
|
171
|
+
orientation: "horizontal",
|
|
172
|
+
inverted: true,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Placeholder for future Tabs component tests. Add tests here if/when needed.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Tabs as MuiTabs,
|
|
4
|
+
type TabsProps as MuiTabsProps,
|
|
5
|
+
Tab as MuiTab,
|
|
6
|
+
type TabProps as MuiTabProps,
|
|
7
|
+
} from "@mui/material";
|
|
8
|
+
import {
|
|
9
|
+
filterStylingProps,
|
|
10
|
+
mergeClassNames,
|
|
11
|
+
type RecursicaOverStyled,
|
|
12
|
+
} from "../../utils/filterStylingProps";
|
|
13
|
+
import styles from "./Tabs.module.css";
|
|
14
|
+
|
|
15
|
+
import { type RecursicaTabsProps } from "@recursica/adapter-common";
|
|
16
|
+
|
|
17
|
+
export interface RecursicaTabsPropsExtended
|
|
18
|
+
extends Omit<MuiTabsProps, "variant">,
|
|
19
|
+
RecursicaTabsProps {}
|
|
20
|
+
|
|
21
|
+
export type TabsProps = RecursicaOverStyled<RecursicaTabsPropsExtended>;
|
|
22
|
+
|
|
23
|
+
export const Tabs = forwardRef<HTMLDivElement, TabsProps>(
|
|
24
|
+
function Tabs(props, ref) {
|
|
25
|
+
const {
|
|
26
|
+
variant = "default",
|
|
27
|
+
orientation = "horizontal",
|
|
28
|
+
inverted = false,
|
|
29
|
+
overStyled = false,
|
|
30
|
+
className,
|
|
31
|
+
...rest
|
|
32
|
+
} = props;
|
|
33
|
+
|
|
34
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
35
|
+
|
|
36
|
+
const mergedClassNames = mergeClassNames(
|
|
37
|
+
{
|
|
38
|
+
flexContainer: styles.list,
|
|
39
|
+
indicator: styles.indicator,
|
|
40
|
+
},
|
|
41
|
+
(sanitizedProps as Record<string, unknown>).classes as
|
|
42
|
+
| Partial<Record<string, string>>
|
|
43
|
+
| undefined,
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<MuiTabs
|
|
48
|
+
ref={ref}
|
|
49
|
+
{...(sanitizedProps as MuiTabsProps)}
|
|
50
|
+
orientation={orientation}
|
|
51
|
+
className={`${styles.root} ${className || ""}`}
|
|
52
|
+
data-variant={variant}
|
|
53
|
+
data-orientation={orientation}
|
|
54
|
+
data-inverted={inverted || undefined}
|
|
55
|
+
classes={mergedClassNames}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
Tabs.displayName = "Tabs";
|
|
62
|
+
|
|
63
|
+
export type TabProps = RecursicaOverStyled<MuiTabProps>;
|
|
64
|
+
|
|
65
|
+
export const Tab = forwardRef<HTMLDivElement, TabProps>(
|
|
66
|
+
function Tab(props, ref) {
|
|
67
|
+
const { overStyled = false, className, ...rest } = props;
|
|
68
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<MuiTab
|
|
72
|
+
ref={ref}
|
|
73
|
+
disableRipple
|
|
74
|
+
className={`${styles.tab} ${className || ""}`}
|
|
75
|
+
{...(sanitizedProps as MuiTabProps)}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
},
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
Tab.displayName = "Tab";
|
|
82
|
+
|
|
83
|
+
import { TabPanel as MuiTabPanel } from "@mui/lab";
|
|
84
|
+
import type { TabPanelProps as MuiTabPanelProps } from "@mui/lab";
|
|
85
|
+
|
|
86
|
+
export type TabPanelProps = RecursicaOverStyled<MuiTabPanelProps>;
|
|
87
|
+
|
|
88
|
+
export const TabPanel = forwardRef<HTMLDivElement, TabPanelProps>(
|
|
89
|
+
function TabPanel(props, ref) {
|
|
90
|
+
const { overStyled = false, className, ...rest } = props;
|
|
91
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<MuiTabPanel
|
|
95
|
+
ref={ref}
|
|
96
|
+
className={`${styles.panel} ${className || ""}`}
|
|
97
|
+
{...(sanitizedProps as MuiTabPanelProps)}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
},
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
TabPanel.displayName = "TabPanel";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Tabs - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `Tabs` component in your projects using `@recursica/adapter-mui-v7`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Import Reference
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Tabs, Tab, TabPanel } from "@recursica/adapter-mui-v7";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Basic Example
|
|
16
|
+
|
|
17
|
+
Unlike the mantine-adapter, `Tabs` has no `.List`/`.Panel` compound API — it mirrors native
|
|
18
|
+
MUI's own `@mui/lab` split, where `Tabs`/`Tab` and `TabPanel` are separate elements coordinated
|
|
19
|
+
by `TabContext`. Because `TabPanel` renders as a sibling of `Tabs` (not nested inside it), wrap
|
|
20
|
+
both in a column-direction container yourself so the panel renders below the tab list instead of
|
|
21
|
+
beside it.
|
|
22
|
+
|
|
23
|
+
> [!WARNING] > `Tabs` wraps `@mui/material`'s `Tabs`, which does **not** read `TabContext` for its own
|
|
24
|
+
> selected state — only `TabPanel` (from `@mui/lab`) does that. You must pass `value` to `Tabs`
|
|
25
|
+
> explicitly, in addition to wrapping everything in `TabContext`. Omitting it silently leaves
|
|
26
|
+
> every tab unselected (no active styling, no indicator).
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import React, { useState } from "react";
|
|
30
|
+
import { TabContext } from "@mui/lab";
|
|
31
|
+
import { Tabs, Tab, TabPanel, Flex } from "@recursica/adapter-mui-v7";
|
|
32
|
+
|
|
33
|
+
export default function Demo() {
|
|
34
|
+
const [value, setValue] = useState("home");
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Flex direction="column">
|
|
38
|
+
<TabContext value={value}>
|
|
39
|
+
<Tabs value={value} onChange={(_e, v) => setValue(v)}>
|
|
40
|
+
<Tab value="home" label="Home" />
|
|
41
|
+
<Tab value="profile" label="Profile" />
|
|
42
|
+
</Tabs>
|
|
43
|
+
<TabPanel value="home">Home content</TabPanel>
|
|
44
|
+
<TabPanel value="profile">Profile content</TabPanel>
|
|
45
|
+
</TabContext>
|
|
46
|
+
</Flex>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 3. Design System Integration
|
|
54
|
+
|
|
55
|
+
All Recursica components in the `@recursica/adapter-mui-v7` package adhere strictly to design system spacing, scaling, and behavior patterns.
|
|
56
|
+
|
|
57
|
+
> [!IMPORTANT]
|
|
58
|
+
>
|
|
59
|
+
> - **Anti-override protection**: Rogues style injections (like inline `style` or arbitrary `className`) are automatically blocked by our prop layer unless `overStyled={true}` is explicitly provided.
|
|
60
|
+
> - **No Direct Layers**: Do not pass a `layer` prop to this component. To place it on a specific visual layer, wrap it in a `<Layer layer={0|1|2|3}>` component natively.
|
|
61
|
+
> - **Variables and Theming**: Styling is entirely determined by local CSS variables defined in `recursica_variables_scoped.css` and mapped in the component's CSS module.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Tabs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Text – Implementation Notes
|
|
2
|
+
|
|
3
|
+
## `StaticVariations` story gap didn't match mantine (2026-08-30, source-of-truth audit)
|
|
4
|
+
|
|
5
|
+
**Found:** `ui-kit-text--static-variations` used `gap: "24px"` in its own inline story wrapper,
|
|
6
|
+
while mantine's equivalent story used `gap: "16px"` — same component, same six variants, but
|
|
7
|
+
visibly more vertical space between each item in mui's render. Not a component bug: `Text.tsx`
|
|
8
|
+
itself has no opinion on inter-item spacing; the gap is entirely owned by each story's own
|
|
9
|
+
`<div style={{ display: "flex", flexDirection: "column", gap }}>` wrapper. Fixed by changing the
|
|
10
|
+
story's `gap` to `"16px"` to match mantine's.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Text } from "./Text";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Text> = {
|
|
5
|
+
title: "UI-Kit/Text",
|
|
6
|
+
component: Text,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component:
|
|
12
|
+
"The standard `<Text>` component controls common body sizing scales and implicit paragraphs governed by the active theme layer. For semantic headings (`h1` through `h6`), use `<Heading>` instead.",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
variant: {
|
|
18
|
+
control: "select",
|
|
19
|
+
options: [
|
|
20
|
+
"body",
|
|
21
|
+
"body-small",
|
|
22
|
+
"caption",
|
|
23
|
+
"overline",
|
|
24
|
+
"subtitle",
|
|
25
|
+
"subtitle-small",
|
|
26
|
+
],
|
|
27
|
+
description:
|
|
28
|
+
"Controls the standard logical boundary definitions natively extracted from Figma.",
|
|
29
|
+
},
|
|
30
|
+
c: {
|
|
31
|
+
control: "text",
|
|
32
|
+
description:
|
|
33
|
+
"Standard Mantine color string mapped via internal boundaries. Example: `dimmed`",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default meta;
|
|
39
|
+
|
|
40
|
+
type Story = StoryObj<typeof Text>;
|
|
41
|
+
|
|
42
|
+
export const Default: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
variant: "body",
|
|
45
|
+
children:
|
|
46
|
+
"This is standard body typography controlled by the central UI-kit boundaries exclusively.",
|
|
47
|
+
},
|
|
48
|
+
render: ({ ...args }) => <Text {...args} />,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const StaticVariations: Story = {
|
|
52
|
+
args: {},
|
|
53
|
+
render: () => (
|
|
54
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
|
|
55
|
+
<Text variant="body">
|
|
56
|
+
Body (Base paragraph and generic information flow)
|
|
57
|
+
</Text>
|
|
58
|
+
<Text variant="body-small">
|
|
59
|
+
Body Small (Compacted list items and helper blocks)
|
|
60
|
+
</Text>
|
|
61
|
+
<Text variant="caption">
|
|
62
|
+
Caption (Data table descriptions or micro-labels)
|
|
63
|
+
</Text>
|
|
64
|
+
<Text variant="overline">
|
|
65
|
+
Overline (Card contextual pre-headers and categorical tags)
|
|
66
|
+
</Text>
|
|
67
|
+
<Text variant="subtitle">
|
|
68
|
+
Subtitle (Minor sub-headers avoiding heavy display weights)
|
|
69
|
+
</Text>
|
|
70
|
+
<Text variant="subtitle-small">
|
|
71
|
+
Subtitle Small (Section anchors deep in hierarchy)
|
|
72
|
+
</Text>
|
|
73
|
+
</div>
|
|
74
|
+
),
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Placeholder for future Text component tests. Add tests here if/when needed.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { type TypographyProps as MuiTypographyProps } from "@mui/material";
|
|
3
|
+
import { Typography } from "../Typography/Typography";
|
|
4
|
+
import { type RecursicaOverStyled } from "../../utils/filterStylingProps";
|
|
5
|
+
import { type RecursicaTextProps } from "@recursica/adapter-common";
|
|
6
|
+
|
|
7
|
+
export type TextProps = RecursicaOverStyled<
|
|
8
|
+
Omit<MuiTypographyProps, "variant" | "classes"> & RecursicaTextProps
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export const Text = forwardRef<HTMLElement, TextProps>(function Text(
|
|
12
|
+
{ variant = "body", ...rest },
|
|
13
|
+
ref,
|
|
14
|
+
) {
|
|
15
|
+
const typographyClass = `recursica_brand_typography_${variant}`;
|
|
16
|
+
return <Typography ref={ref} typographyClass={typographyClass} {...rest} />;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
Text.displayName = "Text";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Text - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `Text` component in your projects using `@recursica/adapter-mui-v7`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Import Reference
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Text } from "@recursica/adapter-mui-v7";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Basic Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { Text } from "@recursica/adapter-mui-v7";
|
|
20
|
+
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
return (
|
|
23
|
+
<Text size="md" color="dimmed">
|
|
24
|
+
This is some styled body text.
|
|
25
|
+
</Text>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 3. Design System Integration
|
|
33
|
+
|
|
34
|
+
All Recursica components in the `@recursica/adapter-mui-v7` package adhere strictly to design system spacing, scaling, and behavior patterns.
|
|
35
|
+
|
|
36
|
+
> [!IMPORTANT]
|
|
37
|
+
>
|
|
38
|
+
> - **Anti-override protection**: Rogues style injections (like inline `style` or arbitrary `className`) are automatically blocked by our prop layer unless `overStyled={true}` is explicitly provided.
|
|
39
|
+
> - **No Direct Layers**: Do not pass a `layer` prop to this component. To place it on a specific visual layer, wrap it in a `<Layer layer={0|1|2|3}>` component natively.
|
|
40
|
+
> - **Variables and Theming**: Styling is entirely determined by local CSS variables defined in `recursica_variables_scoped.css` and mapped in the component's CSS module.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Text";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# TextArea – implementation notes
|
|
2
|
+
|
|
3
|
+
Decisions and design tweaks specific to the UI Kit's TextArea wrapped against `@mui/material`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Neutralizing `min-height` on TextareaAutosize's hidden measurement clone (source-of-truth audit, 2026-08-30)
|
|
8
|
+
|
|
9
|
+
**Symptom:** `ui-kit-textarea--autosize` (MUI) rendered much taller than Mantine's equivalent —
|
|
10
|
+
~208px vs. Mantine's ~93px for the same `minRows={2}`/`maxRows={6}` content.
|
|
11
|
+
|
|
12
|
+
**Root cause:** MUI's `TextField` always renders `multiline` fields through
|
|
13
|
+
`@mui/material/TextareaAutosize`, which mounts **two** `<textarea>` elements: the real, visible
|
|
14
|
+
one, and a second `aria-hidden="true"` clone (`visibility: hidden; position: absolute; height: 0`)
|
|
15
|
+
used purely to measure natural `scrollHeight` for the auto-grow calculation
|
|
16
|
+
(`TextareaAutosize.js` → `calculateTextareaStyles`). Both clones receive the exact same
|
|
17
|
+
`className`, including this component's own CSS-module `.input` class.
|
|
18
|
+
|
|
19
|
+
`.input`'s `min-height: calc(rows * line-height + 2*padding + 2px)` rule — meant only as a
|
|
20
|
+
cosmetic floor for the _visible_ textarea — was therefore also forcing the hidden clone's
|
|
21
|
+
`scrollHeight` up to that same floor, regardless of its actual (near-zero) content. Since
|
|
22
|
+
TextareaAutosize's algorithm computes `singleRowHeight` from that clone and then multiplies it by
|
|
23
|
+
`minRows`, the corrupted single-row measurement (~93px instead of the true ~17px line height)
|
|
24
|
+
cascaded into a final `minRows * singleRowHeight` output roughly double what it should have been
|
|
25
|
+
— confirmed via `getComputedStyle` on both clones: the hidden one's `scrollHeight` matched the
|
|
26
|
+
CSS floor almost exactly instead of the actual near-empty content height.
|
|
27
|
+
|
|
28
|
+
**Implementation:** Added `.input[aria-hidden="true"] { min-height: 0; }`. This selector only
|
|
29
|
+
ever matches TextareaAutosize's own hidden measurement clone (the real textarea has no
|
|
30
|
+
`aria-hidden` attribute), so it restores accurate content-based measurement there without
|
|
31
|
+
touching the visible textarea at all — which still gets the `min-height` floor applied directly,
|
|
32
|
+
producing the same ~93px baseline Mantine renders for short/empty content.
|
|
33
|
+
|
|
34
|
+
## 2. Fixed (non-autosize) height still pinned via `!important` on `.input`
|
|
35
|
+
|
|
36
|
+
Unchanged from the existing implementation: `.root:not([data-autosize]) .input { height: ... !important }`
|
|
37
|
+
still overrides TextareaAutosize's own inline `height` for every story that doesn't set
|
|
38
|
+
`autosize`, since MUI always routes `multiline` through TextareaAutosize regardless of Recursica's
|
|
39
|
+
`autosize` prop — there is no way to opt a MUI `TextField` out of it once `multiline` is set. This
|
|
40
|
+
rule is unaffected by the `[aria-hidden="true"]` fix above, since it targets the visible node via
|
|
41
|
+
`.root:not([data-autosize]) .input` and the `[aria-hidden="true"]` rule only lowers specificity
|
|
42
|
+
competition for `min-height`, not `height`.
|