braid-ui 1.0.4 → 1.0.5
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 +28 -1
- package/package.json +12 -8
- package/src/styles.css +124 -0
package/README.md
CHANGED
|
@@ -5,7 +5,34 @@ A comprehensive React UI component library built with TypeScript, Tailwind CSS,
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install braid-ui
|
|
8
|
+
npm install braid-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
**No additional setup required!** The styles are automatically bundled with the components.
|
|
14
|
+
|
|
15
|
+
However, if you want to customize the styling, you can configure Tailwind CSS in your project:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
19
|
+
npx tailwindcss init -p
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then update your `tailwind.config.js`:
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
/** @type {import('tailwindcss').Config} */
|
|
26
|
+
module.exports = {
|
|
27
|
+
content: [
|
|
28
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
29
|
+
"./node_modules/braid-ui/dist/**/*.{js,ts,jsx,tsx}", // Add this line
|
|
30
|
+
],
|
|
31
|
+
theme: {
|
|
32
|
+
extend: {},
|
|
33
|
+
},
|
|
34
|
+
plugins: [],
|
|
35
|
+
}
|
|
9
36
|
```
|
|
10
37
|
|
|
11
38
|
## Usage
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"import": "./dist/index.js",
|
|
28
28
|
"require": "./dist/index.cjs"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"./styles": "./src/styles.css"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
|
-
"dist"
|
|
33
|
+
"dist",
|
|
34
|
+
"src/styles.css"
|
|
33
35
|
],
|
|
34
36
|
"keywords": [
|
|
35
37
|
"react",
|
|
@@ -46,9 +48,7 @@
|
|
|
46
48
|
"url": "https://github.com/your-username/braid-ui-kit.git"
|
|
47
49
|
},
|
|
48
50
|
"peerDependencies": {
|
|
49
|
-
"
|
|
50
|
-
"react-dom": ">=18.0.0",
|
|
51
|
-
"react-router-dom": ">=6.0.0",
|
|
51
|
+
"@hookform/resolvers": ">=3.0.0",
|
|
52
52
|
"@radix-ui/react-accordion": ">=1.0.0",
|
|
53
53
|
"@radix-ui/react-alert-dialog": ">=1.0.0",
|
|
54
54
|
"@radix-ui/react-aspect-ratio": ">=1.0.0",
|
|
@@ -85,16 +85,18 @@
|
|
|
85
85
|
"input-otp": ">=1.0.0",
|
|
86
86
|
"lucide-react": ">=0.400.0",
|
|
87
87
|
"next-themes": ">=0.3.0",
|
|
88
|
+
"react": ">=18.0.0",
|
|
88
89
|
"react-day-picker": ">=9.0.0",
|
|
90
|
+
"react-dom": ">=18.0.0",
|
|
89
91
|
"react-hook-form": ">=7.0.0",
|
|
90
92
|
"react-resizable-panels": ">=2.0.0",
|
|
93
|
+
"react-router-dom": ">=6.0.0",
|
|
91
94
|
"recharts": ">=2.0.0",
|
|
92
95
|
"sonner": ">=1.0.0",
|
|
93
96
|
"tailwind-merge": ">=2.0.0",
|
|
94
97
|
"tailwindcss-animate": ">=1.0.0",
|
|
95
98
|
"vaul": ">=0.9.0",
|
|
96
|
-
"zod": ">=3.0.0"
|
|
97
|
-
"@hookform/resolvers": ">=3.0.0"
|
|
99
|
+
"zod": ">=3.0.0"
|
|
98
100
|
},
|
|
99
101
|
"scripts": {
|
|
100
102
|
"dev": "vite",
|
|
@@ -107,6 +109,8 @@
|
|
|
107
109
|
"prepublishOnly": "npm run build:lib"
|
|
108
110
|
},
|
|
109
111
|
"devDependencies": {
|
|
112
|
+
"@emotion/react": "^11.14.0",
|
|
113
|
+
"@emotion/styled": "^11.14.1",
|
|
110
114
|
"@eslint/js": "^9.32.0",
|
|
111
115
|
"@tailwindcss/typography": "^0.5.16",
|
|
112
116
|
"@types/node": "^22.16.5",
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
/* Definition of the design system. All colors, gradients, fonts, etc should be defined here.
|
|
6
|
+
All colors MUST be HSL.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@layer base {
|
|
10
|
+
:root {
|
|
11
|
+
--background: 240 10% 98%;
|
|
12
|
+
--foreground: 240 10% 8%;
|
|
13
|
+
|
|
14
|
+
--card: 0 0% 100%;
|
|
15
|
+
--card-foreground: 240 10% 8%;
|
|
16
|
+
|
|
17
|
+
--popover: 0 0% 100%;
|
|
18
|
+
--popover-foreground: 240 10% 8%;
|
|
19
|
+
|
|
20
|
+
--primary: 204 100% 54%;
|
|
21
|
+
--primary-foreground: 0 0% 100%;
|
|
22
|
+
--primary-glow: 204 100% 64%;
|
|
23
|
+
|
|
24
|
+
--secondary: 240 5% 96%;
|
|
25
|
+
--secondary-foreground: 240 6% 10%;
|
|
26
|
+
|
|
27
|
+
--muted: 240 5% 96%;
|
|
28
|
+
--muted-foreground: 240 4% 60%;
|
|
29
|
+
|
|
30
|
+
--accent: 240 5% 96%;
|
|
31
|
+
--accent-foreground: 240 6% 10%;
|
|
32
|
+
|
|
33
|
+
--destructive: 0 84% 60%;
|
|
34
|
+
--destructive-foreground: 0 0% 98%;
|
|
35
|
+
|
|
36
|
+
--border: 240 6% 90%;
|
|
37
|
+
--input: 240 6% 90%;
|
|
38
|
+
--ring: 204 100% 54%;
|
|
39
|
+
|
|
40
|
+
--success: 142 76% 36%;
|
|
41
|
+
--success-foreground: 0 0% 98%;
|
|
42
|
+
|
|
43
|
+
--warning: 38 92% 50%;
|
|
44
|
+
--warning-foreground: 0 0% 98%;
|
|
45
|
+
|
|
46
|
+
/* Form-specific colors */
|
|
47
|
+
--form-background: 0 0% 100%;
|
|
48
|
+
--form-border: 240 6% 88%;
|
|
49
|
+
--form-border-focus: 204 100% 54%;
|
|
50
|
+
--form-border-error: 0 84% 60%;
|
|
51
|
+
--form-border-success: 142 76% 36%;
|
|
52
|
+
|
|
53
|
+
/* Gradients */
|
|
54
|
+
--gradient-primary: linear-gradient(135deg, hsl(204 100% 54%), hsl(204 100% 64%));
|
|
55
|
+
--gradient-subtle: linear-gradient(180deg, hsl(240 10% 98%), hsl(240 5% 96%));
|
|
56
|
+
|
|
57
|
+
/* Shadows */
|
|
58
|
+
--shadow-form: 0 1px 3px 0 hsl(240 5% 84% / 0.12), 0 1px 2px 0 hsl(240 5% 84% / 0.24);
|
|
59
|
+
--shadow-form-focus: 0 0 0 3px hsl(204 100% 54% / 0.12);
|
|
60
|
+
--shadow-form-error: 0 0 0 3px hsl(0 84% 60% / 0.12);
|
|
61
|
+
|
|
62
|
+
/* Animations */
|
|
63
|
+
--transition-form: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
64
|
+
|
|
65
|
+
--radius: 0.5rem;
|
|
66
|
+
|
|
67
|
+
--sidebar-background: 0 0% 98%;
|
|
68
|
+
--sidebar-foreground: 240 5.3% 26.1%;
|
|
69
|
+
--sidebar-primary: 240 5.9% 10%;
|
|
70
|
+
--sidebar-primary-foreground: 0 0% 98%;
|
|
71
|
+
--sidebar-accent: 240 4.8% 95.9%;
|
|
72
|
+
--sidebar-accent-foreground: 240 5.9% 10%;
|
|
73
|
+
--sidebar-border: 220 13% 91%;
|
|
74
|
+
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dark {
|
|
78
|
+
--background: 222.2 84% 4.9%;
|
|
79
|
+
--foreground: 210 40% 98%;
|
|
80
|
+
|
|
81
|
+
--card: 222.2 84% 4.9%;
|
|
82
|
+
--card-foreground: 210 40% 98%;
|
|
83
|
+
|
|
84
|
+
--popover: 222.2 84% 4.9%;
|
|
85
|
+
--popover-foreground: 210 40% 98%;
|
|
86
|
+
|
|
87
|
+
--primary: 210 40% 98%;
|
|
88
|
+
--primary-foreground: 222.2 47.4% 11.2%;
|
|
89
|
+
|
|
90
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
91
|
+
--secondary-foreground: 210 40% 98%;
|
|
92
|
+
|
|
93
|
+
--muted: 217.2 32.6% 17.5%;
|
|
94
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
95
|
+
|
|
96
|
+
--accent: 217.2 32.6% 17.5%;
|
|
97
|
+
--accent-foreground: 210 40% 98%;
|
|
98
|
+
|
|
99
|
+
--destructive: 0 62.8% 30.6%;
|
|
100
|
+
--destructive-foreground: 210 40% 98%;
|
|
101
|
+
|
|
102
|
+
--border: 217.2 32.6% 17.5%;
|
|
103
|
+
--input: 217.2 32.6% 17.5%;
|
|
104
|
+
--ring: 212.7 26.8% 83.9%;
|
|
105
|
+
--sidebar-background: 240 5.9% 10%;
|
|
106
|
+
--sidebar-foreground: 240 4.8% 95.9%;
|
|
107
|
+
--sidebar-primary: 224.3 76.3% 48%;
|
|
108
|
+
--sidebar-primary-foreground: 0 0% 100%;
|
|
109
|
+
--sidebar-accent: 240 3.7% 15.9%;
|
|
110
|
+
--sidebar-accent-foreground: 240 4.8% 95.9%;
|
|
111
|
+
--sidebar-border: 240 3.7% 15.9%;
|
|
112
|
+
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@layer base {
|
|
117
|
+
* {
|
|
118
|
+
@apply border-border;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
body {
|
|
122
|
+
@apply bg-background text-foreground;
|
|
123
|
+
}
|
|
124
|
+
}
|