orynn 0.1.0 → 0.5.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 +1 -1
- package/README.md +51 -37
- package/dist/index.cjs +4311 -241
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1119 -69
- package/dist/index.d.ts +1119 -69
- package/dist/index.js +4233 -243
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2530 -111
- package/package.json +27 -9
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,37 +1,64 @@
|
|
|
1
1
|
# orynn
|
|
2
2
|
|
|
3
|
-
> A
|
|
3
|
+
> A strongly-typed React UI library — JSON-driven forms **and** a shadcn-aligned component set.
|
|
4
|
+
> Built by **Rajveer Singh**.
|
|
5
|
+
>
|
|
6
|
+
> **Showcase & docs → https://orynn-web.pages.dev**
|
|
4
7
|
|
|
5
|
-
`orynn` gives you
|
|
6
|
-
`<Dropdown>` controls you can use entirely on their own. V1 is intentionally small — a clean
|
|
7
|
-
foundation designed so validation, theming, and new field types can grow later without breaking
|
|
8
|
-
the public API.
|
|
8
|
+
`orynn` gives you:
|
|
9
9
|
|
|
10
|
-
- **JSON-driven
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
- **Form controls** (standalone or JSON-driven) — `Input` · `Textarea` · `NumberField` ·
|
|
11
|
+
`Dropdown` (combobox) · `DatePicker` · `Checkbox` / `CheckboxGroup` · `Radio` / `RadioGroup` ·
|
|
12
|
+
`Field` primitive — plus a `<Fieldset>` / `<Form>` that renders a whole form from a config
|
|
13
|
+
object, with a pluggable validation resolver and a field registry.
|
|
14
|
+
- **A shadcn-aligned component set** — `Button` · `Label` · `Card` · `Badge` · `Alert` ·
|
|
15
|
+
`Separator` · `Switch` · `Tabs` · `Dialog` · `Popover` · `Tooltip` · `DropdownMenu` · `Table`.
|
|
16
|
+
Semantic OKLCH tokens, one `--orynn-radius` knob, light/dark via a `.dark` class, and a
|
|
17
|
+
`className` that always wins.
|
|
18
|
+
- **Theming** — `<OrynnProvider theme="…">` with presets, density, and a custom primary /
|
|
19
|
+
ring / font / radius / spacing. Zero styling runtime: it only sets `--orynn-*` CSS variables.
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
One runtime dependency (`radix-ui`, for the interactive primitives); `react` is the only
|
|
22
|
+
required peer. ESM + CJS + one shipped stylesheet.
|
|
23
|
+
|
|
24
|
+
## Status & licence
|
|
25
|
+
|
|
26
|
+
`0.5.0`, **MIT** ([`LICENSE`](LICENSE)) — published on npm as [`orynn`](https://www.npmjs.com/package/orynn).
|
|
27
|
+
The showcase site at <https://orynn-web.pages.dev> documents every component and has an
|
|
28
|
+
AI-redesign guide at `/redesign`.
|
|
17
29
|
|
|
18
30
|
## Install
|
|
19
31
|
|
|
20
32
|
```bash
|
|
21
|
-
npm
|
|
33
|
+
npm i orynn # peer: react >= 18
|
|
22
34
|
```
|
|
23
35
|
|
|
24
36
|
```tsx
|
|
25
|
-
import { Fieldset } from "orynn";
|
|
26
37
|
import "orynn/styles.css";
|
|
27
38
|
```
|
|
28
39
|
|
|
29
40
|
## Quick start
|
|
30
41
|
|
|
31
42
|
```tsx
|
|
32
|
-
import {
|
|
43
|
+
import { OrynnProvider, Button, Card, CardHeader, CardTitle, CardContent, Input } from "orynn";
|
|
33
44
|
import "orynn/styles.css";
|
|
34
45
|
|
|
46
|
+
<OrynnProvider theme={{ preset: "teal", colorScheme: "dark" }}>
|
|
47
|
+
<Card>
|
|
48
|
+
<CardHeader><CardTitle>Sign in</CardTitle></CardHeader>
|
|
49
|
+
<CardContent>
|
|
50
|
+
<Input label="Email" type="email" floatingLabel />
|
|
51
|
+
<Button>Continue</Button>
|
|
52
|
+
</CardContent>
|
|
53
|
+
</Card>
|
|
54
|
+
</OrynnProvider>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
JSON-driven form:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { Fieldset, type FieldsetConfig } from "orynn";
|
|
61
|
+
|
|
35
62
|
const config: FieldsetConfig = {
|
|
36
63
|
legend: "Personal details",
|
|
37
64
|
fields: [
|
|
@@ -41,31 +68,18 @@ const config: FieldsetConfig = {
|
|
|
41
68
|
],
|
|
42
69
|
};
|
|
43
70
|
|
|
44
|
-
|
|
45
|
-
return <Fieldset config={config} onChange={(values) => console.log(values)} />;
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Standalone:
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
import { Input, Dropdown } from "orynn";
|
|
53
|
-
|
|
54
|
-
<Input label="Name" value={name} onChange={setName} required />
|
|
55
|
-
<Dropdown label="Country" value={country} onChange={setCountry} options={options} />
|
|
71
|
+
<Fieldset config={config} onChange={(values) => console.log(values)} />;
|
|
56
72
|
```
|
|
57
73
|
|
|
58
74
|
## Docs
|
|
59
75
|
|
|
60
|
-
|
|
61
|
-
- [`Fieldset`](docs/fieldset.md) · [`Input`](docs/input.md) · [`Dropdown`](docs/dropdown.md)
|
|
62
|
-
- [JSON configuration](docs/json-config.md)
|
|
63
|
-
- [Validation](docs/validation.md)
|
|
64
|
-
- [Layout](docs/layout.md)
|
|
65
|
-
- [Extensibility](docs/extensibility.md)
|
|
66
|
-
- [Accessibility](docs/accessibility.md)
|
|
67
|
-
- [Architecture](ARCHITECTURE.md) · [Roadmap / postponed](FUTURE.md)
|
|
68
|
-
|
|
69
|
-
## License
|
|
76
|
+
Full docs live at **https://orynn-web.pages.dev**. In this repo:
|
|
70
77
|
|
|
71
|
-
|
|
78
|
+
- [Getting started](docs/getting-started.md) · [Theming](docs/theming.md) · [Controls](docs/controls.md)
|
|
79
|
+
- Components: [button](docs/button.md) · [card](docs/card.md) · [dialog](docs/dialog.md) ·
|
|
80
|
+
[dropdown-menu](docs/dropdown-menu.md) · [tabs](docs/tabs.md) · [tooltip](docs/tooltip.md) ·
|
|
81
|
+
[popover](docs/popover.md) · [switch](docs/switch.md) · [badge](docs/badge.md) ·
|
|
82
|
+
[alert](docs/alert.md) · [separator](docs/separator.md) · [table](docs/table.md) · [label](docs/label.md)
|
|
83
|
+
- [`Fieldset`](docs/fieldset.md) · [JSON configuration](docs/json-config.md) · [Validation](docs/validation.md)
|
|
84
|
+
- [Layout](docs/layout.md) · [Extensibility](docs/extensibility.md) · [Accessibility](docs/accessibility.md)
|
|
85
|
+
- [Changelog](CHANGELOG.md) · [Architecture](ARCHITECTURE.md) · [Roadmap](FUTURE.md)
|