banhatten-ui 0.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/README.md +62 -0
- package/dist/index.d.mts +806 -0
- package/dist/index.d.ts +806 -0
- package/dist/index.js +4639 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4524 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/utils.d.mts +5 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +35 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/tokens/tailwind.config.d.mts +5 -0
- package/dist/tokens/tailwind.config.d.ts +5 -0
- package/dist/tokens/tailwind.config.js +423 -0
- package/dist/tokens/tailwind.config.js.map +1 -0
- package/dist/tokens/tailwind.config.mjs +400 -0
- package/dist/tokens/tailwind.config.mjs.map +1 -0
- package/dist/tokens/tokens.json +340 -0
- package/package.json +71 -0
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# banhatten-ui
|
|
2
|
+
|
|
3
|
+
Banhatten Design System - React component library with token-based theming.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install banhatten-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- React 19+ (`react@^19.0.0` and `react-dom@^19.0.0`)
|
|
14
|
+
- Tailwind CSS v4
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
### 1. Configure Tailwind CSS
|
|
19
|
+
|
|
20
|
+
Add the Banhatten tokens to your `tailwind.config.ts`:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import type { Config } from "tailwindcss";
|
|
24
|
+
import banhattenConfig from "banhatten-ui/tokens/tailwind.config";
|
|
25
|
+
|
|
26
|
+
const config: Config = {
|
|
27
|
+
presets: [banhattenConfig],
|
|
28
|
+
content: [
|
|
29
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
30
|
+
"./node_modules/banhatten-ui/dist/**/*.{js,mjs}",
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Import Components
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { Button, Input, Badge } from "banhatten-ui";
|
|
41
|
+
|
|
42
|
+
export function MyComponent() {
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<Button variant="primary" size="md">Submit</Button>
|
|
46
|
+
<Input label="Email" preset="email" />
|
|
47
|
+
<Badge variant="filled" color="brand">New</Badge>
|
|
48
|
+
</>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Exports
|
|
54
|
+
|
|
55
|
+
- **Components:** `import { Button, Input, ... } from "banhatten-ui"`
|
|
56
|
+
- **Utils:** `import { cn } from "banhatten-ui/lib/utils"`
|
|
57
|
+
- **Tokens JSON:** `import tokens from "banhatten-ui/tokens"`
|
|
58
|
+
- **Tailwind Config:** `import config from "banhatten-ui/tokens/tailwind.config"`
|
|
59
|
+
|
|
60
|
+
## Documentation
|
|
61
|
+
|
|
62
|
+
Visit the [documentation site](https://khaaledashraaf.github.io/banhatten-ds/) for component API reference and examples.
|