@shineuix/react 0.0.0-stage → 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ShineUI contributors
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 CHANGED
@@ -1,3 +1,40 @@
1
- # Temporary Holding Version
1
+ # @shineuix/react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React bindings for ShineUI, one component per element.
4
+
5
+ ```bash
6
+ npm i @shineuix/core @shineuix/react
7
+ ```
8
+
9
+ ```jsx
10
+ import { SuiButton, SuiInputText } from '@shineuix/react';
11
+ import '@shineuix/core/shineui.css';
12
+
13
+ <SuiButton variant="accent" label="Record payment" onClick={recordPayment} />
14
+ <SuiInputText label="Customer email" required onSuiChange={(e) => save(e.detail)} />
15
+ ```
16
+
17
+ Events: every core `suiX` custom event surfaces as an `onSuiX` prop; the payload is `event.detail`.
18
+ Native events (click, focus) are ordinary React props. Complex data (`columns`, `rows`, `options`,
19
+ render functions) pass as normal props; the binding assigns them as element properties, so a
20
+ boolean prop is a property too and `disabled={false}` means enabled.
21
+
22
+ Peer dependencies: React 18 or 19. Install `@shineuix/core` and this package at the same version;
23
+ the bindings pin the core exactly. Vite needs no extra configuration; the package is pure ESM and
24
+ tree-shakes per component, because each wrapper imports only its own element. The one runtime
25
+ dependency is `@lit/react`. `require('@shineuix/react')` resolves through the `default` condition
26
+ and loads on Node 20.19 and later; a Jest project in CommonJS mode also needs
27
+ `transformIgnorePatterns` to let its transform reach `@shineuix`, as the Testing section of the
28
+ [frameworks guide](https://shineui.dev/frameworks) shows.
29
+
30
+ Server rendering: in a server-rendered app (Next.js, Remix) a component renders nothing on the
31
+ server and while the page hydrates, and its element draws in the next render, so hydration reports
32
+ no mismatch; an app that renders only in the browser sees the element in its first render. The
33
+ elements draw into their own light DOM, which React counts among its own children, so markup the
34
+ browser upgraded before React hydrated it would end in hydration error 418 and a rebuild of the
35
+ whole tree. The components carry `'use client'`, so a Next.js App Router Server Component renders
36
+ them directly. `@shineuix/ssr` renders the elements' own markup for pages without React.
37
+
38
+ Documentation, live demos and the API of every element: [shineui.dev](https://shineui.dev).
39
+
40
+ MIT. Copyright 2026 ShineUI contributors.