@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,243 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Table as MantineTable,
|
|
4
|
+
type TableProps as MantineTableProps,
|
|
5
|
+
type TableTheadProps as MantineTableTheadProps,
|
|
6
|
+
type TableTbodyProps as MantineTableTbodyProps,
|
|
7
|
+
type TableTrProps as MantineTableTrProps,
|
|
8
|
+
type TableThProps as MantineTableThProps,
|
|
9
|
+
type TableTdProps as MantineTableTdProps,
|
|
10
|
+
type TableTfootProps as MantineTableTfootProps,
|
|
11
|
+
type TableCaptionProps as MantineTableCaptionProps,
|
|
12
|
+
type TableScrollContainerProps as MantineTableScrollContainerProps,
|
|
13
|
+
} from "@mantine/core";
|
|
14
|
+
import {
|
|
15
|
+
filterStylingProps,
|
|
16
|
+
type RecursicaOverStyled,
|
|
17
|
+
} from "../../utils/filterStylingProps";
|
|
18
|
+
import {
|
|
19
|
+
type RecursicaTableProps,
|
|
20
|
+
type RecursicaTableRowProps,
|
|
21
|
+
type RecursicaTableHeaderCellProps,
|
|
22
|
+
type RecursicaTableCellProps,
|
|
23
|
+
} from "@recursica/adapter-common";
|
|
24
|
+
import styles from "./Table.module.css";
|
|
25
|
+
import { ChevronUpIcon, ChevronDownIcon } from "./Table.icons";
|
|
26
|
+
|
|
27
|
+
export type TableProps = RecursicaOverStyled<
|
|
28
|
+
MantineTableProps & RecursicaTableProps
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
const TableBase = forwardRef<HTMLTableElement, TableProps>(function Table(
|
|
32
|
+
{ overStyled = false, ...rest },
|
|
33
|
+
ref,
|
|
34
|
+
) {
|
|
35
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
36
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
37
|
+
.className as string | undefined;
|
|
38
|
+
|
|
39
|
+
const rootClass = styles.root;
|
|
40
|
+
const finalClass = classNameProp
|
|
41
|
+
? `${rootClass} ${classNameProp}`
|
|
42
|
+
: rootClass;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<MantineTable
|
|
46
|
+
ref={ref}
|
|
47
|
+
{...(sanitizedProps as unknown as MantineTableProps)}
|
|
48
|
+
className={finalClass}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
TableBase.displayName = "Table";
|
|
54
|
+
|
|
55
|
+
// ==== EXPLICIT DOT-NOTATION SUB-COMPONENTS ====
|
|
56
|
+
// Each sub-component is wrapped independently so it goes through
|
|
57
|
+
// filterStylingProps/overStyled the same way the root Table does.
|
|
58
|
+
|
|
59
|
+
export type TableTheadProps = RecursicaOverStyled<MantineTableTheadProps>;
|
|
60
|
+
|
|
61
|
+
export const TableThead = forwardRef<HTMLTableSectionElement, TableTheadProps>(
|
|
62
|
+
function TableThead({ overStyled = false, ...rest }, ref) {
|
|
63
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
64
|
+
return (
|
|
65
|
+
<MantineTable.Thead
|
|
66
|
+
ref={ref}
|
|
67
|
+
{...(sanitizedProps as unknown as MantineTableTheadProps)}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
},
|
|
71
|
+
);
|
|
72
|
+
TableThead.displayName = "TableThead";
|
|
73
|
+
|
|
74
|
+
export type TableTbodyProps = RecursicaOverStyled<MantineTableTbodyProps>;
|
|
75
|
+
|
|
76
|
+
export const TableTbody = forwardRef<HTMLTableSectionElement, TableTbodyProps>(
|
|
77
|
+
function TableTbody({ overStyled = false, ...rest }, ref) {
|
|
78
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
79
|
+
return (
|
|
80
|
+
<MantineTable.Tbody
|
|
81
|
+
ref={ref}
|
|
82
|
+
{...(sanitizedProps as unknown as MantineTableTbodyProps)}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
TableTbody.displayName = "TableTbody";
|
|
88
|
+
|
|
89
|
+
export type TableTrProps = RecursicaOverStyled<
|
|
90
|
+
Omit<MantineTableTrProps, "children"> & RecursicaTableRowProps
|
|
91
|
+
>;
|
|
92
|
+
|
|
93
|
+
export const TableTr = forwardRef<HTMLTableRowElement, TableTrProps>(
|
|
94
|
+
function TableTr(
|
|
95
|
+
{ overStyled = false, selected = false, disabled = false, ...rest },
|
|
96
|
+
ref,
|
|
97
|
+
) {
|
|
98
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
99
|
+
return (
|
|
100
|
+
<MantineTable.Tr
|
|
101
|
+
ref={ref}
|
|
102
|
+
{...(sanitizedProps as unknown as MantineTableTrProps)}
|
|
103
|
+
data-selected={selected ? "true" : undefined}
|
|
104
|
+
data-disabled={disabled ? "true" : undefined}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
},
|
|
108
|
+
);
|
|
109
|
+
TableTr.displayName = "TableTr";
|
|
110
|
+
|
|
111
|
+
export type TableThProps = RecursicaOverStyled<
|
|
112
|
+
Omit<MantineTableThProps, "children"> & RecursicaTableHeaderCellProps
|
|
113
|
+
>;
|
|
114
|
+
|
|
115
|
+
export const TableTh = forwardRef<HTMLTableCellElement, TableThProps>(
|
|
116
|
+
function TableTh(
|
|
117
|
+
{
|
|
118
|
+
overStyled = false,
|
|
119
|
+
sorted = false,
|
|
120
|
+
disabled = false,
|
|
121
|
+
variant = "default",
|
|
122
|
+
children,
|
|
123
|
+
...rest
|
|
124
|
+
},
|
|
125
|
+
ref,
|
|
126
|
+
) {
|
|
127
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
128
|
+
return (
|
|
129
|
+
<MantineTable.Th
|
|
130
|
+
ref={ref}
|
|
131
|
+
{...(sanitizedProps as unknown as MantineTableThProps)}
|
|
132
|
+
data-sorted={sorted ? "true" : undefined}
|
|
133
|
+
data-disabled={disabled ? "true" : undefined}
|
|
134
|
+
data-currency={variant === "currency" ? "true" : undefined}
|
|
135
|
+
aria-sort={
|
|
136
|
+
sorted === "asc"
|
|
137
|
+
? "ascending"
|
|
138
|
+
: sorted === "desc"
|
|
139
|
+
? "descending"
|
|
140
|
+
: undefined
|
|
141
|
+
}
|
|
142
|
+
>
|
|
143
|
+
{children}
|
|
144
|
+
{sorted === "asc" && <ChevronUpIcon className={styles.sortIcon} />}
|
|
145
|
+
{sorted === "desc" && <ChevronDownIcon className={styles.sortIcon} />}
|
|
146
|
+
</MantineTable.Th>
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
);
|
|
150
|
+
TableTh.displayName = "TableTh";
|
|
151
|
+
|
|
152
|
+
export type TableTdProps = RecursicaOverStyled<
|
|
153
|
+
Omit<MantineTableTdProps, "children"> & RecursicaTableCellProps
|
|
154
|
+
>;
|
|
155
|
+
|
|
156
|
+
export const TableTd = forwardRef<HTMLTableCellElement, TableTdProps>(
|
|
157
|
+
function TableTd(
|
|
158
|
+
{ overStyled = false, disabled = false, variant = "default", ...rest },
|
|
159
|
+
ref,
|
|
160
|
+
) {
|
|
161
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
162
|
+
return (
|
|
163
|
+
<MantineTable.Td
|
|
164
|
+
ref={ref}
|
|
165
|
+
{...(sanitizedProps as unknown as MantineTableTdProps)}
|
|
166
|
+
data-disabled={disabled ? "true" : undefined}
|
|
167
|
+
data-currency={variant === "currency" ? "true" : undefined}
|
|
168
|
+
/>
|
|
169
|
+
);
|
|
170
|
+
},
|
|
171
|
+
);
|
|
172
|
+
TableTd.displayName = "TableTd";
|
|
173
|
+
|
|
174
|
+
export type TableTfootProps = RecursicaOverStyled<MantineTableTfootProps>;
|
|
175
|
+
|
|
176
|
+
export const TableTfoot = forwardRef<HTMLTableSectionElement, TableTfootProps>(
|
|
177
|
+
function TableTfoot({ overStyled = false, ...rest }, ref) {
|
|
178
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
179
|
+
return (
|
|
180
|
+
<MantineTable.Tfoot
|
|
181
|
+
ref={ref}
|
|
182
|
+
{...(sanitizedProps as unknown as MantineTableTfootProps)}
|
|
183
|
+
/>
|
|
184
|
+
);
|
|
185
|
+
},
|
|
186
|
+
);
|
|
187
|
+
TableTfoot.displayName = "TableTfoot";
|
|
188
|
+
|
|
189
|
+
export type TableCaptionProps = RecursicaOverStyled<MantineTableCaptionProps>;
|
|
190
|
+
|
|
191
|
+
export const TableCaption = forwardRef<
|
|
192
|
+
HTMLTableCaptionElement,
|
|
193
|
+
TableCaptionProps
|
|
194
|
+
>(function TableCaption({ overStyled = false, ...rest }, ref) {
|
|
195
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
196
|
+
return (
|
|
197
|
+
<MantineTable.Caption
|
|
198
|
+
ref={ref}
|
|
199
|
+
{...(sanitizedProps as unknown as MantineTableCaptionProps)}
|
|
200
|
+
/>
|
|
201
|
+
);
|
|
202
|
+
});
|
|
203
|
+
TableCaption.displayName = "TableCaption";
|
|
204
|
+
|
|
205
|
+
export type TableScrollContainerProps =
|
|
206
|
+
RecursicaOverStyled<MantineTableScrollContainerProps>;
|
|
207
|
+
|
|
208
|
+
export const TableScrollContainer = forwardRef<
|
|
209
|
+
HTMLDivElement,
|
|
210
|
+
TableScrollContainerProps
|
|
211
|
+
>(function TableScrollContainer({ overStyled = false, ...rest }, ref) {
|
|
212
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
213
|
+
return (
|
|
214
|
+
<MantineTable.ScrollContainer
|
|
215
|
+
ref={ref}
|
|
216
|
+
{...(sanitizedProps as unknown as MantineTableScrollContainerProps)}
|
|
217
|
+
/>
|
|
218
|
+
);
|
|
219
|
+
});
|
|
220
|
+
TableScrollContainer.displayName = "TableScrollContainer";
|
|
221
|
+
|
|
222
|
+
// ==== DOT NOTATION EXPORT ====
|
|
223
|
+
|
|
224
|
+
type TableComponent = typeof TableBase & {
|
|
225
|
+
Thead: typeof TableThead;
|
|
226
|
+
Tbody: typeof TableTbody;
|
|
227
|
+
Tr: typeof TableTr;
|
|
228
|
+
Th: typeof TableTh;
|
|
229
|
+
Td: typeof TableTd;
|
|
230
|
+
Tfoot: typeof TableTfoot;
|
|
231
|
+
Caption: typeof TableCaption;
|
|
232
|
+
ScrollContainer: typeof TableScrollContainer;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
export const Table = TableBase as TableComponent;
|
|
236
|
+
Table.Thead = TableThead;
|
|
237
|
+
Table.Tbody = TableTbody;
|
|
238
|
+
Table.Tr = TableTr;
|
|
239
|
+
Table.Th = TableTh;
|
|
240
|
+
Table.Td = TableTd;
|
|
241
|
+
Table.Tfoot = TableTfoot;
|
|
242
|
+
Table.Caption = TableCaption;
|
|
243
|
+
Table.ScrollContainer = TableScrollContainer;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Table - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `Table` component in your projects using `@recursica/adapter-mantine-v8`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Import Reference
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Table } from "@recursica/adapter-mantine-v8";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Basic Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { Table } from "@recursica/adapter-mantine-v8";
|
|
20
|
+
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
return (
|
|
23
|
+
<Table>
|
|
24
|
+
<Table.Thead>
|
|
25
|
+
<Table.Tr>
|
|
26
|
+
<Table.Th>Name</Table.Th>
|
|
27
|
+
<Table.Th>Email</Table.Tr>
|
|
28
|
+
</Table.Tr>
|
|
29
|
+
</Table.Thead>
|
|
30
|
+
<Table.Tbody>
|
|
31
|
+
<Table.Tr>
|
|
32
|
+
<Table.Td>Jane Doe</Table.Tr>
|
|
33
|
+
<Table.Td>jane@example.com</Table.Tr>
|
|
34
|
+
</Table.Tr>
|
|
35
|
+
</Table.Tbody>
|
|
36
|
+
</Table>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 3. Row and Cell States
|
|
44
|
+
|
|
45
|
+
- **`Table.Tr`**: `selected` applies the selected-row background; `disabled` dims the row and applies the disabled cell colors to every cell in it.
|
|
46
|
+
- **`Table.Th`**: `sorted="asc" | "desc"` applies the sorted header style and renders the matching chevron icon; omit it (or pass `false`) for the unsorted style. `disabled` dims the header cell. `variant="currency"` right-aligns the header to match a currency column's value cells.
|
|
47
|
+
- **`Table.Td`**: `variant="currency"` applies the currency text style (for numeric/monetary columns); `disabled` dims the cell.
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
<Table>
|
|
51
|
+
<Table.Thead>
|
|
52
|
+
<Table.Tr>
|
|
53
|
+
<Table.Th>Name</Table.Th>
|
|
54
|
+
<Table.Th sorted="asc" variant="currency">
|
|
55
|
+
Balance
|
|
56
|
+
</Table.Th>
|
|
57
|
+
</Table.Tr>
|
|
58
|
+
</Table.Thead>
|
|
59
|
+
<Table.Tbody>
|
|
60
|
+
<Table.Tr selected>
|
|
61
|
+
<Table.Td>Jane Doe</Table.Td>
|
|
62
|
+
<Table.Td variant="currency">$1,204.50</Table.Td>
|
|
63
|
+
</Table.Tr>
|
|
64
|
+
<Table.Tr disabled>
|
|
65
|
+
<Table.Td>Inactive Account</Table.Td>
|
|
66
|
+
<Table.Td variant="currency">$0.00</Table.Td>
|
|
67
|
+
</Table.Tr>
|
|
68
|
+
</Table.Tbody>
|
|
69
|
+
<Table.Tfoot>
|
|
70
|
+
<Table.Tr>
|
|
71
|
+
<Table.Td>Total</Table.Td>
|
|
72
|
+
<Table.Td variant="currency">$1,204.50</Table.Td>
|
|
73
|
+
</Table.Tr>
|
|
74
|
+
</Table.Tfoot>
|
|
75
|
+
</Table>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Tabs Implementation Notes
|
|
2
|
+
|
|
3
|
+
## `inverted` never actually moved the tab list below the content (2026-08-30, source-of-truth audit)
|
|
4
|
+
|
|
5
|
+
**Reported symptom:** in the `Inverted` story, content should render above the tab list (tabs
|
|
6
|
+
below), with padding between them — the padding looked missing "when content is on top".
|
|
7
|
+
|
|
8
|
+
**What was actually happening:** `inverted` is a real, native `@mantine/core` `Tabs` prop
|
|
9
|
+
(confirmed by reading `@mantine/core`'s own `Tabs.cjs`/`Tabs.css`) — this adapter doesn't even
|
|
10
|
+
reference it directly, it flows straight through `...rest` to `<MantineTabs>`. But Mantine's own
|
|
11
|
+
`inverted` support only flips the active-indicator line and border-radius direction (top vs
|
|
12
|
+
bottom) via `data-inverted` CSS selectors; it does not reposition `.list` below `.panel`. The
|
|
13
|
+
story always renders `<Tabs.List>` before the `<Tabs.Panel>`s in JSX regardless of `inverted`, so
|
|
14
|
+
"padding missing when content is on top" wasn't reproducible as such: content was never on top to
|
|
15
|
+
begin with, before this fix.
|
|
16
|
+
|
|
17
|
+
**Fix:** Mantine renders `Tabs.List`/`Tabs.Panel` as flat siblings directly under `.root` despite
|
|
18
|
+
the nested JSX (confirmed via live DOM dump) — so making `.root[data-orientation="horizontal"]`
|
|
19
|
+
a flex column and giving `.list` `order: 1` only when `[data-inverted]` reorders them visually
|
|
20
|
+
with zero DOM changes, no compound-component internals to touch. Scoped to horizontal only —
|
|
21
|
+
vertical's "instead of left" flip isn't exercised by any story. Also introduced a shared
|
|
22
|
+
`--tabs-content-gap` custom property per variant (previously each variant inlined its own long
|
|
23
|
+
token reference directly into `.list`'s `margin-bottom`) so the same gap can be redirected:
|
|
24
|
+
`margin-bottom: 0; margin-top: var(--tabs-content-gap);` when inverted, since the gap now needs
|
|
25
|
+
to land above the now-trailing tab list instead of below it. Verified live against mui-adapter's
|
|
26
|
+
identical fix (see its own `Tabs/IMPLEMENTATION_NOTES.md`) — pixel-equivalent stacking order and
|
|
27
|
+
gap; no regression on Default/Outline/Pills/Vertical stories.
|