@cdx-ui/primitives 0.0.1-beta.114 → 0.0.1-beta.115

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.
Files changed (2) hide show
  1. package/README.md +32 -30
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -21,39 +21,41 @@ pnpm add @cdx-ui/primitives
21
21
 
22
22
  Concrete behavioral components with built-in interaction state tracking, accessibility (roles, ARIA props, keyboard handling), and context propagation. Each primitive owns behavior that the styled layer (`@cdx-ui/components`) cannot express with host elements alone.
23
23
 
24
- | Export | Description |
25
- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
- | `AvatarRoot` | Concrete root primitive (context provider for image load state; Image/Text/Icon/Badge live in `@cdx-ui/components`) |
27
- | `ButtonRoot` | Concrete root primitive (no sub-slots — Label/Icon/Spinner/Group live in `@cdx-ui/components`) |
28
- | `CheckboxRoot`, `CheckboxGroup` | Concrete checkbox primitives (Root owns controlled state + ARIA + `.web` split; Group owns group context. Indicator/Icon/Label live in `@cdx-ui/components`) |
29
- | `ChipRoot` | Concrete root primitive (View/Pressable union with interaction state + context; Label/Icon/Avatar live in `@cdx-ui/components`) |
30
- | `DialogRoot`, `DialogTrigger`, `DialogPopup`, `DialogClose` | Concrete dialog primitives (Root owns open state + context; Trigger/Close use `Slot` for `asChild`; Popup owns portal/focus-scope. Header/Title/Description/Content/Footer live in `@cdx-ui/components`) |
31
- | `FieldRoot`, `FieldLabel` | Concrete field primitives (Root provides `FormControlContext`; Label is platform-split: `Text` + focus-bridge on native, `<label htmlFor>` on web; Helper/Error/ErrorIcon live in `@cdx-ui/components`) |
32
- | `FormRoot` | Concrete form primitive (platform-split: `<form>` on web, `View` on native) |
33
- | `InputRoot`, `InputField` | Concrete input primitives (Root owns input context; Field is platform-split: `.tsx`/`.web.tsx`/`.android.tsx`. Slot lives in `@cdx-ui/components`) |
34
- | `LinkRoot` | Concrete link primitive (`useLink` press behavior + ARIA + cross-platform routing) |
35
- | `ListItemRoot` | Concrete root primitive (View/Pressable union with bespoke `asChild` merging — interaction state + context; LeadingSlot/Content/Title/Description/Meta/TrailingSlot/SectionHeader live in `@cdx-ui/components`) |
36
- | `useOtpInput`, `OtpInputField` | Headless hook for OTP state machine + concrete per-cell TextInput primitive (focus management, a11y, autofill; styled layer composes `Input`/`HStack` on top) |
37
- | `ProgressBarRoot`, `ProgressBarIndicator` | Concrete progress primitives (Root owns percent context; Indicator maps percent to width) |
38
- | `RadioRoot`, `RadioGroup` | Concrete radio primitives (Root owns interaction + checked state + `.web` split; Group owns selection contract + group context. Indicator/Label live in `@cdx-ui/components`) |
39
- | `SelectRoot`, `SelectTrigger`, `SelectContent`, `SelectItem` | Concrete select primitives (Root owns controlled value/open state; Trigger is platform-split; Content owns FocusScope + keyboard nav; Item owns selection state. Value/Icon/ItemLabel live in `@cdx-ui/components`) |
40
- | `useSwitch` | Headless hook for `Switch` (controlled state + ARIA + interaction tracking; styled layer renders the host element) |
41
- | `TileRoot`, `TileGroup` | Concrete tile primitives (Root owns interaction + selection state + per-tile context; Group owns selection contract + group context. LeadingSlot/Content/Title/Description/Indicator/TrailingSlot live in `@cdx-ui/components`) |
24
+ | Export | Description |
25
+ | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | `AvatarRoot` | Concrete root primitive (context provider for image load state; Image/Text/Icon/Badge live in `@cdx-ui/components`) |
27
+ | `ButtonRoot` | Concrete root primitive (no sub-slots — Label/Icon/Spinner/Group live in `@cdx-ui/components`) |
28
+ | `CheckboxRoot`, `CheckboxGroup` | Concrete checkbox primitives (Root owns controlled state + ARIA + `.web` split; Group owns group context. Indicator/Icon/Label live in `@cdx-ui/components`) |
29
+ | `ChipRoot` | Concrete root primitive (View/Pressable union with interaction state + context; Label/Icon/Avatar live in `@cdx-ui/components`) |
30
+ | `DialogRoot`, `DialogTrigger`, `DialogPortal`, `DialogOverlay`, `DialogContent`, `DialogPopup`, `DialogClose` | Concrete dialog primitives (Root owns open state + context; Trigger/Close use `Slot` for `asChild`; Portal mounts children into the shared `PortalHost`; Overlay is the dismiss backdrop; Content owns FocusScope + ARIA + Escape/back-button dismissal; `DialogPopup` is the legacy fused panel, kept for back-compat. Header/Title/Description/Content/Footer live in `@cdx-ui/components`) |
31
+ | `FieldRoot`, `FieldLabel` | Concrete field primitives (Root provides `FormControlContext`; Label is platform-split: `Text` + focus-bridge on native, `<label htmlFor>` on web; Helper/Error/ErrorIcon live in `@cdx-ui/components`) |
32
+ | `FormRoot` | Concrete form primitive (platform-split: `<form>` on web, `View` on native) |
33
+ | `InputRoot`, `InputField` | Concrete input primitives (Root owns input context; Field is platform-split: `.tsx`/`.web.tsx`/`.android.tsx`. Slot lives in `@cdx-ui/components`) |
34
+ | `LinkRoot` | Concrete link primitive (`useLink` press behavior + ARIA + cross-platform routing) |
35
+ | `ListItemRoot` | Concrete root primitive (View/Pressable union with bespoke `asChild` merging — interaction state + context; LeadingSlot/Content/Title/Description/Meta/TrailingSlot/SectionHeader live in `@cdx-ui/components`) |
36
+ | `useOtpInput`, `OtpInputField` | Headless hook for OTP state machine + concrete per-cell TextInput primitive (focus management, a11y, autofill; styled layer composes `Input`/`HStack` on top) |
37
+ | `ProgressBarRoot`, `ProgressBarIndicator` | Concrete progress primitives (Root owns percent context; Indicator maps percent to width) |
38
+ | `RadioRoot`, `RadioGroup` | Concrete radio primitives (Root owns interaction + checked state + `.web` split; Group owns selection contract + group context. Indicator/Label live in `@cdx-ui/components`) |
39
+ | `SelectRoot`, `SelectTrigger`, `SelectContent`, `SelectItem` | Concrete select primitives (Root owns controlled value/open state; Trigger is platform-split; Content owns FocusScope + keyboard nav; Item owns selection state. Value/Icon/ItemLabel live in `@cdx-ui/components`) |
40
+ | `useSwitch` | Headless hook for `Switch` (controlled state + ARIA + interaction tracking; styled layer renders the host element) |
41
+ | `TileRoot`, `TileGroup` | Concrete tile primitives (Root owns interaction + selection state + per-tile context; Group owns selection contract + group context. LeadingSlot/Content/Title/Description/Indicator/TrailingSlot live in `@cdx-ui/components`) |
42
42
 
43
43
  ### Utility exports
44
44
 
45
- | Export | Description |
46
- | ------------------------ | ------------------------------------------------------------------------------------------------- |
47
- | `dataAttributes` | Builds `data-hover`, `data-active`, `data-focus-visible`, etc. from an `InteractionState` object. |
48
- | `mergeDataAttributes` | Combines multiple data-attribute sources into one spread (prevents overwrites on web). |
49
- | `domDataAttributes` | Web-specific variant that converts data attributes to DOM-compatible format. |
50
- | `mergeDomDataAttributes` | Web-specific merge variant for combining DOM data attribute sources. |
51
- | `Slot` | Primitives-layer `asChild` implementation — merges props/ref onto the consumer's child element. |
52
- | `FormControlContext` | Re-exported from `@cdx-ui/utils`; shared context for field/form control state. |
53
- | `useFormControlContext` | Re-exported from `@cdx-ui/utils`; reads `FormControlContext` in descendant components. |
54
- | `OverlayInsetsProvider` | Context provider for safe-area insets used by overlay/dialog positioning. |
55
- | `InteractionState` | Type: `{ hover, focus, active, disabled, focusVisible }`. |
56
- | `EdgeInsets` | Type: `{ top, right, bottom, left }`. |
45
+ | Export | Description |
46
+ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47
+ | `dataAttributes` | Builds `data-hover`, `data-active`, `data-focus-visible`, etc. from an `InteractionState` object. |
48
+ | `mergeDataAttributes` | Combines multiple data-attribute sources into one spread (prevents overwrites on web). |
49
+ | `domDataAttributes` | Web-specific variant that converts data attributes to DOM-compatible format. |
50
+ | `mergeDomDataAttributes` | Web-specific merge variant for combining DOM data attribute sources. |
51
+ | `Slot` | Primitives-layer `asChild` implementation — merges props/ref onto the consumer's child element. |
52
+ | `FormControlContext` | Re-exported from `@cdx-ui/utils`; shared context for field/form control state. |
53
+ | `useFormControlContext` | Re-exported from `@cdx-ui/utils`; reads `FormControlContext` in descendant components. |
54
+ | `OverlayInsetsProvider` | Context provider for safe-area insets used by overlay/dialog positioning. |
55
+ | `Portal`, `PortalHost` | Store-backed portal: `Portal` registers children into a named host; `PortalHost` renders them and must be mounted once near the app root (Forge UI's `ForgeDesignProvider` does this). Used by `Dialog`, `Toast`, etc. |
56
+ | `FullWindowOverlay` | iOS wrapper (over `react-native-screens`) that renders overlays in a separate window above native modals/keyboard; pass-through on Android/web. |
57
+ | `InteractionState` | Type: `{ hover, focus, active, disabled, focusVisible }`. |
58
+ | `EdgeInsets` | Type: `{ top, right, bottom, left }`. |
57
59
 
58
60
  ### OTP input utilities
59
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/primitives",
3
- "version": "0.0.1-beta.114",
3
+ "version": "0.0.1-beta.115",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -60,7 +60,7 @@
60
60
  "@react-stately/checkbox": "3.7.4",
61
61
  "@react-stately/radio": "3.12.0",
62
62
  "@react-stately/toggle": "3.9.4",
63
- "@cdx-ui/utils": "0.0.1-beta.114"
63
+ "@cdx-ui/utils": "0.0.1-beta.115"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/react": "19.1.17",