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
Document and type the adapter contract so developers can add their own UI framework. Provide an adapter test kit (shared conformance tests an adapter author runs) and a minimal example adapter (plain HTML elements).
Contract:src/core/adapter.ts. defineAdapter(), mergeAdapters(), FormsComponents and one …SlotProps type per slot, all exported from @javaabu/forms.
Docs:docs/advanced-usage/adapters.md covers the rules, the slot table and a worked example.
Test kit:@javaabu/forms/testing. Use testAdapter(adapter, { describe?, it?, skip?, wrapper? }) with any runner, or adapterConformance() to get the raw cases. It has 19 cases: labels, values, FormData, errors and ARIA, the summary, submit state, and display content. It uses plain assertions, so it doesn't depend on a test framework; @testing-library/react is an optional peer.
Minimal example adapter: the HTML adapter (@javaabu/forms/html) is the reference implementation and the fallback for missing slots. The examples/html.html page styles it through data-slot attributes.
Activity
Adapter contract, HTML base adapter and conformance test kit
n4ff4h commentedon Nov 4, 2026
Done on
next-gen(d134eb5).src/core/adapter.ts.defineAdapter(),mergeAdapters(),FormsComponentsand one…SlotPropstype per slot, all exported from@javaabu/forms.docs/advanced-usage/adapters.mdcovers the rules, the slot table and a worked example.@javaabu/forms/testing. UsetestAdapter(adapter, { describe?, it?, skip?, wrapper? })with any runner, oradapterConformance()to get the raw cases. It has 19 cases: labels, values,FormData, errors and ARIA, the summary, submit state, and display content. It uses plain assertions, so it doesn't depend on a test framework;@testing-library/reactis an optional peer.@javaabu/forms/html) is the reference implementation and the fallback for missing slots. Theexamples/html.htmlpage styles it throughdata-slotattributes.