Skip to content

Version Packages - #25

Merged
n4ff4h merged 1 commit into
mainfrom
changeset-release/main
Nov 22, 2026
Merged

n4ff4h merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@javaabu/forms@0.1.0

Minor Changes

  • d134eb5: New @javaabu/forms/testing: testAdapter(myAdapter) runs conformance tests that render every component through an adapter and check labels, values, native submission, errors and ARIA. The adapter contract is typed (defineAdapter, FormsComponents and a …SlotProps type per slot) and documented in docs/advanced-usage/adapters.md. @testing-library/react is an optional peer dependency.
  • 450f778: Validation errors are now handled by the core, for every adapter. Errors come from Inertia page props, useForm(), a JSON 422 response, the errors prop or FormsProvider errors. Fields match them in dot or bracket notation, and array fields (tags[]) also collect their items' errors (tags.0). Error bags work with errorBag. New: ErrorSummary, ValidationError, errorsFor, selectErrorBag and useFormState(). Invalid fields get aria-invalid and aria-describedby, and the first one is focused when errors arrive.
  • 204e616: Icons match javaabu/forms (Blade): startIcon, endIcon and the new Icon component take Blade's 30 bundled Lucide names (pencil, trash-2, eye, check, …) or icon font classes. The Onu adapter maps them to Onu's icon names. close and error stay as aliases of x and circle-alert. Adds BUNDLED_ICONS, ICON_ALIASES and resolveIconName() for adapters.
  • 204e616: Custom fields: useFieldState, splitFieldProps and usePublishField (with FieldStateOptions, UseFieldOptions, FieldEntry and FieldKind) are exported from the package root, so fields from other packages get Inertia useForm() data, reset, ConditionalWrapper and errors like the built-in ones. New docs page: Custom fields.
  • a848bef: Strings now come from @javaabu/i18n under the Blade package's keys (forms::strings.nothing_selected), so apps change them in lang/vendor/forms/{locale}/strings.php as they do for the Blade components. Generated labels go through __() by default. The locale follows @javaabu/i18n (<html lang>, setLocale()) instead of Onu's. FormsProvider messages is gone, and the string keys are now snake_case like Blade's (t("nothing_selected")).
  • 50f7d8c: New @javaabu/forms/inertia. <FormsProvider router={inertia}> submits every form as an Inertia visit, with files, method spoofing, error bags, progress, preserveScroll / preserveState (default "errors") and resetOnSuccess. Errors and old input come from the page props. <Form form={useForm(…)}> binds the fields to useForm data, nested names and checkbox groups included. inertiaLinks puts Inertia's Link in the Link slot. Without Inertia, fetchRouter submits JSON requests and shows 422 errors. @inertiajs/react (v2 or v3) is an optional peer dependency.
  • 769399a: Listing components (sortable headings, Filter, PerPage, SearchForm, BulkActions, Pagination) no longer read window.location while rendering, so Inertia SSR pages hydrate without a mismatch. They read the URL from the router's new useUrl() hook (the Inertia router returns usePage().url) or the new FormsProvider url, else the browser's URL after hydration. usePageUrl() and usePageQuery() expose it.
  • e8802cb: Parity with javaabu/forms v2. Form summary now defaults to false, as in Blade; a general message (a failed submit) still shows at the top. Errors and ErrorSummary take bag. Textarea wysiwyg renders the rich text editor. New strings: per_page (the PerPage default label), export_title and export_options. The parity matrix is in docs/parity.md.
  • 6b373d1: Renamed from @javaabu/react-forms to @javaabu/forms. The package now ships CommonJS next to ESM, and builds itself when installed from Git (github:Javaabu/react-forms#next-gen).
  • f2b6c08: A <script> tag build, dist/forms.iife.js (also the package's unpkg/jsdelivr file and @javaabu/forms/browser). It puts every component and the plain HTML adapter on window.JavaabuForms, with React, ReactDOM and @javaabu/i18n bundled in, plus h (React.createElement) and mount(target, node, providerProps), so pages without a bundler can use the forms. examples/script-tag.html shows it in Dhivehi.
  • acd7d02: New @javaabu/forms/shadcn: createShadcnAdapter({ Button, Input, Label, … }) makes an adapter from the app's own shadcn/ui components. Slots whose components are missing fall back to plain HTML. Searchable, multiple, tag and server-searched selects use the shadcn combobox (Popover + Command). Radios in a group now update together with any adapter, Radix's button radios included.
  • 204e616: useTableSelection() gives content inside a Table (its bulkForm, rows, …) the selected and page row ids and setSelected(). bulkForm content is now inside the table's context.
  • 4565fde: The core no longer depends on Onu. Components render through an adapter: <FormsProvider ui={onu}> with onu from @javaabu/forms/onu, and components={{ Select: MySelect }} replaces single components for the whole app or one form. Without an adapter, components render plain HTML (@javaabu/forms/html). Wysiwyg and MapInput are now in the main entry. Onu's editor and maps come from @javaabu/forms/onu/editor and /onu/maps, combined with mergeAdapters(onu, onuEditor, onuMaps). The ./editor and ./maps entries are gone. Onu is now an optional peer dependency (^0.2.1).
  • 19cd33f: Form action accepts Laravel Wayfinder routes: route objects (store()), form variants (update.form(user)) and route functions (update, called with the form's model). The route's method is used unless method is set, with _method spoofing for PUT, PATCH and DELETE. Nothing extra is needed to install.

Patch Changes

  • c0bac9c: Fields are controlled by the core and still submit natively. Model binding, old input (including null old values), nested and array names, checkbox groups, radio groups, relations and date formats follow javaabu/forms. Radios in a group now update together when one is picked.
  • 5b90ef8: A cascade child linked with parent= no longer loses its saved value on mount: it waits for the parent's value, and clears only when that value changes.
  • 85f1598: Date fields no longer move zone-aware values (Laravel's JSON for date casts, 2024-05-01T00:00:00.000000Z) into the browser's time zone. Date keeps the date as written, and the new app_timezone setting (FormsProvider settings) shows every date field in the app's time zone.
  • 2f8f494: Tab panels stay mounted in every adapter (and accordion items in the HTML and shadcn adapters), so fields in other tabs keep their values and submit, as in Blade. The tab or item with an invalid field opens when errors arrive. New for adapters: TabPanel and useReveal. Textarea wysiwyg passes className and onChange on. The docs are rewritten for the adapter-based API, with llms.txt, an API reference, an upgrade guide from @javaabu/react-forms, and a Laravel Boost guideline and skill (javaabu-react-forms).
  • f1f11b8: FilterSubmit export={["csv", "xlsx"]} submits the format (download=csv) instead of the list index.
  • 2d18681: Icon (and startIcon / endIcon) no longer crashes on names like constructor or toString: they render as icon font classes.
  • 6a24455: Submit buttons of the HTML and shadcn adapters submit again with animate. While loading, they use aria-disabled and ignore clicks instead of disabled, because a button disabled during its own click doesn't submit the form. The shadcn adapter now styles Form, DescriptionList, DescriptionItem and EmptyState, and lays out inline fields side by side. New example pages for Inertia and fetch, with a mock Laravel endpoint.
  • 83f43de: MapInput follows a model that loads later and changed lat, lng, radius and polygon props, and returns to its starting values when the form resets.
  • c2e61b5: Number, Latitude and Longitude with decimals now submit the rounded value they report: the HTML and shadcn adapters show it once the input loses focus, and the Onu adapter rounds what it reports. The conformance kit checks it.
  • d52321d: Onu adapter: closed accordion items stay mounted (hidden), so their fields submit, and an item opens when a field inside has an error. The conformance kit's accordion case now runs for Onu.
  • efea03d: Onu maps: every polygon of a bound MULTIPOLYGON boundary can be edited, not just the first. A single boundary still draws one polygon, as in Blade.
  • 4e570f4: Onu adapter: error summary links focus nested fields (items.0.name) and open the tab or accordion item that holds the field, like the other adapters.
  • 70cbc11: Installing from Git no longer fails in CI when pnpm's store is inside node_modules (TS2883 during the prepare build). Wysiwyg, and the Onu editor and maps slots, have explicit return types.
  • 6dc7640: A field that a resetOnSuccess list leaves out keeps its value, even after an earlier reset of every field.
  • c2a5fc1: The HTML adapter flips side-pointing arrows in right-to-left pages. Thaana typing (thaana) is documented and tested for every adapter. Dhivehi lines that need a native speaker's review are listed in docs/advanced-usage/dhivehi-and-rtl.md.
  • 1223666: Fields named like items[0][name] create arrays in useForm() data ({ items: [{ name }] }) instead of objects keyed "0".
  • d1aec40: shadcn adapter: closed accordion panels are hidden again. They stay mounted, so their fields still submit.
  • 7f36bec: shadcn adapter: a clearable simple Select (an optional one with a placeholder, or clearable) shows a Clear button beside the trigger.
  • 1e6ad16: shadcn adapter: a Radio with value="" is no longer always checked.
  • 80cd9cc: shadcn adapter: a Modal's trigger opens it when DialogTrigger isn't passed to createShadcnAdapter, instead of not rendering.
  • 6e29196: shadcn adapter: a remote (isAjax) select keeps the picked option's label after the search changes, instead of showing its id.
  • cc0dcce: Submit's spinner no longer sticks when a native submit doesn't leave the page: it stops on pageshow (back-forward cache) and when a handler prevented the submit.
  • 189aa63: useTableSelection().selected no longer keeps the ids of rows that left the table (pagination with the table still mounted).
  • fe02fa8: A controlled Url now reports the https:// it adds on blur through onChange.
  • 4699087: A radio's or checkbox's default (or bound model value) no longer overrides data that useForm() already holds. The store wins, as it does for value fields.
  • 67f5c6d: File, Image, Hidden and MapInput now write to useForm() data, so <Form form={useForm(…)}> uploads picked files and submits hidden fields (a multi-select's sync_<name>, MapInput's coordinates and boundary). Controlled fields write their value too, and a reset clears a picked file.
  • 45937b6: <Form form={useForm(…)}> no longer replaces your form.transform() on every submit. It sets a transform only to add _method to a multipart PUT / PATCH / DELETE.

@n4ff4h
n4ff4h merged commit 22f94e7 into main Nov 22, 2026
@n4ff4h
n4ff4h deleted the changeset-release/main branch November 22, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant