@recursica/mui-adapter 0.18.0 → 0.19.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 +25 -0
- package/SETUP.md +1 -1
- package/dist/mui-adapter.cjs +172 -23
- package/dist/mui-adapter.cjs.map +1 -1
- package/dist/mui-adapter.css +1 -1
- package/dist/mui-adapter.js +12963 -4694
- package/dist/mui-adapter.js.map +1 -1
- package/dist/src/components/Tree/Tree.d.ts +9 -5
- package/llms.txt +2 -0
- package/package.json +6 -1
- package/src/components/Accordion/Accordion.module.css +98 -62
- package/src/components/Autocomplete/Autocomplete.module.css +50 -47
- 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 +25 -43
- package/src/components/Card/Card.module.css +3 -3
- package/src/components/Checkbox/Checkbox.module.css +57 -16
- package/src/components/Chip/Chip.module.css +32 -20
- 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 +20 -3
- package/src/components/Layer/USAGE.md +50 -0
- package/src/components/Link/Link.module.css +18 -71
- package/src/components/Loader/Loader.module.css +3 -3
- package/src/components/Menu/Menu.module.css +33 -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/Radio/Radio.module.css +32 -15
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +1 -1
- package/src/components/RecursicaThemeProvider/USAGE.md +60 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +37 -29
- package/src/components/Slider/Slider.module.css +51 -35
- package/src/components/Stepper/Stepper.module.css +3 -3
- package/src/components/Switch/Switch.module.css +27 -11
- package/src/components/Tabs/Tabs.module.css +309 -166
- 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 -33
- package/src/components/TextField/TextField.tsx +2 -2
- package/src/components/Timeline/IMPLEMENTATION_NOTES.md +5 -0
- package/src/components/Timeline/Timeline.module.css +35 -34
- package/src/components/Toast/Toast.module.css +24 -11
- package/src/components/Tooltip/Tooltip.module.css +4 -2
- package/src/components/Tree/IMPLEMENTATION_NOTES.md +21 -0
- package/src/components/Tree/Tree.module.css +204 -39
- package/src/components/Tree/Tree.stories.tsx +81 -4
- package/src/components/Tree/Tree.tsx +214 -13
- package/src/components/Tree/USAGE.md +40 -3
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
/* EXEMPTIONS:
|
|
2
|
-
-
|
|
3
|
-
unexpected layout shift or flickering during
|
|
4
|
-
/* recursica-ignore: --recursica_ui-
|
|
2
|
+
- border-size variables are ignored because a uniform 1px border is applied globally to prevent
|
|
3
|
+
unexpected layout shift or flickering during focused, disabled, or error state transitions. */
|
|
4
|
+
/* recursica-ignore: --recursica_ui-kit_components_textarea_properties_border-size */
|
|
5
5
|
/* recursica-ignore: --recursica_ui-kit_components_textarea_variants_states_disabled_properties_border-size */
|
|
6
6
|
/* recursica-ignore: --recursica_ui-kit_components_textarea_variants_states_error_properties_border-size */
|
|
7
|
-
/* recursica-ignore: --recursica_ui-kit_components_textarea_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 --textarea-control-{max,min}-width hooks consumed inline in TextArea.tsx, since
|
|
11
|
+
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_textarea_variants_layouts_stacked_properties_top-bottom-margin
|
|
14
15
|
);
|
|
16
|
+
--textarea-control-max-width: var(
|
|
17
|
+
--recursica_ui-kit_components_textarea_variants_layouts_stacked_properties_max-width
|
|
18
|
+
);
|
|
19
|
+
--textarea-control-min-width: var(
|
|
20
|
+
--recursica_ui-kit_components_textarea_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_textarea_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
20
27
|
);
|
|
28
|
+
--textarea-control-max-width: var(
|
|
29
|
+
--recursica_ui-kit_components_textarea_variants_layouts_side-by-side_properties_max-width
|
|
30
|
+
);
|
|
31
|
+
--textarea-control-min-width: var(
|
|
32
|
+
--recursica_ui-kit_components_textarea_variants_layouts_side-by-side_properties_min-width
|
|
33
|
+
);
|
|
21
34
|
}
|
|
22
35
|
|
|
23
36
|
/* HARDCODED VALUES:
|
|
@@ -95,13 +108,13 @@
|
|
|
95
108
|
|
|
96
109
|
/* Base State Default Execution */
|
|
97
110
|
background-color: var(
|
|
98
|
-
--recursica_ui-
|
|
111
|
+
--recursica_ui-kit_components_textarea_properties_colors_background-color
|
|
99
112
|
);
|
|
100
113
|
border-color: var(
|
|
101
|
-
--recursica_ui-
|
|
114
|
+
--recursica_ui-kit_components_textarea_properties_colors_border-color
|
|
102
115
|
);
|
|
103
116
|
color: var(
|
|
104
|
-
--recursica_ui-
|
|
117
|
+
--recursica_ui-kit_components_textarea_properties_colors_text-color
|
|
105
118
|
);
|
|
106
119
|
|
|
107
120
|
outline: none;
|
|
@@ -119,17 +132,16 @@
|
|
|
119
132
|
-------------------------------------- */
|
|
120
133
|
|
|
121
134
|
/* Focus State Mapping (Triggered internally via browser focus rules) */
|
|
135
|
+
/* The token schema no longer provides per-component focus colors; apply the generic focus ring
|
|
136
|
+
tokens as a box-shadow ring instead of a color swap. */
|
|
122
137
|
.input:focus-within,
|
|
123
138
|
.input:focus {
|
|
124
|
-
|
|
125
|
-
--
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
color: var(
|
|
131
|
-
--recursica_ui-kit_components_textarea_variants_states_focus_properties_colors_text
|
|
132
|
-
);
|
|
139
|
+
box-shadow:
|
|
140
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
141
|
+
var(--recursica_brand_states_focus_color),
|
|
142
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
143
|
+
var(--recursica_brand_states_focus_margin)
|
|
144
|
+
var(--recursica_brand_states_focus_color);
|
|
133
145
|
}
|
|
134
146
|
|
|
135
147
|
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
@@ -138,10 +150,10 @@
|
|
|
138
150
|
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_border-color
|
|
139
151
|
) !important;
|
|
140
152
|
background-color: var(
|
|
141
|
-
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_background
|
|
153
|
+
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_background-color
|
|
142
154
|
) !important;
|
|
143
155
|
color: var(
|
|
144
|
-
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_text
|
|
156
|
+
--recursica_ui-kit_components_textarea_variants_states_error_properties_colors_text-color
|
|
145
157
|
) !important;
|
|
146
158
|
}
|
|
147
159
|
|
|
@@ -151,10 +163,13 @@
|
|
|
151
163
|
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_border-color
|
|
152
164
|
) !important;
|
|
153
165
|
background-color: var(
|
|
154
|
-
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_background
|
|
166
|
+
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_background-color
|
|
155
167
|
) !important;
|
|
156
168
|
color: var(
|
|
157
|
-
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_text
|
|
169
|
+
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_colors_text-color
|
|
170
|
+
) !important;
|
|
171
|
+
opacity: var(
|
|
172
|
+
--recursica_ui-kit_components_textarea_variants_states_disabled_properties_opacity
|
|
158
173
|
) !important;
|
|
159
174
|
cursor: not-allowed;
|
|
160
175
|
}
|
|
@@ -105,8 +105,8 @@ export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
|
|
|
105
105
|
<WithReadOnlyWrapper
|
|
106
106
|
className={wrapperClass}
|
|
107
107
|
style={style as React.CSSProperties}
|
|
108
|
-
controlMaxWidth="var(--
|
|
109
|
-
controlMinWidth="var(--
|
|
108
|
+
controlMaxWidth="var(--textarea-control-max-width)"
|
|
109
|
+
controlMinWidth="var(--textarea-control-min-width)"
|
|
110
110
|
overStyled={overStyled as true}
|
|
111
111
|
formLayout={formLayout}
|
|
112
112
|
labelSize={labelSize}
|
|
@@ -7,21 +7,34 @@
|
|
|
7
7
|
/* recursica-ignore: --recursica_ui-kit_components_text-field_variants_states_focus_properties_border-size */
|
|
8
8
|
|
|
9
9
|
/* LAYOUT SPACING OVERRIDES:
|
|
10
|
-
- Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens.
|
|
10
|
+
- Sets the --form-control-margin-bottom spacing hook to map component-specific layout tokens.
|
|
11
|
+
- Also sets the --text-field-control-{max,min}-width hooks consumed inline in TextField.tsx,
|
|
12
|
+
since the token schema no longer provides a single layout-agnostic min/max width. */
|
|
11
13
|
.layoutOverride {
|
|
12
14
|
--form-control-margin-bottom: var(
|
|
13
15
|
--recursica_ui-kit_components_text-field_variants_layouts_stacked_properties_top-bottom-margin
|
|
14
16
|
);
|
|
17
|
+
--text-field-control-max-width: var(
|
|
18
|
+
--recursica_ui-kit_components_text-field_variants_layouts_stacked_properties_max-width
|
|
19
|
+
);
|
|
20
|
+
--text-field-control-min-width: var(
|
|
21
|
+
--recursica_ui-kit_components_text-field_variants_layouts_stacked_properties_min-width
|
|
22
|
+
);
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
.layoutOverride[data-form-layout="side-by-side"] {
|
|
18
26
|
--form-control-margin-bottom: var(
|
|
19
27
|
--recursica_ui-kit_components_text-field_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
20
28
|
);
|
|
29
|
+
--text-field-control-max-width: var(
|
|
30
|
+
--recursica_ui-kit_components_text-field_variants_layouts_side-by-side_properties_max-width
|
|
31
|
+
);
|
|
32
|
+
--text-field-control-min-width: var(
|
|
33
|
+
--recursica_ui-kit_components_text-field_variants_layouts_side-by-side_properties_min-width
|
|
34
|
+
);
|
|
21
35
|
}
|
|
22
36
|
|
|
23
37
|
/* HARDCODED VALUES:
|
|
24
|
-
- border-width: 1px. Native geometric boundary for the input box.
|
|
25
38
|
- border-style: solid. Native structural rendering rule.
|
|
26
39
|
- outline: none. Bypassing browser focus rings to rely strictly on Recursica focus states natively.
|
|
27
40
|
- flex/layout: display: flex on the root wrapper safely encapsulating internal section rendering.
|
|
@@ -65,18 +78,20 @@
|
|
|
65
78
|
border-radius: var(
|
|
66
79
|
--recursica_ui-kit_components_text-field_properties_border-radius
|
|
67
80
|
);
|
|
68
|
-
border-width:
|
|
81
|
+
border-width: var(
|
|
82
|
+
--recursica_ui-kit_components_text-field_properties_border-size
|
|
83
|
+
);
|
|
69
84
|
border-style: solid;
|
|
70
85
|
|
|
71
86
|
/* Base State Default Execution */
|
|
72
87
|
background-color: var(
|
|
73
|
-
--recursica_ui-kit_components_text-
|
|
88
|
+
--recursica_ui-kit_components_text-field_properties_colors_background-color
|
|
74
89
|
);
|
|
75
90
|
border-color: var(
|
|
76
|
-
--recursica_ui-kit_components_text-
|
|
91
|
+
--recursica_ui-kit_components_text-field_properties_colors_border-color
|
|
77
92
|
);
|
|
78
93
|
color: var(
|
|
79
|
-
--recursica_ui-kit_components_text-
|
|
94
|
+
--recursica_ui-kit_components_text-field_properties_colors_text-color
|
|
80
95
|
);
|
|
81
96
|
|
|
82
97
|
/* Override MUI/Mantine native Input variables governing section spacing padding mathematics safely */
|
|
@@ -170,13 +185,13 @@
|
|
|
170
185
|
width: var(--recursica_ui-kit_components_text-field_properties_icon-size);
|
|
171
186
|
height: var(--recursica_ui-kit_components_text-field_properties_icon-size);
|
|
172
187
|
color: var(
|
|
173
|
-
--recursica_ui-kit_components_text-
|
|
188
|
+
--recursica_ui-kit_components_text-field_properties_colors_leading-icon
|
|
174
189
|
);
|
|
175
190
|
}
|
|
176
191
|
|
|
177
192
|
.section[data-position="right"] :global(svg) {
|
|
178
193
|
color: var(
|
|
179
|
-
--recursica_ui-kit_components_text-
|
|
194
|
+
--recursica_ui-kit_components_text-field_properties_colors_trailing-icon
|
|
180
195
|
);
|
|
181
196
|
}
|
|
182
197
|
|
|
@@ -185,29 +200,16 @@
|
|
|
185
200
|
-------------------------------------- */
|
|
186
201
|
|
|
187
202
|
/* Focus State Mapping (Triggered internally via browser pseudo-pseudo-class) */
|
|
203
|
+
/* The token schema no longer provides per-component focus colors; apply the generic focus ring
|
|
204
|
+
tokens as a box-shadow ring instead of a color swap (matches mantine-adapter reference). */
|
|
188
205
|
.root:focus-within,
|
|
189
206
|
.root:focus {
|
|
190
|
-
|
|
191
|
-
--
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
color: var(
|
|
197
|
-
--recursica_ui-kit_components_text-field_variants_states_focus_properties_colors_text
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.root:focus-within .section[data-position="left"] :global(svg) {
|
|
202
|
-
color: var(
|
|
203
|
-
--recursica_ui-kit_components_text-field_variants_states_focus_properties_colors_leading-icon
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.root:focus-within .section[data-position="right"] :global(svg) {
|
|
208
|
-
color: var(
|
|
209
|
-
--recursica_ui-kit_components_text-field_variants_states_focus_properties_colors_trailing-icon
|
|
210
|
-
);
|
|
207
|
+
box-shadow:
|
|
208
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
209
|
+
var(--recursica_brand_states_focus_color),
|
|
210
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
211
|
+
var(--recursica_brand_states_focus_margin)
|
|
212
|
+
var(--recursica_brand_states_focus_color);
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
@@ -216,10 +218,10 @@
|
|
|
216
218
|
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_border-color
|
|
217
219
|
);
|
|
218
220
|
background-color: var(
|
|
219
|
-
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_background
|
|
221
|
+
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_background-color
|
|
220
222
|
);
|
|
221
223
|
color: var(
|
|
222
|
-
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_text
|
|
224
|
+
--recursica_ui-kit_components_text-field_variants_states_error_properties_colors_text-color
|
|
223
225
|
);
|
|
224
226
|
}
|
|
225
227
|
|
|
@@ -241,10 +243,13 @@
|
|
|
241
243
|
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_border-color
|
|
242
244
|
);
|
|
243
245
|
background-color: var(
|
|
244
|
-
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_background
|
|
246
|
+
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_background-color
|
|
245
247
|
);
|
|
246
248
|
color: var(
|
|
247
|
-
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_text
|
|
249
|
+
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_colors_text-color
|
|
250
|
+
);
|
|
251
|
+
opacity: var(
|
|
252
|
+
--recursica_ui-kit_components_text-field_variants_states_disabled_properties_opacity
|
|
248
253
|
);
|
|
249
254
|
cursor: not-allowed;
|
|
250
255
|
}
|
|
@@ -126,8 +126,8 @@ export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
126
126
|
<WithReadOnlyWrapper
|
|
127
127
|
className={wrapperClass}
|
|
128
128
|
style={style as React.CSSProperties}
|
|
129
|
-
controlMaxWidth="var(--
|
|
130
|
-
controlMinWidth="var(--
|
|
129
|
+
controlMaxWidth="var(--text-field-control-max-width)"
|
|
130
|
+
controlMinWidth="var(--text-field-control-min-width)"
|
|
131
131
|
overStyled={overStyled as true}
|
|
132
132
|
formLayout={formLayout}
|
|
133
133
|
labelSize={labelSize}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Timeline Implementation Notes
|
|
2
|
+
|
|
3
|
+
- **`TimelineItem.tsx`'s `classes` prop likely does nothing (needs follow-up):** `TimelineItem.tsx` passes `classes={{ item: styles.item, itemBody: styles.itemBody, itemContent: styles.itemContent, itemBullet: styles.itemBullet, itemTitle: styles.itemTitle }}` to `MuiTimelineItem`. But `@mui/lab`'s `TimelineItem` only defines these class slots (see `node_modules/@mui/lab/TimelineItem/timelineItemClasses.d.ts`): `root`, `positionLeft`, `positionRight`, `positionAlternate`, `positionAlternateReverse`, `missingOppositeContent`. There is no `item`/`itemBody`/`itemContent`/`itemBullet`/`itemTitle` slot — `useUtilityClasses` in `TimelineItem.js` builds its class list from a fixed `slots` object keyed only by those real slot names and passes it through `composeClasses`, which ignores any other keys on the `classes` object we pass in. So `.item`, `.itemBody`, `.itemContent`, `.itemBullet`, and `.itemTitle` in `Timeline.module.css` (lines with those selectors) are not actually attached to any rendered element today — they're dead CSS.
|
|
4
|
+
- Discovered 2026-08-06 while wiring up the `--recursica_ui-kit_components_timeline_properties_item-gap` token (see changeset `fix-mui-adapter-broken-tokens`). That specific fix didn't depend on these classes — it uses `gap` on `.root` (a real, correctly-applied slot), which spaces direct `<li>` children regardless of their own class — so it's unaffected by this bug and needed no workaround.
|
|
5
|
+
- **Needs a real fix later:** likely means auditing which of `.item`/`.itemBody`/`.itemContent`/`.itemBullet`/`.itemTitle`'s rules are actually load-bearing (vs. now-inert overrides of Mantine's naming that never carried over structurally to MUI), and either (a) finding the correct way to target those parts under MUI's actual DOM (e.g. `:global()` selectors against MUI's own internal class names, similar to the pattern used elsewhere in this adapter for `TableCell`/`TableRow`), or (b) restructuring `TimelineItem.tsx` to apply these as plain `className`s on wrapper elements it already renders internally, since `classes` won't work for slots MUI doesn't define.
|
|
@@ -7,17 +7,18 @@
|
|
|
7
7
|
.root {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
|
+
gap: var(--recursica_ui-kit_components_timeline_properties_item-gap);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.item {
|
|
13
14
|
/* Mantine uses these vars to calculate the exact left: position of the connector line */
|
|
14
15
|
--tl-line-width: var(
|
|
15
|
-
--recursica_ui-
|
|
16
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_inactive_properties_connector-size
|
|
16
17
|
) !important;
|
|
17
18
|
|
|
18
19
|
&[data-active] {
|
|
19
20
|
--tl-line-width: var(
|
|
20
|
-
--recursica_ui-
|
|
21
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_active_properties_connector-size
|
|
21
22
|
) !important;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -47,20 +48,20 @@
|
|
|
47
48
|
/* Inactive connector */
|
|
48
49
|
&::before {
|
|
49
50
|
border-left-width: var(
|
|
50
|
-
--recursica_ui-
|
|
51
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_inactive_properties_connector-size
|
|
51
52
|
) !important;
|
|
52
53
|
border-left-color: var(
|
|
53
|
-
--recursica_ui-
|
|
54
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_inactive_properties_colors_connector-color
|
|
54
55
|
) !important;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/* Active connector */
|
|
58
59
|
&[data-active]::before {
|
|
59
60
|
border-left-width: var(
|
|
60
|
-
--recursica_ui-
|
|
61
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_active_properties_connector-size
|
|
61
62
|
) !important;
|
|
62
63
|
border-left-color: var(
|
|
63
|
-
--recursica_ui-
|
|
64
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_active_properties_colors_connector-color
|
|
64
65
|
) !important;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
@@ -89,18 +90,18 @@
|
|
|
89
90
|
) !important;
|
|
90
91
|
|
|
91
92
|
background-color: var(
|
|
92
|
-
--recursica_ui-kit_components_timeline-
|
|
93
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_default_variants_selection-states_inactive_properties_colors_background-color
|
|
93
94
|
) !important;
|
|
94
95
|
border-color: var(
|
|
95
|
-
--recursica_ui-kit_components_timeline-
|
|
96
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_default_variants_selection-states_inactive_properties_colors_border-color
|
|
96
97
|
) !important;
|
|
97
98
|
}
|
|
98
99
|
:global(.mantine-Timeline-item)[data-variant="default"][data-active] & {
|
|
99
100
|
background-color: var(
|
|
100
|
-
--recursica_ui-kit_components_timeline-
|
|
101
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_default_variants_selection-states_active_properties_colors_background-color
|
|
101
102
|
) !important;
|
|
102
103
|
border-color: var(
|
|
103
|
-
--recursica_ui-kit_components_timeline-
|
|
104
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_default_variants_selection-states_active_properties_colors_border-color
|
|
104
105
|
) !important;
|
|
105
106
|
}
|
|
106
107
|
|
|
@@ -120,13 +121,13 @@
|
|
|
120
121
|
) !important;
|
|
121
122
|
|
|
122
123
|
background-color: var(
|
|
123
|
-
--recursica_ui-kit_components_timeline-
|
|
124
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon_variants_selection-states_inactive_properties_colors_background-color
|
|
124
125
|
) !important;
|
|
125
126
|
border-color: var(
|
|
126
|
-
--recursica_ui-kit_components_timeline-
|
|
127
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon_variants_selection-states_inactive_properties_colors_border-color
|
|
127
128
|
) !important;
|
|
128
129
|
color: var(
|
|
129
|
-
--recursica_ui-kit_components_timeline-
|
|
130
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon_variants_selection-states_inactive_properties_colors_icon-color
|
|
130
131
|
) !important;
|
|
131
132
|
|
|
132
133
|
/* Propagate icon size */
|
|
@@ -144,13 +145,13 @@
|
|
|
144
145
|
}
|
|
145
146
|
:global(.mantine-Timeline-item)[data-variant="icon"][data-active] & {
|
|
146
147
|
background-color: var(
|
|
147
|
-
--recursica_ui-kit_components_timeline-
|
|
148
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon_variants_selection-states_active_properties_colors_background-color
|
|
148
149
|
) !important;
|
|
149
150
|
border-color: var(
|
|
150
|
-
--recursica_ui-kit_components_timeline-
|
|
151
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon_variants_selection-states_active_properties_colors_border-color
|
|
151
152
|
) !important;
|
|
152
153
|
color: var(
|
|
153
|
-
--recursica_ui-kit_components_timeline-
|
|
154
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon_variants_selection-states_active_properties_colors_icon-color
|
|
154
155
|
) !important;
|
|
155
156
|
}
|
|
156
157
|
|
|
@@ -170,13 +171,13 @@
|
|
|
170
171
|
) !important;
|
|
171
172
|
|
|
172
173
|
background-color: var(
|
|
173
|
-
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-
|
|
174
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-alternative_variants_selection-states_inactive_properties_colors_background-color
|
|
174
175
|
) !important;
|
|
175
176
|
border-color: var(
|
|
176
|
-
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-
|
|
177
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-alternative_variants_selection-states_inactive_properties_colors_border-color
|
|
177
178
|
) !important;
|
|
178
179
|
color: var(
|
|
179
|
-
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-
|
|
180
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-alternative_variants_selection-states_inactive_properties_colors_icon-color
|
|
180
181
|
) !important;
|
|
181
182
|
|
|
182
183
|
font-size: var(
|
|
@@ -194,13 +195,13 @@
|
|
|
194
195
|
:global(.mantine-Timeline-item)[data-variant="icon-alternative"][data-active]
|
|
195
196
|
& {
|
|
196
197
|
background-color: var(
|
|
197
|
-
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-
|
|
198
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-alternative_variants_selection-states_active_properties_colors_background-color
|
|
198
199
|
) !important;
|
|
199
200
|
border-color: var(
|
|
200
|
-
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-
|
|
201
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-alternative_variants_selection-states_active_properties_colors_border-color
|
|
201
202
|
) !important;
|
|
202
203
|
color: var(
|
|
203
|
-
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-
|
|
204
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_icon-alternative_variants_selection-states_active_properties_colors_icon-color
|
|
204
205
|
) !important;
|
|
205
206
|
}
|
|
206
207
|
|
|
@@ -214,25 +215,25 @@
|
|
|
214
215
|
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_properties_border-size
|
|
215
216
|
) !important;
|
|
216
217
|
opacity: var(
|
|
217
|
-
--recursica_ui-kit_components_timeline-
|
|
218
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_variants_selection-states_inactive_properties_avatar-opacity
|
|
218
219
|
) !important;
|
|
219
220
|
|
|
220
221
|
background-color: var(
|
|
221
|
-
--recursica_ui-kit_components_timeline-
|
|
222
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_variants_selection-states_inactive_properties_colors_background-color
|
|
222
223
|
) !important;
|
|
223
224
|
border-color: var(
|
|
224
|
-
--recursica_ui-kit_components_timeline-
|
|
225
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_variants_selection-states_inactive_properties_colors_border-color
|
|
225
226
|
) !important;
|
|
226
227
|
}
|
|
227
228
|
:global(.mantine-Timeline-item)[data-variant="avatar"][data-active] & {
|
|
228
229
|
opacity: var(
|
|
229
|
-
--recursica_ui-kit_components_timeline-
|
|
230
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_variants_selection-states_active_properties_avatar-opacity
|
|
230
231
|
) !important;
|
|
231
232
|
background-color: var(
|
|
232
|
-
--recursica_ui-kit_components_timeline-
|
|
233
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_variants_selection-states_active_properties_colors_background-color
|
|
233
234
|
) !important;
|
|
234
235
|
border-color: var(
|
|
235
|
-
--recursica_ui-kit_components_timeline-
|
|
236
|
+
--recursica_ui-kit_components_timeline-bullet_variants_types_avatar_variants_selection-states_active_properties_colors_border-color
|
|
236
237
|
) !important;
|
|
237
238
|
}
|
|
238
239
|
}
|
|
@@ -270,13 +271,13 @@
|
|
|
270
271
|
|
|
271
272
|
/* Inactive Title Color */
|
|
272
273
|
color: var(
|
|
273
|
-
--recursica_ui-
|
|
274
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_inactive_properties_colors_title-color
|
|
274
275
|
) !important;
|
|
275
276
|
|
|
276
277
|
/* Active Title Color */
|
|
277
278
|
:global(.mantine-Timeline-item)[data-active] & {
|
|
278
279
|
color: var(
|
|
279
|
-
--recursica_ui-
|
|
280
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_active_properties_colors_title-color
|
|
280
281
|
) !important;
|
|
281
282
|
}
|
|
282
283
|
}
|
|
@@ -319,12 +320,12 @@
|
|
|
319
320
|
);
|
|
320
321
|
|
|
321
322
|
color: var(
|
|
322
|
-
--recursica_ui-
|
|
323
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_inactive_properties_colors_description-color
|
|
323
324
|
);
|
|
324
325
|
|
|
325
326
|
:global(.mantine-Timeline-item)[data-active] & {
|
|
326
327
|
color: var(
|
|
327
|
-
--recursica_ui-
|
|
328
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_active_properties_colors_description-color
|
|
328
329
|
);
|
|
329
330
|
}
|
|
330
331
|
}
|
|
@@ -356,12 +357,12 @@
|
|
|
356
357
|
);
|
|
357
358
|
|
|
358
359
|
color: var(
|
|
359
|
-
--recursica_ui-
|
|
360
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_inactive_properties_colors_timestamp-color
|
|
360
361
|
);
|
|
361
362
|
|
|
362
363
|
:global(.mantine-Timeline-item)[data-active] & {
|
|
363
364
|
color: var(
|
|
364
|
-
--recursica_ui-
|
|
365
|
+
--recursica_ui-kit_components_timeline_variants_selection-states_active_properties_colors_timestamp-color
|
|
365
366
|
);
|
|
366
367
|
}
|
|
367
368
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/* recursica-ignore: --recursica_ui-kit_components_toast_properties_elevation_layer-3 */
|
|
7
7
|
|
|
8
8
|
/* HARDCODED VALUES:
|
|
9
|
-
- border-style:
|
|
9
|
+
- border-style: solid. Baseline so the per-variant border-color tokens actually render.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* ======================================
|
|
@@ -14,7 +14,14 @@
|
|
|
14
14
|
====================================== */
|
|
15
15
|
|
|
16
16
|
.root {
|
|
17
|
-
border-
|
|
17
|
+
border-radius: var(
|
|
18
|
+
--recursica_ui-kit_components_toast_properties_border-radius
|
|
19
|
+
);
|
|
20
|
+
border-width: var(--recursica_ui-kit_components_toast_properties_border-size);
|
|
21
|
+
border-style: solid; /* HARDCODE: baseline so border-color tokens render */
|
|
22
|
+
border-color: var(
|
|
23
|
+
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_border-color
|
|
24
|
+
);
|
|
18
25
|
box-shadow: var(
|
|
19
26
|
--recursica_ui-kit_components_toast_properties_elevation_layer-0
|
|
20
27
|
);
|
|
@@ -26,7 +33,7 @@
|
|
|
26
33
|
|
|
27
34
|
/* Default Variant (Base) */
|
|
28
35
|
background-color: var(
|
|
29
|
-
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_background
|
|
36
|
+
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_background-color
|
|
30
37
|
);
|
|
31
38
|
gap: var(--recursica_ui-kit_components_toast_properties_spacing);
|
|
32
39
|
|
|
@@ -43,7 +50,7 @@
|
|
|
43
50
|
background-color: transparent !important; /* Remove Mantine's native circle background */
|
|
44
51
|
|
|
45
52
|
color: var(
|
|
46
|
-
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_text
|
|
53
|
+
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_text-color
|
|
47
54
|
);
|
|
48
55
|
}
|
|
49
56
|
|
|
@@ -53,7 +60,7 @@
|
|
|
53
60
|
& .title,
|
|
54
61
|
& .description {
|
|
55
62
|
color: var(
|
|
56
|
-
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_text
|
|
63
|
+
--recursica_ui-kit_components_toast_variants_styles_default_properties_colors_text-color
|
|
57
64
|
);
|
|
58
65
|
}
|
|
59
66
|
& .closeButton {
|
|
@@ -65,18 +72,21 @@
|
|
|
65
72
|
/* Error Variant styling */
|
|
66
73
|
&[data-variant="error"] {
|
|
67
74
|
background-color: var(
|
|
68
|
-
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_background
|
|
75
|
+
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_background-color
|
|
76
|
+
);
|
|
77
|
+
border-color: var(
|
|
78
|
+
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_border-color
|
|
69
79
|
);
|
|
70
80
|
|
|
71
81
|
& .icon {
|
|
72
82
|
color: var(
|
|
73
|
-
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_text
|
|
83
|
+
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_text-color
|
|
74
84
|
) !important;
|
|
75
85
|
}
|
|
76
86
|
& .title,
|
|
77
87
|
& .description {
|
|
78
88
|
color: var(
|
|
79
|
-
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_text
|
|
89
|
+
--recursica_ui-kit_components_toast_variants_styles_error_properties_colors_text-color
|
|
80
90
|
);
|
|
81
91
|
}
|
|
82
92
|
& .closeButton {
|
|
@@ -89,18 +99,21 @@
|
|
|
89
99
|
/* Success Variant styling */
|
|
90
100
|
&[data-variant="success"] {
|
|
91
101
|
background-color: var(
|
|
92
|
-
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_background
|
|
102
|
+
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_background-color
|
|
103
|
+
);
|
|
104
|
+
border-color: var(
|
|
105
|
+
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_border-color
|
|
93
106
|
);
|
|
94
107
|
|
|
95
108
|
& .icon {
|
|
96
109
|
color: var(
|
|
97
|
-
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_text
|
|
110
|
+
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_text-color
|
|
98
111
|
) !important;
|
|
99
112
|
}
|
|
100
113
|
& .title,
|
|
101
114
|
& .description {
|
|
102
115
|
color: var(
|
|
103
|
-
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_text
|
|
116
|
+
--recursica_ui-kit_components_toast_variants_styles_success_properties_colors_text-color
|
|
104
117
|
);
|
|
105
118
|
}
|
|
106
119
|
& .closeButton {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
.tooltip {
|
|
25
25
|
background-color: var(
|
|
26
|
-
--recursica_ui-kit_components_tooltip_properties_colors_background
|
|
26
|
+
--recursica_ui-kit_components_tooltip_properties_colors_background-color
|
|
27
27
|
);
|
|
28
28
|
border-style: solid; /* HARDCODE: Mantine Box does not set border-style natively */
|
|
29
29
|
border-width: var(
|
|
@@ -76,7 +76,9 @@
|
|
|
76
76
|
--recursica_ui-kit_components_tooltip_properties_text_text-transform
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
-
color: var(
|
|
79
|
+
color: var(
|
|
80
|
+
--recursica_ui-kit_components_tooltip_properties_colors_text-color
|
|
81
|
+
);
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
/* ======================================
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Tree Implementation Notes
|
|
2
|
+
|
|
3
|
+
- **New dependency: `@mui/x-tree-view`.** Neither `@mui/material` nor `@mui/lab` (already a peer dep, used for Timeline) ships a tree component. `@mui/x-tree-view`'s free/MIT community edition (`RichTreeView` + `TreeItem` building blocks) was added as an optional peer + dev dependency (mirroring how `@mui/lab` is declared), confirmed with the user before adding since it's a new external dependency, not a mechanical port.
|
|
4
|
+
|
|
5
|
+
- **`RichTreeView` over `SimpleTreeView`.** `SimpleTreeView` is composable/children-based (you hand-write nested `<TreeItem>` JSX); `RichTreeView` is data-driven (`items` prop), matching Mantine's `data`-prop shape and our `RecursicaTreeProps.data` API far more directly. No conversion needed for `id`/`children` (bridged via `getItemId`), only `getItemLabel`.
|
|
6
|
+
|
|
7
|
+
- **Fully custom `slots.item` (`CustomTreeItem`), not the default `TreeItem`.** Every visual property comes from `Tree.module.css` rather than `@mui/x-tree-view`'s own default styles (which apply real theme palette colors for hover/selected/focused states that would otherwise fight our tokens). `CustomTreeItem` is built from the officially-documented low-level building blocks (`useTreeItem`, `TreeItemProvider`, `TreeItemRoot`, `TreeItemContent`, `TreeItemIconContainer`, `TreeItemGroupTransition`, `TreeItemLabel`, `TreeItemIcon`) — the same pattern MUI X's own docs use for "rich"/custom tree items — rather than rebuilding keyboard/focus/ARIA handling from scratch.
|
|
8
|
+
|
|
9
|
+
- **`getItemLabel` only ever sees a string; the real `React.ReactNode` label comes from `useTreeItemModel`.** `RichTreeView`'s internal model requires `getItemLabel(item): string` (used for its own a11y/typeahead search), so a non-string `RecursicaTreeNode.label` is coerced to `item.value` there — this string is _never actually rendered_. Inside `CustomTreeItem`, `useTreeItemModel<RecursicaTreeNode>(itemId)` retrieves the **original** untransformed node (real `label: ReactNode` included), which is what actually gets rendered in `<TreeItemLabel>`. This is the documented MUI X mechanism for rich/custom tree item content — not a workaround.
|
|
10
|
+
|
|
11
|
+
- **`TreeItemContent` requires a `status` prop.** Its styled-component variant system reads `status: UseTreeItemStatus` directly (not just via `getContentProps()`'s spread) — omitting it is a compile error, not just a missing visual detail.
|
|
12
|
+
|
|
13
|
+
- **Indentation: preserve MUI's own depth formula, override only the base.** MUI computes each row's `padding-left` as `calc(<base> + --TreeView-itemChildrenIndentation * --TreeView-itemDepth)`, with `--TreeView-itemChildrenIndentation` set as an **inline style** on the root `<ul>` (see `useTreeViewRootProps` in `@mui/x-tree-view/internals`). `Tree.module.css` overrides that CSS variable with `!important` (same category of override as the mantine-adapter's `--level-offset`, itself modeled on this adapter's own Timeline `--mantine-spacing-xl` / `--tl-line-width` precedent — inline styles beat plain stylesheet rules regardless of specificity, so `!important` is required, not optional). `.row`'s own `padding-left` then reuses the same `calc(... + --TreeView-itemChildrenIndentation * --TreeView-itemDepth)` formula, just substituting our `horizontal-padding` token as the base instead of MUI's theme spacing — so per-level indentation keeps working, only its amount changes.
|
|
14
|
+
|
|
15
|
+
- **No `!important` needed for color/hover/selected/disabled overrides.** Unlike the CSS-variable overrides above, these come from `@mui/x-tree-view`'s own Emotion-generated _stylesheet_ rules (not inline styles). Because this app's `<StyledEngineProvider injectFirst>` setup (required per `SETUP.md`, already configured in `.storybook/preview.tsx`) injects MUI's baseline styles before our CSS Modules, our classes win via normal DOM source order — matching `COMPONENT_DEV_GUIDE.md`'s explicit "no `!important`" rule for this category, and the existing `Button`/`Menu` precedent in this adapter.
|
|
16
|
+
|
|
17
|
+
- **`expandOnClick`/`selectOnClick` are approximated, not exact.** Mantine's `Tree` has two independent boolean toggles for these. `@mui/x-tree-view` only has `expansionTrigger: 'content' | 'iconContainer'` (does clicking the row content expand it, or only the icon container?) and `disableSelection` (turns off selection everywhere, not just on a content click). Mapping used: `expansionTrigger = expandOnClick ? "content" : "iconContainer"`, `disableSelection = !selectOnClick`. The specific combination "clicking anywhere expands, but nothing is ever selectable via click" has no exact MUI equivalent beyond `disableSelection` — documented here rather than silently diverging without explanation.
|
|
18
|
+
|
|
19
|
+
- **Deliberately not implemented (no tokens back them):** checkbox/indeterminate node state (`@mui/x-tree-view` supports `checkboxSelection`, but the Figma UI Kit's `tree` tokens only define `selected`/`unselected`, not a checked state) and per-node `disabled` (no token, and no `disabled` field in `RecursicaTreeNode`). Matches the mantine-adapter implementation's same decision.
|
|
20
|
+
|
|
21
|
+
- **KNOWN GAP (2026-08-06): Forge's own preview shows a red chevron with more chevron-to-label spacing than what's currently implemented here.** Same finding as the mantine-adapter implementation (see its `IMPLEMENTATION_NOTES.md`) — re-verified against both the compiled `recursica_variables_scoped.css` and the raw `recursica_ui-kit.json` (synced the same day): the `tree` schema has no `icon-color` property at all, and `button-node-gap` (used as `.row`'s `gap`) resolves to exactly 4px. Not a mapping bug on our side. Needs a Forge/design follow-up (a bound icon-color variable and a confirmed intended gap value) before this can be fixed with a real token.
|