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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 rajveer
3
+ Copyright (c) 2026 Rajveer Singh
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,37 +1,64 @@
1
1
  # orynn
2
2
 
3
- > A small, strongly-typed, JSON-driven form library for React.
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 a `<Fieldset>` that renders a form from a config object, plus `<Input>` and
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**describe fields in a strongly-typed config, get an accessible responsive form.
11
- - **Standalone controls** `<Input>` and `<Dropdown>` work without `<Fieldset>`.
12
- - **Extensible by design** field registry, pluggable validation resolver, CSS-variable tokens.
13
- - **Zero runtime dependencies** `react` is the only peer. ESM + CJS. Tree-shakeable.
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
- > Status: `0.x`. The core API (`Fieldset`, `Input`, `Dropdown`, `useFieldsetState`) is stable in
16
- > intent; APIs marked `@experimental` (the field registry, `registerRule`) may change before `1.0`.
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 install orynn
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 { Fieldset, type FieldsetConfig } from "orynn";
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
- export function Form() {
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
- - [Getting started](docs/getting-started.md)
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
- MIT
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)