@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,131 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Card } from "./Card";
|
|
3
|
+
import { Layer } from "@recursica/adapter-common";
|
|
4
|
+
import { Button } from "../Button/Button";
|
|
5
|
+
import { Group } from "../Group/Group";
|
|
6
|
+
import { Text } from "../Text/Text";
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof Card> = {
|
|
9
|
+
title: "UI-Kit/Card",
|
|
10
|
+
component: Card,
|
|
11
|
+
subcomponents: {
|
|
12
|
+
"Card.Header": Card.Header,
|
|
13
|
+
"Card.Content": Card.Content,
|
|
14
|
+
"Card.Footer": Card.Footer,
|
|
15
|
+
"Card.Section": Card.Section,
|
|
16
|
+
} as Record<string, React.ComponentType<unknown>>,
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
parameters: {
|
|
19
|
+
docs: {
|
|
20
|
+
description: {
|
|
21
|
+
component:
|
|
22
|
+
"The Card component acts as the foundational padded surface for grouping related information. It relies on standard internal compositional nodes (`Card.Header`, `Card.Content`, `Card.Footer`) mapped directly to the active Recursica design tokens to enforce layout gaps and margins seamlessly. Use the provided dot-notation wrappers rather than building ad-hoc generic sections.",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
argTypes: {},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
|
|
31
|
+
type Story = StoryObj<typeof Card>;
|
|
32
|
+
|
|
33
|
+
export const Default: Story = {
|
|
34
|
+
args: {},
|
|
35
|
+
render: ({ ...args }) => {
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
style={{
|
|
39
|
+
padding: "48px",
|
|
40
|
+
backgroundColor: "#e9ecef",
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<Layer layer={0}>
|
|
44
|
+
<Card {...args}>
|
|
45
|
+
<Card.Header>Customer Activity Report</Card.Header>
|
|
46
|
+
<Card.Content>
|
|
47
|
+
<Text>
|
|
48
|
+
Card inner section content body. Notice how this acts as padded
|
|
49
|
+
content natively based on the overarching properties.
|
|
50
|
+
Recursica's vertical gutter governs vertical spacing between
|
|
51
|
+
siblings in the flex container.
|
|
52
|
+
</Text>
|
|
53
|
+
<Text>Another section showing the vertical gutter spacing.</Text>
|
|
54
|
+
</Card.Content>
|
|
55
|
+
<Card.Footer>
|
|
56
|
+
<Group justify="space-between" align="center">
|
|
57
|
+
<Text variant="caption">Generated today</Text>
|
|
58
|
+
<Button variant="solid">View Details</Button>
|
|
59
|
+
</Group>
|
|
60
|
+
</Card.Footer>
|
|
61
|
+
</Card>
|
|
62
|
+
</Layer>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const HeaderlessAndFooterless: Story = {
|
|
69
|
+
args: {},
|
|
70
|
+
render: ({ ...args }) => {
|
|
71
|
+
return (
|
|
72
|
+
<div
|
|
73
|
+
style={{
|
|
74
|
+
padding: "48px",
|
|
75
|
+
backgroundColor: "#e9ecef",
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<Layer layer={0}>
|
|
79
|
+
<Card {...args}>
|
|
80
|
+
<Card.Content>
|
|
81
|
+
<Text variant="subtitle">Notice</Text>
|
|
82
|
+
<Text>
|
|
83
|
+
This is a completely generic card payload dropping the Header
|
|
84
|
+
and Footer specific elements, simply acting as a padded
|
|
85
|
+
elevation boundary box directly mirroring native composability!
|
|
86
|
+
</Text>
|
|
87
|
+
<Button variant="solid">Acknowledge</Button>
|
|
88
|
+
</Card.Content>
|
|
89
|
+
</Card>
|
|
90
|
+
</Layer>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const LayerDemonstration: Story = {
|
|
97
|
+
args: {},
|
|
98
|
+
render: ({ ...args }) => {
|
|
99
|
+
return (
|
|
100
|
+
<div
|
|
101
|
+
style={{
|
|
102
|
+
display: "flex",
|
|
103
|
+
gap: "32px",
|
|
104
|
+
backgroundColor: "#e9ecef",
|
|
105
|
+
padding: "32px",
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
<Layer layer={1}>
|
|
109
|
+
<Card {...args}>
|
|
110
|
+
<Card.Header>Layer 1 Wrapper</Card.Header>
|
|
111
|
+
<Card.Content>
|
|
112
|
+
<Text>Content inside layer 1 card.</Text>
|
|
113
|
+
</Card.Content>
|
|
114
|
+
</Card>
|
|
115
|
+
</Layer>
|
|
116
|
+
|
|
117
|
+
<Layer layer={2}>
|
|
118
|
+
<Card {...args}>
|
|
119
|
+
<Card.Header>Layer 2 Wrapper</Card.Header>
|
|
120
|
+
<Card.Content>
|
|
121
|
+
<Text>
|
|
122
|
+
Content inside layer 2 card exposing a higher elevation drop
|
|
123
|
+
shadow inherently cascaded.
|
|
124
|
+
</Text>
|
|
125
|
+
</Card.Content>
|
|
126
|
+
</Card>
|
|
127
|
+
</Layer>
|
|
128
|
+
</div>
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Placeholder for future Card component tests. Add tests here if/when needed.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { Card as MuiCard, type CardProps as MuiCardProps } from "@mui/material";
|
|
3
|
+
import {
|
|
4
|
+
filterStylingProps,
|
|
5
|
+
mergeClassNames,
|
|
6
|
+
type RecursicaOverStyled,
|
|
7
|
+
} from "../../utils/filterStylingProps";
|
|
8
|
+
import styles from "./Card.module.css";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
type RecursicaCardProps,
|
|
12
|
+
type RecursicaCardSectionProps,
|
|
13
|
+
} from "@recursica/adapter-common";
|
|
14
|
+
|
|
15
|
+
// ==== CARD CONTAINER ====
|
|
16
|
+
export type CardProps = RecursicaOverStyled<
|
|
17
|
+
MuiCardProps & RecursicaCardProps
|
|
18
|
+
> & {
|
|
19
|
+
flex?: string | number;
|
|
20
|
+
flexGrow?: string | number;
|
|
21
|
+
flexShrink?: string | number;
|
|
22
|
+
flexBasis?: string | number;
|
|
23
|
+
grow?: string | number;
|
|
24
|
+
h?: string | number;
|
|
25
|
+
height?: string | number;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The root Card elevation box. It establishes the global background color, border radius, nested component gap, and outer shadow governed by the current `Layer` context.
|
|
30
|
+
*/
|
|
31
|
+
const CardBase = forwardRef<HTMLDivElement, CardProps>(function Card(
|
|
32
|
+
{ overStyled = false, ...rest },
|
|
33
|
+
ref,
|
|
34
|
+
) {
|
|
35
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
36
|
+
|
|
37
|
+
// Expose outer layout/flexbox properties on Card to allow structuring alongside siblings
|
|
38
|
+
const safeCardLayoutKeys = [
|
|
39
|
+
"flex",
|
|
40
|
+
"flexGrow",
|
|
41
|
+
"flexShrink",
|
|
42
|
+
"flexBasis",
|
|
43
|
+
"grow",
|
|
44
|
+
"h",
|
|
45
|
+
"height",
|
|
46
|
+
] as const;
|
|
47
|
+
safeCardLayoutKeys.forEach((key) => {
|
|
48
|
+
if (key in rest && !(key in sanitizedProps)) {
|
|
49
|
+
(sanitizedProps as Record<string, unknown>)[key] = (
|
|
50
|
+
rest as Record<string, unknown>
|
|
51
|
+
)[key];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Note MUI's actual prop is "classes", not "classNames" (that's Mantine's naming) — this
|
|
56
|
+
// used to read the wrong key, silently no-op-ing any caller-supplied classes.
|
|
57
|
+
const mergedClassNames = mergeClassNames(
|
|
58
|
+
{ root: styles.root },
|
|
59
|
+
(sanitizedProps as Record<string, unknown>).classes as
|
|
60
|
+
| Partial<Record<string, string>>
|
|
61
|
+
| undefined,
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
65
|
+
.className as string | undefined;
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<MuiCard
|
|
69
|
+
ref={ref}
|
|
70
|
+
{...(sanitizedProps as unknown as MuiCardProps)}
|
|
71
|
+
className={classNameProp}
|
|
72
|
+
classes={mergedClassNames}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
CardBase.displayName = "Card";
|
|
77
|
+
|
|
78
|
+
// ==== NATIVE MANTINE CARD.SECTION ====
|
|
79
|
+
export type CardSectionProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* A generalized edge-to-edge structural wrapper native to Mui. Strips typical boundary padding via negative margins to allow content (like maps or header images) to touch the border seamlessly.
|
|
83
|
+
*/
|
|
84
|
+
export const CardSection = forwardRef<HTMLDivElement, CardSectionProps>(
|
|
85
|
+
function CardSection({ overStyled = false, ...rest }, ref) {
|
|
86
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
87
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
88
|
+
.className as string | undefined;
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
ref={ref}
|
|
93
|
+
{...(sanitizedProps as unknown as React.HTMLAttributes<HTMLDivElement>)}
|
|
94
|
+
className={
|
|
95
|
+
classNameProp ? `${styles.section} ${classNameProp}` : styles.section
|
|
96
|
+
}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
CardSection.displayName = "CardSection";
|
|
102
|
+
|
|
103
|
+
// ==== EXPLICIT CARD.HEADER ====
|
|
104
|
+
export type CardHeaderProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Replaces standard generic Mui `<Card.Section>` wrappers by directly injecting the strict Recursica design tokens for header sizing, background drops, and intrinsic padding limits.
|
|
108
|
+
*/
|
|
109
|
+
export const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(
|
|
110
|
+
function CardHeader({ overStyled = false, ...rest }, ref) {
|
|
111
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
112
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
113
|
+
.className as string | undefined;
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<div
|
|
117
|
+
ref={ref}
|
|
118
|
+
{...(sanitizedProps as unknown as React.HTMLAttributes<HTMLDivElement>)}
|
|
119
|
+
className={
|
|
120
|
+
classNameProp ? `${styles.header} ${classNameProp}` : styles.header
|
|
121
|
+
}
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
124
|
+
},
|
|
125
|
+
);
|
|
126
|
+
CardHeader.displayName = "CardHeader";
|
|
127
|
+
|
|
128
|
+
// ==== EXPLICIT CARD.FOOTER ====
|
|
129
|
+
export type CardFooterProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Counterpart to `Card.Header`, applying specific footer elevation margins, sizes, and padding natively.
|
|
133
|
+
*/
|
|
134
|
+
export const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(
|
|
135
|
+
function CardFooter({ overStyled = false, ...rest }, ref) {
|
|
136
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
137
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
138
|
+
.className as string | undefined;
|
|
139
|
+
|
|
140
|
+
return (
|
|
141
|
+
<div
|
|
142
|
+
ref={ref}
|
|
143
|
+
{...(sanitizedProps as unknown as React.HTMLAttributes<HTMLDivElement>)}
|
|
144
|
+
className={
|
|
145
|
+
classNameProp ? `${styles.footer} ${classNameProp}` : styles.footer
|
|
146
|
+
}
|
|
147
|
+
/>
|
|
148
|
+
);
|
|
149
|
+
},
|
|
150
|
+
);
|
|
151
|
+
CardFooter.displayName = "CardFooter";
|
|
152
|
+
|
|
153
|
+
// ==== EXPLICIT CARD.CONTENT ====
|
|
154
|
+
export type CardContentProps = RecursicaOverStyled<
|
|
155
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
156
|
+
>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Internal container that safely binds typography and structural flex gaps driven by the active UI kit tokens natively, preserving correct padding blocks compared to rigid `Card.Section` edges.
|
|
160
|
+
*/
|
|
161
|
+
export const CardContent = forwardRef<HTMLDivElement, CardContentProps>(
|
|
162
|
+
function CardContent({ overStyled = false, ...rest }, ref) {
|
|
163
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
164
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
165
|
+
.className as string | undefined;
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
<div
|
|
169
|
+
ref={ref}
|
|
170
|
+
{...sanitizedProps}
|
|
171
|
+
className={
|
|
172
|
+
classNameProp ? `${styles.content} ${classNameProp}` : styles.content
|
|
173
|
+
}
|
|
174
|
+
/>
|
|
175
|
+
);
|
|
176
|
+
},
|
|
177
|
+
);
|
|
178
|
+
CardContent.displayName = "CardContent";
|
|
179
|
+
|
|
180
|
+
// ==== DOT NOTATION EXPORT ====
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Recursica Card component wrapping Mui's Card (Paper).
|
|
184
|
+
*
|
|
185
|
+
* Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
|
|
186
|
+
* Use dot-notation sub-components for structured card layouts.
|
|
187
|
+
*/
|
|
188
|
+
const PolymorphicCard = CardBase;
|
|
189
|
+
|
|
190
|
+
// Attach static components for dot-notation access
|
|
191
|
+
const _card = PolymorphicCard as unknown as Record<string, unknown>;
|
|
192
|
+
_card.Section = CardSection;
|
|
193
|
+
_card.Header = CardHeader;
|
|
194
|
+
_card.Footer = CardFooter;
|
|
195
|
+
_card.Content = CardContent;
|
|
196
|
+
|
|
197
|
+
export const Card = PolymorphicCard as typeof PolymorphicCard & {
|
|
198
|
+
Section: typeof CardSection;
|
|
199
|
+
Header: typeof CardHeader;
|
|
200
|
+
Footer: typeof CardFooter;
|
|
201
|
+
Content: typeof CardContent;
|
|
202
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Card - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `Card` component in your projects using `@recursica/adapter-mui-v7`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Import Reference
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Card } from "@recursica/adapter-mui-v7";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Basic Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { Card } from "@recursica/adapter-mui-v7";
|
|
20
|
+
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
return (
|
|
23
|
+
<Card>
|
|
24
|
+
<Card.Header>
|
|
25
|
+
<Heading order={3}>Card Title</Heading>
|
|
26
|
+
</Card.Header>
|
|
27
|
+
<Card.Content>
|
|
28
|
+
<Text>
|
|
29
|
+
This is some card content styled natively via design tokens.
|
|
30
|
+
</Text>
|
|
31
|
+
</Card.Content>
|
|
32
|
+
<Card.Footer>
|
|
33
|
+
<Button variant="secondary">Cancel</Button>
|
|
34
|
+
<Button variant="primary">Submit</Button>
|
|
35
|
+
</Card.Footer>
|
|
36
|
+
</Card>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 3. Design System Integration
|
|
44
|
+
|
|
45
|
+
All Recursica components in the `@recursica/adapter-mui-v7` package adhere strictly to design system spacing, scaling, and behavior patterns.
|
|
46
|
+
|
|
47
|
+
> [!IMPORTANT]
|
|
48
|
+
>
|
|
49
|
+
> - **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.
|
|
50
|
+
> - **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.
|
|
51
|
+
> - **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.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. Key Integration Features & Constraints
|
|
56
|
+
|
|
57
|
+
`Card.Header` and `Card.Footer` stretch edge-to-edge within the card. The root `Card` component also accepts a safe subset of flexbox/dimension props (`flex`, `flexGrow`, `flexShrink`, `flexBasis`, `grow`, `h`, `height`) so it can be sized properly alongside other elements in dynamic/flex layouts (such as dashboard panels, grid tracks, or sidebar layout segments). `Card.Content` grows to fill the available vertical space, keeping `Card.Footer` aligned to the bottom of the card.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Card";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Checkbox Implementation Notes
|
|
2
|
+
|
|
3
|
+
### `Checkbox.Group` `controlMaxWidth` bug (fixed 2026-08-31)
|
|
4
|
+
|
|
5
|
+
`CheckboxGroup` was passing `--recursica_ui-kit_components_checkbox-item_properties_max-width`
|
|
6
|
+
(400px) as its own `controlMaxWidth`. That token caps a single checkbox+its own label — it's
|
|
7
|
+
already applied per-item via `.root` in `Checkbox.module.css`. Passed as the _group's_
|
|
8
|
+
`controlMaxWidth`, `FormControlLayout` applies it to the whole root row (`max-width` on
|
|
9
|
+
`.root`, which contains both `leftSection`/label and `rightSection`/items), so in side-by-side
|
|
10
|
+
layout the group's own label got squeezed into that same 400px alongside the checkboxes. There
|
|
11
|
+
is no group-level max-width token in the schema (`checkbox-group_variants_layouts_*` only
|
|
12
|
+
covers gutter/margin/padding) — fixed by leaving `controlMaxWidth` `undefined`, matching
|
|
13
|
+
`SwitchGroup`'s existing pattern. Same bug existed in `RadioGroup`, fixed the same way.
|
|
14
|
+
Mirrors the identical fix in mantine-adapter (source of truth).
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox.module.css
|
|
3
|
+
*
|
|
4
|
+
* HARDCODED VALUES:
|
|
5
|
+
* - margin / padding: 0 — Structural resets; consider token if spacing needed.
|
|
6
|
+
* - cursor: pointer / not-allowed — Baseline interactive indications.
|
|
7
|
+
* - appearance / box-sizing / border-style — necessary normalization for inputs.
|
|
8
|
+
* - transition: all 0.2s ease — Animation curve; consider a transition token.
|
|
9
|
+
* - min-width: 0 — Forces text wrap boundary in flex children.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* --- GROUP STYLES --- */
|
|
13
|
+
.groupRoot {
|
|
14
|
+
padding: var(--recursica_ui-kit_components_checkbox-group_properties_padding);
|
|
15
|
+
margin: 0; /* HARDCODE: structural reset; consider token if layout needs change */
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: var(--recursica_ui-kit_components_checkbox-group_properties_item-gap);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* SideBySide Variant */
|
|
22
|
+
.groupRoot[data-layout="side-by-side"] {
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
padding-top: var(
|
|
26
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_side-by-side_properties_vertical-padding
|
|
27
|
+
);
|
|
28
|
+
padding-bottom: var(
|
|
29
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_side-by-side_properties_vertical-padding
|
|
30
|
+
);
|
|
31
|
+
margin-top: var(
|
|
32
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
33
|
+
);
|
|
34
|
+
margin-bottom: var(
|
|
35
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Stacked Variant */
|
|
40
|
+
.groupRoot[data-layout="stacked"] {
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
margin-top: var(
|
|
43
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_stacked_properties_top-bottom-margin
|
|
44
|
+
);
|
|
45
|
+
margin-bottom: var(
|
|
46
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_stacked_properties_top-bottom-margin
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* --- PRIMITIVE CHECKBOX STYLES --- */
|
|
51
|
+
|
|
52
|
+
.root {
|
|
53
|
+
max-width: var(
|
|
54
|
+
--recursica_ui-kit_components_checkbox-item_properties_max-width
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.body {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: flex-start;
|
|
61
|
+
gap: var(--recursica_ui-kit_components_checkbox-item_properties_label-gap);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.inner {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
margin: 0; /* HARDCODE: structural reset */
|
|
69
|
+
width: var(--recursica_ui-kit_components_checkbox_properties_size);
|
|
70
|
+
height: var(--recursica_ui-kit_components_checkbox_properties_size);
|
|
71
|
+
/* Apply font-size to this element so that an 'em' based line-height token evaluates to the correct exact pixel value. */
|
|
72
|
+
font-size: var(
|
|
73
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_font-size
|
|
74
|
+
);
|
|
75
|
+
/* Mathematically syncs the physical input checkbox bounding block visually with the center of the text's first line.
|
|
76
|
+
NOTE: Since the Figma line-height token resolves to an 'em' length (e.g. 1.05em), we CANNOT multiply it by font-size in CSS.
|
|
77
|
+
Instead, it naturally evaluates to the correct height because we applied the font-size above. */
|
|
78
|
+
margin-top: calc(
|
|
79
|
+
(
|
|
80
|
+
var(
|
|
81
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_line-height
|
|
82
|
+
) -
|
|
83
|
+
var(--recursica_ui-kit_components_checkbox_properties_size)
|
|
84
|
+
) /
|
|
85
|
+
2
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Base explicit reset masking underlying framework defaults.
|
|
90
|
+
display: flex + centering: the checkmark icon renders as a nested child of this box
|
|
91
|
+
(see Checkbox.tsx — icon/checkedIcon are combined nodes, icon inside .input), so this
|
|
92
|
+
box has to center it itself rather than relying on a parent's centering. */
|
|
93
|
+
.input {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
cursor: pointer; /* HARDCODE: core interaction behavior */
|
|
98
|
+
appearance: none; /* HARDCODE: reset native widget */
|
|
99
|
+
box-sizing: border-box; /* HARDCODE: ensures size includes borders */
|
|
100
|
+
width: var(--recursica_ui-kit_components_checkbox_properties_size);
|
|
101
|
+
height: var(--recursica_ui-kit_components_checkbox_properties_size);
|
|
102
|
+
border-radius: var(
|
|
103
|
+
--recursica_ui-kit_components_checkbox_properties_border-radius
|
|
104
|
+
);
|
|
105
|
+
border-width: var(
|
|
106
|
+
--recursica_ui-kit_components_checkbox_properties_border-size
|
|
107
|
+
);
|
|
108
|
+
border-style: solid; /* HARDCODE: normalize primitive border-style */
|
|
109
|
+
|
|
110
|
+
/* Standard unchecked state */
|
|
111
|
+
background-color: var(
|
|
112
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_unchecked_properties_colors_background-color
|
|
113
|
+
);
|
|
114
|
+
border-color: var(
|
|
115
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_unchecked_properties_colors_border-color
|
|
116
|
+
);
|
|
117
|
+
transition: all 0.2s ease; /* HARDCODE: consider global transition token */
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Checked/Indeterminate State */
|
|
121
|
+
.input:checked,
|
|
122
|
+
.inputChecked {
|
|
123
|
+
background-color: var(
|
|
124
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_properties_colors_background-color
|
|
125
|
+
);
|
|
126
|
+
border-color: var(
|
|
127
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_properties_colors_border-color
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
.input[data-indeterminate],
|
|
131
|
+
.inputIndeterminate {
|
|
132
|
+
background-color: var(
|
|
133
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_properties_colors_background-color
|
|
134
|
+
);
|
|
135
|
+
border-color: var(
|
|
136
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_properties_colors_border-color
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Disabled State (colors now differ per selection state; MUI applies its
|
|
141
|
+
`disabled` classKey to the same root element as `root`, so `.root.disabled`
|
|
142
|
+
targets the actual disabled instance and cascades to the decorative
|
|
143
|
+
icon divs rendered inside it — mirrors the split now required by the
|
|
144
|
+
token schema, matching the mantine-adapter reference). */
|
|
145
|
+
.input:disabled {
|
|
146
|
+
cursor: not-allowed; /* HARDCODE: disabled state default */
|
|
147
|
+
}
|
|
148
|
+
.root.disabled .input:not(.inputChecked):not(.inputIndeterminate) {
|
|
149
|
+
opacity: var(
|
|
150
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_unchecked_variants_states_disabled_properties_opacity
|
|
151
|
+
);
|
|
152
|
+
background-color: var(
|
|
153
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_unchecked_variants_states_disabled_properties_colors_background-color
|
|
154
|
+
);
|
|
155
|
+
border-color: var(
|
|
156
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_unchecked_variants_states_disabled_properties_colors_border-color
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
.root.disabled .inputChecked {
|
|
160
|
+
opacity: var(
|
|
161
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_variants_states_disabled_properties_opacity
|
|
162
|
+
);
|
|
163
|
+
background-color: var(
|
|
164
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_variants_states_disabled_properties_colors_background-color
|
|
165
|
+
);
|
|
166
|
+
border-color: var(
|
|
167
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_variants_states_disabled_properties_colors_border-color
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
.root.disabled .inputIndeterminate {
|
|
171
|
+
opacity: var(
|
|
172
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_variants_states_disabled_properties_opacity
|
|
173
|
+
);
|
|
174
|
+
background-color: var(
|
|
175
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_variants_states_disabled_properties_colors_background-color
|
|
176
|
+
);
|
|
177
|
+
border-color: var(
|
|
178
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_variants_states_disabled_properties_colors_border-color
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.icon {
|
|
183
|
+
width: var(--recursica_ui-kit_components_checkbox_properties_icon-size);
|
|
184
|
+
height: var(--recursica_ui-kit_components_checkbox_properties_icon-size);
|
|
185
|
+
}
|
|
186
|
+
/* No icon-color token exists for the unchecked state (no icon is visible then) */
|
|
187
|
+
.inputChecked .icon {
|
|
188
|
+
color: var(
|
|
189
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_properties_colors_icon-color
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
.inputIndeterminate .icon {
|
|
193
|
+
color: var(
|
|
194
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_properties_colors_icon-color
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
.root.disabled .inputChecked .icon {
|
|
198
|
+
color: var(
|
|
199
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_checked_variants_states_disabled_properties_colors_icon-color
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
.root.disabled .inputIndeterminate .icon {
|
|
203
|
+
color: var(
|
|
204
|
+
--recursica_ui-kit_components_checkbox_variants_selection-states_indeterminate_variants_states_disabled_properties_colors_icon-color
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* display: flex (not the browser default block) blockifies the native inline <label>
|
|
209
|
+
child per the CSS Display spec's flex-item blockification rule — matches Mantine's
|
|
210
|
+
own labelWrapper (inline-flex), whose flex context does the same to its label.
|
|
211
|
+
Without it, the label stays inline and its line box picks up extra half-leading
|
|
212
|
+
height, visually shifting it below vertical center against the checkbox. */
|
|
213
|
+
.labelWrapper {
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
padding: 0; /* HARDCODE: structural layout reset */
|
|
217
|
+
margin: 0; /* HARDCODE: structural layout reset */
|
|
218
|
+
flex: 1;
|
|
219
|
+
min-width: 0; /* HARDCODE: forces text wrap boundary in flex child */
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.label {
|
|
223
|
+
cursor: pointer; /* HARDCODE: interactive affordance */
|
|
224
|
+
padding: 0; /* HARDCODE: reset layout */
|
|
225
|
+
margin: 0; /* HARDCODE: reset layout */
|
|
226
|
+
word-wrap: break-word;
|
|
227
|
+
white-space: normal;
|
|
228
|
+
color: var(
|
|
229
|
+
--recursica_ui-kit_components_checkbox-item_properties_colors_text-color
|
|
230
|
+
);
|
|
231
|
+
font-family: var(
|
|
232
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_font-family
|
|
233
|
+
);
|
|
234
|
+
font-size: var(
|
|
235
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_font-size
|
|
236
|
+
);
|
|
237
|
+
font-weight: var(
|
|
238
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_font-weight
|
|
239
|
+
);
|
|
240
|
+
line-height: var(
|
|
241
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_line-height
|
|
242
|
+
);
|
|
243
|
+
font-style: var(
|
|
244
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_font-style
|
|
245
|
+
);
|
|
246
|
+
letter-spacing: var(
|
|
247
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_letter-spacing
|
|
248
|
+
);
|
|
249
|
+
text-decoration: var(
|
|
250
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_text-decoration
|
|
251
|
+
);
|
|
252
|
+
text-transform: var(
|
|
253
|
+
--recursica_ui-kit_components_checkbox-item_properties_text_text-transform
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
.root:has(input:disabled) .label {
|
|
257
|
+
cursor: not-allowed; /* HARDCODE: disabled interaction */
|
|
258
|
+
opacity: var(
|
|
259
|
+
--recursica_ui-kit_components_checkbox-item_variants_states_disabled_properties_opacity
|
|
260
|
+
);
|
|
261
|
+
color: var(
|
|
262
|
+
--recursica_ui-kit_components_checkbox-item_properties_colors_disabled-text
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* description/error text renders via AssistiveElement directly (see Checkbox.tsx) —
|
|
267
|
+
it owns its own tokenized styling. AssistiveElement has no disabled state and
|
|
268
|
+
must never dim. */
|
|
269
|
+
|
|
270
|
+
/* CheckboxGroup Layouts */
|
|
271
|
+
.groupRoot {
|
|
272
|
+
display: flex;
|
|
273
|
+
}
|
|
274
|
+
.groupRoot[data-layout="stacked"] {
|
|
275
|
+
flex-direction: column;
|
|
276
|
+
gap: var(
|
|
277
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_stacked_properties_label-field-gap
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
.groupRoot[data-layout="side-by-side"] {
|
|
281
|
+
flex-direction: row;
|
|
282
|
+
flex-wrap: wrap;
|
|
283
|
+
gap: var(
|
|
284
|
+
--recursica_ui-kit_components_checkbox-group_variants_layouts_side-by-side_properties_gutter
|
|
285
|
+
);
|
|
286
|
+
}
|