@cdx-ui/utils 0.0.1-beta.40 → 0.0.1-beta.42
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 +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @cdx-ui/utils
|
|
2
2
|
|
|
3
|
-
Shared utilities used across
|
|
3
|
+
Shared utilities used across FDS packages.
|
|
4
4
|
|
|
5
5
|
Provides common helpers for styling, event handling, state management, and context propagation used by [`@cdx-ui/primitives`](../primitives/) and [`@cdx-ui/components`](../components/).
|
|
6
6
|
|
|
@@ -43,13 +43,13 @@ Used internally by `@cdx-ui/components` to propagate variant props (size, color,
|
|
|
43
43
|
|
|
44
44
|
Low-level form-field state used by the `Field` and `Input` primitives.
|
|
45
45
|
|
|
46
|
-
| Export | Description
|
|
47
|
-
| ------------------------------------- |
|
|
48
|
-
| `useFormControlRoot(props)` | Creates the root state object for a form field (id generation, `aria-describedby` wiring).
|
|
49
|
-
| `useFormControl(props)` | Merges component-level props with inherited form-control context.
|
|
50
|
-
| `useFormControlContext()` | Reads form-control state from the nearest provider.
|
|
46
|
+
| Export | Description |
|
|
47
|
+
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| `useFormControlRoot(props)` | Creates the root state object for a form field (id generation, `aria-describedby` wiring). |
|
|
49
|
+
| `useFormControl(props)` | Merges component-level props with inherited form-control context. |
|
|
50
|
+
| `useFormControlContext()` | Reads form-control state from the nearest provider. |
|
|
51
51
|
| `useReportFormControlLabelFocus(ref)` | Reports label focus/blur events to the parent `FormControlContext` — used by `Field.Label` to trigger `isFocused` styling on the associated input. |
|
|
52
|
-
| `FormControlContext` | The React context object for form-control state propagation.
|
|
52
|
+
| `FormControlContext` | The React context object for form-control state propagation. |
|
|
53
53
|
|
|
54
54
|
## Further reading
|
|
55
55
|
|