@recursica/mantine-adapter 0.22.0 → 0.24.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.
Files changed (137) hide show
  1. package/ARCHITECTURE.md +15 -0
  2. package/CHANGELOG.md +18 -0
  3. package/SETUP.md +78 -0
  4. package/USAGE.md +55 -0
  5. package/dist/mantine-adapter.cjs +1 -1
  6. package/dist/mantine-adapter.cjs.map +1 -1
  7. package/dist/mantine-adapter.css +1 -1
  8. package/dist/mantine-adapter.js +1897 -1575
  9. package/dist/mantine-adapter.js.map +1 -1
  10. package/dist/src/components/Accordion/Accordion.d.ts +4 -24
  11. package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +1 -6
  12. package/dist/src/components/AutoComplete/AutoComplete.d.ts +7 -3
  13. package/dist/src/components/Avatar/Avatar.d.ts +2 -6
  14. package/dist/src/components/Badge/Badge.d.ts +2 -5
  15. package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -2
  16. package/dist/src/components/Button/Button.d.ts +2 -16
  17. package/dist/src/components/Card/Card.d.ts +4 -6
  18. package/dist/src/components/Checkbox/Checkbox.d.ts +4 -4
  19. package/dist/src/components/Checkbox/CheckboxGroup.d.ts +7 -3
  20. package/dist/src/components/Chip/Chip.d.ts +1 -10
  21. package/dist/src/components/Container/Container.d.ts +1 -11
  22. package/dist/src/components/DatePicker/DatePicker.d.ts +12 -2
  23. package/dist/src/components/Dropdown/Dropdown.d.ts +2 -4
  24. package/dist/src/components/Flex/Flex.d.ts +2 -11
  25. package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +2 -7
  26. package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +1 -15
  27. package/dist/src/components/Group/Group.d.ts +1 -10
  28. package/dist/src/components/HoverCard/HoverCard.d.ts +1 -11
  29. package/dist/src/components/Label/Label.d.ts +1 -14
  30. package/dist/src/components/Link/Link.d.ts +2 -11
  31. package/dist/src/components/Loader/Loader.d.ts +2 -7
  32. package/dist/src/components/Menu/Menu.d.ts +4 -3
  33. package/dist/src/components/Modal/Modal.d.ts +2 -1
  34. package/dist/src/components/NumberInput/NumberInput.d.ts +2 -4
  35. package/dist/src/components/Pagination/Pagination.d.ts +2 -4
  36. package/dist/src/components/Panel/Panel.d.ts +2 -9
  37. package/dist/src/components/Popover/Popover.d.ts +1 -11
  38. package/dist/src/components/Radio/Radio.d.ts +4 -4
  39. package/dist/src/components/Radio/RadioGroup.d.ts +7 -3
  40. package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +2 -10
  41. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +1 -11
  42. package/dist/src/components/Slider/Slider.d.ts +18 -2
  43. package/dist/src/components/Stack/Stack.d.ts +2 -9
  44. package/dist/src/components/Stepper/Stepper.d.ts +2 -4
  45. package/dist/src/components/Switch/Switch.d.ts +4 -4
  46. package/dist/src/components/Switch/SwitchGroup.d.ts +7 -3
  47. package/dist/src/components/Table/Table.d.ts +2 -1
  48. package/dist/src/components/Tabs/Tabs.d.ts +2 -4
  49. package/dist/src/components/Text/Text.d.ts +2 -11
  50. package/dist/src/components/TextArea/TextArea.d.ts +2 -8
  51. package/dist/src/components/TextField/TextField.d.ts +7 -3
  52. package/dist/src/components/TimePicker/TimePicker.d.ts +2 -1
  53. package/dist/src/components/Timeline/Timeline.d.ts +2 -1
  54. package/dist/src/components/Timeline/TimelineItem.d.ts +1 -12
  55. package/dist/src/components/Title/Title.d.ts +1 -7
  56. package/dist/src/components/Toast/Toast.d.ts +1 -12
  57. package/dist/src/components/Tooltip/Tooltip.d.ts +1 -12
  58. package/dist/src/components/TransferList/TransferList.d.ts +2 -1
  59. package/dist/src/utils/RequireAccessibleLabel.d.ts +1 -18
  60. package/dist/src/utils/filterStylingProps.d.ts +1 -11
  61. package/dist/test.html +1 -0
  62. package/llms.txt +16 -0
  63. package/package.json +7 -3
  64. package/src/components/Accordion/Accordion.module.css +1 -2
  65. package/src/components/Accordion/Accordion.tsx +15 -28
  66. package/src/components/AssistiveElement/AssistiveElement.tsx +1 -6
  67. package/src/components/AutoComplete/AutoComplete.tsx +4 -1
  68. package/src/components/Avatar/Avatar.tsx +1 -5
  69. package/src/components/Badge/Badge.tsx +1 -4
  70. package/src/components/Breadcrumb/Breadcrumb.tsx +1 -2
  71. package/src/components/Button/Button.module.css +18 -45
  72. package/src/components/Button/Button.tsx +2 -16
  73. package/src/components/Card/Card.tsx +11 -6
  74. package/src/components/Checkbox/Checkbox.module.css +6 -10
  75. package/src/components/Checkbox/Checkbox.tsx +19 -14
  76. package/src/components/Checkbox/CheckboxGroup.tsx +4 -1
  77. package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +4 -1
  78. package/src/components/Chip/Chip.module.css +36 -28
  79. package/src/components/Chip/Chip.tsx +8 -15
  80. package/src/components/Container/Container.tsx +1 -19
  81. package/src/components/DatePicker/DATEPICKER_IMPLEMENTATION_NOTES.md +16 -0
  82. package/src/components/DatePicker/DatePicker.module.css +282 -41
  83. package/src/components/DatePicker/DatePicker.stories.tsx +127 -4
  84. package/src/components/DatePicker/DatePicker.tsx +169 -5
  85. package/src/components/Dropdown/Dropdown.tsx +4 -4
  86. package/src/components/Flex/Flex.tsx +2 -13
  87. package/src/components/FormControlLayout/FormControlLayout.module.css +6 -18
  88. package/src/components/FormControlLayout/FormControlLayout.tsx +4 -8
  89. package/src/components/FormControlWrapper/FormControlWrapper.module.css +1 -0
  90. package/src/components/FormControlWrapper/FormControlWrapper.tsx +2 -15
  91. package/src/components/Group/Group.tsx +2 -13
  92. package/src/components/HoverCard/HoverCard.tsx +1 -8
  93. package/src/components/Label/Label.module.css +5 -10
  94. package/src/components/Label/Label.tsx +1 -14
  95. package/src/components/Link/Link.module.css +4 -3
  96. package/src/components/Link/Link.stories.tsx +2 -3
  97. package/src/components/Link/Link.tsx +1 -10
  98. package/src/components/Loader/LOADER_IMPLEMENTATION_NOTES.md +1 -2
  99. package/src/components/Loader/Loader.module.css +4 -11
  100. package/src/components/Loader/Loader.tsx +1 -7
  101. package/src/components/Menu/Menu.tsx +5 -1
  102. package/src/components/Modal/Modal.tsx +3 -1
  103. package/src/components/NumberInput/NumberInput.tsx +4 -4
  104. package/src/components/Pagination/Pagination.module.css +12 -24
  105. package/src/components/Pagination/Pagination.stories.tsx +0 -8
  106. package/src/components/Pagination/Pagination.tsx +5 -4
  107. package/src/components/Panel/Panel.tsx +1 -8
  108. package/src/components/Popover/Popover.tsx +1 -8
  109. package/src/components/Radio/Radio.module.css +4 -10
  110. package/src/components/Radio/Radio.tsx +19 -14
  111. package/src/components/Radio/RadioGroup.tsx +4 -1
  112. package/src/components/ReadOnlyField/ReadOnlyField.module.css +9 -18
  113. package/src/components/ReadOnlyField/ReadOnlyField.tsx +4 -11
  114. package/src/components/SegmentedControl/SegmentedControl.module.css +20 -44
  115. package/src/components/SegmentedControl/SegmentedControl.tsx +1 -11
  116. package/src/components/Slider/IMPLEMENTATION_NOTES.md +49 -0
  117. package/src/components/Slider/Slider.module.css +492 -86
  118. package/src/components/Slider/Slider.stories.tsx +159 -4
  119. package/src/components/Slider/Slider.tsx +275 -4
  120. package/src/components/Stack/Stack.tsx +2 -11
  121. package/src/components/Stepper/Stepper.tsx +1 -7
  122. package/src/components/Switch/Switch.tsx +19 -11
  123. package/src/components/Switch/SwitchGroup.tsx +4 -1
  124. package/src/components/Table/Table.tsx +3 -1
  125. package/src/components/Tabs/Tabs.tsx +1 -7
  126. package/src/components/Text/Text.tsx +2 -16
  127. package/src/components/TextArea/TextArea.tsx +4 -8
  128. package/src/components/TextField/TextField.tsx +4 -1
  129. package/src/components/TimePicker/TimePicker.tsx +3 -1
  130. package/src/components/Timeline/Timeline.tsx +4 -1
  131. package/src/components/Timeline/TimelineItem.tsx +1 -12
  132. package/src/components/Title/Title.tsx +1 -6
  133. package/src/components/Toast/Toast.tsx +1 -13
  134. package/src/components/Tooltip/Tooltip.tsx +1 -9
  135. package/src/components/TransferList/TransferList.tsx +3 -1
  136. package/src/utils/RequireAccessibleLabel.ts +1 -12
  137. package/src/utils/filterStylingProps.ts +7 -20
@@ -9,7 +9,10 @@ import {
9
9
  filterStylingProps,
10
10
  type RecursicaOverStyled,
11
11
  } from "../../utils/filterStylingProps";
12
- import { type RequireAccessibleLabel } from "../../utils/RequireAccessibleLabel";
12
+ import {
13
+ type RequireAccessibleLabel,
14
+ type RecursicaRadioProps,
15
+ } from "@recursica/adapter-common";
13
16
  import {
14
17
  FormControlLayout,
15
18
  type FormControlLayoutProps,
@@ -32,19 +35,21 @@ const RadioIcon: React.FC<{
32
35
  </svg>
33
36
  );
34
37
 
35
- export type RecursicaRadioProps = RequireAccessibleLabel<
36
- Omit<
37
- MantineRadioProps,
38
- "size" | "color" | "radius" | "iconColor" | "variant"
39
- > &
40
- ReadOnlyControlProps &
41
- Pick<
42
- FormControlLayoutProps,
43
- "formLayout" | "labelSize" | "controlMaxWidth" | "controlMinWidth"
44
- >
45
- >;
46
-
47
- export type RadioProps = RecursicaOverStyled<RecursicaRadioProps>;
38
+ export type RadioWrapperProps = Omit<
39
+ MantineRadioProps,
40
+ "size" | "color" | "radius" | "iconColor" | "variant"
41
+ > &
42
+ RecursicaRadioProps &
43
+ ReadOnlyControlProps &
44
+ Pick<
45
+ FormControlLayoutProps,
46
+ "formLayout" | "labelSize" | "controlMaxWidth" | "controlMinWidth"
47
+ >;
48
+
49
+ export type RecursicaRadioPropsAlias =
50
+ RequireAccessibleLabel<RadioWrapperProps>;
51
+
52
+ export type RadioProps = RecursicaOverStyled<RecursicaRadioPropsAlias>;
48
53
 
49
54
  type RadioComponent = React.ForwardRefExoticComponent<
50
55
  RadioProps & React.RefAttributes<HTMLInputElement>
@@ -13,13 +13,16 @@ import { type RecursicaFormControlWrapperProps } from "../FormControlWrapper/For
13
13
  import { WithReadOnlyWrapper } from "../ReadOnlyField/WithReadOnlyWrapper";
14
14
  import styles from "./Radio.module.css";
15
15
 
16
+ import { type RecursicaRadioGroupProps as BaseRecursicaRadioGroupProps } from "@recursica/adapter-common";
17
+
16
18
  export interface RecursicaRadioGroupProps
17
19
  extends Omit<MantineRadioGroupProps, "size" | "labelProps">,
18
20
  Omit<
19
21
  RecursicaFormControlWrapperProps,
20
22
  "controlMaxWidth" | "controlMinWidth"
21
23
  >,
22
- ReadOnlyControlProps {}
24
+ ReadOnlyControlProps,
25
+ BaseRecursicaRadioGroupProps {}
23
26
 
24
27
  export type RadioGroupProps = RecursicaOverStyled<RecursicaRadioGroupProps>;
25
28
 
@@ -22,42 +22,33 @@
22
22
  word-break: break-word;
23
23
  padding: 0; /* HARDCODE: read-only fields have no specific padding defined by tokens, zeroing it. */
24
24
  font-family: var(
25
- --recursica_ui-kit_components_read-only-field_properties_text_font-family,
26
- inherit
25
+ --recursica_ui-kit_components_read-only-field_properties_text_font-family
27
26
  );
28
27
  font-size: var(
29
- --recursica_ui-kit_components_read-only-field_properties_text_font-size,
30
- 1rem
28
+ --recursica_ui-kit_components_read-only-field_properties_text_font-size
31
29
  );
32
30
  font-weight: var(
33
- --recursica_ui-kit_components_read-only-field_properties_text_font-weight,
34
- normal
31
+ --recursica_ui-kit_components_read-only-field_properties_text_font-weight
35
32
  );
36
33
  letter-spacing: var(
37
- --recursica_ui-kit_components_read-only-field_properties_text_letter-spacing,
38
- normal
34
+ --recursica_ui-kit_components_read-only-field_properties_text_letter-spacing
39
35
  );
40
36
  line-height: var(
41
- --recursica_ui-kit_components_read-only-field_properties_text_line-height,
42
- 1.5
37
+ --recursica_ui-kit_components_read-only-field_properties_text_line-height
43
38
  );
44
39
  font-style: var(
45
- --recursica_ui-kit_components_read-only-field_properties_text_font-style,
46
- normal
40
+ --recursica_ui-kit_components_read-only-field_properties_text_font-style
47
41
  );
48
42
  text-decoration: var(
49
- --recursica_ui-kit_components_read-only-field_properties_text_text-decoration,
50
- none
43
+ --recursica_ui-kit_components_read-only-field_properties_text_text-decoration
51
44
  );
52
45
  text-transform: var(
53
- --recursica_ui-kit_components_read-only-field_properties_text_text-transform,
54
- none
46
+ --recursica_ui-kit_components_read-only-field_properties_text_text-transform
55
47
  );
56
48
  color: var(
57
49
  --recursica_ui-kit_components_read-only-field_properties_colors_text
58
50
  );
59
51
  min-height: var(
60
- --recursica_ui-kit_components_read-only-field_properties_min-height,
61
- 32px
52
+ --recursica_ui-kit_components_read-only-field_properties_min-height
62
53
  );
63
54
  }
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import React, { forwardRef } from "react";
3
3
  import {
4
- ReadOnlyFieldType,
5
4
  EmptyValueRenderer,
6
5
  type ReadOnlyControlProps,
7
6
  } from "@recursica/adapter-common";
@@ -16,21 +15,15 @@ import {
16
15
  import { ReadOnlyTextField } from "./ReadOnlyTextField";
17
16
  import styles from "./ReadOnlyField.module.css";
18
17
 
18
+ import { type RecursicaReadOnlyFieldProps as BaseRecursicaReadOnlyFieldProps } from "@recursica/adapter-common";
19
+
19
20
  export interface RecursicaReadOnlyFieldProps
20
21
  extends Omit<
21
22
  FormControlWrapperProps,
22
23
  "children" | "overStyled" | "controlMaxWidth" | "controlMinWidth"
23
24
  >,
24
- Pick<ReadOnlyControlProps, "emptyValueComponent"> {
25
- /** The specific value to be rendered in read-only mode explicitly matching the original field input */
26
- value?: any;
27
- /** The data type formatting rules bounding how the string is presented to the user */
28
- type?: ReadOnlyFieldType;
29
- /** Pass the native maximum width design variable dynamically bounding the specific wrapper width exclusively. */
30
- controlMaxWidth?: string | undefined;
31
- /** Pass the native minimum width design variable dynamically bounding the specific wrapper width exclusively. */
32
- controlMinWidth?: string | undefined;
33
- }
25
+ Pick<ReadOnlyControlProps, "emptyValueComponent">,
26
+ BaseRecursicaReadOnlyFieldProps {}
34
27
 
35
28
  export type ReadOnlyFieldProps =
36
29
  RecursicaOverStyled<RecursicaReadOnlyFieldProps>;
@@ -25,8 +25,7 @@
25
25
  --recursica_ui-kit_components_segmented-control_properties_padding-horizontal
26
26
  );
27
27
  box-shadow: var(
28
- --recursica_ui-kit_components_segmented-control_properties_elevation,
29
- none
28
+ --recursica_ui-kit_components_segmented-control_properties_elevation
30
29
  );
31
30
  gap: var(--recursica_ui-kit_components_segmented-control_properties_item-gap);
32
31
  }
@@ -42,10 +41,7 @@
42
41
  --recursica_ui-kit_components_segmented-control-item_properties_item_height
43
42
  );
44
43
  border-radius: var(
45
- --recursica_ui-kit_components_segmented-control-item_properties_unselected_border-radius,
46
- var(
47
- --recursica_ui-kit_components_segmented-control-item_properties_item_border-radius
48
- )
44
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected_border-radius
49
45
  );
50
46
 
51
47
  border: var(
@@ -63,41 +59,32 @@
63
59
  );
64
60
 
65
61
  font-family: var(
66
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-family,
67
- inherit
62
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-family
68
63
  );
69
64
  font-size: var(
70
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-size,
71
- inherit
65
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-size
72
66
  );
73
67
  font-style: var(
74
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-style,
75
- inherit
68
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-style
76
69
  );
77
70
  font-weight: var(
78
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-weight,
79
- inherit
71
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_font-weight
80
72
  );
81
73
  letter-spacing: var(
82
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_letter-spacing,
83
- inherit
74
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_letter-spacing
84
75
  );
85
76
  line-height: var(
86
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_line-height,
87
- inherit
77
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_line-height
88
78
  );
89
79
  text-decoration: var(
90
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_text-decoration,
91
- inherit
80
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_text-decoration
92
81
  );
93
82
  text-transform: var(
94
- --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_text-transform,
95
- inherit
83
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected-text_text-transform
96
84
  );
97
85
 
98
86
  color: var(
99
- --recursica_ui-kit_components_segmented-control-item_properties_unselected_colors_text-color,
100
- inherit
87
+ --recursica_ui-kit_components_segmented-control-item_properties_unselected_colors_text-color
101
88
  );
102
89
 
103
90
  display: flex;
@@ -156,10 +143,7 @@
156
143
  --recursica_ui-kit_components_segmented-control-item_properties_selected_elevation
157
144
  );
158
145
  border-radius: var(
159
- --recursica_ui-kit_components_segmented-control-item_properties_selected_border-radius,
160
- var(
161
- --recursica_ui-kit_components_segmented-control-item_properties_item_border-radius
162
- )
146
+ --recursica_ui-kit_components_segmented-control-item_properties_selected_border-radius
163
147
  );
164
148
  }
165
149
 
@@ -169,35 +153,27 @@
169
153
  --recursica_ui-kit_components_segmented-control-item_properties_selected_colors_text-color
170
154
  );
171
155
  font-family: var(
172
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-family,
173
- inherit
156
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-family
174
157
  );
175
158
  font-size: var(
176
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-size,
177
- inherit
159
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-size
178
160
  );
179
161
  font-style: var(
180
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-style,
181
- inherit
162
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-style
182
163
  );
183
164
  font-weight: var(
184
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-weight,
185
- inherit
165
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_font-weight
186
166
  );
187
167
  letter-spacing: var(
188
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_letter-spacing,
189
- inherit
168
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_letter-spacing
190
169
  );
191
170
  line-height: var(
192
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_line-height,
193
- inherit
171
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_line-height
194
172
  );
195
173
  text-decoration: var(
196
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_text-decoration,
197
- inherit
174
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_text-decoration
198
175
  );
199
176
  text-transform: var(
200
- --recursica_ui-kit_components_segmented-control-item_properties_selected-text_text-transform,
201
- inherit
177
+ --recursica_ui-kit_components_segmented-control-item_properties_selected-text_text-transform
202
178
  );
203
179
  }
@@ -9,17 +9,7 @@ import {
9
9
  } from "../../utils/filterStylingProps";
10
10
  import styles from "./SegmentedControl.module.css";
11
11
 
12
- export interface RecursicaSegmentedControlProps {
13
- /** The orientation of the control */
14
- orientation?: "horizontal" | "vertical";
15
- /** If true, the control will take up the full width of its container */
16
- fullWidth?: boolean;
17
- /**
18
- * SegmentedControl should NOT be allowed to be disabled by design.
19
- * This component explicitly disables the `disabled` prop.
20
- */
21
- disabled?: never;
22
- }
12
+ import { type RecursicaSegmentedControlProps } from "@recursica/adapter-common";
23
13
 
24
14
  export type SegmentedControlProps = RecursicaOverStyled<
25
15
  Omit<
@@ -0,0 +1,49 @@
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.