Admiral moves to the modern React stack. This is a major release: the package is now ESM-only, targets React 19 and React Router 7, and ships two new form capabilities — validation-aware tabs and conditional fields.
Upgrading from v5? Follow MIGRATION.md — every breaking change comes with a before/after snippet. Using an AI coding agent? Hand it MIGRATION_AI.md instead — it's written to be executed.
💥 Breaking changes
- ESM-only package. The CommonJS/UMD bundles are gone; the library ships per-module ESM files (smaller installs, proper tree-shaking).
- Requirements: Node >= 20; peer deps
react@^19,react-dom@^19,react-router-dom@^7,axios@^1. DataProvider/AuthProviderare strictly typed.FormRef.handleSubmitnow returnsPromise<boolean>.useMergedState/useSafeSetStateare no longer exported.Tabs:TabPaneremoved — use theitemsprop.- Notifications mount inside
<Admin>;Tableref is a regular prop; date/time picker types now match runtime behavior.
✨ New
Form.Tabs— validation-aware form tabs: tabs containing invalid fields are highlighted, and a failed submit switches to the first tab with an error. Docs- Conditional & dependent fields —
visibleWhen/disabledWhen/requiredWhenon every form input (as functions or a serializable JSON rule DSL),<Form.When>for groups, and cascading selects viaresetOnChangeOf+ value-awarefetchOptions. Hidden fields are omitted from the payload. Docs - New utility hooks:
useLocalStorageState,useSize,useLatest,useLatestRequest,useDebouncedCallback,useThrottledCallback.
🤖 AI-ready
- AI_GUIDE.md — an exact reference for AI assistants: the DataProvider contract and response shapes, where select/filter options come from, all form inputs, common mistakes. Ships inside the npm package, so agents can read it straight from
node_modules/@devfamily/admiral/. - llms.txt on the demo site.
🐛 Fixed
- File/image upload: clicking the empty form-item area around the upload button no longer opens the file dialog.
🛠 Under the hood
React 19, React Router 7, Vite 6, TypeScript 5.7; rc-* components updated to current majors (incl. stable rc-select); drag-and-drop migrated from react-beautiful-dnd to @dnd-kit; date-fns 4. npm releases are now published with provenance.