Commit 1536dcd
authored
fix(settings/ui): id-keyed dependencies, RadioImageCard layout, rich-text caret (#99)
* fix(radio-group): enhance styling for RadioImageCard component
* fix(settings): resolve id-keyed dependencies regardless of values keying
evaluateDependencies looked up values[dep.key] directly. When the flat
values map is keyed by the reconstructed dot-path instead of the plain
field id, that lookup misses and every dependency-gated field collapses
to hidden. Add layered resolution: direct id, then optional idIndex, then
last dot-path-segment match. Makes the previously-dormant idIndex param
useful and keeps plain-id dependencies working under either keying.
* style(radio-group): remove RadioImageCard body padding for flush image
* fix(rich-text): stop caret jumping to start on every keystroke
The contentEditable was bound with dangerouslySetInnerHTML={value}, so React
re-applied innerHTML on each keystroke-driven re-render and collapsed the
selection to the start — every typed char appeared to prepend (reversed/RTL
effect). Make it uncontrolled: drop dangerouslySetInnerHTML and only sync the
DOM from value/defaultValue when content differs and the editor isn't focused.
* style(radio-group): make RadioImageCard illustration fill card width
Image rendered at intrinsic size and was centered, leaving asymmetric
whitespace that read as padding. Make the image block w-full and drop the
centering wrapper so the illustration spans the full card width flush.
* fix(radio): make RadioImageCard illustration flush to card edges
The base FieldLabel injects `*:data-[slot=field]:p-3` which targets the child
Field with higher specificity than a `p-0!` on the Field itself, so under the
global !important strategy it could not be overridden there. Neutralise it at the
root via the same child-targeting utility (`*:data-[slot=field]:p-0`); twMerge
collapses p-3 -> p-0 so the illustration sits flush.
* fix(radio): pad RadioImageCard content to match the card header
FieldContent now uses the same px-5 py-4 padding as the header row, so the
illustration is inset consistently with the title instead of bleeding flush.1 parent 942227e commit 1536dcd
3 files changed
Lines changed: 46 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
357 | 369 | | |
358 | 370 | | |
359 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
153 | | - | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | | - | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
162 | | - | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
166 | | - | |
167 | | - | |
| 171 | + | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
175 | | - | |
| 180 | + | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
56 | 63 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
315 | 325 | | |
316 | 326 | | |
317 | 327 | | |
318 | | - | |
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
| |||
0 commit comments