Behive Tech Component Registry

Form Field Managed

v0.1.8Stable

`FormField` with its react-hook-form wiring already done — the control's value/onChange/onBlur/ref, the label association, and the error message.

pnpm add @behivetech/forms.form-field-managed

Published to npm.pkg.github.com

  • v0.1.8 · current
  • v0.1.4
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
  • v0.0.1

Changelog

v0.1.8

Patch Changes

  • Updated dependencies [0e4857f]
    • @behivetech/forms.form-provider@0.1.7

v0.1.7

Patch Changes

  • 280ec88: docs.json no longer documents the PartialArgsStillWiden type-test fixture: props docs now cover only the components the package exports from index.ts.
    • @behivetech/forms.form-provider@0.1.6

v0.1.6

Patch Changes

  • 0c52e51: Each published package now says what it is and where its docs are: description from the README's first paragraph, and homepage plus a Docs: line in the README pointing at the package's page on https://bht-galaxy.vercel.app, all applied at publish time from one source. Seven READMEs that still said "TODO" have a summary; @behivetech/atoms.stat and @behivetech/cms.base-styles have a README at all; the hand-written props tables are gone from the READMEs, since the Props tab on the site is generated from the interface.
  • Updated dependencies [0c52e51]
    • @behivetech/forms.form-field@0.3.4
    • @behivetech/forms.form-provider@0.1.6

v0.1.5

Patch Changes

  • c733fc5: Published to the public npm registry (registry.npmjs.org, access public, with provenance) instead of GitHub Packages. Install with no registry configuration: pnpm add @behivetech/atoms.button. The versions already on GitHub Packages stay there; nothing in the packages changed.
  • Updated dependencies [c733fc5]
    • @behivetech/forms.form-field@0.3.3
    • @behivetech/forms.form-provider@0.1.5

v0.1.4

Patch Changes

  • e3bf015: Live examples are <name>.example.tsx (was <name>.composition.tsx), following template 0.4.0 of the component registry: the published files list and the docs site's Examples tab use the new name. No component code changed.
  • Updated dependencies [e3bf015]
    • @behivetech/forms.form-field@0.3.2
    • @behivetech/forms.form-provider@0.1.4

v0.1.3

Patch Changes

  • dcbb801: README code samples are complete, runnable examples: each declares the state, data or handler it uses, so the registry site renders them live and they copy-paste as working code. No component code changed.
  • 726a7ab: The component registry is now the bht-component-registry template, adopted into this repo: every package lives at registry/behivetech/<category>/<name> and builds with the template's shared env. Published output is the same code; the class-name helper is bundled into each package instead of being a runtime dependency on @behivetech/get-class-name, the tarball now ships README.md, the source, the compositions and a docs.json the docs site reads, and each package declares license: MIT.
  • Updated dependencies [dcbb801]
  • Updated dependencies [726a7ab]
    • @behivetech/forms.form-provider@0.1.3
    • @behivetech/forms.form-field@0.3.1

v0.1.2

Patch Changes

  • Updated dependencies [a7bf591]
    • @behivetech/forms.form-field@0.3.0
    • @behivetech/forms.form-provider@0.1.2

v0.1.1

Patch Changes

  • f8c57db: Generate TypeScript declarations once per build instead of once per format.

    dist/index.d.cts is no longer emitted. Nothing referenced it: each package's exports["."].types points at dist/index.d.ts, which is unchanged and still covers both the import and require conditions. There are no API, type, or runtime changes.

  • Updated dependencies [f8c57db]

    • @behivetech/forms.form-field@0.2.1
    • @behivetech/forms.form-provider@0.1.2

v0.1.0

Minor Changes

  • b98ff2a: narrow the render prop's value to the named field

    ManagedField and FormFieldManagedProps now take TName as a second type parameter and thread it into ControllerRenderProps. Previously TName sat at its default, so field.value widened to a union of every field type in the form and each call site needed value={field.value as string} — an assertion that keeps compiling if the field later changes type, which is the mistake the generic exists to prevent. rules.validate had the same problem.

    The parameter defaults to the old behaviour, so existing callers, casts and all, keep compiling.

    Getting the narrowing depends on how the generics are supplied. Passing control infers both parameters and needs no annotation. Reading control from context means naming both — <FormFieldManaged<Values, "email">. Supplying only the first, <FormFieldManaged<Values>, does not narrow: TypeScript stops inferring the remaining parameters once any is given explicitly. The README and the component docstring cover both working forms, and a type test now enforces the narrowing under check-types, which spec files are excluded from.

v0.0.1

Patch Changes

  • 0e22d45: Adding react hoook form with form item managed and a couple oof fixes
  • Updated dependencies [0e22d45]
    • @behivetech/forms.form-provider@0.1.1