orynn 0.2.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 +47 -54
- package/dist/index.cjs +2666 -494
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +836 -104
- package/dist/index.d.ts +836 -104
- package/dist/index.js +2599 -495
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2028 -392
- package/package.json +18 -9
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,43 +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
|
-
theming layer built on CSS custom properties, and a `<Fieldset>` that renders a whole form from
|
|
7
|
-
a config object.
|
|
8
|
+
`orynn` gives you:
|
|
8
9
|
|
|
9
|
-
**
|
|
10
|
-
`
|
|
11
|
-
`
|
|
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.
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- **Feature-rich** — floating labels, adornments, clearable / loading, success & error states,
|
|
16
|
-
searchable + multi + grouped selects, a keyboard-navigable calendar, `Intl` number formatting.
|
|
17
|
-
- **Extensible** — field registry, pluggable validation resolver, every value a design token.
|
|
18
|
-
- **Small & tree-shakeable** — `react` is the only required peer (`react-dom` for the
|
|
19
|
-
`Dropdown` / `DatePicker` popovers). ESM + CJS.
|
|
21
|
+
One runtime dependency (`radix-ui`, for the interactive primitives); `react` is the only
|
|
22
|
+
required peer. ESM + CJS + one shipped stylesheet.
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
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`.
|
|
23
29
|
|
|
24
30
|
## Install
|
|
25
31
|
|
|
26
32
|
```bash
|
|
27
|
-
npm
|
|
33
|
+
npm i orynn # peer: react >= 18
|
|
28
34
|
```
|
|
29
35
|
|
|
30
36
|
```tsx
|
|
31
|
-
import { Fieldset } from "orynn";
|
|
32
37
|
import "orynn/styles.css";
|
|
33
38
|
```
|
|
34
39
|
|
|
35
40
|
## Quick start
|
|
36
41
|
|
|
37
42
|
```tsx
|
|
38
|
-
import {
|
|
43
|
+
import { OrynnProvider, Button, Card, CardHeader, CardTitle, CardContent, Input } from "orynn";
|
|
39
44
|
import "orynn/styles.css";
|
|
40
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
|
+
|
|
41
62
|
const config: FieldsetConfig = {
|
|
42
63
|
legend: "Personal details",
|
|
43
64
|
fields: [
|
|
@@ -47,46 +68,18 @@ const config: FieldsetConfig = {
|
|
|
47
68
|
],
|
|
48
69
|
};
|
|
49
70
|
|
|
50
|
-
|
|
51
|
-
return <Fieldset config={config} onChange={(values) => console.log(values)} />;
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Standalone controls + theming
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
import {
|
|
59
|
-
OrynnProvider, Input, Textarea, NumberField,
|
|
60
|
-
Dropdown, DatePicker, Checkbox, RadioGroup,
|
|
61
|
-
} from "orynn";
|
|
62
|
-
import "orynn/styles.css";
|
|
63
|
-
|
|
64
|
-
<OrynnProvider theme={{ preset: "teal", radius: "lg", density: "comfortable" }}>
|
|
65
|
-
<Input label="Full name" floatingLabel clearable required />
|
|
66
|
-
<NumberField label="Budget" currency="USD" locale="en-US" min={0} />
|
|
67
|
-
<Dropdown
|
|
68
|
-
label="Country"
|
|
69
|
-
searchable
|
|
70
|
-
options={[
|
|
71
|
-
{ label: "India", value: "IN", icon: "🇮🇳" },
|
|
72
|
-
{ label: "Indonesia", value: "ID", icon: "🇮🇩" },
|
|
73
|
-
]}
|
|
74
|
-
/>
|
|
75
|
-
<DatePicker label="Start date" showToday clearable />
|
|
76
|
-
<Checkbox label="Email me updates" />
|
|
77
|
-
</OrynnProvider>
|
|
71
|
+
<Fieldset config={config} onChange={(values) => console.log(values)} />;
|
|
78
72
|
```
|
|
79
73
|
|
|
80
|
-
`theme` also accepts a preset shorthand (`theme="slate"`) or a custom accent
|
|
81
|
-
(`theme={{ accent: "#e11d48" }}`). See [Theming](docs/theming.md).
|
|
82
|
-
|
|
83
74
|
## Docs
|
|
84
75
|
|
|
76
|
+
Full docs live at **https://orynn-web.pages.dev**. In this repo:
|
|
77
|
+
|
|
85
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)
|
|
86
83
|
- [`Fieldset`](docs/fieldset.md) · [JSON configuration](docs/json-config.md) · [Validation](docs/validation.md)
|
|
87
84
|
- [Layout](docs/layout.md) · [Extensibility](docs/extensibility.md) · [Accessibility](docs/accessibility.md)
|
|
88
85
|
- [Changelog](CHANGELOG.md) · [Architecture](ARCHITECTURE.md) · [Roadmap](FUTURE.md)
|
|
89
|
-
|
|
90
|
-
## License
|
|
91
|
-
|
|
92
|
-
MIT
|