@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,535 @@
|
|
|
1
|
+
/* Brand-layer exemptions (recursica-allow-brand) — see recursica-token-analyzer README.md.
|
|
2
|
+
* Global hover/focus/disabled state tokens (recursica_variables_scoped.css header, 'Hover & Focus states' / 'Disabled state' — implicit rule for every interactive element; components must not define their own per-component treatment).
|
|
3
|
+
* recursica-allow-brand: --recursica_brand_states_focus_blur
|
|
4
|
+
* recursica-allow-brand: --recursica_brand_states_focus_border-size
|
|
5
|
+
* recursica-allow-brand: --recursica_brand_states_focus_color
|
|
6
|
+
* recursica-allow-brand: --recursica_brand_states_focus_margin
|
|
7
|
+
* recursica-allow-brand: --recursica_brand_states_hover_color
|
|
8
|
+
* recursica-allow-brand: --recursica_brand_states_hover_opacity
|
|
9
|
+
* No ui-kit token exists for the input-to-menu gap (see `.dropdown` below) — reusing the same
|
|
10
|
+
* generic dimension token AutoComplete.module.css's `.popper` uses, instead of hardcoding an
|
|
11
|
+
* unexplained pixel value.
|
|
12
|
+
* recursica-allow-brand: --recursica_brand_dimensions_general_default
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* LAYOUT SPACING OVERRIDES:
|
|
16
|
+
- Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens.
|
|
17
|
+
- Also sets the --dropdown-control-{max,min}-width hooks consumed inline in Dropdown.tsx, since
|
|
18
|
+
the token schema no longer provides a single layout-agnostic min/max width. */
|
|
19
|
+
.layoutOverride {
|
|
20
|
+
--form-control-margin-bottom: var(
|
|
21
|
+
--recursica_ui-kit_components_dropdown_variants_layouts_stacked_properties_top-bottom-margin
|
|
22
|
+
);
|
|
23
|
+
--dropdown-control-max-width: var(
|
|
24
|
+
--recursica_ui-kit_components_dropdown_variants_layouts_stacked_properties_max-width
|
|
25
|
+
);
|
|
26
|
+
--dropdown-control-min-width: var(
|
|
27
|
+
--recursica_ui-kit_components_dropdown_variants_layouts_stacked_properties_min-width
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.layoutOverride[data-form-layout="side-by-side"] {
|
|
32
|
+
--form-control-margin-bottom: var(
|
|
33
|
+
--recursica_ui-kit_components_dropdown_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
34
|
+
);
|
|
35
|
+
--dropdown-control-max-width: var(
|
|
36
|
+
--recursica_ui-kit_components_dropdown_variants_layouts_side-by-side_properties_max-width
|
|
37
|
+
);
|
|
38
|
+
--dropdown-control-min-width: var(
|
|
39
|
+
--recursica_ui-kit_components_dropdown_variants_layouts_side-by-side_properties_min-width
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* HARDCODED VALUES:
|
|
44
|
+
- border-width: 1px. Native geometric boundary for the input box.
|
|
45
|
+
- border-style: solid. Native structural rendering rule.
|
|
46
|
+
- outline: none. Bypassing browser focus rings to rely strictly on Recursica focus states natively.
|
|
47
|
+
- flex/layout: display: flex on the root wrapper safely encapsulating internal section rendering.
|
|
48
|
+
- placeholder opacity: 0.5. The dropdown parameters currently lack a dedicated placeholder-opacity variable.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
.root {
|
|
52
|
+
display: flex;
|
|
53
|
+
position: relative;
|
|
54
|
+
width: 100%;
|
|
55
|
+
min-height: var(--recursica_ui-kit_components_dropdown_properties_min-height);
|
|
56
|
+
|
|
57
|
+
/* Override Mantine native Input variables governing section spacing padding mathematics safely */
|
|
58
|
+
--input-left-section-size: calc(
|
|
59
|
+
var(--recursica_ui-kit_components_dropdown_properties_horizontal-padding) +
|
|
60
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-size) +
|
|
61
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-text-gap)
|
|
62
|
+
);
|
|
63
|
+
--input-right-section-size: calc(
|
|
64
|
+
var(--recursica_ui-kit_components_dropdown_properties_horizontal-padding) +
|
|
65
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-size) +
|
|
66
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-text-gap)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.input {
|
|
71
|
+
/* Structural Overrides */
|
|
72
|
+
width: 100%;
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
margin: 0;
|
|
75
|
+
|
|
76
|
+
/* Box Geometry
|
|
77
|
+
`!important` throughout: MUI's own `.MuiSelect-select`/`.MuiOutlinedInput-input` styled rules
|
|
78
|
+
(e.g. `minHeight: 1.4375em`, and outlined-variant default padding) are equal-specificity
|
|
79
|
+
single-class selectors injected by emotion at runtime, after this CSS module's own stylesheet
|
|
80
|
+
— on that tie they win by source order, which is what silently shrank the control below the
|
|
81
|
+
min-height token (measured 42.8px vs Mantine's 48px) even though the token was already wired
|
|
82
|
+
here. Same root cause as the notchedOutline double-border fix below. */
|
|
83
|
+
min-height: var(
|
|
84
|
+
--recursica_ui-kit_components_dropdown_properties_min-height
|
|
85
|
+
) !important;
|
|
86
|
+
padding-top: var(
|
|
87
|
+
--recursica_ui-kit_components_dropdown_properties_vertical-padding
|
|
88
|
+
) !important;
|
|
89
|
+
padding-bottom: var(
|
|
90
|
+
--recursica_ui-kit_components_dropdown_properties_vertical-padding
|
|
91
|
+
) !important;
|
|
92
|
+
padding-left: var(
|
|
93
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
94
|
+
) !important;
|
|
95
|
+
padding-right: var(
|
|
96
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
97
|
+
) !important;
|
|
98
|
+
border-radius: var(
|
|
99
|
+
--recursica_ui-kit_components_dropdown_properties_border-radius
|
|
100
|
+
);
|
|
101
|
+
border-width: 1px;
|
|
102
|
+
border-style: solid;
|
|
103
|
+
|
|
104
|
+
/* Strict Typography Unification */
|
|
105
|
+
font-family: var(
|
|
106
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-family
|
|
107
|
+
);
|
|
108
|
+
font-size: var(
|
|
109
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-size
|
|
110
|
+
);
|
|
111
|
+
font-style: var(
|
|
112
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-style
|
|
113
|
+
);
|
|
114
|
+
font-weight: var(
|
|
115
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-weight
|
|
116
|
+
);
|
|
117
|
+
letter-spacing: var(
|
|
118
|
+
--recursica_ui-kit_components_dropdown_properties_text_letter-spacing
|
|
119
|
+
);
|
|
120
|
+
line-height: var(
|
|
121
|
+
--recursica_ui-kit_components_dropdown_properties_text_line-height
|
|
122
|
+
);
|
|
123
|
+
text-decoration: var(
|
|
124
|
+
--recursica_ui-kit_components_dropdown_properties_text_text-decoration
|
|
125
|
+
);
|
|
126
|
+
text-transform: var(
|
|
127
|
+
--recursica_ui-kit_components_dropdown_properties_text_text-transform
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
/* Base State Default Execution */
|
|
131
|
+
background-color: var(
|
|
132
|
+
--recursica_ui-kit_components_dropdown_properties_colors_background-color
|
|
133
|
+
);
|
|
134
|
+
border-color: var(
|
|
135
|
+
--recursica_ui-kit_components_dropdown_properties_colors_border-color
|
|
136
|
+
);
|
|
137
|
+
color: var(
|
|
138
|
+
--recursica_ui-kit_components_dropdown_properties_colors_text-color
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
outline: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.input::placeholder {
|
|
145
|
+
/* HARDCODE: Dropdown properties currently missing placeholder-opacity tokens from Figma JSON */
|
|
146
|
+
opacity: 0.5;
|
|
147
|
+
color: inherit;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* MUI's Select has no native placeholder concept (it isn't a text <input>) — the closed field's
|
|
151
|
+
`renderValue` wraps the placeholder string in this span instead, matching `.input::placeholder`
|
|
152
|
+
above so an empty Select reads the same as an empty text control. */
|
|
153
|
+
.placeholder {
|
|
154
|
+
opacity: 0.5;
|
|
155
|
+
color: inherit;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* MUI's outlined variant renders its own `<fieldset class="MuiOutlinedInput-notchedOutline">` as a
|
|
159
|
+
separate absolutely-positioned sibling of `.input` — independent of the border we already draw
|
|
160
|
+
on `.input` above. Left alone, it shows its own default/focused/error border (theme grays/blue/
|
|
161
|
+
red) UNDERNEATH ours, which is what produced the double border (bug: static-error story showing
|
|
162
|
+
a leftover dark border under the red one) and MUI's own blue focus ring leaking in alongside the
|
|
163
|
+
Recursica focus box-shadow. We own the border entirely via `.input`, so this native outline is
|
|
164
|
+
never needed — always neutralize it. */
|
|
165
|
+
.root :global(.MuiOutlinedInput-notchedOutline) {
|
|
166
|
+
border: none !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Dynamic Padding Overrides */
|
|
170
|
+
.root[data-with-left-section] .input {
|
|
171
|
+
padding-left: var(--input-left-section-size) !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.root[data-with-right-section] .input {
|
|
175
|
+
padding-right: var(--input-right-section-size) !important;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Flexible End-Caps (Icons, actions)
|
|
179
|
+
Absolutely positioned within `.root` (already `position: relative`), NOT flex siblings of
|
|
180
|
+
`.input` in the row. MUI passes `startAdornment`/`endAdornment` as ordinary flex children next
|
|
181
|
+
to the select div, so as siblings they'd add their own width on top of `.input`'s already-100%-
|
|
182
|
+
width box instead of sharing it — the reserved padding above only carves out space *inside*
|
|
183
|
+
`.input`'s own bordered box, so a sibling rendered outside that box overflows past the visible
|
|
184
|
+
border (bug: leading icon / the clear+chevron pair sat outside the control's right edge).
|
|
185
|
+
Absolute positioning is Mantine's own technique for the equivalent `Input.Section` slot, which
|
|
186
|
+
is why the mantine-adapter never had this bug. */
|
|
187
|
+
.section {
|
|
188
|
+
position: absolute;
|
|
189
|
+
top: 0;
|
|
190
|
+
bottom: 0;
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
gap: var(--recursica_ui-kit_components_dropdown_properties_icon-text-gap);
|
|
194
|
+
pointer-events: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.section[data-position="left"] {
|
|
198
|
+
left: 0;
|
|
199
|
+
justify-content: flex-start;
|
|
200
|
+
padding-left: var(
|
|
201
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.section[data-position="right"] {
|
|
206
|
+
right: 0;
|
|
207
|
+
justify-content: flex-end;
|
|
208
|
+
padding-right: var(
|
|
209
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
210
|
+
);
|
|
211
|
+
/* Unlike the left section (decorative icon only), this one can hold the interactive clear
|
|
212
|
+
button, so it needs to opt back into pointer events itself. */
|
|
213
|
+
pointer-events: auto;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.section :global(svg) {
|
|
217
|
+
width: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
218
|
+
height: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
219
|
+
color: var(
|
|
220
|
+
--recursica_ui-kit_components_dropdown_properties_colors_leading-icon
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.section[data-position="right"] :global(svg) {
|
|
225
|
+
color: var(
|
|
226
|
+
--recursica_ui-kit_components_dropdown_properties_colors_trailing-icon
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Clear ("x") button rendered inside the right section when `clearable` and a value is present.
|
|
231
|
+
Sized/colored via the same icon tokens as the rest of the right section (rather than any
|
|
232
|
+
default browser/library button chrome), same treatment as the mantine-adapter's equivalent
|
|
233
|
+
fix to its native clear button (see DROPDOWN_IMPLEMENTATION_NOTES.md). */
|
|
234
|
+
.clearButton {
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
flex-shrink: 0;
|
|
239
|
+
width: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
240
|
+
height: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
241
|
+
padding: 0;
|
|
242
|
+
border: none;
|
|
243
|
+
border-radius: 50%;
|
|
244
|
+
background: transparent;
|
|
245
|
+
color: var(
|
|
246
|
+
--recursica_ui-kit_components_dropdown_properties_colors_trailing-icon
|
|
247
|
+
);
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
outline: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.clearButton svg {
|
|
253
|
+
width: 100%;
|
|
254
|
+
height: 100%;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.clearButton:focus-visible {
|
|
258
|
+
box-shadow:
|
|
259
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
260
|
+
var(--recursica_brand_states_focus_color),
|
|
261
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
262
|
+
var(--recursica_brand_states_focus_margin)
|
|
263
|
+
var(--recursica_brand_states_focus_color);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* -------------------------------------
|
|
267
|
+
STATE CASCADE ARCHITECTURE
|
|
268
|
+
-------------------------------------- */
|
|
269
|
+
|
|
270
|
+
/* Focus State Mapping (Triggered internally via browser pseudo-pseudo-class) */
|
|
271
|
+
/* The token schema no longer provides per-component focus colors; apply the generic focus ring
|
|
272
|
+
tokens as a box-shadow ring instead of a color swap. */
|
|
273
|
+
.input:focus-within,
|
|
274
|
+
.input:focus {
|
|
275
|
+
box-shadow:
|
|
276
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
277
|
+
var(--recursica_brand_states_focus_color),
|
|
278
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
279
|
+
var(--recursica_brand_states_focus_margin)
|
|
280
|
+
var(--recursica_brand_states_focus_color);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
284
|
+
.root[data-error] .input {
|
|
285
|
+
border-color: var(
|
|
286
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_border-color
|
|
287
|
+
) !important;
|
|
288
|
+
background-color: var(
|
|
289
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_background-color
|
|
290
|
+
) !important;
|
|
291
|
+
color: var(
|
|
292
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_text-color
|
|
293
|
+
) !important;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.root[data-error] .section[data-position="left"] :global(svg) {
|
|
297
|
+
color: var(
|
|
298
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_leading-icon
|
|
299
|
+
) !important;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.root[data-error] .section[data-position="right"] :global(svg) {
|
|
303
|
+
color: var(
|
|
304
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_trailing-icon
|
|
305
|
+
) !important;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/* Disabled State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
309
|
+
.root[data-disabled] .input {
|
|
310
|
+
border-color: var(
|
|
311
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_border-color
|
|
312
|
+
) !important;
|
|
313
|
+
background-color: var(
|
|
314
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_background-color
|
|
315
|
+
) !important;
|
|
316
|
+
color: var(
|
|
317
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_text-color
|
|
318
|
+
) !important;
|
|
319
|
+
opacity: var(
|
|
320
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_opacity
|
|
321
|
+
) !important;
|
|
322
|
+
cursor: not-allowed;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.root[data-disabled] .section[data-position="left"] :global(svg) {
|
|
326
|
+
color: var(
|
|
327
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_leading-icon
|
|
328
|
+
) !important;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.root[data-disabled] .section[data-position="right"] :global(svg) {
|
|
332
|
+
color: var(
|
|
333
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_trailing-icon
|
|
334
|
+
) !important;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* -------------------------------------
|
|
338
|
+
DROPDOWN & OPTIONS ARCHITECTURE
|
|
339
|
+
-------------------------------------- */
|
|
340
|
+
|
|
341
|
+
.dropdown {
|
|
342
|
+
background-color: var(
|
|
343
|
+
--recursica_ui-kit_components_dropdown_properties_colors_background-color
|
|
344
|
+
);
|
|
345
|
+
border: 1px solid
|
|
346
|
+
var(--recursica_ui-kit_components_dropdown_properties_colors_border-color);
|
|
347
|
+
border-radius: var(
|
|
348
|
+
--recursica_ui-kit_components_dropdown_properties_border-radius
|
|
349
|
+
);
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
/* Same missing input-to-menu gap as AutoComplete.module.css's `.popper` — MUI's Select renders
|
|
352
|
+
this menu flush against the input, with no offset token in the schema either. Reusing the
|
|
353
|
+
same --recursica_brand_dimensions_general_default stand-in for consistency; see AutoComplete's
|
|
354
|
+
comment for the full reasoning. No inline `margin: 0` to beat here (Select's Menu is a
|
|
355
|
+
Popover, not a Popper — it positions via computed `top`/`left`, not an inline margin), so no
|
|
356
|
+
`!important` needed. */
|
|
357
|
+
margin-top: var(--recursica_brand_dimensions_general_default);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* The visible top/bottom gap inside the open menu, before/after the option list, is MUI's own
|
|
361
|
+
`.MuiList-padding` default (8px) on the inner `<ul>` — not driven by any Recursica token. Wire
|
|
362
|
+
it to the same dropdown vertical-padding token the closed control itself uses, matching the
|
|
363
|
+
mantine-adapter fix (its `.dropdown` had the same gap, driven by Mantine's own untokenized
|
|
364
|
+
4px `--combobox-padding` default). `!important` needed to beat MUI's own emotion-generated
|
|
365
|
+
`.MuiList-padding` rule at equal selector specificity. */
|
|
366
|
+
.dropdown :global(.MuiMenu-list) {
|
|
367
|
+
padding-top: var(
|
|
368
|
+
--recursica_ui-kit_components_dropdown_properties_vertical-padding
|
|
369
|
+
) !important;
|
|
370
|
+
padding-bottom: var(
|
|
371
|
+
--recursica_ui-kit_components_dropdown_properties_vertical-padding
|
|
372
|
+
) !important;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.option {
|
|
376
|
+
font-family: var(
|
|
377
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-family
|
|
378
|
+
);
|
|
379
|
+
font-size: var(
|
|
380
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-size
|
|
381
|
+
);
|
|
382
|
+
font-weight: var(
|
|
383
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-weight
|
|
384
|
+
);
|
|
385
|
+
color: var(
|
|
386
|
+
--recursica_ui-kit_components_dropdown_properties_colors_text-color
|
|
387
|
+
);
|
|
388
|
+
/* Padding/inter-item gap reuse the menu-item component's tokens (same reasoning as the icon/
|
|
389
|
+
supporting-text tokens below) instead of an arbitrary scaled dropdown padding — matches the
|
|
390
|
+
mantine-adapter's equivalent Menu.module.css `.item` padding + gap exactly. `!important` on
|
|
391
|
+
padding: MUI's `MenuItem` root sets its own paddingTop/Bottom (MenuItem.js) plus paddingLeft/
|
|
392
|
+
Right 16px via its `gutters` variant, both at equal selector specificity to this rule, so
|
|
393
|
+
without it the winner depends on emotion's injection order rather than this stylesheet. */
|
|
394
|
+
padding: var(
|
|
395
|
+
--recursica_ui-kit_components_menu-item_properties_vertical-padding
|
|
396
|
+
)
|
|
397
|
+
var(--recursica_ui-kit_components_menu-item_properties_horizontal-padding) !important;
|
|
398
|
+
margin-bottom: var(--recursica_ui-kit_components_menu_properties_item-gap);
|
|
399
|
+
cursor: pointer;
|
|
400
|
+
/* MUI's `MenuItem` also forces `white-space: nowrap` by default; override it so long
|
|
401
|
+
labels/supportingText wrap instead of overflowing. Same equal-specificity reasoning. */
|
|
402
|
+
white-space: normal !important;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.option:last-of-type {
|
|
406
|
+
margin-bottom: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/* No per-option hovered token exists in the schema; use the generic overlay tint (same technique
|
|
410
|
+
as the Mantine reference implementation) to highlight a hovered-but-not-selected option.
|
|
411
|
+
`!important` is required here: MUI's own `.Mui-selected` (and `.Mui-selected:hover`) classes
|
|
412
|
+
carry their own default primary-blue tint at equal selector specificity, and without it that
|
|
413
|
+
default tint wins over this token-driven one. */
|
|
414
|
+
.option[data-hovered="true"],
|
|
415
|
+
.option:hover {
|
|
416
|
+
background-color: color-mix(
|
|
417
|
+
in srgb,
|
|
418
|
+
var(--recursica_brand_states_hover_color)
|
|
419
|
+
calc(var(--recursica_brand_states_hover_opacity) * 100%),
|
|
420
|
+
transparent
|
|
421
|
+
) !important;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/* No dedicated dropdown-option "selected" token exists in the schema either, but the menu-item
|
|
425
|
+
component's selected-state colors are the closest real token family for the same concept (a
|
|
426
|
+
selected row in a list) — reused here rather than the neutral hover tint above, which is what
|
|
427
|
+
previously made the selected option read as grey instead of Recursica's brand color. */
|
|
428
|
+
.option[data-selected="true"],
|
|
429
|
+
.option[data-combobox-selected="true"] {
|
|
430
|
+
background-color: var(
|
|
431
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_background-color
|
|
432
|
+
) !important;
|
|
433
|
+
color: var(
|
|
434
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_text-color
|
|
435
|
+
) !important;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Rich option content (leadingIcon/supportingText — see MANTINE_ADAPTER_RICH_OPTION_DATA.md). No
|
|
439
|
+
dedicated dropdown-option icon or supporting-text token exists in the schema either; reuse the
|
|
440
|
+
menu-item component's tokens for the same reason the selected-state colors above do. Matches
|
|
441
|
+
the mantine-adapter's equivalent classes. */
|
|
442
|
+
.optionContent {
|
|
443
|
+
display: flex;
|
|
444
|
+
align-items: center;
|
|
445
|
+
gap: var(--recursica_ui-kit_components_menu-item_properties_icon-text-gap);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.optionIcon {
|
|
449
|
+
display: flex;
|
|
450
|
+
flex-shrink: 0;
|
|
451
|
+
width: var(
|
|
452
|
+
--recursica_ui-kit_components_menu-item_properties_icon-leading-size
|
|
453
|
+
);
|
|
454
|
+
height: var(
|
|
455
|
+
--recursica_ui-kit_components_menu-item_properties_icon-leading-size
|
|
456
|
+
);
|
|
457
|
+
color: var(
|
|
458
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_leading-icon-color
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.optionIcon :global(svg) {
|
|
463
|
+
width: 100%;
|
|
464
|
+
height: 100%;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.optionText {
|
|
468
|
+
display: flex;
|
|
469
|
+
flex-direction: column;
|
|
470
|
+
min-width: 0;
|
|
471
|
+
gap: var(--recursica_ui-kit_components_menu-item_properties_text-gap);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* Default: label/supportingText each truncate to a single line with an ellipsis. */
|
|
475
|
+
.optionText > * {
|
|
476
|
+
overflow: clip; /* HARDCODE: `hidden` clips descenders (e.g. "g") when text_line-height is
|
|
477
|
+
tighter than the font's natural ascent+descent; overflow-clip-margin gives ink a small bleed
|
|
478
|
+
allowance while still clipping genuinely overflowing text (see Chip's IMPLEMENTATION_NOTES.md). */
|
|
479
|
+
overflow-clip-margin: 0.35em;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
white-space: nowrap;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/* Applied alongside .optionText when `wrapItemText` is true — long values wrap onto additional
|
|
485
|
+
lines instead of overflowing the fixed-width dropdown. */
|
|
486
|
+
.optionTextWrap > * {
|
|
487
|
+
overflow: visible;
|
|
488
|
+
text-overflow: clip;
|
|
489
|
+
white-space: normal;
|
|
490
|
+
overflow-wrap: anywhere;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.optionSupportingText {
|
|
494
|
+
font-family: var(
|
|
495
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-family
|
|
496
|
+
);
|
|
497
|
+
font-size: var(
|
|
498
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-size
|
|
499
|
+
);
|
|
500
|
+
font-style: var(
|
|
501
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-style
|
|
502
|
+
);
|
|
503
|
+
font-weight: var(
|
|
504
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-weight
|
|
505
|
+
);
|
|
506
|
+
letter-spacing: var(
|
|
507
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_letter-spacing
|
|
508
|
+
);
|
|
509
|
+
line-height: var(
|
|
510
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_line-height
|
|
511
|
+
);
|
|
512
|
+
text-decoration: var(
|
|
513
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_text-decoration
|
|
514
|
+
);
|
|
515
|
+
text-transform: var(
|
|
516
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_text-transform
|
|
517
|
+
);
|
|
518
|
+
color: var(
|
|
519
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_supporting-text-color
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.option[data-selected="true"] .optionIcon,
|
|
524
|
+
.option[data-combobox-selected="true"] .optionIcon {
|
|
525
|
+
color: var(
|
|
526
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_leading-icon-color
|
|
527
|
+
) !important;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.option[data-selected="true"] .optionSupportingText,
|
|
531
|
+
.option[data-combobox-selected="true"] .optionSupportingText {
|
|
532
|
+
color: var(
|
|
533
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_supporting-text-color
|
|
534
|
+
) !important;
|
|
535
|
+
}
|