@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,92 @@
|
|
|
1
|
+
# Slider Implementation Notes
|
|
2
|
+
|
|
3
|
+
This document contains specific design decisions, architectural constraints, and hacks required to bridge the Recursica design system with Mantine's underlying `Slider` primitive.
|
|
4
|
+
|
|
5
|
+
## 1. Bidirectional State Synchronization
|
|
6
|
+
|
|
7
|
+
**Decision:** Maintain a highly responsive, bidirectional connection between the sliding track value and the adjacent numeric text input.
|
|
8
|
+
**Implementation:**
|
|
9
|
+
|
|
10
|
+
- The slider track requires a clean `number` state, whereas the text box requires a `string` state (`inputValue`) to allow typing intermediate characters like decimals (`2.`), negative signs (`-`), or empty text without breaking standard React input binding.
|
|
11
|
+
- A `useEffect` hook continuously feeds the outer numeric state changes back into the text input value as a string representation.
|
|
12
|
+
- Input changes instantly parsed as float clamp bounds securely. On blur (`onBlur`), the input state is automatically sanitized and reset to the clean, clamped string representation of the final track value.
|
|
13
|
+
|
|
14
|
+
## 2. Outer Form Control Wrapper Integration
|
|
15
|
+
|
|
16
|
+
**Decision:** Bypass Mantine's native `Input.Wrapper` and `label` properties.
|
|
17
|
+
**Implementation:**
|
|
18
|
+
|
|
19
|
+
- Universal form wrappers like `<FormControlWrapper>` and `<WithReadOnlyWrapper>` handle the outer layout architecture, including labels, assistive text, error states, and optional edit-triggering fields.
|
|
20
|
+
- Therefore, we map the outer form label directly to the `label` property of the `Slider` (delegated to the wrapper), and rename Mantine's internal dragging tooltip label property to `tooltipLabel`.
|
|
21
|
+
|
|
22
|
+
## 3. Custom Min-Max Labels and Step Indicators
|
|
23
|
+
|
|
24
|
+
**Decision:** Enforce rigid typography tokens on lower bounds and custom mark indicators.
|
|
25
|
+
**Implementation:**
|
|
26
|
+
|
|
27
|
+
- Mantine's native mark and step structures are fully styles-mapped back to our scoped variables in `Slider.module.css`.
|
|
28
|
+
- Min and Max numeric guides are rendered directly to the left and right of the slider track, centered vertically and spaced automatically using standard input gaps, while dynamically fetching custom typography tokens for min-max labels to avoid hardcoded formatting constraints.
|
|
29
|
+
|
|
30
|
+
## 4. Visual Overrides for Stacked and Side-by-Side Spacing
|
|
31
|
+
|
|
32
|
+
**Decision:** Enforce layout margins dynamically based on container orientation parameters.
|
|
33
|
+
**Implementation:**
|
|
34
|
+
|
|
35
|
+
- Using custom layouts (e.g. `stacked` and `side-by-side`), we override the margins by assigning the component-specific Figma spacing variables to the unified `--form-control-margin-bottom` property.
|
|
36
|
+
|
|
37
|
+
## 5. Right-Aligned Floating Current Value
|
|
38
|
+
|
|
39
|
+
**Decision:** Position the current active value of the slider directly above the max guide (or right-side element) on the right side of the track.
|
|
40
|
+
**Implementation:**
|
|
41
|
+
|
|
42
|
+
- Wrap the max guide element in a relative layout container (`.rightGuideContainer`) to provide a positioning anchor.
|
|
43
|
+
- Place the active value element (`.currentValue`) inside `.rightGuideContainer` and position it absolutely (`bottom: calc(100% + var(--recursica_ui-kit_globals_form_properties_label-field-gap-vertical, 8px))`, `right: 0`).
|
|
44
|
+
- This absolute positioning strategy guarantees that the active value floats cleanly above the track's right side, while aligning it vertically on the Y-axis to sit in perfect baseline alignment with the component's left-aligned form label.
|
|
45
|
+
- Set typography using the Figma-aligned component-specific read-only value variables (`--recursica_ui-kit_components_slider_properties_read-only-value_...`).
|
|
46
|
+
- Allow the text color of both the floating current value (`.currentValue`) and the component's read-only value (`.readOnlyValue`) to naturally inherit from their parent states/form globals, automatically supporting default (`--form-field-text-valued`), disabled (`--form-field-disabled-text`), and error colors without explicit color overrides, matching the min/max guides.
|
|
47
|
+
- If `showInput` is enabled, the floating `.currentValue` is hidden since the active value is already displayed and editable within the adjacent numeric text input, avoiding visual redundancy.
|
|
48
|
+
- In `side-by-side` form layouts, the `.currentValue` is positioned inline (static positioning) to the right of the max label rather than floating above it, centered vertically with the max label and aligned right to the container. This uses CSS flexbox ordering (`order: 2` for `.currentValue` and `order: 1` for `.minMaxGuide`) to visually swap their positions while preserving clean, semantic DOM ordering.
|
|
49
|
+
- To ensure perfect, pixel-perfect vertical track alignment between sliders that show numeric text inputs (`showInput={true}`) and sliders that display the active inline value (`showInput={false}`), the `.currentValue` element is globally given a width equal to the input width (`var(--recursica_ui-kit_components_slider_properties_input-width)`) and right-aligned (`text-align: right`). In `side-by-side` layouts, `.rightGuideContainer`'s flex gap is also matched to the horizontal input-to-track gap (`var(--recursica_ui-kit_components_slider_properties_input-gap)`), making the horizontal space occupied by the rightmost elements exactly identical in both component modes.
|
|
50
|
+
|
|
51
|
+
## 6. Focus Treatment (Generic State Tokens)
|
|
52
|
+
|
|
53
|
+
**Decision:** The token schema dropped the component-level `focus` state entirely. Only a narrower `active` state remains, covering `colors_track`/`colors_step-indicator-color` for the track/mark while any part of the slider has focus-within.
|
|
54
|
+
**Implementation:**
|
|
55
|
+
|
|
56
|
+
- Thumb, icon, and numeric input no longer have per-component focus colors. Instead they get a focus _ring_ built from the generic `--recursica_brand_states_focus_{border-size,color,margin,blur}` tokens, applied as a `box-shadow` (crisp inner ring at `border-size` plus a soft outer glow using `blur`/`margin`) rather than a color swap.
|
|
57
|
+
- The thumb's focus box-shadow layers the ring on top of its existing `thumb-elevation` shadow rather than replacing it.
|
|
58
|
+
- `.sliderMark[data-filled]` has no default-state "-active" step-indicator token anymore (only `disabled`/`error` define one); it reuses `colors_track-active` so filled marks stay visually tied to the filled portion of the track. Worth a design review if a distinct filled-mark color is expected.
|
|
59
|
+
- `markLabel` was already mapped in the `classNames` prop but had no matching `.sliderMarkLabel` rule in this file, so Mantine silently fell back to its own default theme grey instead of any recursica token. Added a `.sliderMarkLabel` rule reusing the min-max-label typography tokens with `color: inherit`, matching the mui-adapter's equivalent.
|
|
60
|
+
|
|
61
|
+
## 7. Formatted Current Value, Label Overrides, Trailing Icon
|
|
62
|
+
|
|
63
|
+
**Decision:** The floating `.currentValue` display (see §5) always rendered the raw numeric value, even when `tooltipLabel` was a formatter function — a caller mapping values onto custom text (e.g. 0-4 → XS/S/M/L/XL) got the formatted tooltip while dragging but the raw number next to the track otherwise.
|
|
64
|
+
**Implementation:**
|
|
65
|
+
|
|
66
|
+
- `.currentValue` now runs `resolvedValue` through `tooltipLabel` when it's a function, so both displays agree. No change when `tooltipLabel` is absent or a static node — still the raw number.
|
|
67
|
+
- `minLabel`/`maxLabel` (new `adapter-common` props) override the `.minMaxGuide` text at either end of the track, falling back to the numeric `min`/`max`.
|
|
68
|
+
- `trailingIcon` (new `adapter-common` prop) renders a second icon on the opposite side of the track from the existing `icon`, reusing the same `.iconWrapper` styling (disabled/error/focus states already target `.iconWrapper` generically, so no new CSS was needed).
|
|
69
|
+
|
|
70
|
+
## 8. Dual-Thumb / Range Support
|
|
71
|
+
|
|
72
|
+
**Decision:** Previously requested and declined (see git history for this section) as no use case needed it; reopened with a full spec and implemented. `value`/`defaultValue`/`onChange`/`onChangeEnd` are now typed `number | [number, number]` in `@recursica/adapter-common`'s `RecursicaSliderProps`.
|
|
73
|
+
**Implementation:**
|
|
74
|
+
|
|
75
|
+
- `isRange = Array.isArray(resolvedValue)` picks which underlying Mantine component to render: single-thumb `Slider` (unchanged) or two-thumb `RangeSlider` — Mantine ships these as two separate components (unlike raw MUI, which renders two thumbs off a single `Slider` given a tuple `value`), so this is a real component swap, not just a type/prop change. Both share the same `SliderStylesNames` shape, so `mergedClassNames` (root/track/bar/thumb/mark/markLabel) applies unchanged to either.
|
|
76
|
+
- Internal state (`internalValue`, `resolvedValue`, `inputValue`) generalized from `number` to `number | [number, number]`; range-mode input handlers (`handleLowerInputChange`/`handleUpperInputChange`) clamp each thumb against the other's current value (not the shared `min`/`max`) so the two inputs can't cross.
|
|
77
|
+
- `SliderReadOnlyValue` and the floating `.currentValue` display both render `"lower – upper"` for a range value, running each side through `tooltipLabel` independently when it's a formatter.
|
|
78
|
+
- DOM order in range mode (input → leading icon → min label → track → max label → trailing icon → input) mirrors Forge's own Material/Carbon range layouts — see §9 below.
|
|
79
|
+
- Not carried over: Mantine `RangeSlider`'s own `minRange`/`maxRange`/`pushOnOverlap`/`thumbFromLabel`/`thumbToLabel` pass through via the existing unsanitized `...rest` spread if a caller sets them directly; no adapter-level default is applied (e.g. Mantine's own `minRange` default of `10` is left as-is).
|
|
80
|
+
|
|
81
|
+
## 9. Trailing Icon Order Relative to the Input Field
|
|
82
|
+
|
|
83
|
+
**Decision:** `trailingIcon` previously rendered after the numeric input (`... max label, input, trailing icon`), reversed from Forge's Material/Carbon kits, which always render the trailing icon directly after the max label and before the input.
|
|
84
|
+
**Implementation:** Moved `{trailingIconEl}` before the `showInput` input block in the single-value layout; the range layout was built with this order from the start (input → icon → min label → track → max label → trailing icon → input).
|
|
85
|
+
|
|
86
|
+
## 10. Marks Rendering Off Mantine Defaults Instead of Recursica Tokens
|
|
87
|
+
|
|
88
|
+
**Decision:** §3 claimed marks were "fully styles-mapped back to our scoped variables" — not quite true. Mantine's `markWrapper` style slot (the zero-height, top-anchored positioning wrapper around each mark dot + label) was never mapped in `mergedClassNames`, and `markLabel`'s vertical position was never overridden, so both stayed on raw Mantine defaults.
|
|
89
|
+
**Implementation:**
|
|
90
|
+
|
|
91
|
+
- `markWrapper` is anchored to Mantine's own `top: 0` (the track's top edge), with the mark dot inside it unpositioned. Mantine's own dot has no size override so it happens to fill the track height exactly by default; our `step-indicator-width` token is independent of track height, so the dot rendered small and flush to the top instead of centered. Added `markWrapper: styles.sliderMarkWrapper` to `mergedClassNames`, with `.sliderMarkWrapper { top: 50%; }`, and changed `.sliderMark`'s transform from `translateX(-50%)` to `translate(-50%, -50%)` to center the dot on that midpoint.
|
|
92
|
+
- `.sliderMarkLabel` never overrode `transform`, so its vertical offset stayed Mantine's own `calc(var(--mantine-spacing-xs) / 2)` — an unbound theme default, not a recursica token. Replaced the vertical term with `--recursica_ui-kit_globals_form_properties_label-field-gap-vertical` (the same token the mui-adapter's markLabel already uses), keeping the horizontal term (`-50% + var(--slider-size) / 2`, Mantine's own mark-offset compensation) unchanged.
|
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
/* Brand-layer exemptions (recursica-allow-brand) — see recursica-token-analyzer README.md.
|
|
2
|
+
* Global hover/focus/disabled state tokens (recursica_variables_scoped.css header, 'Hover & Focus states' / 'Disabled state' — implicit rule for every interactive element; components must not define their own per-component treatment).
|
|
3
|
+
* recursica-allow-brand: --recursica_brand_states_focus_blur
|
|
4
|
+
* recursica-allow-brand: --recursica_brand_states_focus_border-size
|
|
5
|
+
* recursica-allow-brand: --recursica_brand_states_focus_color
|
|
6
|
+
* recursica-allow-brand: --recursica_brand_states_focus_margin
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* HARDCODED VALUES:
|
|
11
|
+
* - display: flex; align-items: center; width: 100%; (Standard CSS flexbox layouts for bidirectional components)
|
|
12
|
+
* - flex-grow: 1; flex-shrink: 0; (Layout control structures)
|
|
13
|
+
* - transform: translate(-50%, -50%); (custom step-mark centering offset — see .sliderMarkWrapper
|
|
14
|
+
* / .sliderMark below; not inherited from Mantine, which centers marks via its own
|
|
15
|
+
* --slider-size variable that our step-indicator-width token doesn't participate in)
|
|
16
|
+
* - top: 50%; on .sliderMarkWrapper (re-anchors Mantine's zero-height mark wrapper to the
|
|
17
|
+
* track's vertical midpoint instead of its top edge)
|
|
18
|
+
* - outline: none; border-style: solid; (Standard focus reset and border outlines)
|
|
19
|
+
* - Focus ring on thumb/icon/input: the token schema no longer provides per-component focus
|
|
20
|
+
* colors for these (only `active` covers track/step-indicator-color). We apply the generic
|
|
21
|
+
* --recursica_brand_states_focus_* ring tokens (border-size/color/margin/blur) as a box-shadow
|
|
22
|
+
* ring instead of a color swap.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/* ==========================================
|
|
26
|
+
1. Baseline, Reset & Layout Overrides
|
|
27
|
+
========================================== */
|
|
28
|
+
|
|
29
|
+
/* Stacked Layout Spacing Override */
|
|
30
|
+
.layoutOverride {
|
|
31
|
+
--form-control-margin-bottom: var(
|
|
32
|
+
--recursica_ui-kit_components_slider_variants_layouts_stacked_properties_top-bottom-margin
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Side-by-Side Layout Spacing Override */
|
|
37
|
+
.layoutOverride[data-form-layout="side-by-side"] {
|
|
38
|
+
--form-control-margin-bottom: var(
|
|
39
|
+
--recursica_ui-kit_components_slider_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.sliderContainer {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
width: 100%;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
gap: var(--recursica_ui-kit_components_slider_properties_input-gap);
|
|
49
|
+
color: var(--form-field-text-valued);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.sliderTrackWrapper {
|
|
53
|
+
flex-grow: 1;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.iconWrapper {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
width: var(--recursica_ui-kit_components_slider_properties_icon-size);
|
|
65
|
+
height: var(--recursica_ui-kit_components_slider_properties_icon-size);
|
|
66
|
+
color: var(--recursica_ui-kit_components_slider_properties_colors_icon-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ==========================================
|
|
70
|
+
2. Slider Tracks, Bars, Thumbs, and Marks
|
|
71
|
+
========================================== */
|
|
72
|
+
|
|
73
|
+
.sliderRoot {
|
|
74
|
+
width: 100%;
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.sliderTrack {
|
|
79
|
+
height: var(--recursica_ui-kit_components_slider_properties_track-height);
|
|
80
|
+
border-radius: var(
|
|
81
|
+
--recursica_ui-kit_components_slider_properties_track-border-radius
|
|
82
|
+
);
|
|
83
|
+
background-color: var(
|
|
84
|
+
--recursica_ui-kit_components_slider_properties_colors_track
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.sliderBar {
|
|
89
|
+
background-color: var(
|
|
90
|
+
--recursica_ui-kit_components_slider_properties_colors_track-active
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sliderThumb {
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
width: var(--recursica_ui-kit_components_slider_properties_thumb-size);
|
|
97
|
+
height: var(--recursica_ui-kit_components_slider_properties_thumb-size);
|
|
98
|
+
border-radius: var(
|
|
99
|
+
--recursica_ui-kit_components_slider_properties_thumb-border-radius
|
|
100
|
+
);
|
|
101
|
+
box-shadow: var(
|
|
102
|
+
--recursica_ui-kit_components_slider_properties_thumb-elevation
|
|
103
|
+
);
|
|
104
|
+
background-color: var(
|
|
105
|
+
--recursica_ui-kit_components_slider_properties_colors_thumb
|
|
106
|
+
);
|
|
107
|
+
border: none;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
outline: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sliderThumb:focus,
|
|
113
|
+
.sliderThumb:focus-visible {
|
|
114
|
+
outline: none;
|
|
115
|
+
box-shadow:
|
|
116
|
+
var(--recursica_ui-kit_components_slider_properties_thumb-elevation),
|
|
117
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
118
|
+
var(--recursica_brand_states_focus_color),
|
|
119
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
120
|
+
var(--recursica_brand_states_focus_margin)
|
|
121
|
+
var(--recursica_brand_states_focus_color);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/*
|
|
125
|
+
* Mantine positions the mark dot inside a zero-height `markWrapper` anchored to the track's
|
|
126
|
+
* top edge, relying on the dot's height matching Mantine's own `--slider-size` to land centered.
|
|
127
|
+
* Our step-indicator-width token is independent of that, so without an explicit vertical
|
|
128
|
+
* transform the dot sits flush to the track's top instead of centered. `sliderMarkWrapper`
|
|
129
|
+
* moves the anchor to the track's vertical midpoint; `translate(-50%, -50%)` below centers the
|
|
130
|
+
* dot on that midpoint (in addition to the pre-existing horizontal centering).
|
|
131
|
+
*/
|
|
132
|
+
.sliderMarkWrapper {
|
|
133
|
+
top: 50%;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.sliderMark {
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
width: var(
|
|
139
|
+
--recursica_ui-kit_components_slider_properties_step-indicator-width
|
|
140
|
+
);
|
|
141
|
+
height: var(
|
|
142
|
+
--recursica_ui-kit_components_slider_properties_step-indicator-width
|
|
143
|
+
);
|
|
144
|
+
border-radius: var(
|
|
145
|
+
--recursica_ui-kit_components_slider_properties_step-indicator-border-radius
|
|
146
|
+
);
|
|
147
|
+
background-color: var(
|
|
148
|
+
--recursica_ui-kit_components_slider_properties_colors_step-indicator-color
|
|
149
|
+
);
|
|
150
|
+
transform: translate(-50%, -50%);
|
|
151
|
+
border: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.sliderMark[data-filled] {
|
|
155
|
+
/* No default-state "-active" step-indicator token exists anymore (only disabled/error define
|
|
156
|
+
one); reusing the active-track color keeps filled marks visually tied to the filled track. */
|
|
157
|
+
background-color: var(
|
|
158
|
+
--recursica_ui-kit_components_slider_properties_colors_track-active
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/*
|
|
163
|
+
* Mantine's default markLabel has no dedicated recursica token; it renders with Mantine's own
|
|
164
|
+
* theme grey instead of inheriting the container text color. Reusing the min-max-label
|
|
165
|
+
* typography tokens and inheriting color keeps this visually consistent with the min/max guides.
|
|
166
|
+
*
|
|
167
|
+
* The vertical gap between mark and label is also Mantine's own default (half of
|
|
168
|
+
* --mantine-spacing-xs, unbound to any recursica token) unless overridden here. The transform's
|
|
169
|
+
* horizontal term (`-50% + var(--slider-size) / 2`) is Mantine's own mark-offset compensation
|
|
170
|
+
* and is left untouched; only the vertical term is replaced with the same label-field gap token
|
|
171
|
+
* the mui-adapter's markLabel already uses, for cross-adapter consistency.
|
|
172
|
+
*/
|
|
173
|
+
.sliderMarkLabel {
|
|
174
|
+
transform: translate(
|
|
175
|
+
calc(-50% + var(--slider-size) / 2),
|
|
176
|
+
var(--recursica_ui-kit_globals_form_properties_label-field-gap-vertical)
|
|
177
|
+
);
|
|
178
|
+
color: inherit;
|
|
179
|
+
|
|
180
|
+
font-family: var(
|
|
181
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-family
|
|
182
|
+
);
|
|
183
|
+
font-size: var(
|
|
184
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-size
|
|
185
|
+
);
|
|
186
|
+
font-style: var(
|
|
187
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-style
|
|
188
|
+
);
|
|
189
|
+
font-weight: var(
|
|
190
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-weight
|
|
191
|
+
);
|
|
192
|
+
letter-spacing: var(
|
|
193
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_letter-spacing
|
|
194
|
+
);
|
|
195
|
+
line-height: var(
|
|
196
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_line-height
|
|
197
|
+
);
|
|
198
|
+
text-decoration: var(
|
|
199
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_text-decoration
|
|
200
|
+
);
|
|
201
|
+
text-transform: var(
|
|
202
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_text-transform
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* ==========================================
|
|
207
|
+
3. Min / Max Custom Typography Labels & Floating Active Value
|
|
208
|
+
========================================== */
|
|
209
|
+
|
|
210
|
+
.minMaxGuide {
|
|
211
|
+
font-family: var(
|
|
212
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-family
|
|
213
|
+
);
|
|
214
|
+
font-size: var(
|
|
215
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-size
|
|
216
|
+
);
|
|
217
|
+
font-style: var(
|
|
218
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-style
|
|
219
|
+
);
|
|
220
|
+
font-weight: var(
|
|
221
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_font-weight
|
|
222
|
+
);
|
|
223
|
+
letter-spacing: var(
|
|
224
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_letter-spacing
|
|
225
|
+
);
|
|
226
|
+
line-height: var(
|
|
227
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_line-height
|
|
228
|
+
);
|
|
229
|
+
text-decoration: var(
|
|
230
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_text-decoration
|
|
231
|
+
);
|
|
232
|
+
text-transform: var(
|
|
233
|
+
--recursica_ui-kit_components_slider_properties_min-max-label_text-transform
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/*
|
|
238
|
+
* LAYOUT DECISION: Right-Aligned Floating Current Value Container
|
|
239
|
+
* - Wrapped around the right-side max guide (or icon) as a relative flex context.
|
|
240
|
+
* - This provides the anchor for absolutely positioning the floating current value element
|
|
241
|
+
* above the guide.
|
|
242
|
+
*/
|
|
243
|
+
.rightGuideContainer {
|
|
244
|
+
position: relative;
|
|
245
|
+
display: inline-flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
flex-shrink: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/*
|
|
252
|
+
* LAYOUT DECISION: Floating Active Value Element
|
|
253
|
+
* - Absolutely positioned directly above the max guide and right-aligned (`right: 0`).
|
|
254
|
+
* - Uses a vertical gap matching the global label-to-component gap variable, ensuring
|
|
255
|
+
* that `.currentValue` is placed in perfect horizontal baseline alignment with the
|
|
256
|
+
* left-aligned form label of the component.
|
|
257
|
+
* - Typography maps back to the slider component's read-only value token definitions.
|
|
258
|
+
* - Inherits the container default/disabled/error text colors naturally.
|
|
259
|
+
*/
|
|
260
|
+
.currentValue {
|
|
261
|
+
position: absolute;
|
|
262
|
+
bottom: calc(
|
|
263
|
+
100% +
|
|
264
|
+
var(--recursica_ui-kit_globals_form_properties_label-field-gap-vertical)
|
|
265
|
+
);
|
|
266
|
+
right: 0;
|
|
267
|
+
white-space: nowrap;
|
|
268
|
+
pointer-events: none;
|
|
269
|
+
display: inline-block;
|
|
270
|
+
width: var(--recursica_ui-kit_components_slider_properties_input-width);
|
|
271
|
+
text-align: right;
|
|
272
|
+
|
|
273
|
+
font-family: var(
|
|
274
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-family
|
|
275
|
+
);
|
|
276
|
+
font-size: var(
|
|
277
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-size
|
|
278
|
+
);
|
|
279
|
+
font-style: var(
|
|
280
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-style
|
|
281
|
+
);
|
|
282
|
+
font-weight: var(
|
|
283
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-weight
|
|
284
|
+
);
|
|
285
|
+
letter-spacing: var(
|
|
286
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_letter-spacing
|
|
287
|
+
);
|
|
288
|
+
line-height: var(
|
|
289
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_line-height
|
|
290
|
+
);
|
|
291
|
+
text-decoration: var(
|
|
292
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_text-decoration
|
|
293
|
+
);
|
|
294
|
+
text-transform: var(
|
|
295
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_text-transform
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* ==========================================
|
|
300
|
+
4. Numeric Input Field
|
|
301
|
+
========================================== */
|
|
302
|
+
|
|
303
|
+
.inputField {
|
|
304
|
+
box-sizing: border-box;
|
|
305
|
+
flex-shrink: 0;
|
|
306
|
+
width: var(--recursica_ui-kit_components_slider_properties_input-width);
|
|
307
|
+
height: var(--recursica_ui-kit_components_slider_properties_input-height);
|
|
308
|
+
border-radius: var(
|
|
309
|
+
--recursica_ui-kit_components_slider_properties_input-border-radius
|
|
310
|
+
);
|
|
311
|
+
border-style: solid;
|
|
312
|
+
border-width: var(
|
|
313
|
+
--recursica_ui-kit_components_slider_properties_input-border-size
|
|
314
|
+
);
|
|
315
|
+
border-color: var(
|
|
316
|
+
--recursica_ui-kit_components_slider_properties_colors_input-border-color
|
|
317
|
+
);
|
|
318
|
+
background-color: var(
|
|
319
|
+
--recursica_ui-kit_components_slider_properties_colors_input-background-color
|
|
320
|
+
);
|
|
321
|
+
color: var(--recursica_ui-kit_components_slider_properties_colors_input-text);
|
|
322
|
+
|
|
323
|
+
font-family: var(
|
|
324
|
+
--recursica_ui-kit_components_slider_properties_input-text_font-family
|
|
325
|
+
);
|
|
326
|
+
font-size: var(
|
|
327
|
+
--recursica_ui-kit_components_slider_properties_input-text_font-size
|
|
328
|
+
);
|
|
329
|
+
font-style: var(
|
|
330
|
+
--recursica_ui-kit_components_slider_properties_input-text_font-style
|
|
331
|
+
);
|
|
332
|
+
font-weight: var(
|
|
333
|
+
--recursica_ui-kit_components_slider_properties_input-text_font-weight
|
|
334
|
+
);
|
|
335
|
+
letter-spacing: var(
|
|
336
|
+
--recursica_ui-kit_components_slider_properties_input-text_letter-spacing
|
|
337
|
+
);
|
|
338
|
+
line-height: var(
|
|
339
|
+
--recursica_ui-kit_components_slider_properties_input-text_line-height
|
|
340
|
+
);
|
|
341
|
+
text-decoration: var(
|
|
342
|
+
--recursica_ui-kit_components_slider_properties_input-text_text-decoration
|
|
343
|
+
);
|
|
344
|
+
text-transform: var(
|
|
345
|
+
--recursica_ui-kit_components_slider_properties_input-text_text-transform
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
padding-left: var(
|
|
349
|
+
--recursica_ui-kit_components_slider_properties_input-padding-left
|
|
350
|
+
);
|
|
351
|
+
padding-right: var(
|
|
352
|
+
--recursica_ui-kit_components_slider_properties_input-padding-right
|
|
353
|
+
);
|
|
354
|
+
padding-top: var(
|
|
355
|
+
--recursica_ui-kit_components_slider_properties_input-padding-vertical
|
|
356
|
+
);
|
|
357
|
+
padding-bottom: var(
|
|
358
|
+
--recursica_ui-kit_components_slider_properties_input-padding-vertical
|
|
359
|
+
);
|
|
360
|
+
text-align: center;
|
|
361
|
+
transition:
|
|
362
|
+
border-color 0.15s ease,
|
|
363
|
+
background-color 0.15s ease;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.inputField:focus {
|
|
367
|
+
outline: none;
|
|
368
|
+
box-shadow:
|
|
369
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
370
|
+
var(--recursica_brand_states_focus_color),
|
|
371
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
372
|
+
var(--recursica_brand_states_focus_margin)
|
|
373
|
+
var(--recursica_brand_states_focus_color);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/* Chrome, Safari, Edge, Opera: Hide number spin buttons */
|
|
377
|
+
.inputField::-webkit-outer-spin-button,
|
|
378
|
+
.inputField::-webkit-inner-spin-button {
|
|
379
|
+
-webkit-appearance: none;
|
|
380
|
+
margin: 0;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/* Firefox: Hide number spin buttons */
|
|
384
|
+
.inputField[type="number"] {
|
|
385
|
+
-moz-appearance: textfield;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/* ==========================================
|
|
389
|
+
5. Custom Read-Only Typography Value
|
|
390
|
+
========================================== */
|
|
391
|
+
|
|
392
|
+
.readOnlyValue {
|
|
393
|
+
font-family: var(
|
|
394
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-family
|
|
395
|
+
);
|
|
396
|
+
font-size: var(
|
|
397
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-size
|
|
398
|
+
);
|
|
399
|
+
font-style: var(
|
|
400
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-style
|
|
401
|
+
);
|
|
402
|
+
font-weight: var(
|
|
403
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_font-weight
|
|
404
|
+
);
|
|
405
|
+
letter-spacing: var(
|
|
406
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_letter-spacing
|
|
407
|
+
);
|
|
408
|
+
line-height: var(
|
|
409
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_line-height
|
|
410
|
+
);
|
|
411
|
+
text-decoration: var(
|
|
412
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_text-decoration
|
|
413
|
+
);
|
|
414
|
+
text-transform: var(
|
|
415
|
+
--recursica_ui-kit_components_slider_properties_read-only-value_text-transform
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* ==========================================
|
|
420
|
+
6. State-Specific Overrides (Disabled, Error)
|
|
421
|
+
========================================== */
|
|
422
|
+
|
|
423
|
+
/* Focus states */
|
|
424
|
+
/* The token schema's `active` state (not a separate `focus` state) now covers track/step-indicator
|
|
425
|
+
color while focus is within the slider; there is no `active` override for the filled mark. */
|
|
426
|
+
.sliderRoot:has(.sliderThumb:focus) .sliderTrack,
|
|
427
|
+
.sliderRoot:focus-within .sliderTrack {
|
|
428
|
+
background-color: var(
|
|
429
|
+
--recursica_ui-kit_components_slider_variants_states_active_properties_colors_track
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.sliderRoot:has(.sliderThumb:focus) .sliderMark,
|
|
434
|
+
.sliderRoot:focus-within .sliderMark {
|
|
435
|
+
background-color: var(
|
|
436
|
+
--recursica_ui-kit_components_slider_variants_states_active_properties_colors_step-indicator-color
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.sliderContainer:focus-within .iconWrapper {
|
|
441
|
+
box-shadow:
|
|
442
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
443
|
+
var(--recursica_brand_states_focus_color),
|
|
444
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
445
|
+
var(--recursica_brand_states_focus_margin)
|
|
446
|
+
var(--recursica_brand_states_focus_color);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Disabled state */
|
|
450
|
+
.sliderContainer[data-disabled="true"] .iconWrapper {
|
|
451
|
+
color: var(
|
|
452
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_icon-color
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.sliderContainer[data-disabled="true"] .sliderTrack {
|
|
457
|
+
background-color: var(
|
|
458
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_track
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.sliderContainer[data-disabled="true"] .sliderBar {
|
|
463
|
+
background-color: var(
|
|
464
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_track-active
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.sliderContainer[data-disabled="true"] .sliderThumb {
|
|
469
|
+
background-color: var(
|
|
470
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_thumb
|
|
471
|
+
);
|
|
472
|
+
cursor: not-allowed;
|
|
473
|
+
box-shadow: none;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.sliderContainer[data-disabled="true"] .sliderMark {
|
|
477
|
+
background-color: var(
|
|
478
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_step-indicator-color
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.sliderContainer[data-disabled="true"] .sliderMark[data-filled] {
|
|
483
|
+
background-color: var(
|
|
484
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_step-indicator-color-active
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.sliderContainer[data-disabled="true"] {
|
|
489
|
+
color: var(--form-field-disabled-text);
|
|
490
|
+
opacity: var(
|
|
491
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_opacity
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.inputField:disabled {
|
|
496
|
+
cursor: not-allowed;
|
|
497
|
+
background-color: var(
|
|
498
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_input-background-color
|
|
499
|
+
);
|
|
500
|
+
border-color: var(
|
|
501
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_input-border-color
|
|
502
|
+
);
|
|
503
|
+
color: var(
|
|
504
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_colors_input-text
|
|
505
|
+
);
|
|
506
|
+
border-width: var(
|
|
507
|
+
--recursica_ui-kit_components_slider_variants_states_disabled_properties_input-border-size
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* Error state */
|
|
512
|
+
.sliderContainer[data-error="true"] .iconWrapper {
|
|
513
|
+
color: var(
|
|
514
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_icon-color
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.sliderContainer[data-error="true"] .sliderTrack {
|
|
519
|
+
background-color: var(
|
|
520
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_track
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.sliderContainer[data-error="true"] .sliderBar {
|
|
525
|
+
background-color: var(
|
|
526
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_track-active
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.sliderContainer[data-error="true"] .sliderThumb {
|
|
531
|
+
background-color: var(
|
|
532
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_thumb
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.sliderContainer[data-error="true"] .sliderMark {
|
|
537
|
+
background-color: var(
|
|
538
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_step-indicator-color
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.sliderContainer[data-error="true"] .sliderMark[data-filled] {
|
|
543
|
+
background-color: var(
|
|
544
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_step-indicator-color-active
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.inputField[data-error="true"] {
|
|
549
|
+
background-color: var(
|
|
550
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_input-background-color
|
|
551
|
+
);
|
|
552
|
+
border-color: var(
|
|
553
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_input-border-color
|
|
554
|
+
);
|
|
555
|
+
color: var(
|
|
556
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_colors_input-text
|
|
557
|
+
);
|
|
558
|
+
border-width: var(
|
|
559
|
+
--recursica_ui-kit_components_slider_variants_states_error_properties_input-border-size
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/* ==========================================
|
|
564
|
+
7. Side-by-Side Layout Overrides
|
|
565
|
+
========================================== */
|
|
566
|
+
|
|
567
|
+
.sliderContainer[data-form-layout="side-by-side"] .rightGuideContainer {
|
|
568
|
+
position: relative;
|
|
569
|
+
display: inline-flex;
|
|
570
|
+
flex-direction: row;
|
|
571
|
+
align-items: center;
|
|
572
|
+
justify-content: flex-end;
|
|
573
|
+
flex-shrink: 0;
|
|
574
|
+
gap: var(--recursica_ui-kit_components_slider_properties_input-gap);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.sliderContainer[data-form-layout="side-by-side"] .currentValue {
|
|
578
|
+
position: static;
|
|
579
|
+
white-space: nowrap;
|
|
580
|
+
pointer-events: none;
|
|
581
|
+
order: 2; /* Positioned to the right of the max label */
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.sliderContainer[data-form-layout="side-by-side"]
|
|
585
|
+
.rightGuideContainer
|
|
586
|
+
.minMaxGuide {
|
|
587
|
+
order: 1; /* Positioned to the left of the current value */
|
|
588
|
+
}
|