@threelight/ui-react 0.1.0-alpha.0 → 0.2.0-alpha.0

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 CHANGED
@@ -1,71 +1,57 @@
1
1
  # @threelight/ui-react
2
2
 
3
- React adapters for the ThreeLight UI HTML/CSS contract.
3
+ React DOM adapters for the ThreeLight short-class CSS contract.
4
4
 
5
5
  ```bash
6
6
  pnpm add @threelight/ui@alpha @threelight/ui-react@alpha
7
7
  ```
8
8
 
9
- `@threelight/ui` is a required peer dependency. It provides the CSS, tokens,
10
- metadata, and public `tl-*` / `data-tl-*` contract that these React wrappers
11
- render.
12
-
13
- Import the core CSS once from your app entrypoint:
9
+ Import the core CSS once:
14
10
 
15
11
  ```tsx
16
12
  import '@threelight/ui/base.css'
17
13
  ```
18
14
 
19
- Use React components as thin wrappers around the public contract:
15
+ Use React components as thin wrappers over `tl-*` classes and `data-tl-*`
16
+ attributes:
20
17
 
21
18
  ```tsx
22
- import { Body, Button, Display, PageHeader } from '@threelight/ui-react'
19
+ import { Button, MetricCard, MetricGroup, Root } from '@threelight/ui-react'
23
20
 
24
- export function ReportsHeader() {
21
+ export function DashboardSummary() {
25
22
  return (
26
- <PageHeader>
27
- <PageHeader.Content>
28
- <Display>Reports</Display>
29
- <Body>Readable governed UI foundations.</Body>
30
- </PageHeader.Content>
31
- <PageHeader.Actions>
32
- <Button tone="primary">New report</Button>
33
- </PageHeader.Actions>
34
- </PageHeader>
23
+ <Root>
24
+ <MetricGroup>
25
+ <MetricCard tone="success">
26
+ <MetricCard.Label>Active users</MetricCard.Label>
27
+ <MetricCard.Value>48,210</MetricCard.Value>
28
+ <MetricCard.Delta>+12.4%</MetricCard.Delta>
29
+ </MetricCard>
30
+ </MetricGroup>
31
+ <Button tone="primary" variant="solid">
32
+ Export
33
+ </Button>
34
+ </Root>
35
35
  )
36
36
  }
37
37
  ```
38
38
 
39
- `tone="neutral"` omits `data-tl-tone`; other tones render `data-tl-tone`.
40
- `state` renders `data-tl-state`. The `as` prop is available on root components.
39
+ Core components include `Button`, `IconButton`, `Badge`, `Alert`, `Card`,
40
+ `Panel`, `Field`, `Input`, `Select`, `Switch`, `Tabs`, `Table`, `CodeBlock`,
41
+ and layout/typography helpers.
41
42
 
42
- ## Components
43
+ Candidate alpha components include `AppShell`, `SideNav`, `Toolbar`,
44
+ `FilterBar`, `MetricCard`, `MetricGroup`, `DataPanel`, `SettingsSection`,
45
+ `Stepper`, `ChoiceCard`, `EmptyState`, `Toast`, and `DocsShell`.
43
46
 
44
- - Root: `Root`
45
- - Layout: `Section`, `Stack`, `Cluster`, `Grid`
46
- - Surfaces: `Card`, `Panel`, `Alert`
47
- - Typography: `Display`, `Heading`, `Body`, `Caption`, `Meta`, `Label`,
48
- `ActionText`, `Metric`, `Code`
49
- - Actions and status: `Button`, `Badge`
50
- - Forms: `Field`, `Input`, `Help`
51
- - Patterns: `PageHeader`, `EmptyState`
47
+ Props such as `tone`, `variant`, `size`, `density`, and `state` render data
48
+ attributes. The React package does not own routing, data fetching, portals, or
49
+ application state.
52
50
 
53
51
  ## Release
54
52
 
55
- Dry-run the package contents:
56
-
57
53
  ```bash
58
54
  pnpm release:ui-react:pack
59
- ```
60
-
61
- Publish an alpha release:
62
-
63
- ```bash
64
55
  pnpm release:ui-react:alpha
65
- ```
66
-
67
- Check published dist-tags:
68
-
69
- ```bash
70
56
  pnpm release:ui-react:tags
71
57
  ```