@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,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,248 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Card as MantineCard,
|
|
4
|
+
type CardProps as MantineCardProps,
|
|
5
|
+
type CardSectionProps as MantineCardSectionProps,
|
|
6
|
+
createPolymorphicComponent,
|
|
7
|
+
} from "@mantine/core";
|
|
8
|
+
import {
|
|
9
|
+
filterStylingProps,
|
|
10
|
+
omitUnsupportedProps,
|
|
11
|
+
mergeClassNames,
|
|
12
|
+
type RecursicaOverStyled,
|
|
13
|
+
} from "../../utils/filterStylingProps";
|
|
14
|
+
import styles from "./Card.module.css";
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
type RecursicaCardProps,
|
|
18
|
+
type RecursicaCardSectionProps,
|
|
19
|
+
} from "@recursica/adapter-common";
|
|
20
|
+
|
|
21
|
+
// ==== CARD CONTAINER ====
|
|
22
|
+
export type CardProps = RecursicaOverStyled<
|
|
23
|
+
MantineCardProps & RecursicaCardProps
|
|
24
|
+
> & {
|
|
25
|
+
flex?: string | number;
|
|
26
|
+
flexGrow?: string | number;
|
|
27
|
+
flexShrink?: string | number;
|
|
28
|
+
flexBasis?: string | number;
|
|
29
|
+
grow?: string | number;
|
|
30
|
+
h?: string | number;
|
|
31
|
+
height?: string | number;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
*/
|
|
37
|
+
// Props this component intentionally doesn't support — deleted at runtime so they can't leak
|
|
38
|
+
// through even if a caller forces them via plain JavaScript. `Card.module.css` unconditionally
|
|
39
|
+
// drives these from Recursica UI Kit tokens on `.root`; the native prop is never consulted.
|
|
40
|
+
const UNSUPPORTED_PROPS = [
|
|
41
|
+
"radius", // Border radius is token-driven (`--recursica_..._borders_border-radius`), not caller-set.
|
|
42
|
+
"withBorder", // Border is always applied via tokens on `.root`; not an optional caller toggle.
|
|
43
|
+
"padding", // Padding is token-driven (`--card-padding`), not Mantine's spacing-scale prop.
|
|
44
|
+
] as const satisfies readonly (keyof MantineCardProps)[];
|
|
45
|
+
|
|
46
|
+
const CardBase = forwardRef<HTMLDivElement, CardProps>(function Card(
|
|
47
|
+
{ overStyled = false, ...rest },
|
|
48
|
+
ref,
|
|
49
|
+
) {
|
|
50
|
+
const sanitizedProps = omitUnsupportedProps(
|
|
51
|
+
filterStylingProps(rest, overStyled),
|
|
52
|
+
UNSUPPORTED_PROPS,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
// Expose outer layout/flexbox properties on Card to allow structuring alongside siblings
|
|
56
|
+
const safeCardLayoutKeys = [
|
|
57
|
+
"flex",
|
|
58
|
+
"flexGrow",
|
|
59
|
+
"flexShrink",
|
|
60
|
+
"flexBasis",
|
|
61
|
+
"grow",
|
|
62
|
+
"h",
|
|
63
|
+
"height",
|
|
64
|
+
] as const;
|
|
65
|
+
safeCardLayoutKeys.forEach((key) => {
|
|
66
|
+
if (key in rest && !(key in sanitizedProps)) {
|
|
67
|
+
(sanitizedProps as Record<string, unknown>)[key] = (
|
|
68
|
+
rest as Record<string, unknown>
|
|
69
|
+
)[key];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const mergedClassNames = mergeClassNames(
|
|
74
|
+
{
|
|
75
|
+
root: styles.root,
|
|
76
|
+
},
|
|
77
|
+
(sanitizedProps as Record<string, unknown>).classNames as
|
|
78
|
+
| Partial<Record<string, string>>
|
|
79
|
+
| undefined,
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
83
|
+
.className as string | undefined;
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<MantineCard
|
|
87
|
+
ref={ref}
|
|
88
|
+
{...(sanitizedProps as unknown as MantineCardProps)}
|
|
89
|
+
className={classNameProp}
|
|
90
|
+
classNames={mergedClassNames}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
CardBase.displayName = "Card";
|
|
95
|
+
|
|
96
|
+
export type CardSectionProps = RecursicaOverStyled<
|
|
97
|
+
MantineCardSectionProps & RecursicaCardSectionProps
|
|
98
|
+
>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* A generalized edge-to-edge structural wrapper native to Mantine. Strips typical boundary padding via negative margins to allow content (like maps or header images) to touch the border seamlessly.
|
|
102
|
+
*/
|
|
103
|
+
export const CardSection = forwardRef<HTMLDivElement, CardSectionProps>(
|
|
104
|
+
function CardSection({ overStyled = false, ...rest }, ref) {
|
|
105
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
106
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
107
|
+
.className as string | undefined;
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<MantineCard.Section
|
|
111
|
+
ref={ref}
|
|
112
|
+
{...(sanitizedProps as unknown as MantineCardSectionProps)}
|
|
113
|
+
className={
|
|
114
|
+
classNameProp ? `${styles.section} ${classNameProp}` : styles.section
|
|
115
|
+
}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
},
|
|
119
|
+
);
|
|
120
|
+
CardSection.displayName = "CardSection";
|
|
121
|
+
|
|
122
|
+
// ==== EXPLICIT CARD.HEADER ====
|
|
123
|
+
export type CardHeaderProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Replaces standard generic Mantine `<Card.Section>` wrappers by directly injecting the strict Recursica design tokens for header sizing, background drops, and intrinsic padding limits.
|
|
127
|
+
*/
|
|
128
|
+
// Props this component intentionally doesn't support — deleted at runtime so they can't leak
|
|
129
|
+
// through even if a caller forces them via plain JavaScript. `CardHeaderProps` already omits all
|
|
130
|
+
// native Mantine section props from the public type, but that alone doesn't stop a forced-typed
|
|
131
|
+
// caller from smuggling one through `...rest`; `.header` in Card.module.css unconditionally
|
|
132
|
+
// drives background/padding/border from Recursica tokens, so these native toggles are meaningless.
|
|
133
|
+
const HEADER_FOOTER_UNSUPPORTED_PROPS = [
|
|
134
|
+
"withBorder", // The divider border is always applied via tokens on `.header`/`.footer`.
|
|
135
|
+
"inheritPadding", // Padding is fixed by the `.header`/`.footer` token-driven padding, not Mantine's default.
|
|
136
|
+
] as const satisfies readonly (keyof MantineCardSectionProps)[];
|
|
137
|
+
|
|
138
|
+
export const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(
|
|
139
|
+
function CardHeader({ overStyled = false, ...rest }, ref) {
|
|
140
|
+
const sanitizedProps = omitUnsupportedProps(
|
|
141
|
+
filterStylingProps(rest, overStyled),
|
|
142
|
+
HEADER_FOOTER_UNSUPPORTED_PROPS,
|
|
143
|
+
);
|
|
144
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
145
|
+
.className as string | undefined;
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<MantineCard.Section
|
|
149
|
+
ref={ref}
|
|
150
|
+
{...(sanitizedProps as unknown as MantineCardSectionProps)}
|
|
151
|
+
className={
|
|
152
|
+
classNameProp ? `${styles.header} ${classNameProp}` : styles.header
|
|
153
|
+
}
|
|
154
|
+
/>
|
|
155
|
+
);
|
|
156
|
+
},
|
|
157
|
+
);
|
|
158
|
+
CardHeader.displayName = "CardHeader";
|
|
159
|
+
|
|
160
|
+
// ==== EXPLICIT CARD.FOOTER ====
|
|
161
|
+
export type CardFooterProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Counterpart to `Card.Header`, applying specific footer elevation margins, sizes, and padding natively.
|
|
165
|
+
*/
|
|
166
|
+
export const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(
|
|
167
|
+
function CardFooter({ overStyled = false, ...rest }, ref) {
|
|
168
|
+
// Reuses HEADER_FOOTER_UNSUPPORTED_PROPS (declared above with CardHeader) — same rationale
|
|
169
|
+
// applies: `.footer` in Card.module.css unconditionally drives padding/border from tokens.
|
|
170
|
+
const sanitizedProps = omitUnsupportedProps(
|
|
171
|
+
filterStylingProps(rest, overStyled),
|
|
172
|
+
HEADER_FOOTER_UNSUPPORTED_PROPS,
|
|
173
|
+
);
|
|
174
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
175
|
+
.className as string | undefined;
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<MantineCard.Section
|
|
179
|
+
ref={ref}
|
|
180
|
+
{...(sanitizedProps as unknown as MantineCardSectionProps)}
|
|
181
|
+
className={
|
|
182
|
+
classNameProp ? `${styles.footer} ${classNameProp}` : styles.footer
|
|
183
|
+
}
|
|
184
|
+
/>
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
);
|
|
188
|
+
CardFooter.displayName = "CardFooter";
|
|
189
|
+
|
|
190
|
+
// ==== EXPLICIT CARD.CONTENT ====
|
|
191
|
+
export type CardContentProps = RecursicaOverStyled<
|
|
192
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
193
|
+
>;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 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.
|
|
197
|
+
*/
|
|
198
|
+
export const CardContent = forwardRef<HTMLDivElement, CardContentProps>(
|
|
199
|
+
function CardContent({ overStyled = false, ...rest }, ref) {
|
|
200
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
201
|
+
const classNameProp = (sanitizedProps as Record<string, unknown>)
|
|
202
|
+
.className as string | undefined;
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
<div
|
|
206
|
+
ref={ref}
|
|
207
|
+
{...sanitizedProps}
|
|
208
|
+
className={
|
|
209
|
+
classNameProp ? `${styles.content} ${classNameProp}` : styles.content
|
|
210
|
+
}
|
|
211
|
+
/>
|
|
212
|
+
);
|
|
213
|
+
},
|
|
214
|
+
);
|
|
215
|
+
CardContent.displayName = "CardContent";
|
|
216
|
+
|
|
217
|
+
// ==== DOT NOTATION EXPORT ====
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Recursica Card component wrapping Mantine's Card (Paper).
|
|
221
|
+
*
|
|
222
|
+
* Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
|
|
223
|
+
* Use dot-notation sub-components for structured card layouts.
|
|
224
|
+
*/
|
|
225
|
+
const PolymorphicCard = createPolymorphicComponent<
|
|
226
|
+
"div",
|
|
227
|
+
CardProps,
|
|
228
|
+
{
|
|
229
|
+
Section: typeof CardSection;
|
|
230
|
+
Header: typeof CardHeader;
|
|
231
|
+
Footer: typeof CardFooter;
|
|
232
|
+
Content: typeof CardContent;
|
|
233
|
+
}
|
|
234
|
+
>(CardBase);
|
|
235
|
+
|
|
236
|
+
// Attach static components for dot-notation access
|
|
237
|
+
const _card = PolymorphicCard as unknown as Record<string, unknown>;
|
|
238
|
+
_card.Section = CardSection;
|
|
239
|
+
_card.Header = CardHeader;
|
|
240
|
+
_card.Footer = CardFooter;
|
|
241
|
+
_card.Content = CardContent;
|
|
242
|
+
|
|
243
|
+
export const Card = PolymorphicCard as typeof PolymorphicCard & {
|
|
244
|
+
Section: typeof CardSection;
|
|
245
|
+
Header: typeof CardHeader;
|
|
246
|
+
Footer: typeof CardFooter;
|
|
247
|
+
Content: typeof CardContent;
|
|
248
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Card - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `Card` component in your projects using `@recursica/adapter-mantine-v8`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Import Reference
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Card } from "@recursica/adapter-mantine-v8";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Basic Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { Card } from "@recursica/adapter-mantine-v8";
|
|
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-mantine-v8` 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
|
+
## Header & Footer Styling
|
|
58
|
+
|
|
59
|
+
`Card.Header` and `Card.Footer` automatically receive their background color and padding from the design system; no manual styling is needed.
|
|
60
|
+
|
|
61
|
+
## Layout Alignment
|
|
62
|
+
|
|
63
|
+
`Card` accepts a safe subset of flexbox/sizing props (`flex`, `flexGrow`, `flexShrink`, `flexBasis`, `grow`, `h`, `height`) so it can participate cleanly in flex or grid layouts (dashboard panels, grid tracks, sidebar segments, etc.). `Card.Content` grows to fill available vertical space, which keeps `Card.Footer` pinned to the bottom of the card.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Checkbox Implementation Notes
|
|
2
|
+
|
|
3
|
+
## Architectural Philosophy
|
|
4
|
+
|
|
5
|
+
The `Checkbox` primitive requires aggressive structural modifications to decouple Mantine's built-in arrays (`<Checkbox.Group>`) tying the raw DOM nodes seamlessly back into Recursica's unified form definitions flawlessly.
|
|
6
|
+
|
|
7
|
+
### Checkbox Alignment Anchoring (gap overflow hack)
|
|
8
|
+
|
|
9
|
+
By default, placing a Checkbox alongside a deeply wrapping multi-line label causes native geometric drifts natively. Because Mantine aligns the Checkbox graphic to the top of standard `display: flex` boxes, its optical center will appear natively skewed slightly _too high_ against the very first typographic text-line.
|
|
10
|
+
|
|
11
|
+
We mathematically fix this alignment within `Checkbox.module.css` using explicit design variable arithmetic natively.
|
|
12
|
+
\`\`\`css
|
|
13
|
+
margin-top: calc(
|
|
14
|
+
(
|
|
15
|
+
var(--recursica_ui-kit_components_checkbox-item_properties_text_line-height) \*
|
|
16
|
+
var(--recursica_ui-kit_components_checkbox-item_properties_text_font-size) -
|
|
17
|
+
var(--recursica_ui-kit_components_checkbox_properties_size)
|
|
18
|
+
) / 2
|
|
19
|
+
) !important;
|
|
20
|
+
\`\`\`
|
|
21
|
+
This calculation ensures that the optical center of the `.inner` checkmark vector perfectly snaps onto the relative center of the text's line-height, permanently solving pixel-drifts natively!
|
|
22
|
+
|
|
23
|
+
### Checkbox.Group Overrides
|
|
24
|
+
|
|
25
|
+
To decouple `<CheckboxGroup>` away from `<Input.Wrapper>`, we explicitly extract the raw array execution mapped correctly against our identical `RecursicaFormControlWrapperProps` schema structurally!
|