@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,9 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
import { RecursicaTreeProps } from '@recursica/adapter-common';
|
|
4
|
+
export type TreeProps = RecursicaOverStyled<RecursicaTreeProps & Omit<React.ComponentPropsWithoutRef<"ul">, "children">>;
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
6
|
+
* Recursively renders hierarchical `data` as an expandable/selectable tree.
|
|
7
|
+
*
|
|
8
|
+
* **Recursica Abstract:**
|
|
9
|
+
* Wraps `@mui/x-tree-view`'s `RichTreeView` with a fully custom item renderer so every visual
|
|
10
|
+
* aspect (row box model, selected/unselected colors and typography, indent, item spacing)
|
|
11
|
+
* comes from Recursica's `tree` design tokens rather than MUI's defaults.
|
|
8
12
|
*/
|
|
9
|
-
export declare const Tree: React.ForwardRefExoticComponent<
|
|
13
|
+
export declare const Tree: React.ForwardRefExoticComponent<TreeProps & React.RefAttributes<HTMLUListElement>>;
|
package/llms.txt
CHANGED
|
@@ -44,6 +44,7 @@ Each component has its own `USAGE.md` documenting its props, adapter-specific be
|
|
|
44
44
|
- [Group](src/components/Group/USAGE.md)
|
|
45
45
|
- [HoverCard](src/components/HoverCard/USAGE.md)
|
|
46
46
|
- [Label](src/components/Label/USAGE.md)
|
|
47
|
+
- [Layer](src/components/Layer/USAGE.md)
|
|
47
48
|
- [Link](src/components/Link/USAGE.md)
|
|
48
49
|
- [Loader](src/components/Loader/USAGE.md)
|
|
49
50
|
- [Menu](src/components/Menu/USAGE.md)
|
|
@@ -53,6 +54,7 @@ Each component has its own `USAGE.md` documenting its props, adapter-specific be
|
|
|
53
54
|
- [Panel](src/components/Panel/USAGE.md)
|
|
54
55
|
- [Radio](src/components/Radio/USAGE.md)
|
|
55
56
|
- [ReadOnlyField](src/components/ReadOnlyField/USAGE.md)
|
|
57
|
+
- [RecursicaThemeProvider](src/components/RecursicaThemeProvider/USAGE.md)
|
|
56
58
|
- [SegmentedControl](src/components/SegmentedControl/USAGE.md)
|
|
57
59
|
- [Slider](src/components/Slider/USAGE.md)
|
|
58
60
|
- [Stack](src/components/Stack/USAGE.md)
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://github.com/borderux/recursica.git",
|
|
14
14
|
"directory": "packages/mui-adapter"
|
|
15
15
|
},
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.19.0",
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"@chromatic-com/storybook": "^5.1.1",
|
|
65
65
|
"@eslint/js": "^9.25.0",
|
|
66
66
|
"@mui/lab": "^7.0.1-beta.25",
|
|
67
|
+
"@mui/x-tree-view": "^9.11.0",
|
|
67
68
|
"@recursica/recursica-postcss-vars": "*",
|
|
68
69
|
"@recursica/storybook-template": "*",
|
|
69
70
|
"@recursica/token-analyzer": "*",
|
|
@@ -107,12 +108,16 @@
|
|
|
107
108
|
"@emotion/styled": "^11.14.0",
|
|
108
109
|
"@mui/lab": "^7.0.1-beta.25",
|
|
109
110
|
"@mui/material": "^7.3.0",
|
|
111
|
+
"@mui/x-tree-view": "^9.11.0",
|
|
110
112
|
"react": ">=16.8.0",
|
|
111
113
|
"react-dom": ">=16.8.0"
|
|
112
114
|
},
|
|
113
115
|
"peerDependenciesMeta": {
|
|
114
116
|
"@mui/lab": {
|
|
115
117
|
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"@mui/x-tree-view": {
|
|
120
|
+
"optional": true
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
123
|
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/* EXEMPTIONS:
|
|
2
|
+
- accordion-header open-appearance background-color/border-color are ignored because Forge does
|
|
3
|
+
not apply a visual swap on expand, even though the token schema defines "open" appearance
|
|
4
|
+
colors distinct from "closed" (see .control below, which intentionally keeps a constant
|
|
5
|
+
background/border across collapsed/expanded). Mirrors the mantine-adapter reference. */
|
|
6
|
+
/* recursica-ignore: --recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_background-color */
|
|
7
|
+
/* recursica-ignore: --recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_border-color */
|
|
8
|
+
|
|
1
9
|
/* ==== ACCORDION CONTAINER ==== */
|
|
2
10
|
.root {
|
|
3
11
|
box-sizing: border-box;
|
|
@@ -16,7 +24,7 @@
|
|
|
16
24
|
--recursica_ui-kit_components_accordion_properties_colors_border-color
|
|
17
25
|
);
|
|
18
26
|
background-color: var(
|
|
19
|
-
--recursica_ui-kit_components_accordion_properties_colors_background
|
|
27
|
+
--recursica_ui-kit_components_accordion_properties_colors_background-color
|
|
20
28
|
);
|
|
21
29
|
box-shadow: var(--recursica_ui-kit_components_accordion_properties_elevation);
|
|
22
30
|
|
|
@@ -31,7 +39,8 @@
|
|
|
31
39
|
/* ==== ACCORDION ITEM ==== */
|
|
32
40
|
.item {
|
|
33
41
|
box-sizing: border-box;
|
|
34
|
-
margin:
|
|
42
|
+
margin: var(--recursica_ui-kit_components_accordion-item_properties_margin);
|
|
43
|
+
padding: var(--recursica_ui-kit_components_accordion-item_properties_padding);
|
|
35
44
|
position: relative;
|
|
36
45
|
transition: all 0.2s ease;
|
|
37
46
|
|
|
@@ -40,13 +49,13 @@
|
|
|
40
49
|
|
|
41
50
|
border-style: solid;
|
|
42
51
|
border-color: var(
|
|
43
|
-
--recursica_ui-kit_components_accordion-
|
|
52
|
+
--recursica_ui-kit_components_accordion-item_properties_colors_border-color
|
|
44
53
|
);
|
|
45
54
|
border-width: var(
|
|
46
|
-
--recursica_ui-kit_components_accordion-
|
|
55
|
+
--recursica_ui-kit_components_accordion-item_properties_border-size
|
|
47
56
|
);
|
|
48
57
|
border-bottom-color: var(
|
|
49
|
-
--recursica_ui-kit_components_accordion_properties_colors_divider
|
|
58
|
+
--recursica_ui-kit_components_accordion_properties_colors_divider-color
|
|
50
59
|
);
|
|
51
60
|
border-bottom-width: var(
|
|
52
61
|
--recursica_ui-kit_components_accordion_properties_divider-size
|
|
@@ -55,18 +64,11 @@
|
|
|
55
64
|
--recursica_ui-kit_components_accordion-item_properties_border-radius
|
|
56
65
|
);
|
|
57
66
|
box-shadow: var(
|
|
58
|
-
--recursica_ui-kit_components_accordion-item_properties_elevation
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
background-color: var(
|
|
62
|
-
--recursica_ui-kit_components_accordion-item_properties_colors_background-collapsed
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
.item:global(.Mui-expanded) {
|
|
66
|
-
background-color: var(
|
|
67
|
-
--recursica_ui-kit_components_accordion-item_properties_colors_background-expanded
|
|
67
|
+
--recursica_ui-kit_components_accordion-item_properties_elevation
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
|
+
/* The collapsed/expanded background now lives on accordion-header (open/closed appearance),
|
|
71
|
+
applied via .control below, rather than on the item wrapper itself. */
|
|
70
72
|
.noDivider {
|
|
71
73
|
border-bottom: none !important;
|
|
72
74
|
border-bottom-width: 0 !important;
|
|
@@ -81,48 +83,75 @@
|
|
|
81
83
|
justify-content: space-between;
|
|
82
84
|
|
|
83
85
|
/* Re-apply gap defined by UI Kit for icons vs text */
|
|
84
|
-
gap: var(--recursica_ui-kit_components_accordion-
|
|
86
|
+
gap: var(--recursica_ui-kit_components_accordion-header_properties_icon-gap);
|
|
85
87
|
|
|
86
88
|
/* Strip Mantine's baked padding directly */
|
|
87
89
|
padding: var(
|
|
88
|
-
--recursica_ui-kit_components_accordion-
|
|
90
|
+
--recursica_ui-kit_components_accordion-header_properties_vertical-padding
|
|
89
91
|
)
|
|
90
92
|
var(
|
|
91
|
-
--recursica_ui-kit_components_accordion-
|
|
93
|
+
--recursica_ui-kit_components_accordion-header_properties_horizontal-padding
|
|
92
94
|
);
|
|
93
|
-
|
|
95
|
+
|
|
96
|
+
/* Background is intentionally constant across collapsed/expanded (Forge doesn't apply a
|
|
97
|
+
background swap on expand, even though the token schema defines an "open" appearance color) */
|
|
98
|
+
background-color: var(
|
|
99
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_closed_properties_colors_background-color
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
/* Header's own border box, constant across collapsed/expanded (only its closed-state
|
|
103
|
+
border-color is used, matching the background decision above) */
|
|
104
|
+
border-style: solid;
|
|
105
|
+
border-width: var(
|
|
106
|
+
--recursica_ui-kit_components_accordion-header_properties_border-size
|
|
107
|
+
);
|
|
108
|
+
border-radius: var(
|
|
109
|
+
--recursica_ui-kit_components_accordion-header_properties_border-radius
|
|
110
|
+
);
|
|
111
|
+
border-color: var(
|
|
112
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_closed_properties_colors_border-color
|
|
113
|
+
);
|
|
114
|
+
box-shadow: var(
|
|
115
|
+
--recursica_ui-kit_components_accordion-header_properties_elevation
|
|
116
|
+
);
|
|
94
117
|
|
|
95
118
|
transition: background-color 0.15s ease;
|
|
96
119
|
position: relative;
|
|
97
120
|
z-index: 1;
|
|
98
121
|
color: var(
|
|
99
|
-
--recursica_ui-kit_components_accordion-
|
|
122
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_closed_properties_colors_text-color
|
|
100
123
|
);
|
|
101
124
|
|
|
102
125
|
/* Header Typography */
|
|
103
126
|
font-family: var(
|
|
104
|
-
--recursica_ui-kit_components_accordion-
|
|
127
|
+
--recursica_ui-kit_components_accordion-header_properties_text_font-family
|
|
105
128
|
);
|
|
106
129
|
font-size: var(
|
|
107
|
-
--recursica_ui-kit_components_accordion-
|
|
130
|
+
--recursica_ui-kit_components_accordion-header_properties_text_font-size
|
|
108
131
|
);
|
|
109
132
|
font-weight: var(
|
|
110
|
-
--recursica_ui-kit_components_accordion-
|
|
133
|
+
--recursica_ui-kit_components_accordion-header_properties_text_font-weight
|
|
111
134
|
);
|
|
112
135
|
font-style: var(
|
|
113
|
-
--recursica_ui-kit_components_accordion-
|
|
136
|
+
--recursica_ui-kit_components_accordion-header_properties_text_font-style
|
|
114
137
|
);
|
|
115
138
|
letter-spacing: var(
|
|
116
|
-
--recursica_ui-kit_components_accordion-
|
|
139
|
+
--recursica_ui-kit_components_accordion-header_properties_text_letter-spacing
|
|
117
140
|
);
|
|
118
141
|
line-height: var(
|
|
119
|
-
--recursica_ui-kit_components_accordion-
|
|
142
|
+
--recursica_ui-kit_components_accordion-header_properties_text_line-height
|
|
120
143
|
);
|
|
121
144
|
text-decoration: var(
|
|
122
|
-
--recursica_ui-kit_components_accordion-
|
|
145
|
+
--recursica_ui-kit_components_accordion-header_properties_text_text-decoration
|
|
123
146
|
);
|
|
124
147
|
text-transform: var(
|
|
125
|
-
--recursica_ui-kit_components_accordion-
|
|
148
|
+
--recursica_ui-kit_components_accordion-header_properties_text_text-transform
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.item:global(.Mui-expanded) .control {
|
|
153
|
+
color: var(
|
|
154
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_text-color
|
|
126
155
|
);
|
|
127
156
|
}
|
|
128
157
|
|
|
@@ -139,11 +168,14 @@
|
|
|
139
168
|
margin: 0 !important;
|
|
140
169
|
}
|
|
141
170
|
|
|
142
|
-
/* Mantine natively places hover states on the control node.
|
|
143
|
-
|
|
144
|
-
|
|
171
|
+
/* Mantine natively places hover states on the control node. We explicitly re-apply our own
|
|
172
|
+
constant background (MUI's native :hover CSS would otherwise show through) and use an
|
|
173
|
+
overlay ::after structure with the generic hover tokens for the actual hover tint; no per-item
|
|
174
|
+
hover-color/hover-opacity tokens exist anymore. */
|
|
145
175
|
.control:hover {
|
|
146
|
-
background-color:
|
|
176
|
+
background-color: var(
|
|
177
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_closed_properties_colors_background-color
|
|
178
|
+
);
|
|
147
179
|
}
|
|
148
180
|
.control::after {
|
|
149
181
|
content: "";
|
|
@@ -152,16 +184,12 @@
|
|
|
152
184
|
border-radius: inherit;
|
|
153
185
|
z-index: -1;
|
|
154
186
|
pointer-events: none;
|
|
155
|
-
background-color: var(
|
|
156
|
-
--recursica_ui-kit_components_accordion-item_properties_hover-color
|
|
157
|
-
);
|
|
187
|
+
background-color: var(--recursica_brand_states_hover_color);
|
|
158
188
|
opacity: 0;
|
|
159
189
|
transition: opacity 150ms ease;
|
|
160
190
|
}
|
|
161
191
|
.control:hover:not(:disabled)::after {
|
|
162
|
-
opacity: var(
|
|
163
|
-
--recursica_ui-kit_components_accordion-item_properties_hover-opacity
|
|
164
|
-
);
|
|
192
|
+
opacity: var(--recursica_brand_states_hover_opacity);
|
|
165
193
|
}
|
|
166
194
|
|
|
167
195
|
/* Label logic inside the Control wrapper */
|
|
@@ -176,13 +204,13 @@
|
|
|
176
204
|
.chevron {
|
|
177
205
|
flex-shrink: 0;
|
|
178
206
|
width: var(
|
|
179
|
-
--recursica_ui-kit_components_accordion-
|
|
207
|
+
--recursica_ui-kit_components_accordion-header_properties_icon-right-size
|
|
180
208
|
);
|
|
181
209
|
height: var(
|
|
182
|
-
--recursica_ui-kit_components_accordion-
|
|
210
|
+
--recursica_ui-kit_components_accordion-header_properties_icon-right-size
|
|
183
211
|
);
|
|
184
212
|
color: var(
|
|
185
|
-
--recursica_ui-kit_components_accordion-
|
|
213
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_closed_properties_colors_icon-color
|
|
186
214
|
);
|
|
187
215
|
margin: 0;
|
|
188
216
|
transition: transform 200ms ease;
|
|
@@ -197,6 +225,9 @@
|
|
|
197
225
|
}
|
|
198
226
|
.item:global(.Mui-expanded) .chevron {
|
|
199
227
|
transform: rotate(180deg);
|
|
228
|
+
color: var(
|
|
229
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_icon-color
|
|
230
|
+
);
|
|
200
231
|
}
|
|
201
232
|
|
|
202
233
|
/* ==== LEFT ICON / CUSTOM ICONS ==== */
|
|
@@ -206,13 +237,18 @@
|
|
|
206
237
|
align-items: center;
|
|
207
238
|
justify-content: center;
|
|
208
239
|
width: var(
|
|
209
|
-
--recursica_ui-kit_components_accordion-
|
|
240
|
+
--recursica_ui-kit_components_accordion-header_properties_icon-left-size
|
|
210
241
|
);
|
|
211
242
|
height: var(
|
|
212
|
-
--recursica_ui-kit_components_accordion-
|
|
243
|
+
--recursica_ui-kit_components_accordion-header_properties_icon-left-size
|
|
244
|
+
);
|
|
245
|
+
color: var(
|
|
246
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_closed_properties_colors_icon-color
|
|
213
247
|
);
|
|
248
|
+
}
|
|
249
|
+
.item:global(.Mui-expanded) .iconLeftWrapper {
|
|
214
250
|
color: var(
|
|
215
|
-
--recursica_ui-kit_components_accordion-
|
|
251
|
+
--recursica_ui-kit_components_accordion-header_variants_appearance_open_properties_colors_icon-color
|
|
216
252
|
);
|
|
217
253
|
}
|
|
218
254
|
.iconLeftWrapper > * {
|
|
@@ -225,24 +261,24 @@
|
|
|
225
261
|
.panel {
|
|
226
262
|
box-sizing: border-box;
|
|
227
263
|
margin: var(
|
|
228
|
-
--recursica_ui-kit_components_accordion-
|
|
264
|
+
--recursica_ui-kit_components_accordion-content_properties_margin
|
|
229
265
|
);
|
|
230
266
|
padding: 0; /* Overriding dynamic layout structure */
|
|
231
267
|
background-color: var(
|
|
232
|
-
--recursica_ui-kit_components_accordion-
|
|
268
|
+
--recursica_ui-kit_components_accordion-content_properties_colors_background-color
|
|
233
269
|
);
|
|
234
270
|
border-style: solid;
|
|
235
271
|
border-color: var(
|
|
236
|
-
--recursica_ui-kit_components_accordion-
|
|
272
|
+
--recursica_ui-kit_components_accordion-content_properties_colors_border-color
|
|
237
273
|
);
|
|
238
274
|
border-width: var(
|
|
239
|
-
--recursica_ui-kit_components_accordion-
|
|
275
|
+
--recursica_ui-kit_components_accordion-content_properties_border-size
|
|
240
276
|
);
|
|
241
277
|
border-radius: var(
|
|
242
|
-
--recursica_ui-kit_components_accordion-
|
|
278
|
+
--recursica_ui-kit_components_accordion-content_properties_border-radius
|
|
243
279
|
);
|
|
244
280
|
box-shadow: var(
|
|
245
|
-
--recursica_ui-kit_components_accordion-
|
|
281
|
+
--recursica_ui-kit_components_accordion-content_properties_elevation
|
|
246
282
|
);
|
|
247
283
|
}
|
|
248
284
|
|
|
@@ -251,44 +287,44 @@
|
|
|
251
287
|
/* Strip Mantine padding and apply logic directly mapped */
|
|
252
288
|
padding: 0
|
|
253
289
|
var(
|
|
254
|
-
--recursica_ui-kit_components_accordion-
|
|
290
|
+
--recursica_ui-kit_components_accordion-content_properties_horizontal-padding
|
|
255
291
|
)
|
|
256
292
|
var(
|
|
257
|
-
--recursica_ui-kit_components_accordion-
|
|
293
|
+
--recursica_ui-kit_components_accordion-content_properties_bottom-padding
|
|
258
294
|
);
|
|
259
295
|
|
|
260
296
|
/* Apply offset gap explicitly calculated below header */
|
|
261
297
|
padding-top: var(
|
|
262
|
-
--recursica_ui-kit_components_accordion-
|
|
298
|
+
--recursica_ui-kit_components_accordion-content_properties_top-padding
|
|
263
299
|
);
|
|
264
300
|
|
|
265
301
|
color: var(
|
|
266
|
-
--recursica_ui-kit_components_accordion-
|
|
302
|
+
--recursica_ui-kit_components_accordion-content_properties_colors_text-color
|
|
267
303
|
);
|
|
268
304
|
|
|
269
305
|
/* Content Typography */
|
|
270
306
|
font-family: var(
|
|
271
|
-
--recursica_ui-kit_components_accordion-
|
|
307
|
+
--recursica_ui-kit_components_accordion-content_properties_text_font-family
|
|
272
308
|
);
|
|
273
309
|
font-size: var(
|
|
274
|
-
--recursica_ui-kit_components_accordion-
|
|
310
|
+
--recursica_ui-kit_components_accordion-content_properties_text_font-size
|
|
275
311
|
);
|
|
276
312
|
font-weight: var(
|
|
277
|
-
--recursica_ui-kit_components_accordion-
|
|
313
|
+
--recursica_ui-kit_components_accordion-content_properties_text_font-weight
|
|
278
314
|
);
|
|
279
315
|
font-style: var(
|
|
280
|
-
--recursica_ui-kit_components_accordion-
|
|
316
|
+
--recursica_ui-kit_components_accordion-content_properties_text_font-style
|
|
281
317
|
);
|
|
282
318
|
letter-spacing: var(
|
|
283
|
-
--recursica_ui-kit_components_accordion-
|
|
319
|
+
--recursica_ui-kit_components_accordion-content_properties_text_letter-spacing
|
|
284
320
|
);
|
|
285
321
|
line-height: var(
|
|
286
|
-
--recursica_ui-kit_components_accordion-
|
|
322
|
+
--recursica_ui-kit_components_accordion-content_properties_text_line-height
|
|
287
323
|
);
|
|
288
324
|
text-decoration: var(
|
|
289
|
-
--recursica_ui-kit_components_accordion-
|
|
325
|
+
--recursica_ui-kit_components_accordion-content_properties_text_text-decoration
|
|
290
326
|
);
|
|
291
327
|
text-transform: var(
|
|
292
|
-
--recursica_ui-kit_components_accordion-
|
|
328
|
+
--recursica_ui-kit_components_accordion-content_properties_text_text-transform
|
|
293
329
|
);
|
|
294
330
|
}
|
|
@@ -7,21 +7,34 @@
|
|
|
7
7
|
/* recursica-ignore: --recursica_ui-kit_components_autocomplete_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 --autocomplete-control-{max,min}-width hooks consumed inline in Autocomplete.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_autocomplete_variants_layouts_stacked_properties_top-bottom-margin
|
|
14
16
|
);
|
|
17
|
+
--autocomplete-control-max-width: var(
|
|
18
|
+
--recursica_ui-kit_components_autocomplete_variants_layouts_stacked_properties_max-width
|
|
19
|
+
);
|
|
20
|
+
--autocomplete-control-min-width: var(
|
|
21
|
+
--recursica_ui-kit_components_autocomplete_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_autocomplete_variants_layouts_side-by-side_properties_top-bottom-margin
|
|
20
28
|
);
|
|
29
|
+
--autocomplete-control-max-width: var(
|
|
30
|
+
--recursica_ui-kit_components_autocomplete_variants_layouts_side-by-side_properties_max-width
|
|
31
|
+
);
|
|
32
|
+
--autocomplete-control-min-width: var(
|
|
33
|
+
--recursica_ui-kit_components_autocomplete_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.
|
|
@@ -31,9 +44,7 @@
|
|
|
31
44
|
display: flex;
|
|
32
45
|
position: relative;
|
|
33
46
|
width: 100% !important; /* Override MUI default 300px width */
|
|
34
|
-
min-height: var(
|
|
35
|
-
--recursica_ui-kit_components_autocomplete_properties_min-height
|
|
36
|
-
);
|
|
47
|
+
min-height: var(--recursica_ui-kit_components_autocomplete_properties_height);
|
|
37
48
|
|
|
38
49
|
/* Override Mantine native Input variables governing section spacing padding mathematics safely */
|
|
39
50
|
--input-left-section-size: calc(
|
|
@@ -66,9 +77,7 @@
|
|
|
66
77
|
margin: 0;
|
|
67
78
|
|
|
68
79
|
/* Box Geometry */
|
|
69
|
-
min-height: var(
|
|
70
|
-
--recursica_ui-kit_components_autocomplete_properties_min-height
|
|
71
|
-
);
|
|
80
|
+
min-height: var(--recursica_ui-kit_components_autocomplete_properties_height);
|
|
72
81
|
padding-top: var(
|
|
73
82
|
--recursica_ui-kit_components_autocomplete_properties_vertical-padding
|
|
74
83
|
) !important;
|
|
@@ -84,7 +93,9 @@
|
|
|
84
93
|
border-radius: var(
|
|
85
94
|
--recursica_ui-kit_components_autocomplete_properties_border-radius
|
|
86
95
|
);
|
|
87
|
-
border-width:
|
|
96
|
+
border-width: var(
|
|
97
|
+
--recursica_ui-kit_components_autocomplete_properties_border-size
|
|
98
|
+
);
|
|
88
99
|
border-style: solid;
|
|
89
100
|
|
|
90
101
|
/* Strict Typography Unification */
|
|
@@ -115,13 +126,13 @@
|
|
|
115
126
|
|
|
116
127
|
/* Base State Default Execution */
|
|
117
128
|
background-color: var(
|
|
118
|
-
--recursica_ui-
|
|
129
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_background-color
|
|
119
130
|
);
|
|
120
131
|
border-color: var(
|
|
121
|
-
--recursica_ui-
|
|
132
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_border-color
|
|
122
133
|
);
|
|
123
134
|
color: var(
|
|
124
|
-
--recursica_ui-
|
|
135
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_text-color
|
|
125
136
|
);
|
|
126
137
|
|
|
127
138
|
outline: none;
|
|
@@ -175,13 +186,13 @@
|
|
|
175
186
|
width: var(--recursica_ui-kit_components_autocomplete_properties_icon-size);
|
|
176
187
|
height: var(--recursica_ui-kit_components_autocomplete_properties_icon-size);
|
|
177
188
|
color: var(
|
|
178
|
-
--recursica_ui-
|
|
189
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_leading-icon
|
|
179
190
|
);
|
|
180
191
|
}
|
|
181
192
|
|
|
182
193
|
.section[data-position="right"] :global(svg) {
|
|
183
194
|
color: var(
|
|
184
|
-
--recursica_ui-
|
|
195
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_trailing-icon
|
|
185
196
|
);
|
|
186
197
|
}
|
|
187
198
|
|
|
@@ -189,11 +200,11 @@
|
|
|
189
200
|
/* We want to make sure the dropdown inherits font correctly. */
|
|
190
201
|
.dropdown {
|
|
191
202
|
background-color: var(
|
|
192
|
-
--recursica_ui-
|
|
203
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_background-color
|
|
193
204
|
);
|
|
194
205
|
border: 1px solid
|
|
195
206
|
var(
|
|
196
|
-
--recursica_ui-
|
|
207
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_border-color
|
|
197
208
|
);
|
|
198
209
|
border-radius: var(
|
|
199
210
|
--recursica_ui-kit_components_autocomplete_properties_border-radius
|
|
@@ -212,7 +223,7 @@
|
|
|
212
223
|
--recursica_ui-kit_components_autocomplete_properties_text_font-weight
|
|
213
224
|
);
|
|
214
225
|
color: var(
|
|
215
|
-
--recursica_ui-
|
|
226
|
+
--recursica_ui-kit_components_autocomplete_properties_colors_text-color
|
|
216
227
|
);
|
|
217
228
|
padding: calc(
|
|
218
229
|
var(
|
|
@@ -226,6 +237,8 @@
|
|
|
226
237
|
cursor: pointer;
|
|
227
238
|
}
|
|
228
239
|
|
|
240
|
+
/* No per-option selected/hovered tokens exist in the schema; use the generic overlay tint
|
|
241
|
+
(same technique as Table/Dropdown) to highlight the active option. */
|
|
229
242
|
.option[data-selected="true"],
|
|
230
243
|
.option[data-selected],
|
|
231
244
|
.option[data-combobox-selected="true"],
|
|
@@ -235,11 +248,11 @@
|
|
|
235
248
|
.option[data-hovered="true"],
|
|
236
249
|
.option[data-hovered],
|
|
237
250
|
.option:hover {
|
|
238
|
-
background-color:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
251
|
+
background-color: color-mix(
|
|
252
|
+
in srgb,
|
|
253
|
+
var(--recursica_brand_states_hover_color)
|
|
254
|
+
calc(var(--recursica_brand_states_hover_opacity) * 100%),
|
|
255
|
+
transparent
|
|
243
256
|
);
|
|
244
257
|
}
|
|
245
258
|
|
|
@@ -248,29 +261,16 @@
|
|
|
248
261
|
-------------------------------------- */
|
|
249
262
|
|
|
250
263
|
/* Focus State Mapping (Triggered internally via browser pseudo-pseudo-class) */
|
|
264
|
+
/* The token schema no longer provides per-component focus colors; apply the generic focus ring
|
|
265
|
+
tokens as a box-shadow ring instead of a color swap. */
|
|
251
266
|
.input:focus-within,
|
|
252
267
|
.input:focus {
|
|
253
|
-
|
|
254
|
-
--
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
color: var(
|
|
260
|
-
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_text
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.root:focus-within .section[data-position="left"] :global(svg) {
|
|
265
|
-
color: var(
|
|
266
|
-
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_leading-icon
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.root:focus-within .section[data-position="right"] :global(svg) {
|
|
271
|
-
color: var(
|
|
272
|
-
--recursica_ui-kit_components_autocomplete_variants_states_focus_properties_colors_trailing-icon
|
|
273
|
-
);
|
|
268
|
+
box-shadow:
|
|
269
|
+
0 0 0 var(--recursica_brand_states_focus_border-size)
|
|
270
|
+
var(--recursica_brand_states_focus_color),
|
|
271
|
+
0 0 var(--recursica_brand_states_focus_blur)
|
|
272
|
+
var(--recursica_brand_states_focus_margin)
|
|
273
|
+
var(--recursica_brand_states_focus_color);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
@@ -279,10 +279,10 @@
|
|
|
279
279
|
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_border-color
|
|
280
280
|
);
|
|
281
281
|
background-color: var(
|
|
282
|
-
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_background
|
|
282
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_background-color
|
|
283
283
|
);
|
|
284
284
|
color: var(
|
|
285
|
-
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_text
|
|
285
|
+
--recursica_ui-kit_components_autocomplete_variants_states_error_properties_colors_text-color
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -304,10 +304,13 @@
|
|
|
304
304
|
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_border-color
|
|
305
305
|
);
|
|
306
306
|
background-color: var(
|
|
307
|
-
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_background
|
|
307
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_background-color
|
|
308
308
|
);
|
|
309
309
|
color: var(
|
|
310
|
-
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_text
|
|
310
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_colors_text-color
|
|
311
|
+
);
|
|
312
|
+
opacity: var(
|
|
313
|
+
--recursica_ui-kit_components_autocomplete_variants_states_disabled_properties_opacity
|
|
311
314
|
);
|
|
312
315
|
}
|
|
313
316
|
|
|
@@ -122,8 +122,8 @@ export const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(
|
|
|
122
122
|
<WithReadOnlyWrapper
|
|
123
123
|
className={wrapperClass}
|
|
124
124
|
style={style as React.CSSProperties}
|
|
125
|
-
controlMaxWidth="var(--
|
|
126
|
-
controlMinWidth="var(--
|
|
125
|
+
controlMaxWidth="var(--autocomplete-control-max-width)"
|
|
126
|
+
controlMinWidth="var(--autocomplete-control-min-width)"
|
|
127
127
|
overStyled={overStyled as true}
|
|
128
128
|
formLayout={formLayout}
|
|
129
129
|
labelSize={labelSize}
|