@recursica/mantine-adapter 0.35.0 → 0.36.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/CHANGELOG.md +26 -0
- package/SETUP.md +1 -1
- package/dist/mantine-adapter.cjs +2 -2
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +1385 -1300
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Tree/Tree.d.ts +9 -5
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/llms.txt +2 -0
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.module.css +123 -62
- package/src/components/Accordion/Accordion.stories.tsx +65 -33
- package/src/components/Accordion/Accordion.tsx +1 -0
- package/src/components/AutoComplete/AutoComplete.module.css +50 -49
- package/src/components/AutoComplete/AutoComplete.tsx +2 -2
- package/src/components/Avatar/Avatar.module.css +7 -7
- package/src/components/Badge/Badge.module.css +8 -8
- package/src/components/Button/Button.module.css +22 -89
- package/src/components/Card/Card.module.css +3 -3
- package/src/components/Checkbox/Checkbox.module.css +54 -15
- package/src/components/Chip/Chip.module.css +27 -26
- package/src/components/DatePicker/DatePicker.module.css +25 -30
- package/src/components/Dropdown/Dropdown.module.css +47 -44
- package/src/components/Dropdown/Dropdown.tsx +2 -2
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +12 -12
- package/src/components/HoverCard/HoverCard.module.css +1 -1
- package/src/components/Label/Label.module.css +7 -3
- package/src/components/Layer/USAGE.md +54 -0
- package/src/components/Link/IMPLEMENTATION_NOTES.md +2 -9
- package/src/components/Link/Link.module.css +15 -76
- package/src/components/Link/USAGE.md +2 -9
- package/src/components/Loader/Loader.module.css +3 -3
- package/src/components/Menu/Menu.module.css +34 -41
- package/src/components/Modal/Modal.module.css +27 -11
- package/src/components/NumberInput/NumberInput.module.css +39 -37
- package/src/components/NumberInput/NumberInput.tsx +2 -2
- package/src/components/Pagination/Pagination.module.css +10 -43
- package/src/components/Panel/Panel.module.css +3 -3
- package/src/components/Popover/Popover.module.css +1 -1
- package/src/components/Radio/Radio.module.css +31 -14
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +1 -1
- package/src/components/RecursicaThemeProvider/USAGE.md +60 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +29 -29
- package/src/components/Slider/IMPLEMENTATION_NOTES.md +9 -0
- package/src/components/Slider/Slider.module.css +44 -48
- package/src/components/Stepper/Stepper.module.css +3 -3
- package/src/components/Switch/Switch.module.css +26 -10
- package/src/components/Table/Table.module.css +53 -21
- package/src/components/Tabs/Tabs.module.css +309 -170
- package/src/components/TextArea/TextArea.module.css +36 -21
- package/src/components/TextArea/TextArea.tsx +2 -2
- package/src/components/TextField/TextField.module.css +38 -35
- package/src/components/TextField/TextField.tsx +2 -2
- package/src/components/Timeline/Timeline.module.css +41 -34
- package/src/components/Toast/Toast.module.css +19 -11
- package/src/components/Tooltip/Tooltip.module.css +4 -2
- package/src/components/Tree/IMPLEMENTATION_NOTES.md +17 -0
- package/src/components/Tree/Tree.module.css +173 -39
- package/src/components/Tree/Tree.stories.tsx +81 -4
- package/src/components/Tree/Tree.tsx +117 -15
- package/src/components/Tree/USAGE.md +36 -3
- package/src/components/index.ts +1 -0
- package/src/index.ts +3 -0
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
/* EXEMPTIONS:
|
|
2
|
-
-
|
|
3
|
-
unexpected layout shifts or flickering when switching between
|
|
4
|
-
/* recursica-ignore: --recursica_ui-kit_components_number-
|
|
2
|
+
- border-size variables are ignored because the input box uses a uniform static boundary to prevent
|
|
3
|
+
unexpected layout shifts or flickering when switching between focused, disabled, or error states. */
|
|
4
|
+
/* recursica-ignore: --recursica_ui-kit_components_number-input_properties_border-size */
|
|
5
5
|
/* recursica-ignore: --recursica_ui-kit_components_number-input_variants_states_disabled_properties_border-size */
|
|
6
6
|
/* recursica-ignore: --recursica_ui-kit_components_number-input_variants_states_error_properties_border-size */
|
|
7
|
-
/* recursica-ignore: --recursica_ui-kit_components_number-input_variants_states_focus_properties_border-size */
|
|
8
7
|
|
|
9
8
|
/* LAYOUT SPACING OVERRIDES:
|
|
10
|
-
- Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens.
|
|
9
|
+
- Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens.
|
|
10
|
+
- Also sets the --number-input-control-{max,min}-width hooks consumed inline in NumberInput.tsx,
|
|
11
|
+
since the token schema no longer provides a single layout-agnostic min/max width. */
|
|
11
12
|
.layoutOverride {
|
|
12
13
|
--form-control-margin-bottom: var(
|
|
13
14
|
--recursica_ui-kit_components_number-input_variants_layouts_stacked_properties_top-bottom-margin
|
|
14
15
|
);
|
|
16
|
+
--number-input-control-max-width: var(
|
|
17
|
+
--recursica_ui-kit_components_number-input_variants_layouts_stacked_properties_max-width
|
|
18
|
+
);
|
|
19
|
+
--number-input-control-min-width: var(
|
|
20
|
+
--recursica_ui-kit_components_number-input_variants_layouts_stacked_properties_min-width
|
|
21
|
+
);
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
.layoutOverride[data-form-layout="side-by-side"] {
|
|
18
25
|
--form-control-margin-bottom: var(
|
|
19
26
|
--recursica_ui-kit_components_number-input_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
20
27
|
);
|
|
28
|
+
--number-input-control-max-width: var(
|
|
29
|
+
--recursica_ui-kit_components_number-input_variants_layouts_side-by-side_properties_max-width
|
|
30
|
+
);
|
|
31
|
+
--number-input-control-min-width: var(
|
|
32
|
+
--recursica_ui-kit_components_number-input_variants_layouts_side-by-side_properties_min-width
|
|
33
|
+
);
|
|
21
34
|
}
|
|
22
35
|
|
|
23
36
|
/* HARDCODED VALUES:
|
|
@@ -109,13 +122,13 @@
|
|
|
109
122
|
|
|
110
123
|
/* Base State Default Execution */
|
|
111
124
|
background-color: var(
|
|
112
|
-
--recursica_ui-kit_components_number-
|
|
125
|
+
--recursica_ui-kit_components_number-input_properties_colors_background-color
|
|
113
126
|
);
|
|
114
127
|
border-color: var(
|
|
115
|
-
--recursica_ui-kit_components_number-
|
|
128
|
+
--recursica_ui-kit_components_number-input_properties_colors_border-color
|
|
116
129
|
);
|
|
117
130
|
color: var(
|
|
118
|
-
--recursica_ui-kit_components_number-
|
|
131
|
+
--recursica_ui-kit_components_number-input_properties_colors_text-color
|
|
119
132
|
);
|
|
120
133
|
|
|
121
134
|
outline: none;
|
|
@@ -162,13 +175,13 @@
|
|
|
162
175
|
width: var(--recursica_ui-kit_components_number-input_properties_icon-size);
|
|
163
176
|
height: var(--recursica_ui-kit_components_number-input_properties_icon-size);
|
|
164
177
|
color: var(
|
|
165
|
-
--recursica_ui-kit_components_number-
|
|
178
|
+
--recursica_ui-kit_components_number-input_properties_colors_leading-icon
|
|
166
179
|
);
|
|
167
180
|
}
|
|
168
181
|
|
|
169
182
|
.section[data-position="right"] :global(svg) {
|
|
170
183
|
color: var(
|
|
171
|
-
--recursica_ui-kit_components_number-
|
|
184
|
+
--recursica_ui-kit_components_number-input_properties_colors_trailing-icon
|
|
172
185
|
);
|
|
173
186
|
}
|
|
174
187
|
|
|
@@ -188,7 +201,7 @@
|
|
|
188
201
|
border: none;
|
|
189
202
|
background: transparent;
|
|
190
203
|
color: var(
|
|
191
|
-
--recursica_ui-kit_components_number-
|
|
204
|
+
--recursica_ui-kit_components_number-input_properties_colors_trailing-icon
|
|
192
205
|
);
|
|
193
206
|
}
|
|
194
207
|
|
|
@@ -201,30 +214,16 @@
|
|
|
201
214
|
-------------------------------------- */
|
|
202
215
|
|
|
203
216
|
/* Focus State Mapping (Triggered internally via browser pseudo-pseudo-class) */
|
|
217
|
+
/* The token schema no longer provides per-component focus colors; apply the generic focus ring
|
|
218
|
+
tokens as a box-shadow ring instead of a color swap. */
|
|
204
219
|
.input:focus-within,
|
|
205
220
|
.input:focus {
|
|
206
|
-
|
|
207
|
-
--
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
color: var(
|
|
213
|
-
--recursica_ui-kit_components_number-input_variants_states_focus_properties_colors_text
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.root:focus-within .section[data-position="left"] :global(svg) {
|
|
218
|
-
color: var(
|
|
219
|
-
--recursica_ui-kit_components_number-input_variants_states_focus_properties_colors_leading-icon
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.root:focus-within .section[data-position="right"] :global(svg),
|
|
224
|
-
.root:focus-within .control {
|
|
225
|
-
color: var(
|
|
226
|
-
--recursica_ui-kit_components_number-input_variants_states_focus_properties_colors_trailing-icon
|
|
227
|
-
);
|
|
221
|
+
box-shadow:
|
|
222
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
223
|
+
var(--recursica_brand_states_focus_color),
|
|
224
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
225
|
+
var(--recursica_brand_states_focus_margin)
|
|
226
|
+
var(--recursica_brand_states_focus_color);
|
|
228
227
|
}
|
|
229
228
|
|
|
230
229
|
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
@@ -233,10 +232,10 @@
|
|
|
233
232
|
--recursica_ui-kit_components_number-input_variants_states_error_properties_colors_border-color
|
|
234
233
|
) !important;
|
|
235
234
|
background-color: var(
|
|
236
|
-
--recursica_ui-kit_components_number-input_variants_states_error_properties_colors_background
|
|
235
|
+
--recursica_ui-kit_components_number-input_variants_states_error_properties_colors_background-color
|
|
237
236
|
) !important;
|
|
238
237
|
color: var(
|
|
239
|
-
--recursica_ui-kit_components_number-input_variants_states_error_properties_colors_text
|
|
238
|
+
--recursica_ui-kit_components_number-input_variants_states_error_properties_colors_text-color
|
|
240
239
|
) !important;
|
|
241
240
|
}
|
|
242
241
|
|
|
@@ -259,10 +258,13 @@
|
|
|
259
258
|
--recursica_ui-kit_components_number-input_variants_states_disabled_properties_colors_border-color
|
|
260
259
|
) !important;
|
|
261
260
|
background-color: var(
|
|
262
|
-
--recursica_ui-kit_components_number-input_variants_states_disabled_properties_colors_background
|
|
261
|
+
--recursica_ui-kit_components_number-input_variants_states_disabled_properties_colors_background-color
|
|
263
262
|
) !important;
|
|
264
263
|
color: var(
|
|
265
|
-
--recursica_ui-kit_components_number-input_variants_states_disabled_properties_colors_text
|
|
264
|
+
--recursica_ui-kit_components_number-input_variants_states_disabled_properties_colors_text-color
|
|
265
|
+
) !important;
|
|
266
|
+
opacity: var(
|
|
267
|
+
--recursica_ui-kit_components_number-input_variants_states_disabled_properties_opacity
|
|
266
268
|
) !important;
|
|
267
269
|
cursor: not-allowed;
|
|
268
270
|
}
|
|
@@ -92,8 +92,8 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
92
92
|
<WithReadOnlyWrapper
|
|
93
93
|
className={wrapperClass}
|
|
94
94
|
style={style as React.CSSProperties}
|
|
95
|
-
controlMaxWidth="var(--
|
|
96
|
-
controlMinWidth="var(--
|
|
95
|
+
controlMaxWidth="var(--number-input-control-max-width)"
|
|
96
|
+
controlMinWidth="var(--number-input-control-min-width)"
|
|
97
97
|
overStyled={overStyled as true}
|
|
98
98
|
formLayout={formLayout}
|
|
99
99
|
labelSize={labelSize}
|
|
@@ -145,13 +145,13 @@
|
|
|
145
145
|
--recursica_ui-kit_components_button_variants_styles_outline_properties_elevation
|
|
146
146
|
);
|
|
147
147
|
background-color: var(
|
|
148
|
-
--recursica_ui-kit_components_button_variants_styles_outline_properties_colors_background
|
|
148
|
+
--recursica_ui-kit_components_button_variants_styles_outline_properties_colors_background-color
|
|
149
149
|
);
|
|
150
150
|
border-color: var(
|
|
151
151
|
--recursica_ui-kit_components_button_variants_styles_outline_properties_colors_border-color
|
|
152
152
|
);
|
|
153
153
|
color: var(
|
|
154
|
-
--recursica_ui-kit_components_button_variants_styles_outline_properties_colors_text
|
|
154
|
+
--recursica_ui-kit_components_button_variants_styles_outline_properties_colors_text-color
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -160,13 +160,8 @@
|
|
|
160
160
|
cursor: not-allowed;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
--recursica_ui-kit_components_button_variants_styles_outline_properties_colors_text-hover
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/* Hover Overlay */
|
|
163
|
+
/* Hover Overlay: no per-variant hover-color/hover-opacity tokens exist anymore; use the
|
|
164
|
+
generic overlay tokens shared across components (same as Button). */
|
|
170
165
|
.control::after {
|
|
171
166
|
content: "";
|
|
172
167
|
position: absolute;
|
|
@@ -176,15 +171,11 @@
|
|
|
176
171
|
pointer-events: none;
|
|
177
172
|
transition: opacity 150ms ease;
|
|
178
173
|
opacity: 0;
|
|
179
|
-
background-color: var(
|
|
180
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-color
|
|
181
|
-
);
|
|
174
|
+
background-color: var(--recursica_brand_states_hover_color);
|
|
182
175
|
}
|
|
183
176
|
|
|
184
177
|
.control:hover:not(:disabled)::after {
|
|
185
|
-
opacity: var(
|
|
186
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-opacity
|
|
187
|
-
);
|
|
178
|
+
opacity: var(--recursica_brand_states_hover_opacity);
|
|
188
179
|
}
|
|
189
180
|
|
|
190
181
|
/* Active Style: Solid */
|
|
@@ -196,19 +187,13 @@
|
|
|
196
187
|
--recursica_ui-kit_components_button_variants_styles_solid_properties_elevation
|
|
197
188
|
);
|
|
198
189
|
background-color: var(
|
|
199
|
-
--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_background
|
|
190
|
+
--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_background-color
|
|
200
191
|
);
|
|
201
192
|
border-color: var(
|
|
202
193
|
--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_border-color
|
|
203
194
|
);
|
|
204
195
|
color: var(
|
|
205
|
-
--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_text
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.control[data-active]:hover:not(:disabled) {
|
|
210
|
-
color: var(
|
|
211
|
-
--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_text-hover
|
|
196
|
+
--recursica_ui-kit_components_button_variants_styles_solid_properties_colors_text-color
|
|
212
197
|
);
|
|
213
198
|
}
|
|
214
199
|
|
|
@@ -221,13 +206,13 @@
|
|
|
221
206
|
--recursica_ui-kit_components_button_variants_styles_text_properties_elevation
|
|
222
207
|
);
|
|
223
208
|
background-color: var(
|
|
224
|
-
--recursica_ui-kit_components_button_variants_styles_text_properties_colors_background
|
|
209
|
+
--recursica_ui-kit_components_button_variants_styles_text_properties_colors_background-color
|
|
225
210
|
);
|
|
226
211
|
border-color: var(
|
|
227
212
|
--recursica_ui-kit_components_button_variants_styles_text_properties_colors_border-color
|
|
228
213
|
);
|
|
229
214
|
color: var(
|
|
230
|
-
--recursica_ui-kit_components_button_variants_styles_text_properties_colors_text
|
|
215
|
+
--recursica_ui-kit_components_button_variants_styles_text_properties_colors_text-color
|
|
231
216
|
);
|
|
232
217
|
|
|
233
218
|
/* Also explicitly inherit navigation sizes incase they differ from pages */
|
|
@@ -246,24 +231,6 @@
|
|
|
246
231
|
);
|
|
247
232
|
}
|
|
248
233
|
|
|
249
|
-
.control[data-variant="text"]:hover:not(:disabled) {
|
|
250
|
-
color: var(
|
|
251
|
-
--recursica_ui-kit_components_button_variants_styles_text_properties_colors_text-hover
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* Hover Overlay for Navigation */
|
|
256
|
-
.control[data-variant="text"]::after {
|
|
257
|
-
background-color: var(
|
|
258
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-color
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
.control[data-variant="text"]:hover:not(:disabled)::after {
|
|
262
|
-
opacity: var(
|
|
263
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-opacity
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
234
|
/* Dots */
|
|
268
235
|
.dots {
|
|
269
236
|
display: inline-flex;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
.content {
|
|
14
14
|
background-color: var(
|
|
15
|
-
--recursica_ui-kit_components_panel_properties_colors_background
|
|
15
|
+
--recursica_ui-kit_components_panel_properties_colors_background-color
|
|
16
16
|
);
|
|
17
17
|
border-style: solid;
|
|
18
18
|
border-width: var(--recursica_ui-kit_components_panel_properties_border-size);
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
.header {
|
|
45
45
|
background-color: var(
|
|
46
|
-
--recursica_ui-kit_components_panel_properties_colors_header-
|
|
46
|
+
--recursica_ui-kit_components_panel_properties_colors_header-background-color
|
|
47
47
|
);
|
|
48
48
|
padding: var(
|
|
49
49
|
--recursica_ui-kit_components_panel_properties_header-footer-vertical-padding
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
|
|
155
155
|
.footer {
|
|
156
156
|
background-color: var(
|
|
157
|
-
--recursica_ui-
|
|
157
|
+
--recursica_ui-kit_components_panel_properties_colors_footer-background-color
|
|
158
158
|
);
|
|
159
159
|
padding: var(
|
|
160
160
|
--recursica_ui-kit_components_panel_properties_header-footer-vertical-padding
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
.dropdown {
|
|
16
16
|
background-color: var(
|
|
17
|
-
--recursica_ui-kit_components_hover-card-popover_properties_colors_background
|
|
17
|
+
--recursica_ui-kit_components_hover-card-popover_properties_colors_background-color
|
|
18
18
|
);
|
|
19
19
|
border-style: solid; /* HARDCODE: Mantine Paper does not set border-style natively */
|
|
20
20
|
border-width: var(
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
|
|
113
113
|
/* Standard unchecked state */
|
|
114
114
|
background-color: var(
|
|
115
|
-
--recursica_ui-kit_components_radio-
|
|
115
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_unselected_properties_colors_background-color
|
|
116
116
|
);
|
|
117
117
|
border-color: var(
|
|
118
|
-
--recursica_ui-kit_components_radio-
|
|
118
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_unselected_properties_colors_border-color
|
|
119
119
|
);
|
|
120
120
|
transition: all 0.2s ease; /* HARDCODE: consider global transition token */
|
|
121
121
|
}
|
|
@@ -123,24 +123,37 @@
|
|
|
123
123
|
/* Checked State */
|
|
124
124
|
.root .radio:checked {
|
|
125
125
|
background-color: var(
|
|
126
|
-
--recursica_ui-kit_components_radio-
|
|
126
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_properties_colors_background-color
|
|
127
127
|
);
|
|
128
128
|
border-color: var(
|
|
129
|
-
--recursica_ui-kit_components_radio-
|
|
129
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_properties_colors_border-color
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
/* Disabled State */
|
|
133
|
+
/* Disabled State (colors now differ per selection state, so each combination is mapped explicitly) */
|
|
134
134
|
.root .radio:disabled {
|
|
135
135
|
cursor: not-allowed; /* HARDCODE: disabled state default */
|
|
136
|
+
}
|
|
137
|
+
.root .radio:disabled:not(:checked) {
|
|
136
138
|
opacity: var(
|
|
137
|
-
--recursica_ui-kit_components_radio-
|
|
139
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_unselected_variants_states_disabled_properties_opacity
|
|
138
140
|
);
|
|
139
141
|
background-color: var(
|
|
140
|
-
--recursica_ui-kit_components_radio-
|
|
142
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_unselected_variants_states_disabled_properties_colors_background-color
|
|
141
143
|
);
|
|
142
144
|
border-color: var(
|
|
143
|
-
--recursica_ui-kit_components_radio-
|
|
145
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_unselected_variants_states_disabled_properties_colors_border-color
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
.root .radio:checked:disabled {
|
|
149
|
+
opacity: var(
|
|
150
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_variants_states_disabled_properties_opacity
|
|
151
|
+
);
|
|
152
|
+
background-color: var(
|
|
153
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_variants_states_disabled_properties_colors_background-color
|
|
154
|
+
);
|
|
155
|
+
border-color: var(
|
|
156
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_variants_states_disabled_properties_colors_border-color
|
|
144
157
|
);
|
|
145
158
|
}
|
|
146
159
|
|
|
@@ -151,14 +164,18 @@
|
|
|
151
164
|
pointer-events: none;
|
|
152
165
|
width: var(--recursica_ui-kit_components_radio-button_properties_icon-size);
|
|
153
166
|
height: var(--recursica_ui-kit_components_radio-button_properties_icon-size);
|
|
167
|
+
}
|
|
168
|
+
/* No icon-color token exists for the unselected state (no icon is visible then) */
|
|
169
|
+
.root .radio:checked + .iconWrapper .icon,
|
|
170
|
+
.root .radio:checked + .icon {
|
|
154
171
|
color: var(
|
|
155
|
-
--recursica_ui-kit_components_radio-
|
|
172
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_properties_colors_icon-color
|
|
156
173
|
);
|
|
157
174
|
}
|
|
158
|
-
.root .radio:disabled + .iconWrapper .icon,
|
|
159
|
-
.root .radio:disabled + .icon {
|
|
175
|
+
.root .radio:checked:disabled + .iconWrapper .icon,
|
|
176
|
+
.root .radio:checked:disabled + .icon {
|
|
160
177
|
color: var(
|
|
161
|
-
--recursica_ui-kit_components_radio-
|
|
178
|
+
--recursica_ui-kit_components_radio-button_variants_selection-states_selected_variants_states_disabled_properties_colors_icon-color
|
|
162
179
|
);
|
|
163
180
|
}
|
|
164
181
|
|
|
@@ -176,7 +193,7 @@
|
|
|
176
193
|
word-wrap: break-word;
|
|
177
194
|
white-space: normal;
|
|
178
195
|
color: var(
|
|
179
|
-
--recursica_ui-kit_components_radio-button-item_properties_colors_text
|
|
196
|
+
--recursica_ui-kit_components_radio-button-item_properties_colors_text-color
|
|
180
197
|
);
|
|
181
198
|
font-family: var(
|
|
182
199
|
--recursica_ui-kit_components_radio-button-item_properties_text_font-family
|
|
@@ -209,6 +226,6 @@
|
|
|
209
226
|
--recursica_ui-kit_components_radio-button-item_properties_colors_disabled-text
|
|
210
227
|
);
|
|
211
228
|
opacity: var(
|
|
212
|
-
--recursica_ui-kit_components_radio-button-
|
|
229
|
+
--recursica_ui-kit_components_radio-button-item_variants_states_disabled_properties_opacity
|
|
213
230
|
);
|
|
214
231
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
--recursica_ui-kit_components_read-only-field_properties_text_text-transform
|
|
47
47
|
);
|
|
48
48
|
color: var(
|
|
49
|
-
--recursica_ui-kit_components_read-only-field_properties_colors_text
|
|
49
|
+
--recursica_ui-kit_components_read-only-field_properties_colors_text-color
|
|
50
50
|
);
|
|
51
51
|
min-height: var(
|
|
52
52
|
--recursica_ui-kit_components_read-only-field_properties_min-height
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# RecursicaThemeProvider - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use `RecursicaThemeProvider` in your projects using `@recursica/mantine-adapter`.
|
|
4
|
+
|
|
5
|
+
> [!NOTE] > `RecursicaThemeProvider` is defined once in `@recursica/adapter-common` and re-exported here so it shares the exact same behavior across every Recursica adapter.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Import Reference
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { RecursicaThemeProvider } from "@recursica/mantine-adapter";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 2. Basic Example
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { MantineProvider } from "@mantine/core";
|
|
21
|
+
import { RecursicaThemeProvider } from "@recursica/mantine-adapter";
|
|
22
|
+
|
|
23
|
+
function App() {
|
|
24
|
+
return (
|
|
25
|
+
<MantineProvider>
|
|
26
|
+
<RecursicaThemeProvider theme="light">
|
|
27
|
+
{/* Your App Components */}
|
|
28
|
+
</RecursicaThemeProvider>
|
|
29
|
+
</MantineProvider>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
By default, `RecursicaThemeProvider` also wraps `children` in a base [`Layer`](../Layer/USAGE.md) (`layer={0}`), so surface/border/elevation variables resolve immediately — no separate `Layer` needed for the page background.
|
|
35
|
+
|
|
36
|
+
If you want to place the base layer yourself (e.g. to use `contentsOnly`, or to control exactly where layer 0 starts in the tree), opt out with `initLayer0={false}`:
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { RecursicaThemeProvider, Layer } from "@recursica/mantine-adapter";
|
|
40
|
+
|
|
41
|
+
<RecursicaThemeProvider theme="light" initLayer0={false}>
|
|
42
|
+
<Layer layer={0}>{/* Your App Components */}</Layer>
|
|
43
|
+
</RecursicaThemeProvider>;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 3. Design System Integration
|
|
49
|
+
|
|
50
|
+
> [!IMPORTANT]
|
|
51
|
+
>
|
|
52
|
+
> - **Required for setup**: `RecursicaThemeProvider` must wrap your entire application, once, near the root. See [SETUP.md](../../../SETUP.md) for the full setup sequence.
|
|
53
|
+
> - **`initLayer0` (default `true`)**: Automatically wraps `children` in a layer-0 [`Layer`](../Layer/USAGE.md). `RecursicaThemeProvider` itself only sets `data-recursica-theme` (`"light"` or `"dark"`, defaults to `"light"`) on `document.documentElement` — without a `Layer` in the tree (either the automatic one or one you add yourself with `initLayer0={false}`), none of Recursica's surface CSS variables resolve.
|
|
54
|
+
> - **Runtime theme switching**: Changing the `theme` prop re-runs the effect and updates `data-recursica-theme` immediately, so you can drive light/dark switching from application state.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 4. Key Integration Features & Constraints
|
|
59
|
+
|
|
60
|
+
`RecursicaThemeProvider` also wires up the `overStyled` development-mode visual auditing helper (see [OVERSTYLING.md](../../../OVERSTYLING.md)) — `recursica.toggleOverStyled()` in the browser console only works once this provider has mounted.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
.root {
|
|
9
9
|
background-color: var(
|
|
10
|
-
--recursica_ui-kit_components_segmented-control_properties_colors_background
|
|
10
|
+
--recursica_ui-kit_components_segmented-control_properties_colors_background-color
|
|
11
11
|
);
|
|
12
12
|
border: var(
|
|
13
13
|
--recursica_ui-kit_components_segmented-control_properties_border-size
|
|
@@ -42,50 +42,50 @@
|
|
|
42
42
|
--recursica_ui-kit_components_segmented-control-item_properties_item_height
|
|
43
43
|
);
|
|
44
44
|
border-radius: var(
|
|
45
|
-
--recursica_ui-kit_components_segmented-control-
|
|
45
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_border-radius
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
border: var(
|
|
49
|
-
--recursica_ui-kit_components_segmented-control-
|
|
49
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_border-size
|
|
50
50
|
)
|
|
51
51
|
solid
|
|
52
52
|
var(
|
|
53
|
-
--recursica_ui-kit_components_segmented-control-
|
|
53
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_colors_border-color
|
|
54
54
|
);
|
|
55
55
|
background-color: var(
|
|
56
|
-
--recursica_ui-kit_components_segmented-control-
|
|
56
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_colors_background-color
|
|
57
57
|
);
|
|
58
58
|
box-shadow: var(
|
|
59
|
-
--recursica_ui-kit_components_segmented-control-
|
|
59
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_elevation
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
font-family: var(
|
|
63
|
-
--recursica_ui-kit_components_segmented-control-
|
|
63
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_font-family
|
|
64
64
|
);
|
|
65
65
|
font-size: var(
|
|
66
|
-
--recursica_ui-kit_components_segmented-control-
|
|
66
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_font-size
|
|
67
67
|
);
|
|
68
68
|
font-style: var(
|
|
69
|
-
--recursica_ui-kit_components_segmented-control-
|
|
69
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_font-style
|
|
70
70
|
);
|
|
71
71
|
font-weight: var(
|
|
72
|
-
--recursica_ui-kit_components_segmented-control-
|
|
72
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_font-weight
|
|
73
73
|
);
|
|
74
74
|
letter-spacing: var(
|
|
75
|
-
--recursica_ui-kit_components_segmented-control-
|
|
75
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_letter-spacing
|
|
76
76
|
);
|
|
77
77
|
line-height: var(
|
|
78
|
-
--recursica_ui-kit_components_segmented-control-
|
|
78
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_line-height
|
|
79
79
|
);
|
|
80
80
|
text-decoration: var(
|
|
81
|
-
--recursica_ui-kit_components_segmented-control-
|
|
81
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_text-decoration
|
|
82
82
|
);
|
|
83
83
|
text-transform: var(
|
|
84
|
-
--recursica_ui-kit_components_segmented-control-
|
|
84
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_text_text-transform
|
|
85
85
|
);
|
|
86
86
|
|
|
87
87
|
color: var(
|
|
88
|
-
--recursica_ui-kit_components_segmented-control-
|
|
88
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_unselected_properties_colors_text-color
|
|
89
89
|
);
|
|
90
90
|
|
|
91
91
|
display: flex;
|
|
@@ -131,50 +131,50 @@
|
|
|
131
131
|
/* Indicator (the moving selected block) */
|
|
132
132
|
.root .indicator {
|
|
133
133
|
background-color: var(
|
|
134
|
-
--recursica_ui-kit_components_segmented-control-
|
|
134
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_colors_background-color
|
|
135
135
|
);
|
|
136
136
|
border: var(
|
|
137
|
-
--recursica_ui-kit_components_segmented-control-
|
|
137
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_border-size
|
|
138
138
|
)
|
|
139
139
|
solid
|
|
140
140
|
var(
|
|
141
|
-
--recursica_ui-kit_components_segmented-control-
|
|
141
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_colors_border-color
|
|
142
142
|
);
|
|
143
143
|
box-shadow: var(
|
|
144
|
-
--recursica_ui-kit_components_segmented-control-
|
|
144
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_elevation
|
|
145
145
|
);
|
|
146
146
|
border-radius: var(
|
|
147
|
-
--recursica_ui-kit_components_segmented-control-
|
|
147
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_border-radius
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/* Selected label text color override */
|
|
152
152
|
.root .control[data-active] .label {
|
|
153
153
|
color: var(
|
|
154
|
-
--recursica_ui-kit_components_segmented-control-
|
|
154
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_colors_text-color
|
|
155
155
|
);
|
|
156
156
|
font-family: var(
|
|
157
|
-
--recursica_ui-kit_components_segmented-control-
|
|
157
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_font-family
|
|
158
158
|
);
|
|
159
159
|
font-size: var(
|
|
160
|
-
--recursica_ui-kit_components_segmented-control-
|
|
160
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_font-size
|
|
161
161
|
);
|
|
162
162
|
font-style: var(
|
|
163
|
-
--recursica_ui-kit_components_segmented-control-
|
|
163
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_font-style
|
|
164
164
|
);
|
|
165
165
|
font-weight: var(
|
|
166
|
-
--recursica_ui-kit_components_segmented-control-
|
|
166
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_font-weight
|
|
167
167
|
);
|
|
168
168
|
letter-spacing: var(
|
|
169
|
-
--recursica_ui-kit_components_segmented-control-
|
|
169
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_letter-spacing
|
|
170
170
|
);
|
|
171
171
|
line-height: var(
|
|
172
|
-
--recursica_ui-kit_components_segmented-control-
|
|
172
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_line-height
|
|
173
173
|
);
|
|
174
174
|
text-decoration: var(
|
|
175
|
-
--recursica_ui-kit_components_segmented-control-
|
|
175
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_text-decoration
|
|
176
176
|
);
|
|
177
177
|
text-transform: var(
|
|
178
|
-
--recursica_ui-kit_components_segmented-control-
|
|
178
|
+
--recursica_ui-kit_components_segmented-control-item_variants_selection-states_selected_properties_text_text-transform
|
|
179
179
|
);
|
|
180
180
|
}
|
|
@@ -47,3 +47,12 @@ This document contains specific design decisions, architectural constraints, and
|
|
|
47
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
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
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.
|