@olwiba/cn 0.1.14
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 +21 -0
- package/README.md +117 -0
- package/dist/index.d.ts +991 -0
- package/dist/index.js +6814 -0
- package/dist/index.js.map +1 -0
- package/package.json +126 -0
- package/src/styles/preset.css +107 -0
- package/src/styles/theme.css +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Olwiba
|
|
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
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: light)" srcset="./public/olwibaCN--light.gif" />
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="./public/olwibaCN.gif" />
|
|
5
|
+
<img src="./public/olwibaCN.gif" alt="olwibaCN" style="width: 100%;" />
|
|
6
|
+
</picture>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<strong>Olwiba's take on shadcn primitives.</strong>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://cn.olwiba.com">Documentation</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://github.com/Olwiba/olwibaCN/issues/new?template=bug_report.md">🪲 Report a bug</a> ·
|
|
19
|
+
<a href="https://github.com/Olwiba/olwibaCN/issues/new?template=feature_request.md">✨ Feature request</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://github.com/sponsors/Olwiba"><img src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=22c55e" alt="Sponsor" /></a>
|
|
24
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/Olwiba/olwibaCN?label=license&logo=github" alt="License" /></a>
|
|
25
|
+
<a href="https://github.com/Olwiba/olwibaCN/issues"><img src="https://img.shields.io/github/issues/Olwiba/olwibaCN" alt="Issues" /></a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
## What This Is
|
|
29
|
+
|
|
30
|
+
`@olwiba/cn` is a custom shadcn component registry. It contains beautifully designed, copy-paste ready primitive components built on React 19 and Tailwind CSS v4.
|
|
31
|
+
|
|
32
|
+
Primitives are the individual lego pieces for building on the web.
|
|
33
|
+
|
|
34
|
+
If you're interested in composite components, these are prebuilt, opinionated combinations of primitives that solve specific UI problems. They're coming soon in `@olwiba/ui`.
|
|
35
|
+
|
|
36
|
+
The project introduces the idea of a `mode` prop, this lets you dial in the visual personality without touching variants or structure. Pair that with seven built-in color themes and you get a design system that can conform to your project.
|
|
37
|
+
|
|
38
|
+
It ships two ways — as an installable package or as a shadcn registry you can copy directly into your project.
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bun add @olwiba/cn
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Peer dependencies: `react`, `react-dom`, `tailwindcss`, `lucide-react`
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import "@olwiba/cn/styles";
|
|
50
|
+
import { Button, Card, UIVariantProvider } from "@olwiba/cn";
|
|
51
|
+
|
|
52
|
+
export function Example() {
|
|
53
|
+
return (
|
|
54
|
+
<UIVariantProvider mode="smooth">
|
|
55
|
+
<Card className="p-6">
|
|
56
|
+
<Button>Continue</Button>
|
|
57
|
+
</Card>
|
|
58
|
+
</UIVariantProvider>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Available CSS entrypoints: `@olwiba/cn/styles`, `@olwiba/cn/theme`, `@olwiba/cn/preset`
|
|
64
|
+
|
|
65
|
+
## Registry
|
|
66
|
+
|
|
67
|
+
Prefer owning the source? Add the registry to your `components.json` and copy components directly into your project.
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"registries": {
|
|
72
|
+
"@olwibacn": "https://cn.olwiba.com/r/{name}.json"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
shadcn add @olwibacn/button
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## What's Included
|
|
82
|
+
|
|
83
|
+
**Themes** Choose your brand color
|
|
84
|
+
**Modes** Default (blocky/sharp), Smooth, Playful
|
|
85
|
+
**Icons** Bring your own icon library!
|
|
86
|
+
**Components** The things you can see and interact with
|
|
87
|
+
**Mechanics** The behaviours that bring your project to life
|
|
88
|
+
|
|
89
|
+
## Tech Stack
|
|
90
|
+
|
|
91
|
+
- [React](https://react.dev) 19
|
|
92
|
+
- [TypeScript](https://www.typescriptlang.org)
|
|
93
|
+
- [Tailwind CSS](https://tailwindcss.com) v4
|
|
94
|
+
- [Radix UI](https://www.radix-ui.com)
|
|
95
|
+
- [shadcn/ui](https://ui.shadcn.com)
|
|
96
|
+
- [Lucide React](https://lucide.dev)
|
|
97
|
+
- [CVA](https://cva.style)
|
|
98
|
+
|
|
99
|
+
## Ecosystem
|
|
100
|
+
|
|
101
|
+
- _Coming soon!_
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
Bug reports, pull requests & feature requests are welcome.
|
|
106
|
+
Open an issue first for anything beyond a small fix.
|
|
107
|
+
|
|
108
|
+
<br/>
|
|
109
|
+
<br/>
|
|
110
|
+
|
|
111
|
+
<p align="center">
|
|
112
|
+
Built with 💖 by <a href="https://github.com/Olwiba">Olwiba</a>
|
|
113
|
+
</p>
|
|
114
|
+
|
|
115
|
+
<p align="center">
|
|
116
|
+
<a href="https://buymeacoffee.com/olwiba"><img src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?logo=buymeacoffee&logoColor=black" alt="Buy Me A Coffee" /></a>
|
|
117
|
+
</p>
|