@cdx-ui/utils 0.1.1 → 0.1.3
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 +5 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Shared utilities used across FDS packages.
|
|
6
6
|
|
|
7
|
-
Provides common helpers for styling, event handling, state management, and context propagation used by [`@cdx-ui/primitives`](
|
|
7
|
+
Provides common helpers for styling, event handling, state management, and context propagation used by [`@cdx-ui/primitives`](https://www.npmjs.com/package/@cdx-ui/primitives) and [`@cdx-ui/components`](https://www.npmjs.com/package/@cdx-ui/components).
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ pnpm add @cdx-ui/utils
|
|
|
24
24
|
| `mergeRefs(...refs)` | Combines multiple refs (callback or object) into one ref callback. |
|
|
25
25
|
| `flattenChildren(children)` | Recursively flattens React `children` (including Fragments) into a flat array with re-keyed elements. |
|
|
26
26
|
| `ariaAttr(condition)` | Returns `true` (boolean) or `undefined` — shorthand for boolean ARIA attribute values. |
|
|
27
|
-
| `cva(base, config)` | Class Variance Authority helper for authoring variant-driven `className` builders. `VariantProps<typeof fn>` derives the prop type.
|
|
27
|
+
| `cva(base, config)` | Class Variance Authority helper for authoring variant-driven `className` builders. `VariantProps<typeof fn>` derives the prop type. |
|
|
28
28
|
|
|
29
29
|
### Context
|
|
30
30
|
|
|
@@ -80,11 +80,10 @@ All runtime exports have test coverage using `@testing-library/react-native` (`r
|
|
|
80
80
|
|
|
81
81
|
## Further reading
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
- [Styling practices](../../docs/internal/practices/styling.md) — `cn()` and CVA variant authoring
|
|
83
|
+
The [Forge UI docs site](https://design.candescent.com/docs/getting-started) covers setup and usage. The repository's internal authoring guides cover the patterns behind these helpers — `useControllableState` and `composeEventHandlers` in the state guide, and `cn()` and CVA variant authoring in the styling guide.
|
|
85
84
|
|
|
86
85
|
## License
|
|
87
86
|
|
|
88
|
-
[](
|
|
87
|
+
[](https://opensource.org/licenses/MIT)
|
|
89
88
|
|
|
90
|
-
MIT © 2026 Digital First Holdings LLC.
|
|
89
|
+
MIT © 2026 Digital First Holdings LLC. The full license text ships in the package as `LICENSE`.
|