@cdx-ui/primitives 0.0.1-beta.176 → 0.0.1-beta.178
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 +37 -35
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -23,25 +23,26 @@ pnpm add @cdx-ui/primitives
|
|
|
23
23
|
|
|
24
24
|
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.
|
|
25
25
|
|
|
26
|
-
| Export | Description
|
|
27
|
-
| ------------------------------------------------------------------------------------------------------------- |
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
26
|
+
| Export | Description |
|
|
27
|
+
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `AccordionRoot`, `AccordionItemRoot`, `AccordionTriggerRoot`, `AccordionContentRoot` | Concrete accordion primitives (Root owns single/multiple expanded state via `@react-stately/disclosure` + group context; Item owns per-item open/disabled state, `trigger`/`content` id wiring, and item context; Trigger is the toggle `Pressable` with interaction state + `aria-expanded`/`aria-controls`; Content is the collapsible `region` rendered only when open. Label/Title/Description/Indicator/LeadingSlot/Meta live in `@cdx-ui/components`) |
|
|
29
|
+
| `AvatarRoot` | Concrete root primitive (context provider for image load state; Image/Text/Icon/Badge live in `@cdx-ui/components`) |
|
|
30
|
+
| `ButtonRoot` | Concrete root primitive (no sub-slots — Label/Icon/Spinner/Group live in `@cdx-ui/components`) |
|
|
31
|
+
| `CheckboxRoot`, `CheckboxGroup` | Concrete checkbox primitives (Root owns controlled state + ARIA + `.web` split; Group owns group context. Indicator/Icon/Label live in `@cdx-ui/components`) |
|
|
32
|
+
| `ChipRoot` | Concrete root primitive (View/Pressable union with interaction state + context; Label/Icon/Avatar live in `@cdx-ui/components`) |
|
|
33
|
+
| `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`) |
|
|
34
|
+
| `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`) |
|
|
35
|
+
| `FormRoot` | Concrete form primitive (platform-split: `<form>` on web, `View` on native) |
|
|
36
|
+
| `InputRoot`, `InputField` | Concrete input primitives (Root owns input context; Field is platform-split: `.tsx`/`.web.tsx`/`.android.tsx`. Slot lives in `@cdx-ui/components`) |
|
|
37
|
+
| `LinkRoot` | Concrete link primitive (`useLink` press behavior + ARIA + cross-platform routing) |
|
|
38
|
+
| `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`) |
|
|
39
|
+
| `useOtpInput`, `OtpInputField` | Headless hook for OTP state machine + concrete per-cell TextInput primitive (focus management, a11y, autofill; styled layer composes `Input`/`HStack` on top) |
|
|
40
|
+
| `ProgressBarRoot`, `ProgressBarIndicator` | Concrete progress primitives (Root owns percent context; Indicator maps percent to width) |
|
|
41
|
+
| `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`) |
|
|
42
|
+
| `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`) |
|
|
43
|
+
| `SliderRoot`, `SliderRail`, `SliderThumb` | Concrete slider primitives (Root owns clamped/snapped value + orientation + keyboard/drag state + context; Rail owns rail-tap-to-seek + track layout; Thumb owns drag gesture + focus. Track/Popup/Marker/MarkerGroup live in `@cdx-ui/components`) |
|
|
44
|
+
| `useSwitch` | Headless hook for `Switch` (controlled state + ARIA + interaction tracking; styled layer renders the host element) |
|
|
45
|
+
| `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`) |
|
|
45
46
|
|
|
46
47
|
### Utility exports
|
|
47
48
|
|
|
@@ -78,22 +79,23 @@ Standalone helper functions re-exported from the otp-input module for custom OTP
|
|
|
78
79
|
|
|
79
80
|
Several modules export context providers and hooks for reading component state from descendant sub-components or for integrating with external systems (e.g., routing).
|
|
80
81
|
|
|
81
|
-
| Module | Provider(s)
|
|
82
|
-
| --------- |
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
82
|
+
| Module | Provider(s) | Hook(s) | Context value type(s) |
|
|
83
|
+
| --------- | -------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------- |
|
|
84
|
+
| accordion | `AccordionProvider`, `AccordionItemProvider` | `useAccordionContext`, `useAccordionItemContext` | `IAccordionContextValue`, `IAccordionItemContextValue` |
|
|
85
|
+
| avatar | — | `useAvatarContext` | `IAvatarContextValue` |
|
|
86
|
+
| button | — | `useButtonContext` | `InteractionState` |
|
|
87
|
+
| checkbox | — | `useCheckboxContext` | `ICheckboxContextValue` |
|
|
88
|
+
| chip | — | `useChipContext` | `InteractionState` |
|
|
89
|
+
| dialog | `DialogProvider` | `useDialog` | `IDialogContextType` |
|
|
90
|
+
| input | — | `useInputContext` | `IInputContextValue` |
|
|
91
|
+
| link | `LinkProvider`, `LinkInteractionProvider` | `useLink`, `useLinkInteractionContext` | `LinkConfig`, `LinkInteractionState` |
|
|
92
|
+
| list-item | `ListItemProvider` | `useListItemContext` | `InteractionState` |
|
|
93
|
+
| otp-input | `OtpInputProvider`, `OtpCellIndexProvider` | `useOtpInputContext`, `useOtpCellIndexContext` | `OtpInputContextValue`, `OtpInputCellIndexContextValue` |
|
|
94
|
+
| progress | — | `useProgressContext` | `ProgressContextValue` |
|
|
95
|
+
| radio | `RadioProvider` | `useRadioContext` | `IRadioContextValue` |
|
|
96
|
+
| select | — | `useSelectContext`, `useSelectItemContext` | `ISelectContextValue`, `ISelectItemContextValue` |
|
|
97
|
+
| slider | — | `useSliderContext` | `SliderContextValue` |
|
|
98
|
+
| tile | `TileProvider` | `useTileContext` | `ITileContextValue`, `ITileGroupContextValue` |
|
|
97
99
|
|
|
98
100
|
## License
|
|
99
101
|
|
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.178",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@react-stately/disclosure": "3.1.1",
|
|
69
69
|
"@react-stately/radio": "3.12.0",
|
|
70
70
|
"@react-stately/toggle": "3.9.4",
|
|
71
|
-
"@cdx-ui/formatters": "0.0.1-beta.
|
|
72
|
-
"@cdx-ui/utils": "0.0.1-beta.
|
|
71
|
+
"@cdx-ui/formatters": "0.0.1-beta.178",
|
|
72
|
+
"@cdx-ui/utils": "0.0.1-beta.178"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/react": "19.1.17",
|