@lenso/primitives 0.1.0 → 0.2.1
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 +24 -2
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @lenso/primitives
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@lenso/primitives@0.2.0` contains headless, style-free Product Primitives for Lenso UI. The current public surface is the composable Sidebar state and accessibility model:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```bash
|
|
6
|
+
pnpm add @lenso/primitives @base-ui/react react
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Sidebar } from "@lenso/primitives/sidebar";
|
|
11
|
+
|
|
12
|
+
export function AppShell() {
|
|
13
|
+
return (
|
|
14
|
+
<Sidebar.Root defaultOpen>
|
|
15
|
+
<Sidebar.Panel>
|
|
16
|
+
<Sidebar.Content>Navigation</Sidebar.Content>
|
|
17
|
+
</Sidebar.Panel>
|
|
18
|
+
</Sidebar.Root>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`Sidebar` supports controlled and uncontrolled state, independent left and right panels, nested Roots, stable targeting, keyboard dismissal, and focus restoration. Its public API exposes behavior and semantic DOM only; it does not impose StyleX, theme tokens, default CSS, an animation runtime, persistence, or routing.
|
|
24
|
+
|
|
25
|
+
Use `@lenso/ui/sidebar` when you want the Lenso UI visual adapter. The registry also includes an editable Sidebar Recipe for Consumers that need structural ownership.
|
|
26
|
+
|
|
27
|
+
Source and browser tests live under `packages/primitives/src/sidebar`. See the repository [architecture guide](../../docs/architecture.md) for the dependency boundary and the [contributing guide](../../CONTRIBUTING.md) for changes and release verification.
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lenso/primitives",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Headless product primitives for Lenso UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/LioRael/lenso-ui.git",
|
|
9
|
+
"directory": "packages/primitives"
|
|
10
|
+
},
|
|
6
11
|
"files": [
|
|
7
12
|
"dist",
|
|
8
13
|
"README.md"
|