@formality-ui/react 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -606,13 +606,14 @@ plain `<input>` use `ref={forwardRef}`. For **MUI v9** components (e.g.
606
606
  slotProps={{ input: { ref: forwardRef } }}
607
607
  ```
608
608
 
609
- **Runtime caveat (important).** Today `Field` delivers the RHF ref via the
610
- React-special `ref` key, **not** a top-level `forwardRef` prop. To receive it
611
- as `forwardRef` on a bare function component, either wrap your component with
612
- `React.forwardRef`, or target React 19's ref-as-prop. Making `Field` deliver a
613
- top-level `forwardRef` key for bare components is a future runtime task; the
614
- type ships the **intended contract now** so consumers can stop hand-rolling
615
- `WithFormality`.
609
+ **Runtime delivery (important).** `<Field>` delivers the RHF ref as a regular,
610
+ top-level `forwardRef` prop no `React.forwardRef` wrap is required for a
611
+ plain function component that destructures `forwardRef` and wires it to the
612
+ inner input (`ref={forwardRef}`). Consumers migrating off the old
613
+ React-special `ref` key: a `React.forwardRef`-wrapped component should consume
614
+ `props.forwardRef` (PRD §20.4), and under React 19 ref-as-prop use `forwardRef`
615
+ directly. The type ships the **intended contract** so consumers can stop
616
+ hand-rolling `WithFormality`.
616
617
 
617
618
  ## Utilities
618
619
 
package/dist/index.cjs CHANGED
@@ -1117,7 +1117,7 @@ function Field({
1117
1117
  [inputConfig.inputFieldProp ?? "value"]: formattedValue,
1118
1118
  onChange: handleChange(field.onChange),
1119
1119
  onBlur: field.onBlur,
1120
- ref: field.ref
1120
+ forwardRef: field.ref
1121
1121
  }
1122
1122
  });
1123
1123
  const Component = inputConfig.component;