You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the two Radix dependencies while keeping the helper pattern intact.
35
-
36
-
**Changes:**
37
-
38
-
-`FormLabel`: replace `@radix-ui/react-label` + `Label` with a plain `<label>` element.
39
-
-`FormControl`: replace `@radix-ui/react-slot``Slot` with a lightweight wrapper that clones the child and merges `id` + `aria-*` props using `React.cloneElement`, keeping accessibility intact.
`FormField`, `FormItem`, `FormDescription`, `FormMessage` require no changes (no Radix).
43
-
44
-
---
45
-
46
24
### Phase 2 — Move all Default components to `examples/`
47
25
48
26
All files in `src/components/form/fields/default/` are reference implementations that depend on Radix-backed `ui/` components. Move them to `examples/fields/`.
@@ -139,45 +117,6 @@ These pure-HTML components have no Radix dependency but are still visual. Move t
139
117
140
118
---
141
119
142
-
### Phase 4 — Make flows with embedded visual components headless
143
-
144
-
For each flow component that directly renders visual elements (Card, Button, Alert, Accordion), replace the hardcoded component with either:
145
-
146
-
-**Component override slot** via a `components` prop (preferred for public-facing output components).
147
-
-**Native HTML equivalent** where the component is simple enough (e.g., `Button` → `<button>`, `Card` → `<div>`).
148
-
149
-
#### 4a. `EstimationResults`
150
-
151
-
Currently accepts a partial `components` prop. Extend it to cover all internal visual dependencies:
The default for each slot is a plain HTML fallback (no Radix).
166
-
167
-
#### 4b. `SummaryResults`
168
-
169
-
Same approach — accept `Card` and `Accordion` overrides. Provide plain HTML defaults.
170
-
171
-
#### 4d. `Termination/PaidTimeOff`
172
-
173
-
Replace `Button` import with a `components?.button` override or a plain `<button>`.
174
-
175
-
#### 4f. `ActionsDropdown`
176
-
177
-
Replace `Button` from `ui/button` with a native `<button>` element directly. `ActionsDropdown` is already a plain dropdown with no Radix — only the `Button` wrapper is Radix-backed.
178
-
179
-
---
180
-
181
120
### Phase 5 — Remove all `@radix-ui/*` from `package.json`
182
121
183
122
After phases 1–4, verify no file in `src/` imports from `@radix-ui/*`. Then remove all 11 Radix entries from `package.json` dependencies.
@@ -246,8 +185,4 @@ examples/
246
185
247
186
## Open questions before starting
248
187
249
-
1.**`form.tsx``FormControl` replacement**: Use `React.cloneElement` or remove entirely? Since Default components move to examples and those are the only `FormControl` consumers, we could remove `FormControl` from the core export and let examples bring their own version.
250
-
251
-
2.**`EstimationResults` plain HTML defaults**: When no `Card`/`Accordion` override is given, should the component render plain `<div>` fallbacks (keeping it functional but unstyled), or should it throw (forcing the consumer to provide all slots)? Recommendation: plain `<div>` fallbacks so the component works out-of-the-box without any Radix.
252
-
253
-
3.**Naming the examples folder**: `examples/` vs `packages/ui/` vs keeping it in the repo as a separate package. TBD with team.
188
+
1.**Naming the examples folder**: `examples/` vs `packages/ui/` vs keeping it in the repo as a separate package. TBD with team.
0 commit comments