opus-react 0.2.3

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 ADDED
@@ -0,0 +1,81 @@
1
+ # opus-react
2
+
3
+ React component library for the Opus design system.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install opus-react
9
+ ```
10
+
11
+ Peer dependencies:
12
+
13
+ ```bash
14
+ npm install react react-dom
15
+ # Optional, for 3D model components:
16
+ npm install three
17
+ ```
18
+
19
+ ## Setup
20
+
21
+ Import theme tokens and component styles, then wrap your app with `OpusThemeProvider`:
22
+
23
+ ```tsx
24
+ import "opus-react/styles.css";
25
+ import "opus-react/index.css";
26
+ import { OpusThemeProvider, Button, TextField } from "opus-react";
27
+
28
+ export function App() {
29
+ return (
30
+ <OpusThemeProvider theme="dark">
31
+ <div data-theme="dark">
32
+ <Button variant="primary">Save</Button>
33
+ </div>
34
+ </OpusThemeProvider>
35
+ );
36
+ }
37
+ ```
38
+
39
+ Set `data-theme="light"` or `data-theme="dark"` on a container (or `document.documentElement`) so CSS variables resolve.
40
+
41
+ ## Next.js
42
+
43
+ Add to `next.config.ts`:
44
+
45
+ ```ts
46
+ const nextConfig = {
47
+ transpilePackages: ["opus-react"],
48
+ };
49
+ ```
50
+
51
+ ## Accent colour
52
+
53
+ ```tsx
54
+ import { AccentColorPicker, createAccentStyle } from "opus-react";
55
+
56
+ <div style={createAccentStyle("#8f6cff")} data-theme="dark">
57
+ ...
58
+ </div>
59
+ ```
60
+
61
+ ## Publish
62
+
63
+ From the monorepo root:
64
+
65
+ ```bash
66
+ npm run build:lib
67
+ npm publish -w opus-react --access public
68
+ ```
69
+
70
+ Set the package `name` in `packages/opus-react/package.json` to your scoped name (for example `@your-org/opus-react`) before publishing.
71
+
72
+ ## What's included
73
+
74
+ - Form fields (text, select, chip input, colour picker, etc.)
75
+ - Overlays (modal, drawer, dialog, popover, toast)
76
+ - Content (card, table, data grid, tabs, accordion)
77
+ - Navigation (sidebar, mega menu, top navigation)
78
+ - Charts, gauges, and dashboard widgets
79
+ - `AccentColorPicker`, `IconPicker`, `CatalogIcon`
80
+
81
+ Documentation site shells, control preview tooling, and generated usage code are **not** published in this package.