brd-ui-kit 0.0.5 → 0.0.6
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 +48 -121
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,150 +1,77 @@
|
|
|
1
|
-
brd-ui-kit
|
|
2
|
-
Modern React component library built with Tailwind CSS v4 and TypeScript.
|
|
1
|
+
# brd-ui-kit
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Modern React component library with Tailwind CSS v4 and TypeScript.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
6
8
|
npm install brd-ui-kit
|
|
7
9
|
# or
|
|
8
10
|
pnpm add brd-ui-kit
|
|
9
11
|
# or
|
|
10
12
|
yarn add brd-ui-kit
|
|
11
|
-
|
|
12
|
-
1. Import styles (choose one option)
|
|
13
|
-
Option A: Import all styles at once (recommended)
|
|
13
|
+
```
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
// In your app's entry file (main.jsx, App.jsx, or layout.jsx)
|
|
17
|
-
import 'brd-ui-kit/styles.css';
|
|
18
|
-
Option B: Import theme separately
|
|
15
|
+
## Quick Start
|
|
19
16
|
|
|
20
|
-
jsx
|
|
21
|
-
import 'brd-ui-kit/
|
|
22
|
-
import 'brd-ui-kit
|
|
23
|
-
2. Use components
|
|
24
|
-
jsx
|
|
25
|
-
import { Button, Card, Input } from 'brd-ui-kit';
|
|
17
|
+
```jsx
|
|
18
|
+
import 'brd-ui-kit/styles.css';
|
|
19
|
+
import { Button, Card } from 'brd-ui-kit';
|
|
26
20
|
|
|
27
21
|
function App() {
|
|
28
22
|
return (
|
|
29
|
-
<Card
|
|
30
|
-
<
|
|
31
|
-
<Input placeholder="Email" className="mb-2" />
|
|
32
|
-
<Input type="password" placeholder="Password" className="mb-4" />
|
|
33
|
-
<Button variant="primary">Sign In</Button>
|
|
23
|
+
<Card>
|
|
24
|
+
<Button>Click me</Button>
|
|
34
25
|
</Card>
|
|
35
26
|
);
|
|
36
27
|
}
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Tailwind Setup
|
|
39
31
|
|
|
40
|
-
js
|
|
32
|
+
```js
|
|
33
|
+
// tailwind.config.js
|
|
41
34
|
/** @type {import('tailwindcss').Config} */
|
|
42
35
|
export default {
|
|
43
36
|
content: [
|
|
44
37
|
"./index.html",
|
|
45
38
|
"./src/**/*.{js,ts,jsx,tsx}",
|
|
46
|
-
"./node_modules/brd-ui-kit/**/*.{js,ts,jsx,tsx}"
|
|
47
|
-
]
|
|
48
|
-
theme: {
|
|
49
|
-
extend: {},
|
|
50
|
-
},
|
|
51
|
-
plugins: [],
|
|
39
|
+
"./node_modules/brd-ui-kit/**/*.{js,ts,jsx,tsx}"
|
|
40
|
+
]
|
|
52
41
|
}
|
|
53
|
-
|
|
54
|
-
Available components:
|
|
55
|
-
Component Description
|
|
56
|
-
Badge Status and label badges
|
|
57
|
-
Button Primary, secondary, outline variants
|
|
58
|
-
Card Content containers
|
|
59
|
-
Checkbox Checkbox input
|
|
60
|
-
Combobox Autocomplete dropdown
|
|
61
|
-
Dialog Modal dialogs
|
|
62
|
-
Field Form field wrapper
|
|
63
|
-
Icon Icon component
|
|
64
|
-
Input Text input
|
|
65
|
-
InputGroup Grouped inputs
|
|
66
|
-
Label Form labels
|
|
67
|
-
NavigationItem Navigation items
|
|
68
|
-
NavigationMenu Navigation menus
|
|
69
|
-
Pagination Pagination controls
|
|
70
|
-
Progress Progress indicators
|
|
71
|
-
RadioGroup Radio buttons
|
|
72
|
-
Separator Divider lines
|
|
73
|
-
Switch Toggle switches
|
|
74
|
-
Table Data tables
|
|
75
|
-
Tabs Tabbed interfaces
|
|
76
|
-
Textarea Multi-line input
|
|
77
|
-
Tooltip Tooltips
|
|
78
|
-
Typography Text styles
|
|
79
|
-
💡 Examples
|
|
80
|
-
Button variants
|
|
81
|
-
jsx
|
|
82
|
-
<Button variant="primary">Primary</Button>
|
|
83
|
-
<Button variant="secondary">Secondary</Button>
|
|
84
|
-
<Button variant="outline">Outline</Button>
|
|
85
|
-
<Button variant="ghost">Ghost</Button>
|
|
86
|
-
<Button variant="danger">Danger</Button>
|
|
87
|
-
Form with validation
|
|
88
|
-
jsx
|
|
89
|
-
import { Field, Input, Button } from 'brd-ui-kit';
|
|
42
|
+
```
|
|
90
43
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
44
|
+
## Components
|
|
45
|
+
|
|
46
|
+
- `Button` — Primary, secondary, outline, ghost
|
|
47
|
+
- `Card` — Content containers
|
|
48
|
+
- `Input` — Text input
|
|
49
|
+
- `Dialog` — Modal dialogs
|
|
50
|
+
- `Tabs` — Tabbed interfaces
|
|
51
|
+
- `Table` — Data tables
|
|
52
|
+
- `Tooltip` — Tooltips
|
|
53
|
+
- `Badge` — Status indicators
|
|
54
|
+
- `Checkbox` — Checkbox input
|
|
55
|
+
- `Switch` — Toggle switches
|
|
56
|
+
- `RadioGroup` — Radio buttons
|
|
57
|
+
- `Combobox` — Autocomplete dropdown
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
```jsx
|
|
62
|
+
import { Button } from 'brd-ui-kit';
|
|
103
63
|
|
|
104
64
|
function Example() {
|
|
105
65
|
return (
|
|
106
|
-
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
</
|
|
110
|
-
|
|
111
|
-
<DialogTitle>Confirm Action</DialogTitle>
|
|
112
|
-
<DialogDescription>
|
|
113
|
-
Are you sure you want to proceed?
|
|
114
|
-
</DialogDescription>
|
|
115
|
-
<DialogFooter>
|
|
116
|
-
<Button variant="outline">Cancel</Button>
|
|
117
|
-
<Button>Confirm</Button>
|
|
118
|
-
</DialogFooter>
|
|
119
|
-
</DialogContent>
|
|
120
|
-
</Dialog>
|
|
66
|
+
<>
|
|
67
|
+
<Button variant="primary">Primary</Button>
|
|
68
|
+
<Button variant="secondary">Secondary</Button>
|
|
69
|
+
<Button variant="outline">Outline</Button>
|
|
70
|
+
</>
|
|
121
71
|
);
|
|
122
72
|
}
|
|
123
|
-
|
|
124
|
-
All components are fully typed:
|
|
125
|
-
|
|
126
|
-
tsx
|
|
127
|
-
import type { ButtonProps, InputProps } from 'brd-ui-kit';
|
|
128
|
-
|
|
129
|
-
function CustomButton(props: ButtonProps) {
|
|
130
|
-
return <Button {...props} />;
|
|
131
|
-
}
|
|
132
|
-
🔧 Development
|
|
133
|
-
bash
|
|
134
|
-
# Install dependencies
|
|
135
|
-
npm install
|
|
136
|
-
|
|
137
|
-
# Run Storybook
|
|
138
|
-
npm run storybook
|
|
139
|
-
|
|
140
|
-
# Build the library
|
|
141
|
-
npm run build
|
|
142
|
-
|
|
143
|
-
# Lint and format
|
|
144
|
-
npm run lint
|
|
145
|
-
npm run format
|
|
146
|
-
📄 License
|
|
147
|
-
MIT © vladislav_mr
|
|
73
|
+
```
|
|
148
74
|
|
|
149
|
-
|
|
75
|
+
## License
|
|
150
76
|
|
|
77
|
+
MIT © vladislav_mr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brd-ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"main": "dist/index.cjs",
|
|
20
20
|
"module": "dist/index.js",
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
|
-
"exports": {
|
|
22
|
+
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"import": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"require": "./src/styles/globals.css"
|
|
31
31
|
},
|
|
32
32
|
"./style.css": {
|
|
33
|
-
"import": "./src/styles/globals.css",
|
|
33
|
+
"import": "./src/styles/globals.css",
|
|
34
34
|
"require": "./src/styles/globals.css"
|
|
35
35
|
},
|
|
36
36
|
"./src/styles/globals.css": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dist",
|
|
46
46
|
"README.md",
|
|
47
47
|
"src/styles/globals.css",
|
|
48
|
-
"src/styles/theme.css"
|
|
48
|
+
"src/styles/theme.css"
|
|
49
49
|
],
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -101,4 +101,4 @@
|
|
|
101
101
|
"vite": "^7.3.1",
|
|
102
102
|
"vite-plugin-dts": "^4.5.4"
|
|
103
103
|
}
|
|
104
|
-
}
|
|
104
|
+
}
|