@cdx-ui/primitives 0.0.1-beta.5 → 0.0.1-beta.7
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 +21 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,33 +20,33 @@ pnpm add @cdx-ui/primitives
|
|
|
20
20
|
|
|
21
21
|
Each `create*` factory accepts a map of base React Native components and returns a compound component with built-in interaction state tracking, accessibility (roles, ARIA props, keyboard handling), and context propagation.
|
|
22
22
|
|
|
23
|
-
| Factory
|
|
24
|
-
|
|
|
25
|
-
| `createButton`
|
|
26
|
-
| `createInput`
|
|
27
|
-
| `createSelect`
|
|
28
|
-
| `createCheckbox` | `Checkbox` + `.Indicator` `.Icon` `.Label` `.Group`
|
|
29
|
-
| `createSwitch`
|
|
30
|
-
| `createLink`
|
|
31
|
-
| `createAvatar`
|
|
32
|
-
| `createDialog`
|
|
33
|
-
| `createField`
|
|
34
|
-
| `createForm`
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
23
|
+
| Factory | Returns |
|
|
24
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| `createButton` | `Button` + `.Text` `.Group` `.Spinner` `.Icon` |
|
|
26
|
+
| `createInput` | `Input` + `.Slot` `.Field` |
|
|
27
|
+
| `createSelect` | `Select` + `.Trigger` `.Value` `.Icon` `.Content` `.Item` `.ItemLabel` |
|
|
28
|
+
| `createCheckbox` | `Checkbox` + `.Indicator` `.Icon` `.Label` `.Group` |
|
|
29
|
+
| `createSwitch` | `Switch` |
|
|
30
|
+
| `createLink` | `Link` |
|
|
31
|
+
| `createAvatar` | `Avatar` + `.Image` `.Text` `.Icon` `.Badge` |
|
|
32
|
+
| `createDialog` | `Dialog` + `.Root` `.Trigger` `.Content` `.Header` `.Title` `.Description` `.Body` `.Footer` `.Close` |
|
|
33
|
+
| `createField` | `Field` + `.Label` `.Helper` `.HelperText` `.Error` `.ErrorText` `.ErrorIcon` |
|
|
34
|
+
| `createForm` | `Form` |
|
|
35
|
+
| `createListItem` | `ListItem` + `.LeadingSlot` `.Content` `.Title` `.Description` `.Meta` `.TrailingSlot` `.SectionHeader` |
|
|
36
|
+
| `createOtpInput` | `OtpInput` + `.Cell` `.Field` |
|
|
37
|
+
| `createProgress` | `Progress` + `.Indicator` |
|
|
37
38
|
|
|
38
39
|
### Utility exports
|
|
39
40
|
|
|
40
|
-
| Export
|
|
41
|
-
|
|
|
42
|
-
| `dataAttributes`
|
|
43
|
-
| `OverlayInsetsProvider` | Context provider for safe-area insets used by overlay/dialog positioning.
|
|
44
|
-
| `InteractionState`
|
|
45
|
-
| `EdgeInsets`
|
|
41
|
+
| Export | Description |
|
|
42
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `dataAttributes` | Builds `data-hover`, `data-active`, `data-focus-visible`, etc. from an `InteractionState` object. |
|
|
44
|
+
| `OverlayInsetsProvider` | Context provider for safe-area insets used by overlay/dialog positioning. |
|
|
45
|
+
| `InteractionState` | Type: `{ hover, focus, active, disabled, focusVisible }`. |
|
|
46
|
+
| `EdgeInsets` | Type: `{ top, right, bottom, left }`. |
|
|
46
47
|
|
|
47
48
|
The dialog module also exports `DialogProvider` and `useDialog()` for imperative control, and the link module exports `LinkProvider` for router integration.
|
|
48
49
|
|
|
49
50
|
## Further reading
|
|
50
51
|
|
|
51
|
-
- [Advanced Usage — Primitives](../../docs/advanced-usage.md) — full examples for every factory, Uniwind integration, type reference
|
|
52
52
|
- [Definitions](../../docs/internal/practices/definitions.md) — artifact taxonomy (primitive vs component vs utility)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/primitives",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.7",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@react-native-aria/interactions": "^0.2.16",
|
|
58
58
|
"@react-stately/checkbox": "3.7.4",
|
|
59
59
|
"@react-stately/toggle": "3.9.4",
|
|
60
|
-
"@cdx-ui/utils": "0.0.1-beta.
|
|
60
|
+
"@cdx-ui/utils": "0.0.1-beta.7"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/react": "*",
|