@hexdspace/react 0.1.0 → 0.1.1

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 ADDED
@@ -0,0 +1,101 @@
1
+ # @hexdspace/react
2
+
3
+ React basic features, UI components plus a Tailwind v4-compatible theme CSS.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ pnpm add @hexdspace/react
9
+ ```
10
+
11
+ Peer dependencies (install in your app):
12
+
13
+ ```sh
14
+ pnpm add react react-dom react-router-dom radix-ui lucide-react react-toastify @tanstack/react-query
15
+ ```
16
+
17
+ Tailwind requirements (for the theme + utilities):
18
+
19
+ ```sh
20
+ pnpm add -D tailwindcss @tailwindcss/postcss postcss-import tailwind-scrollbar
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Import the theme into your Tailwind entry stylesheet (order matters):
26
+
27
+ ```css
28
+ /* src/index.css */
29
+ @import "tailwindcss";
30
+ @import "@hexdspace/react/css";
31
+ @config "../tailwind.config.ts"; /* adjust path if needed */
32
+
33
+ /* Your app styles */
34
+ ```
35
+
36
+ Make sure PostCSS inlines imports before Tailwind:
37
+
38
+ ```js
39
+ // postcss.config.js
40
+ export default {
41
+ plugins: {
42
+ "postcss-import": {},
43
+ "@tailwindcss/postcss": {},
44
+ },
45
+ };
46
+ ```
47
+
48
+ ### Tailwind config
49
+
50
+ Point Tailwind at this package so it can generate utilities used by the components.
51
+
52
+ For a published package:
53
+
54
+ ```js
55
+ // tailwind.config.js (app)
56
+ export default {
57
+ content: [
58
+ "./index.html",
59
+ "./src/**/*.{ts,tsx,js,jsx}",
60
+ "./node_modules/@hexdspace/react/dist/**/*.{js,ts,tsx}",
61
+ ],
62
+ theme: {
63
+ extend: {},
64
+ },
65
+ };
66
+ ```
67
+
68
+ For a monorepo/workspace (use sources instead of dist):
69
+
70
+ ```js
71
+ // tailwind.config.js (app)
72
+ export default {
73
+ content: [
74
+ "./index.html",
75
+ "./src/**/*.{ts,tsx,js,jsx}",
76
+ "../packages/react/src/**/*.{ts,tsx}",
77
+ ],
78
+ };
79
+ ```
80
+
81
+ ### Component usage
82
+
83
+ ```tsx
84
+ import { Button } from "@hexdspace/react";
85
+
86
+ export function Example() {
87
+ return (
88
+ <Button variant="outline" chrome="push">
89
+ Click me
90
+ </Button>
91
+ );
92
+ }
93
+ ```
94
+
95
+ ## Troubleshooting
96
+
97
+ - Theme styles apply but component utilities are missing:
98
+ - Ensure your Tailwind entry includes `@config` so Tailwind loads `tailwind.config.*`.
99
+ - Ensure the `content` array includes this package (dist or source).
100
+ - `tailwind-scrollbar` styles are missing:
101
+ - Install `tailwind-scrollbar` (the theme registers it via `@plugin`).