@hypoth-ui/react 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 hypoth-org
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # @hypoth-ui/react
2
+
3
+ ![Alpha](https://img.shields.io/badge/status-alpha-orange)
4
+
5
+ React adapter components for the hypoth-ui design system. Provides type-safe React wrappers around the underlying Lit Web Components with full support for Server Components and Client Components in Next.js.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @hypoth-ui/react
11
+ ```
12
+
13
+ ### Peer Dependencies
14
+
15
+ ```bash
16
+ npm install @hypoth-ui/wc react react-dom
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```tsx
22
+ import { Button } from '@hypoth-ui/react';
23
+
24
+ function App() {
25
+ return <Button variant="primary">Click me</Button>;
26
+ }
27
+ ```
28
+
29
+ ### Client Components (Next.js App Router)
30
+
31
+ ```tsx
32
+ "use client";
33
+ import { Button, Dialog, Input } from "@hypoth-ui/react/client";
34
+
35
+ function MyComponent() {
36
+ return (
37
+ <Dialog.Root>
38
+ <Dialog.Trigger asChild>
39
+ <Button>Open Dialog</Button>
40
+ </Dialog.Trigger>
41
+ <Dialog.Content>
42
+ <Dialog.Title>Edit Profile</Dialog.Title>
43
+ <Input placeholder="Enter name" />
44
+ </Dialog.Content>
45
+ </Dialog.Root>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ### Compound Component Pattern
51
+
52
+ Most complex components use the compound pattern:
53
+
54
+ ```tsx
55
+ import { Select } from "@hypoth-ui/react";
56
+
57
+ <Select.Root onValueChange={(value) => console.log(value)}>
58
+ <Select.Trigger>
59
+ <Select.Value placeholder="Choose..." />
60
+ </Select.Trigger>
61
+ <Select.Content>
62
+ <Select.Option value="a">Option A</Select.Option>
63
+ <Select.Option value="b">Option B</Select.Option>
64
+ </Select.Content>
65
+ </Select.Root>
66
+ ```
67
+
68
+ ## Documentation
69
+
70
+ See the [main README](../../README.md) for full documentation and architecture overview.
71
+
72
+ ## License
73
+
74
+ MIT