braid-ui 1.0.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 +134 -0
- package/dist/braid-logo-343BOQZ2.png +0 -0
- package/dist/index.cjs +6271 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1221 -0
- package/dist/index.d.ts +1221 -0
- package/dist/index.js +6086 -0
- package/dist/index.js.map +1 -0
- package/package.json +133 -0
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Braid UI Kit
|
|
2
|
+
|
|
3
|
+
A comprehensive React UI component library built with TypeScript, Tailwind CSS, and Radix UI.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install braid-ui-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Import Components
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button, Card, Dialog } from 'braid-ui-kit'
|
|
17
|
+
|
|
18
|
+
function App() {
|
|
19
|
+
return (
|
|
20
|
+
<div>
|
|
21
|
+
<Button>Click me</Button>
|
|
22
|
+
<Card>
|
|
23
|
+
<h2>Card Title</h2>
|
|
24
|
+
<p>Card content</p>
|
|
25
|
+
</Card>
|
|
26
|
+
</div>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Import Hooks
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { useToast, useEditState } from 'braid-ui-kit'
|
|
35
|
+
|
|
36
|
+
function MyComponent() {
|
|
37
|
+
const { toast } = useToast()
|
|
38
|
+
const editState = useEditState()
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<button onClick={() => toast({ title: "Hello!" })}>
|
|
42
|
+
Show Toast
|
|
43
|
+
</button>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Import Pages
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { Dashboard, Alerts, Business } from 'braid-ui-kit'
|
|
52
|
+
|
|
53
|
+
function App() {
|
|
54
|
+
return (
|
|
55
|
+
<Router>
|
|
56
|
+
<Routes>
|
|
57
|
+
<Route path="/" element={<Dashboard />} />
|
|
58
|
+
<Route path="/alerts" element={<Alerts />} />
|
|
59
|
+
<Route path="/business" element={<Business />} />
|
|
60
|
+
</Routes>
|
|
61
|
+
</Router>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Import Specific Categories
|
|
67
|
+
|
|
68
|
+
You can also import from specific categories:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
// Import only components
|
|
72
|
+
import { Button, Card } from 'braid-ui-kit/components'
|
|
73
|
+
|
|
74
|
+
// Import only hooks
|
|
75
|
+
import { useToast } from 'braid-ui-kit/hooks'
|
|
76
|
+
|
|
77
|
+
// Import only pages
|
|
78
|
+
import { Dashboard } from 'braid-ui-kit/pages'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Development
|
|
82
|
+
|
|
83
|
+
### Build the Library
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm run build:lib
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Watch Mode
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run build:lib:watch
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Components
|
|
96
|
+
|
|
97
|
+
The library includes:
|
|
98
|
+
|
|
99
|
+
- **UI Components**: Basic building blocks like Button, Card, Dialog, etc.
|
|
100
|
+
- **Form Components**: Form fields, inputs, and validation components
|
|
101
|
+
- **Layout Components**: Page layouts, containers, and grid systems
|
|
102
|
+
- **Business Components**: Specialized components for business applications
|
|
103
|
+
- **Alert Components**: Alert and notification components
|
|
104
|
+
|
|
105
|
+
## Hooks
|
|
106
|
+
|
|
107
|
+
- `useToast`: Toast notification management
|
|
108
|
+
- `useEditState`: Edit state management
|
|
109
|
+
- `useFormWithEditState`: Form state with edit capabilities
|
|
110
|
+
- `useMobile`: Mobile detection hook
|
|
111
|
+
|
|
112
|
+
## Pages
|
|
113
|
+
|
|
114
|
+
Pre-built page components for common business applications:
|
|
115
|
+
|
|
116
|
+
- Dashboard
|
|
117
|
+
- Alerts management
|
|
118
|
+
- Business management
|
|
119
|
+
- Transaction handling
|
|
120
|
+
- Counterparty management
|
|
121
|
+
|
|
122
|
+
## Dependencies
|
|
123
|
+
|
|
124
|
+
This library requires React 18+ and includes peer dependencies for:
|
|
125
|
+
|
|
126
|
+
- React
|
|
127
|
+
- React DOM
|
|
128
|
+
- Various Radix UI components
|
|
129
|
+
- Tailwind CSS
|
|
130
|
+
- Lucide React icons
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT
|
|
Binary file
|