@onyxdesign/core 0.0.0-stage → 1.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 +25 -0
- package/README.md +108 -2
- package/package.json +36 -4
- package/src/onyx.css +1128 -0
- package/src/onyx.js +317 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Onyx UI
|
|
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.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
This license covers the Onyx UI core library only. Onyx Pro components,
|
|
25
|
+
templates and design kits are distributed under a separate commercial license.
|
package/README.md
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src="brand/onyx-logo-black.svg" width="120" alt="Onyx"></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Onyx
|
|
4
|
+
|
|
5
|
+
**The interface, in black & white.**
|
|
6
|
+
|
|
7
|
+
[Website](https://onyx-six-ashy.vercel.app/) · [Documentation](https://onyx-six-ashy.vercel.app/docs/) · [Pricing](https://onyx-six-ashy.vercel.app/#pricing)
|
|
8
|
+
|
|
9
|
+
Onyx is a zero-dependency UI component library for designers who believe restraint is a feature. Two colors, sharp typography, and every detail considered. One CSS file, one small script, light and dark themes built in.
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<link rel="stylesheet" href="onyx.css">
|
|
15
|
+
<body class="ox">
|
|
16
|
+
<button class="ox-btn">Hello Onyx</button>
|
|
17
|
+
<script src="onyx.js"></script>
|
|
18
|
+
</body>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or via npm (once published):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @onyxdesign/core
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## React
|
|
28
|
+
|
|
29
|
+
Onyx is also available as typed React components:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install @onyxdesign/react
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import "@onyxdesign/react/styles.css";
|
|
37
|
+
import { Button, Modal, Tabs, useToast } from "@onyxdesign/react";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
See [packages/react](packages/react) for details.
|
|
41
|
+
|
|
42
|
+
## Run the showcase locally
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run dev
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Then open http://localhost:5173.
|
|
49
|
+
|
|
50
|
+
## What's inside
|
|
51
|
+
|
|
52
|
+
| Category | Components |
|
|
53
|
+
|------------|------------|
|
|
54
|
+
| Actions | Button (primary, outline, ghost, link, pill, sizes, icon, loading), Segmented control |
|
|
55
|
+
| Forms | Input, Input group with icon, Select, Textarea, Checkbox, Radio, Switch, Field + hint + invalid state |
|
|
56
|
+
| Layout | Container, Card, Navbar, Stack, Row, Grid, Divider, Separator |
|
|
57
|
+
| Display | Badge, Avatar, Avatar stack, Alert, Kbd, Code block, Progress, Skeleton, Spinner |
|
|
58
|
+
| Overlays | Modal (focus trap, Esc to close), Dropdown, Tooltip, Toast |
|
|
59
|
+
| Navigation | Tabs (arrow-key support), Accordion |
|
|
60
|
+
|
|
61
|
+
Full documentation with live examples lives in [docs/](docs/index.html) — run `npm run dev` and open http://localhost:5173/docs/.
|
|
62
|
+
|
|
63
|
+
## Onyx Pro
|
|
64
|
+
|
|
65
|
+
Premium components and templates are sold separately and kept in a private repository. The docs show live previews of them.
|
|
66
|
+
|
|
67
|
+
Customers add the Pro files after the core files:
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<link rel="stylesheet" href="onyx.css">
|
|
71
|
+
<link rel="stylesheet" href="onyx-pro.css">
|
|
72
|
+
<script src="onyx.js"></script>
|
|
73
|
+
<script src="onyx-pro.js"></script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Maintainers: the private repo is cloned into `pro/` (ignored here). After changing it, run `npm run build:pro-preview` to refresh the docs previews in `docs/pro-preview/`.
|
|
77
|
+
|
|
78
|
+
## Brand
|
|
79
|
+
|
|
80
|
+
The bat logo lives in [`brand/`](brand): `onyx-logo.svg` (follows text color), black and white versions, and a favicon that adapts to light and dark mode.
|
|
81
|
+
|
|
82
|
+
## Theming
|
|
83
|
+
|
|
84
|
+
Everything is driven by CSS custom properties (`--ox-*`):
|
|
85
|
+
|
|
86
|
+
```css
|
|
87
|
+
:root {
|
|
88
|
+
--ox-radius: 2px;
|
|
89
|
+
--ox-radius-lg: 4px;
|
|
90
|
+
--ox-font-sans: "Inter", sans-serif;
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- Dark mode follows the OS. Force it with `<html data-theme="dark">` or `Onyx.theme.set("dark")`.
|
|
95
|
+
- Add `.ox-invert` to any element to flip it to the opposite theme (a black card on a white page, or the other way round).
|
|
96
|
+
|
|
97
|
+
## Plans
|
|
98
|
+
|
|
99
|
+
| | Free | Pro | Team |
|
|
100
|
+
|---|---|---|---|
|
|
101
|
+
| Core components | ✓ | ✓ | ✓ |
|
|
102
|
+
| Pro components & templates | | ✓ | ✓ |
|
|
103
|
+
| Figma kit | | ✓ | ✓ |
|
|
104
|
+
| Seats | 1 | 1 | 10 |
|
|
105
|
+
| Price | $0 | $12/mo | $39/mo |
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
Core library: MIT. Pro components: commercial license.
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onyxdesign/core",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A black & white, zero-dependency UI component library for people who care about the details.",
|
|
5
|
+
"main": "src/onyx.js",
|
|
6
|
+
"style": "src/onyx.css",
|
|
7
|
+
"files": [
|
|
8
|
+
"src",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "python -m http.server 5173",
|
|
14
|
+
"build:pro-preview": "node scripts/build-pro-preview.mjs"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ui",
|
|
18
|
+
"css",
|
|
19
|
+
"components",
|
|
20
|
+
"design-system",
|
|
21
|
+
"black-and-white",
|
|
22
|
+
"monochrome",
|
|
23
|
+
"dark-mode",
|
|
24
|
+
"accessible"
|
|
25
|
+
],
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/codewithanshuman/Onyx.git"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://onyx-six-ashy.vercel.app/",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/codewithanshuman/Onyx/issues"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
}
|
|
38
|
+
}
|