@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 +8 -7
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
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
|
-
|
|
1120
|
+
forwardRef: field.ref
|
|
1121
1121
|
}
|
|
1122
1122
|
});
|
|
1123
1123
|
const Component = inputConfig.component;
|