@recursica/adapter-mantine-v8 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 +688 -0
- package/LICENSE +21 -0
- package/OVERSTYLING.md +56 -0
- package/README.md +70 -0
- package/SETUP.md +93 -0
- package/USAGE.md +57 -0
- package/dist/adapter-mantine-v8.cjs +12 -0
- package/dist/adapter-mantine-v8.cjs.map +1 -0
- package/dist/adapter-mantine-v8.css +1 -0
- package/dist/adapter-mantine-v8.js +5759 -0
- package/dist/adapter-mantine-v8.js.map +1 -0
- package/dist/index.d.ts +2095 -0
- package/dist/test.html +1 -0
- package/dist/vite.svg +1 -0
- package/docs/PHILOSOPHY.md +39 -0
- package/llms.txt +74 -0
- package/package.json +131 -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 +154 -0
- package/src/OverStyling.tsx +79 -0
- package/src/Version.tsx +44 -0
- package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +72 -0
- package/src/components/Accordion/Accordion.module.css +367 -0
- package/src/components/Accordion/Accordion.stories.tsx +189 -0
- package/src/components/Accordion/Accordion.test.tsx +1 -0
- package/src/components/Accordion/Accordion.tsx +220 -0
- package/src/components/Accordion/USAGE.md +51 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AssistiveElement/ASSISTIVEELEMENT_IMPLEMENTATION_NOTES.md +45 -0
- package/src/components/AssistiveElement/AssistiveElement.module.css +111 -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 +93 -0
- package/src/components/AssistiveElement/USAGE.md +36 -0
- package/src/components/AutoComplete/AUTOCOMPLETE_IMPLEMENTATION_NOTES.md +42 -0
- package/src/components/AutoComplete/AutoComplete.module.css +430 -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 +179 -0
- package/src/components/AutoComplete/USAGE.md +80 -0
- package/src/components/Avatar/AVATAR_IMPLEMENTATION_NOTES.md +34 -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 +108 -0
- package/src/components/Avatar/USAGE.md +38 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Badge/BADGE_IMPLEMENTATION_NOTES.md +18 -0
- package/src/components/Badge/Badge.module.css +127 -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 +64 -0
- package/src/components/Badge/USAGE.md +56 -0
- package/src/components/Breadcrumb/BREADCRUMB_IMPLEMENTATION_NOTES.md +47 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css +48 -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 +85 -0
- package/src/components/Breadcrumb/USAGE.md +55 -0
- package/src/components/Breadcrumb/markCurrentPageItem.test.ts +49 -0
- package/src/components/Button/Button.module.css +446 -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 +184 -0
- package/src/components/Button/IMPLEMENTATION_NOTES.md +109 -0
- package/src/components/Button/USAGE.md +80 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Card/CARD_IMPLEMENTATION_NOTES.md +17 -0
- package/src/components/Card/Card.module.css +119 -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 +248 -0
- package/src/components/Card/USAGE.md +63 -0
- package/src/components/Checkbox/CHECKBOX_IMPLEMENTATION_NOTES.md +25 -0
- package/src/components/Checkbox/Checkbox.module.css +267 -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 +151 -0
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +139 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +147 -0
- package/src/components/Checkbox/USAGE.md +48 -0
- package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +110 -0
- package/src/components/Chip/Chip.module.css +288 -0
- package/src/components/Chip/Chip.stories.tsx +128 -0
- package/src/components/Chip/Chip.test.tsx +1 -0
- package/src/components/Chip/Chip.tsx +157 -0
- package/src/components/Chip/USAGE.md +55 -0
- package/src/components/Container/CONTAINER_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Container/Container.module.css +7 -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 +69 -0
- package/src/components/Container/USAGE.md +47 -0
- package/src/components/DatePicker/DATEPICKER_IMPLEMENTATION_NOTES.md +31 -0
- package/src/components/DatePicker/DatePicker.icons.tsx +27 -0
- package/src/components/DatePicker/DatePicker.module.css +566 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +158 -0
- package/src/components/DatePicker/DatePicker.test.tsx +1 -0
- package/src/components/DatePicker/DatePicker.tsx +218 -0
- package/src/components/DatePicker/USAGE.md +49 -0
- package/src/components/Dropdown/BareDropdown.tsx +97 -0
- package/src/components/Dropdown/DROPDOWN_IMPLEMENTATION_NOTES.md +12 -0
- package/src/components/Dropdown/Dropdown.module.css +477 -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 +213 -0
- package/src/components/Dropdown/USAGE.md +69 -0
- package/src/components/FileInput/FILEINPUT_IMPLEMENTATION_NOTES.md +153 -0
- package/src/components/FileInput/FileInput.module.css +280 -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 +417 -0
- package/src/components/FileInput/USAGE.md +145 -0
- package/src/components/FileUpload/FILEUPLOAD_IMPLEMENTATION_NOTES.md +244 -0
- package/src/components/FileUpload/FileUpload.module.css +205 -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 +354 -0
- package/src/components/FileUpload/USAGE.md +199 -0
- package/src/components/Flex/FLEX_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Flex/Flex.module.css +7 -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 +75 -0
- package/src/components/Flex/USAGE.md +48 -0
- package/src/components/FormControlLayout/FormControlLayout.module.css +90 -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 +74 -0
- package/src/components/FormControlLayout/USAGE.md +40 -0
- package/src/components/FormControlWrapper/FORMCONTROLWRAPPER_IMPLEMENTATION_NOTES.md +32 -0
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +75 -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 +151 -0
- package/src/components/FormControlWrapper/USAGE.md +47 -0
- package/src/components/Grid/GRID_IMPLEMENTATION_NOTES.md +18 -0
- package/src/components/Grid/Grid.module.css +11 -0
- package/src/components/Grid/Grid.stories.tsx +206 -0
- package/src/components/Grid/Grid.test.tsx +1 -0
- package/src/components/Grid/Grid.tsx +140 -0
- package/src/components/Grid/USAGE.md +47 -0
- package/src/components/Group/GROUP_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Group/Group.module.css +7 -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 +60 -0
- package/src/components/Group/USAGE.md +48 -0
- package/src/components/Heading/HEADING_IMPLEMENTATION_NOTES.md +18 -0
- package/src/components/Heading/Heading.module.css +13 -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 +52 -0
- package/src/components/Heading/USAGE.md +36 -0
- package/src/components/HoverCard/HOVERCARD_IMPLEMENTATION_NOTES.md +77 -0
- package/src/components/HoverCard/HoverCard.module.css +90 -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 +133 -0
- package/src/components/HoverCard/USAGE.md +52 -0
- package/src/components/Label/LABEL_IMPLEMENTATION_NOTES.md +48 -0
- package/src/components/Label/Label.module.css +141 -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 +113 -0
- package/src/components/Label/USAGE.md +47 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Layer/USAGE.md +54 -0
- package/src/components/Link/IMPLEMENTATION_NOTES.md +19 -0
- package/src/components/Link/Link.module.css +110 -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 +67 -0
- package/src/components/Link/USAGE.md +56 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Loader/LOADER_IMPLEMENTATION_NOTES.md +24 -0
- package/src/components/Loader/Loader.animate.dom.test.tsx +82 -0
- package/src/components/Loader/Loader.module.css +63 -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 +69 -0
- package/src/components/Loader/USAGE.md +44 -0
- package/src/components/Menu/MENU_IMPLEMENTATION_NOTES.md +88 -0
- package/src/components/Menu/Menu.module.css +280 -0
- package/src/components/Menu/Menu.stories.tsx +371 -0
- package/src/components/Menu/Menu.test.tsx +1 -0
- package/src/components/Menu/Menu.tsx +373 -0
- package/src/components/Menu/USAGE.md +55 -0
- package/src/components/Modal/MODAL_IMPLEMENTATION_NOTES.md +32 -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 +368 -0
- package/src/components/Modal/USAGE.md +58 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/NumberInput/NUMBER_INPUT_IMPLEMENTATION_NOTES.md +24 -0
- package/src/components/NumberInput/NumberInput.module.css +302 -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 +157 -0
- package/src/components/NumberInput/USAGE.md +52 -0
- package/src/components/Pagination/IMPLEMENTATION_NOTES.md +16 -0
- package/src/components/Pagination/Pagination.icons.tsx +66 -0
- package/src/components/Pagination/Pagination.module.css +188 -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 +265 -0
- package/src/components/Pagination/USAGE.md +36 -0
- package/src/components/Pagination/index.ts +5 -0
- package/src/components/Panel/PANEL_IMPLEMENTATION_NOTES.md +116 -0
- package/src/components/Panel/Panel.module.css +209 -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 +269 -0
- package/src/components/Panel/USAGE.md +56 -0
- package/src/components/Popover/IMPLEMENTATION_NOTES.md +77 -0
- package/src/components/Popover/Popover.module.css +86 -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 +142 -0
- package/src/components/Popover/USAGE.md +61 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/Radio/Radio.module.css +231 -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 +168 -0
- package/src/components/Radio/RadioGroup.stories.tsx +117 -0
- package/src/components/Radio/RadioGroup.tsx +124 -0
- package/src/components/Radio/USAGE.md +36 -0
- package/src/components/ReadOnlyField/READ_ONLY_FIELD_IMPLEMENTATION_NOTES.md +15 -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 +114 -0
- package/src/components/ReadOnlyField/ReadOnlySwitchField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +48 -0
- package/src/components/ReadOnlyField/USAGE.md +44 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +93 -0
- package/src/components/ReadOnlyField/index.ts +5 -0
- package/src/components/RecursicaThemeProvider/USAGE.md +60 -0
- package/src/components/SegmentedControl/IMPLEMENTATION_NOTES.md +25 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +185 -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 +110 -0
- package/src/components/SegmentedControl/USAGE.md +55 -0
- package/src/components/Slider/IMPLEMENTATION_NOTES.md +92 -0
- package/src/components/Slider/Slider.module.css +588 -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 +391 -0
- package/src/components/Slider/USAGE.md +56 -0
- package/src/components/Stack/STACK_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Stack/Stack.module.css +7 -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 +62 -0
- package/src/components/Stack/USAGE.md +48 -0
- package/src/components/Stepper/IMPLEMENTATION_NOTES.md +28 -0
- package/src/components/Stepper/Stepper.module.css +404 -0
- package/src/components/Stepper/Stepper.stories.tsx +148 -0
- package/src/components/Stepper/Stepper.test.tsx +1 -0
- package/src/components/Stepper/Stepper.tsx +93 -0
- package/src/components/Stepper/USAGE.md +41 -0
- package/src/components/Switch/SWITCH_IMPLEMENTATION_NOTES.md +64 -0
- package/src/components/Switch/Switch.module.css +279 -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 +177 -0
- package/src/components/Switch/SwitchGroup.stories.tsx +132 -0
- package/src/components/Switch/SwitchGroup.tsx +127 -0
- package/src/components/Switch/USAGE.md +42 -0
- package/src/components/Table/TABLE_IMPLEMENTATION_NOTES.md +78 -0
- package/src/components/Table/Table.icons.tsx +40 -0
- package/src/components/Table/Table.module.css +444 -0
- package/src/components/Table/Table.stories.tsx +140 -0
- package/src/components/Table/Table.test.tsx +1 -0
- package/src/components/Table/Table.tsx +243 -0
- package/src/components/Table/USAGE.md +78 -0
- package/src/components/Tabs/IMPLEMENTATION_NOTES.md +27 -0
- package/src/components/Tabs/Tabs.module.css +591 -0
- package/src/components/Tabs/Tabs.stories.tsx +154 -0
- package/src/components/Tabs/Tabs.test.tsx +1 -0
- package/src/components/Tabs/Tabs.tsx +114 -0
- package/src/components/Tabs/USAGE.md +45 -0
- package/src/components/Text/TEXT_IMPLEMENTATION_NOTES.md +12 -0
- package/src/components/Text/Text.module.css +13 -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 +53 -0
- package/src/components/Text/USAGE.md +40 -0
- package/src/components/TextArea/TEXTAREA_IMPLEMENTATION_NOTES.md +7 -0
- package/src/components/TextArea/TextArea.module.css +183 -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 +137 -0
- package/src/components/TextArea/USAGE.md +48 -0
- package/src/components/TextField/TEXTFIELD_IMPLEMENTATION_NOTES.md +19 -0
- package/src/components/TextField/TextField.module.css +264 -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 +139 -0
- package/src/components/TextField/USAGE.md +44 -0
- package/src/components/TimePicker/TIMEPICKER_IMPLEMENTATION_NOTES.md +119 -0
- package/src/components/TimePicker/TimePicker.module.css +291 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +141 -0
- package/src/components/TimePicker/TimePicker.test.tsx +1 -0
- package/src/components/TimePicker/TimePicker.tsx +304 -0
- package/src/components/TimePicker/USAGE.md +57 -0
- package/src/components/Timeline/TIMELINE_IMPLEMENTATION_NOTES.md +13 -0
- package/src/components/Timeline/Timeline.module.css +373 -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 +73 -0
- package/src/components/Timeline/TimelineItem.tsx +79 -0
- package/src/components/Timeline/USAGE.md +49 -0
- package/src/components/Toast/TOAST_IMPLEMENTATION_NOTES.md +39 -0
- package/src/components/Toast/Toast.module.css +184 -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 +82 -0
- package/src/components/Toast/USAGE.md +50 -0
- package/src/components/Toast/index.ts +1 -0
- package/src/components/Tooltip/TOOLTIP_IMPLEMENTATION_NOTES.md +85 -0
- package/src/components/Tooltip/Tooltip.module.css +91 -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 +117 -0
- package/src/components/Tooltip/USAGE.md +80 -0
- package/src/components/TransferList/TRANSFERLIST_IMPLEMENTATION_NOTES.md +111 -0
- package/src/components/TransferList/TransferList.module.css +182 -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/Tree/IMPLEMENTATION_NOTES.md +48 -0
- package/src/components/Tree/Tree.module.css +232 -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 +220 -0
- package/src/components/Tree/USAGE.md +96 -0
- package/src/components/Tree/index.ts +1 -0
- package/src/components/index.ts +52 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +179 -0
- package/src/types/index.ts +9 -0
- package/src/types/mantine.d.ts +7 -0
- package/src/types/scss-modules.d.ts +9 -0
- package/src/utils/ColorSchemeWrapper.tsx +27 -0
- package/src/utils/RequireAccessibleLabel.ts +1 -0
- package/src/utils/copyToClipboard.ts +36 -0
- package/src/utils/filterStylingProps.test.ts +85 -0
- package/src/utils/filterStylingProps.ts +150 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/renderRichOption.tsx +65 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
/* Default inheritance mapped from component variables if not explicitly overridden by variants */
|
|
3
|
+
--loader-color: var(
|
|
4
|
+
--recursica_ui-kit_components_loader_properties_indicator-color
|
|
5
|
+
);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* `animate={false}` — freezes every variant's animation (the oval's own
|
|
9
|
+
* spinning ::after, and the bars'/dots' individually-animated child spans)
|
|
10
|
+
* so the loader renders deterministically, e.g. for a visual-regression
|
|
11
|
+
* snapshot that would otherwise diff differently every run. */
|
|
12
|
+
.root[data-animate="false"],
|
|
13
|
+
.root[data-animate="false"] *,
|
|
14
|
+
.root[data-animate="false"]::after {
|
|
15
|
+
animation: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* data-size mapping */
|
|
19
|
+
|
|
20
|
+
/* SMALL */
|
|
21
|
+
.root[data-size="small"] {
|
|
22
|
+
--loader-size: var(
|
|
23
|
+
--recursica_ui-kit_components_loader_variants_sizes_small_properties_size
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
.root[data-size="small"][data-variant="oval"]::after {
|
|
27
|
+
border-width: var(
|
|
28
|
+
--recursica_ui-kit_components_loader_variants_sizes_small_properties_thickness-size
|
|
29
|
+
);
|
|
30
|
+
border-radius: var(
|
|
31
|
+
--recursica_ui-kit_components_loader_variants_sizes_small_properties_border-radius
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* DEFAULT */
|
|
36
|
+
.root[data-size="default"] {
|
|
37
|
+
--loader-size: var(
|
|
38
|
+
--recursica_ui-kit_components_loader_variants_sizes_default_properties_size
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
.root[data-size="default"][data-variant="oval"]::after {
|
|
42
|
+
border-width: var(
|
|
43
|
+
--recursica_ui-kit_components_loader_variants_sizes_default_properties_thickness-size
|
|
44
|
+
);
|
|
45
|
+
border-radius: var(
|
|
46
|
+
--recursica_ui-kit_components_loader_variants_sizes_default_properties_border-radius
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* LARGE */
|
|
51
|
+
.root[data-size="large"] {
|
|
52
|
+
--loader-size: var(
|
|
53
|
+
--recursica_ui-kit_components_loader_variants_sizes_large_properties_size
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
.root[data-size="large"][data-variant="oval"]::after {
|
|
57
|
+
border-width: var(
|
|
58
|
+
--recursica_ui-kit_components_loader_variants_sizes_large_properties_thickness-size
|
|
59
|
+
);
|
|
60
|
+
border-radius: var(
|
|
61
|
+
--recursica_ui-kit_components_loader_variants_sizes_large_properties_border-radius
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Loader } from "./Loader";
|
|
4
|
+
import { Layer } from "@recursica/adapter-common";
|
|
5
|
+
|
|
6
|
+
type LoaderStoryArgs = React.ComponentProps<typeof Loader> & {
|
|
7
|
+
layer?: 0 | 1 | 2 | 3;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const meta: Meta<LoaderStoryArgs> = {
|
|
11
|
+
title: "UI-Kit/Loader",
|
|
12
|
+
component: Loader as React.ComponentType<LoaderStoryArgs>,
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
parameters: {
|
|
15
|
+
docs: {
|
|
16
|
+
description: {
|
|
17
|
+
component:
|
|
18
|
+
"The Loader bridges the Recursica UI-Kit `loader` variables to the generic primitive, rendering deterministic sizes and variants visually mapped strictly from the explicit design boundary tokens.",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
argTypes: {
|
|
23
|
+
variant: {
|
|
24
|
+
control: "select",
|
|
25
|
+
options: ["oval", "bars", "dots"],
|
|
26
|
+
description: "The structural layout variant of the loading indicator",
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
control: "select",
|
|
30
|
+
options: ["sm", "md", "lg", "small", "default", "large"],
|
|
31
|
+
description:
|
|
32
|
+
"Scales the dimensional and thickness layout constrained to the explicit UI variables",
|
|
33
|
+
},
|
|
34
|
+
color: {
|
|
35
|
+
control: "color",
|
|
36
|
+
description:
|
|
37
|
+
"Optional inline dynamic color override spanning the token defaults",
|
|
38
|
+
},
|
|
39
|
+
layer: {
|
|
40
|
+
control: { type: "range", min: 0, max: 3, step: 1 },
|
|
41
|
+
description:
|
|
42
|
+
"Applies a wrapping context to observe rendering logic externally",
|
|
43
|
+
},
|
|
44
|
+
animate: {
|
|
45
|
+
control: "boolean",
|
|
46
|
+
description:
|
|
47
|
+
"Freezes the CSS animation when false — deterministic, for visual regression",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default meta;
|
|
53
|
+
|
|
54
|
+
type Story = StoryObj<LoaderStoryArgs>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Animated — excluded from visual regression (`adapter-tester.config.json`),
|
|
58
|
+
* since a moving animation diffs differently every run. See the `Static*`
|
|
59
|
+
* stories below for the deterministic, visual-regression-covered equivalents.
|
|
60
|
+
*/
|
|
61
|
+
export const Default: Story = {
|
|
62
|
+
args: {
|
|
63
|
+
variant: "oval",
|
|
64
|
+
size: "default",
|
|
65
|
+
layer: 0,
|
|
66
|
+
},
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
68
|
+
render: ({ withLayer, layer, ...args }: any) => (
|
|
69
|
+
<Layer layer={layer ?? 0} style={{ padding: "24px" }}>
|
|
70
|
+
<Loader {...args} />
|
|
71
|
+
</Layer>
|
|
72
|
+
),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** `animate: false` freezes the spin — deterministic for visual regression. */
|
|
76
|
+
export const StaticOvalDefault: Story = {
|
|
77
|
+
args: {
|
|
78
|
+
variant: "oval",
|
|
79
|
+
size: "default",
|
|
80
|
+
animate: false,
|
|
81
|
+
},
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
83
|
+
render: ({ withLayer, layer, ...args }: any) => <Loader {...args} />,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** `animate: false` freezes the bars — deterministic for visual regression. */
|
|
87
|
+
export const StaticBarsLarge: Story = {
|
|
88
|
+
args: {
|
|
89
|
+
variant: "bars",
|
|
90
|
+
size: "large",
|
|
91
|
+
animate: false,
|
|
92
|
+
},
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
94
|
+
render: ({ withLayer, layer, ...args }: any) => <Loader {...args} />,
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** `animate: false` freezes the dots — deterministic for visual regression. */
|
|
98
|
+
export const StaticDotsSmall: Story = {
|
|
99
|
+
args: {
|
|
100
|
+
variant: "dots",
|
|
101
|
+
size: "sm",
|
|
102
|
+
animate: false,
|
|
103
|
+
},
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
105
|
+
render: ({ withLayer, layer, ...args }: any) => <Loader {...args} />,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Animated — excluded from visual regression, same as `Default`; this one
|
|
110
|
+
* additionally demonstrates rendering inside a `layer={2}` context.
|
|
111
|
+
*/
|
|
112
|
+
export const LayerTwoOval: Story = {
|
|
113
|
+
args: {
|
|
114
|
+
variant: "oval",
|
|
115
|
+
size: "default",
|
|
116
|
+
},
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
118
|
+
render: ({ withLayer, layer, ...args }: any) => (
|
|
119
|
+
<Layer layer={2} style={{ padding: "24px" }}>
|
|
120
|
+
<Loader {...args} />
|
|
121
|
+
</Layer>
|
|
122
|
+
),
|
|
123
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Placeholder for future Loader component tests. Add tests here if/when needed.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Loader as MantineLoader,
|
|
4
|
+
type LoaderProps as MantineLoaderProps,
|
|
5
|
+
} from "@mantine/core";
|
|
6
|
+
import {
|
|
7
|
+
filterStylingProps,
|
|
8
|
+
mergeClassNames,
|
|
9
|
+
type RecursicaOverStyled,
|
|
10
|
+
} from "../../utils/filterStylingProps";
|
|
11
|
+
import styles from "./Loader.module.css";
|
|
12
|
+
|
|
13
|
+
import { type RecursicaLoaderProps } from "@recursica/adapter-common";
|
|
14
|
+
|
|
15
|
+
export type LoaderProps = RecursicaOverStyled<
|
|
16
|
+
Omit<MantineLoaderProps, "variant" | "size" | "type"> & RecursicaLoaderProps
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(
|
|
20
|
+
{
|
|
21
|
+
variant = "oval",
|
|
22
|
+
size = "default",
|
|
23
|
+
animate = true,
|
|
24
|
+
overStyled = false,
|
|
25
|
+
...rest
|
|
26
|
+
},
|
|
27
|
+
ref,
|
|
28
|
+
) {
|
|
29
|
+
const mapSize = {
|
|
30
|
+
sm: "small",
|
|
31
|
+
md: "default",
|
|
32
|
+
lg: "large",
|
|
33
|
+
small: "small",
|
|
34
|
+
default: "default",
|
|
35
|
+
large: "large",
|
|
36
|
+
} as const;
|
|
37
|
+
|
|
38
|
+
const resolvedSize = mapSize[size] || "default";
|
|
39
|
+
|
|
40
|
+
// Strip all visual override injections unless developer has specifically opted into overStyling.
|
|
41
|
+
// External layout props like margins are safely preserved.
|
|
42
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
43
|
+
const restRecord = sanitizedProps as Record<string, unknown>;
|
|
44
|
+
|
|
45
|
+
const mergedClassNames = mergeClassNames(
|
|
46
|
+
{ root: styles.root },
|
|
47
|
+
restRecord.classNames as Partial<Record<string, string>> | undefined,
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const classNameProp = restRecord.className as string | undefined;
|
|
51
|
+
const finalClass = classNameProp
|
|
52
|
+
? `${styles.root} ${classNameProp}`
|
|
53
|
+
: styles.root;
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<MantineLoader
|
|
57
|
+
ref={ref}
|
|
58
|
+
{...sanitizedProps}
|
|
59
|
+
type={variant}
|
|
60
|
+
data-variant={variant}
|
|
61
|
+
data-size={resolvedSize}
|
|
62
|
+
data-animate={animate}
|
|
63
|
+
className={finalClass}
|
|
64
|
+
classNames={mergedClassNames}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
Loader.displayName = "Loader";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Loader - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `Loader` component in your projects using `@recursica/adapter-mantine-v8`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Import Reference
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Loader } from "@recursica/adapter-mantine-v8";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Basic Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { Loader } from "@recursica/adapter-mantine-v8";
|
|
20
|
+
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
return <Loader size="md" />;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 3. Design System Integration
|
|
29
|
+
|
|
30
|
+
All Recursica components in the `@recursica/adapter-mantine-v8` package adhere strictly to design system spacing, scaling, and behavior patterns.
|
|
31
|
+
|
|
32
|
+
> [!IMPORTANT]
|
|
33
|
+
>
|
|
34
|
+
> - **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.
|
|
35
|
+
> - **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.
|
|
36
|
+
> - **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.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 4. Notes
|
|
41
|
+
|
|
42
|
+
- `variant` maps to Mantine's loader types: `"oval"`, `"bars"`, or `"dots"`.
|
|
43
|
+
- `thickness` and `border-radius` are not exposed as props; sizing is controlled entirely by the `size` prop.
|
|
44
|
+
- The `xs` and `xl` sizes are not currently supported.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Menu – Implementation Notes
|
|
2
|
+
|
|
3
|
+
Decisions and design tweaks strictly tailored for the UI Kit's Menu wrapped against `@mantine/core`. This is a living document that tracks _why_ specific logic decisions exist.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Composable API Preservation (1:1 Mapping)
|
|
8
|
+
|
|
9
|
+
**Decision:** We maintain the exact library composition API structure (`<Menu>`, `<Menu.Target>`, `<Menu.Dropdown>`, `<Menu.Item>`, `<Menu.Divider>`, `<Menu.Label>`, `<Menu.Sub>`, `<Menu.Sub.Target>`, `<Menu.Sub.Item>`, `<Menu.Sub.Dropdown>`) as a 1:1 React component mapping.
|
|
10
|
+
|
|
11
|
+
**Implementation:** Mantine's Menu internally manages WAI-ARIA role assignments (`role="menu"`, `role="menuitem"`, `aria-haspopup`, `aria-expanded`, `aria-controls`), keyboard navigation (arrow keys, Enter, Escape), and focus trapping natively across its composable hierarchy. By preserving the exact sub-component tree, Recursica safely adopts all of these accessibility behaviors without reimplementation.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Hover State Overlay Technique
|
|
16
|
+
|
|
17
|
+
**Decision:** We nullify Mantine's native hover background on `Menu.Item` and exclusively utilize Recursica's hover structure via a `::after` pseudo-element overlay.
|
|
18
|
+
|
|
19
|
+
**Implementation:** The `.item::after` pseudo-object dynamically pulls `hover-color` & `hover-opacity` bindings from the Recursica token system. Mantine natively changes `background-color` on item hover which would override our token-driven colors. We enforce `background-color` to remain the unselected-item background on hover, then layer our pseudo-overlay on top. This is the same technique used in the Accordion component.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 3. Selected vs Unselected Item States
|
|
24
|
+
|
|
25
|
+
**Decision:** Menu items map to Recursica's `selected-item` and `unselected-item` color token groups.
|
|
26
|
+
|
|
27
|
+
**Implementation:** The CSS module defaults all items to `unselected-item_*` tokens (background, text, opacity). Items with `[data-selected]` switch to `selected-item_*` tokens. This mapping is natively driven by Mantine's internal state tracking without React state hooks.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 4. `color` Prop Stripping
|
|
32
|
+
|
|
33
|
+
**Decision:** Mantine's `color` prop on `Menu.Item` (used for semantics like "danger/red") is explicitly stripped in strict mode.
|
|
34
|
+
|
|
35
|
+
**Implementation:** The `color` prop is deleted from the sanitized props when `overStyled` is `false`. This enforces strict design token adherence — all item colors come from the CSS module referencing Recursica variables. Developers requiring custom color semantics must either:
|
|
36
|
+
|
|
37
|
+
1. Use `overStyled={true}` as an explicit escape hatch
|
|
38
|
+
2. Contribute a proper Recursica variant to the token system
|
|
39
|
+
|
|
40
|
+
**Rationale:** The Recursica token set does not currently include danger-specific or semantic-color variants for menu items. Allowing arbitrary `color` values would break design system consistency.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 5. Menu.Target Pass-Through
|
|
45
|
+
|
|
46
|
+
**Decision:** `Menu.Target` is a transparent pass-through with no styling applied.
|
|
47
|
+
|
|
48
|
+
**Implementation:** The target wrapper exists solely to manage Mantine's ref forwarding and event binding for the trigger element. No `filterStylingProps` or CSS module classes are applied — the trigger's appearance is entirely controlled by whatever component the integrator places inside it (e.g., `<Button>`).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 6. Sub-Menu Support
|
|
53
|
+
|
|
54
|
+
**Decision:** We wrap the full Mantine sub-menu hierarchy (`Menu.Sub`, `Menu.Sub.Target`, `Menu.Sub.Item`, `Menu.Sub.Dropdown`).
|
|
55
|
+
|
|
56
|
+
**Implementation:** Sub-menu components inherit the same CSS module classes as their top-level counterparts since the Recursica token set does not distinguish sub-menu-specific styling. `Menu.Sub.Item` also strips the `color` prop in strict mode, consistent with `Menu.Item`. The sub-menu dropdown portal inherits the same `classNames` from the root Menu's `classNames` mapping.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 7. Dropdown Container Padding
|
|
61
|
+
|
|
62
|
+
**Decision:** The dropdown container uses `divider-item-gap` as its internal padding.
|
|
63
|
+
|
|
64
|
+
**Implementation:** This ensures consistent spacing between the dropdown border and its content items. The gap token (`4px` by default) creates a subtle inset that visually separates items from the container edge, matching the Figma design specifications.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 8. Minimal CSS Override Philosophy
|
|
69
|
+
|
|
70
|
+
**Decision:** The CSS module only overrides visual design tokens (colors, typography, spacing, borders, shadows). All structural layout properties (flex, cursor, pointer-events, box-sizing, etc.) are deferred to Mantine's native behavior.
|
|
71
|
+
|
|
72
|
+
**Implementation:** Unlike form-field components (e.g., Dropdown/TextField) which require deep structural overrides to strip Mantine's macro wrappers, the Menu is an overlay component where Mantine's native layout is already correct. We avoid setting:
|
|
73
|
+
|
|
74
|
+
- `overflow` on the dropdown (Mantine renders sub-menu dropdowns inside the parent DOM tree using Floating UI absolute positioning — setting overflow clips them)
|
|
75
|
+
- `display`, `align-items`, `width`, `cursor` on items (Mantine's button-based items already handle this)
|
|
76
|
+
- `pointer-events` on disabled items (Mantine handles disabled natively)
|
|
77
|
+
|
|
78
|
+
**Rationale:** Early iterations included aggressive structural resets (like `overflow: hidden`, `box-sizing: border-box`, `margin: 0`) cargo-culted from the Dropdown component. These caused sub-menus to render clipped inside the parent dropdown with scrollbars. The lesson: default to Mantine's native behavior and only override what the Recursica token system explicitly needs to control.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 9. `maxHeight` Override
|
|
83
|
+
|
|
84
|
+
**Decision:** `<Menu maxHeight={...}>` lets a caller override the token-driven `.dropdown` max-height with an explicit pixel (or other CSS length) value.
|
|
85
|
+
|
|
86
|
+
**Implementation:** This is the one deliberate exception to "no inline design tokens in TSX" (see `COMPONENT_DEV_GUIDE.md`) — it's applied via Mantine's per-part `styles` API (`styles={{ dropdown: { maxHeight } }}`), the same mechanism already used for `classNames`, merged with any caller-supplied `styles`. It only takes effect when `maxHeight` is actually passed; otherwise the CSS module's token-driven `max-height` is untouched.
|
|
87
|
+
|
|
88
|
+
**Caveat:** Because sub-menu dropdowns inherit the root Menu's `classNames`/`styles` mapping (see §6), setting `maxHeight` on the root also caps `Menu.Sub.Dropdown`'s height, not just the top-level dropdown.
|
|
@@ -0,0 +1,280 @@
|
|
|
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_hover_color
|
|
4
|
+
* recursica-allow-brand: --recursica_brand_states_hover_opacity
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* HARDCODED VALUES:
|
|
8
|
+
- border-style: solid. Structural rendering rule for the dropdown border (Mantine uses Paper which may not set border natively).
|
|
9
|
+
- NOTE: overflow is intentionally NOT set on .dropdown. Mantine renders sub-menu dropdowns
|
|
10
|
+
inside the parent dropdown DOM tree using Floating UI absolute positioning. Setting
|
|
11
|
+
overflow: hidden clips sub-menus; overflow-y: auto causes unwanted scrollbars.
|
|
12
|
+
- All structural layout (flex, cursor, pointer-events on disabled) is deferred to Mantine's
|
|
13
|
+
native behavior. We only override visual design tokens (colors, typography, spacing, borders).
|
|
14
|
+
- Hover overlay: the schema no longer provides per-item hover-color/hover-opacity tokens; the
|
|
15
|
+
overlay now uses the generic --recursica_brand_states_hover_* tokens shared across components.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* ======================================
|
|
19
|
+
DROPDOWN CONTAINER
|
|
20
|
+
====================================== */
|
|
21
|
+
|
|
22
|
+
.dropdown {
|
|
23
|
+
background-color: var(
|
|
24
|
+
--recursica_ui-kit_components_menu_properties_colors_background-color
|
|
25
|
+
);
|
|
26
|
+
border-style: solid; /* HARDCODE: Mantine Paper does not set border-style natively */
|
|
27
|
+
border-width: var(--recursica_ui-kit_components_menu_properties_border-size);
|
|
28
|
+
border-color: var(
|
|
29
|
+
--recursica_ui-kit_components_menu_properties_colors_border-color
|
|
30
|
+
);
|
|
31
|
+
border-radius: var(
|
|
32
|
+
--recursica_ui-kit_components_menu_properties_border-radius
|
|
33
|
+
);
|
|
34
|
+
box-shadow: var(--recursica_ui-kit_components_menu_properties_elevation);
|
|
35
|
+
|
|
36
|
+
min-width: var(--recursica_ui-kit_components_menu_properties_min-width);
|
|
37
|
+
max-height: var(--recursica_ui-kit_components_menu_properties_max-height);
|
|
38
|
+
max-width: var(--recursica_ui-kit_components_menu_properties_max-width);
|
|
39
|
+
padding: var(--recursica_ui-kit_components_menu_properties_padding);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ======================================
|
|
43
|
+
MENU ITEM
|
|
44
|
+
====================================== */
|
|
45
|
+
|
|
46
|
+
.item {
|
|
47
|
+
position: relative;
|
|
48
|
+
|
|
49
|
+
/* Geometry */
|
|
50
|
+
padding: var(
|
|
51
|
+
--recursica_ui-kit_components_menu-item_properties_vertical-padding
|
|
52
|
+
)
|
|
53
|
+
var(--recursica_ui-kit_components_menu-item_properties_horizontal-padding);
|
|
54
|
+
border-radius: var(
|
|
55
|
+
--recursica_ui-kit_components_menu-item_properties_border-radius
|
|
56
|
+
);
|
|
57
|
+
margin-bottom: var(--recursica_ui-kit_components_menu_properties_item-gap);
|
|
58
|
+
|
|
59
|
+
/* Typography */
|
|
60
|
+
font-family: var(
|
|
61
|
+
--recursica_ui-kit_components_menu-item_properties_text_font-family
|
|
62
|
+
);
|
|
63
|
+
font-size: var(
|
|
64
|
+
--recursica_ui-kit_components_menu-item_properties_text_font-size
|
|
65
|
+
);
|
|
66
|
+
font-style: var(
|
|
67
|
+
--recursica_ui-kit_components_menu-item_properties_text_font-style
|
|
68
|
+
);
|
|
69
|
+
font-weight: var(
|
|
70
|
+
--recursica_ui-kit_components_menu-item_properties_text_font-weight
|
|
71
|
+
);
|
|
72
|
+
letter-spacing: var(
|
|
73
|
+
--recursica_ui-kit_components_menu-item_properties_text_letter-spacing
|
|
74
|
+
);
|
|
75
|
+
line-height: var(
|
|
76
|
+
--recursica_ui-kit_components_menu-item_properties_text_line-height
|
|
77
|
+
);
|
|
78
|
+
text-decoration: var(
|
|
79
|
+
--recursica_ui-kit_components_menu-item_properties_text_text-decoration
|
|
80
|
+
);
|
|
81
|
+
text-transform: var(
|
|
82
|
+
--recursica_ui-kit_components_menu-item_properties_text_text-transform
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
/* Default State: Unselected */
|
|
86
|
+
background-color: var(
|
|
87
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_background-color
|
|
88
|
+
);
|
|
89
|
+
color: var(
|
|
90
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_text-color
|
|
91
|
+
);
|
|
92
|
+
opacity: 1;
|
|
93
|
+
}
|
|
94
|
+
.item:last-of-type {
|
|
95
|
+
margin-bottom: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Override Mantine's native hover background to use our overlay technique */
|
|
99
|
+
.item:hover {
|
|
100
|
+
background-color: var(
|
|
101
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_background-color
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Hover overlay using ::after pseudo-element (same technique as Accordion); no per-item
|
|
106
|
+
hover-color/hover-opacity tokens exist anymore, so this uses the generic overlay tokens
|
|
107
|
+
uniformly regardless of selection state. */
|
|
108
|
+
.item::after {
|
|
109
|
+
content: "";
|
|
110
|
+
position: absolute;
|
|
111
|
+
inset: 0;
|
|
112
|
+
border-radius: inherit;
|
|
113
|
+
z-index: 0;
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
background-color: var(--recursica_brand_states_hover_color);
|
|
116
|
+
opacity: 0;
|
|
117
|
+
transition: opacity 150ms ease;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.item:hover:not([data-disabled])::after {
|
|
121
|
+
opacity: var(--recursica_brand_states_hover_opacity);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Selected item state */
|
|
125
|
+
.item[data-selected] {
|
|
126
|
+
background-color: var(
|
|
127
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_background-color
|
|
128
|
+
);
|
|
129
|
+
color: var(
|
|
130
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_text-color
|
|
131
|
+
);
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Hovered item state (keyboard navigation) */
|
|
136
|
+
.item[data-hovered] {
|
|
137
|
+
background-color: var(
|
|
138
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_background-color
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
.item[data-hovered]::after {
|
|
142
|
+
opacity: var(--recursica_brand_states_hover_opacity);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Disabled item (opacity differs depending on selection state) */
|
|
146
|
+
.item[data-disabled]:not([data-selected]) {
|
|
147
|
+
opacity: var(
|
|
148
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_variants_states_disabled_properties_opacity
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.item[data-disabled][data-selected] {
|
|
153
|
+
opacity: var(
|
|
154
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_variants_states_disabled_properties_opacity
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ======================================
|
|
159
|
+
ITEM LABEL
|
|
160
|
+
====================================== */
|
|
161
|
+
|
|
162
|
+
.itemLabel {
|
|
163
|
+
position: relative;
|
|
164
|
+
z-index: 1;
|
|
165
|
+
color: inherit;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* ======================================
|
|
169
|
+
ITEM SECTION (LEFT / RIGHT ICONS)
|
|
170
|
+
====================================== */
|
|
171
|
+
|
|
172
|
+
.itemSection {
|
|
173
|
+
position: relative;
|
|
174
|
+
z-index: 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.itemSection[data-position="left"] {
|
|
178
|
+
width: var(
|
|
179
|
+
--recursica_ui-kit_components_menu-item_properties_icon-leading-size
|
|
180
|
+
);
|
|
181
|
+
height: var(
|
|
182
|
+
--recursica_ui-kit_components_menu-item_properties_icon-leading-size
|
|
183
|
+
);
|
|
184
|
+
margin-right: var(
|
|
185
|
+
--recursica_ui-kit_components_menu-item_properties_icon-text-gap
|
|
186
|
+
);
|
|
187
|
+
color: var(
|
|
188
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_leading-icon-color
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.itemSection[data-position="right"] {
|
|
193
|
+
width: var(
|
|
194
|
+
--recursica_ui-kit_components_menu-item_properties_icon-trailing-size
|
|
195
|
+
);
|
|
196
|
+
height: var(
|
|
197
|
+
--recursica_ui-kit_components_menu-item_properties_icon-trailing-size
|
|
198
|
+
);
|
|
199
|
+
margin-left: var(--recursica_ui-kit_components_menu-item_properties_text-gap);
|
|
200
|
+
color: var(
|
|
201
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_trailing-icon-color
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.item[data-selected] .itemSection[data-position="left"] {
|
|
206
|
+
color: var(
|
|
207
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_leading-icon-color
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.item[data-selected] .itemSection[data-position="right"] {
|
|
212
|
+
color: var(
|
|
213
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_selected_properties_colors_trailing-icon-color
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* ======================================
|
|
218
|
+
DIVIDER
|
|
219
|
+
====================================== */
|
|
220
|
+
|
|
221
|
+
.divider {
|
|
222
|
+
height: var(--recursica_ui-kit_components_menu_properties_divider-height);
|
|
223
|
+
background-color: var(
|
|
224
|
+
--recursica_ui-kit_components_menu_properties_colors_divider-color
|
|
225
|
+
);
|
|
226
|
+
opacity: var(--recursica_ui-kit_components_menu_properties_divider-opacity);
|
|
227
|
+
margin: 8px 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* ======================================
|
|
231
|
+
SECTION LABEL
|
|
232
|
+
====================================== */
|
|
233
|
+
|
|
234
|
+
.label {
|
|
235
|
+
padding: var(
|
|
236
|
+
--recursica_ui-kit_components_menu-item_properties_vertical-padding
|
|
237
|
+
)
|
|
238
|
+
var(--recursica_ui-kit_components_menu-item_properties_horizontal-padding);
|
|
239
|
+
|
|
240
|
+
/* Supporting Text Typography */
|
|
241
|
+
font-family: var(
|
|
242
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-family
|
|
243
|
+
);
|
|
244
|
+
font-size: var(
|
|
245
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-size
|
|
246
|
+
);
|
|
247
|
+
font-style: var(
|
|
248
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-style
|
|
249
|
+
);
|
|
250
|
+
font-weight: var(
|
|
251
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_font-weight
|
|
252
|
+
);
|
|
253
|
+
letter-spacing: var(
|
|
254
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_letter-spacing
|
|
255
|
+
);
|
|
256
|
+
line-height: var(
|
|
257
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_line-height
|
|
258
|
+
);
|
|
259
|
+
text-decoration: var(
|
|
260
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_text-decoration
|
|
261
|
+
);
|
|
262
|
+
text-transform: var(
|
|
263
|
+
--recursica_ui-kit_components_menu-item_properties_supporting-text_text-transform
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
color: var(
|
|
267
|
+
--recursica_ui-kit_components_menu-item_variants_selection-states_unselected_properties_colors_supporting-text-color
|
|
268
|
+
);
|
|
269
|
+
opacity: 0.7;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* ======================================
|
|
273
|
+
SUB-MENU CHEVRON
|
|
274
|
+
====================================== */
|
|
275
|
+
|
|
276
|
+
.chevron {
|
|
277
|
+
position: relative;
|
|
278
|
+
z-index: 1;
|
|
279
|
+
color: inherit;
|
|
280
|
+
}
|