@clidey/ux 0.2.0 → 0.4.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 +51 -57
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -25,7 +25,6 @@ pnpm add @clidey/ux
|
|
|
25
25
|
|
|
26
26
|
```tsx
|
|
27
27
|
import { Button, Card, ThemeProvider } from '@clidey/ux'
|
|
28
|
-
import '@clidey/ux/styles'
|
|
29
28
|
|
|
30
29
|
function App() {
|
|
31
30
|
return (
|
|
@@ -43,6 +42,8 @@ function App() {
|
|
|
43
42
|
}
|
|
44
43
|
```
|
|
45
44
|
|
|
45
|
+
**Note:** Styles are automatically included when you import components. No additional CSS imports are required.
|
|
46
|
+
|
|
46
47
|
## Components
|
|
47
48
|
|
|
48
49
|
### Layout Components
|
|
@@ -192,71 +193,64 @@ function App() {
|
|
|
192
193
|
|
|
193
194
|
## Styling
|
|
194
195
|
|
|
195
|
-
The components are built with Tailwind CSS
|
|
196
|
+
The components are built with Tailwind CSS v4 and include all necessary styles automatically. When you import any component, the styles are automatically included in your bundle.
|
|
197
|
+
|
|
198
|
+
### Requirements
|
|
199
|
+
|
|
200
|
+
To use the components properly, you need to have Tailwind CSS v4 installed in your project:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
npm install tailwindcss@next
|
|
204
|
+
```
|
|
196
205
|
|
|
197
|
-
###
|
|
206
|
+
### Configuration
|
|
198
207
|
|
|
199
|
-
|
|
208
|
+
Configure your build tool to process CSS. For example, with Vite:
|
|
200
209
|
|
|
201
210
|
```js
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
extend: {
|
|
214
|
-
colors: {
|
|
215
|
-
border: "hsl(var(--border))",
|
|
216
|
-
input: "hsl(var(--input))",
|
|
217
|
-
ring: "hsl(var(--ring))",
|
|
218
|
-
background: "hsl(var(--background))",
|
|
219
|
-
foreground: "hsl(var(--foreground))",
|
|
220
|
-
primary: {
|
|
221
|
-
DEFAULT: "hsl(var(--primary))",
|
|
222
|
-
foreground: "hsl(var(--primary-foreground))",
|
|
223
|
-
},
|
|
224
|
-
secondary: {
|
|
225
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
226
|
-
foreground: "hsl(var(--secondary-foreground))",
|
|
227
|
-
},
|
|
228
|
-
destructive: {
|
|
229
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
230
|
-
foreground: "hsl(var(--destructive-foreground))",
|
|
231
|
-
},
|
|
232
|
-
muted: {
|
|
233
|
-
DEFAULT: "hsl(var(--muted))",
|
|
234
|
-
foreground: "hsl(var(--muted-foreground))",
|
|
235
|
-
},
|
|
236
|
-
accent: {
|
|
237
|
-
DEFAULT: "hsl(var(--accent))",
|
|
238
|
-
foreground: "hsl(var(--accent-foreground))",
|
|
239
|
-
},
|
|
240
|
-
popover: {
|
|
241
|
-
DEFAULT: "hsl(var(--popover))",
|
|
242
|
-
foreground: "hsl(var(--popover-foreground))",
|
|
243
|
-
},
|
|
244
|
-
card: {
|
|
245
|
-
DEFAULT: "hsl(var(--card))",
|
|
246
|
-
foreground: "hsl(var(--card-foreground))",
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
borderRadius: {
|
|
250
|
-
lg: "var(--radius)",
|
|
251
|
-
md: "calc(var(--radius) - 2px)",
|
|
252
|
-
sm: "calc(var(--radius) - 4px)",
|
|
253
|
-
},
|
|
211
|
+
// vite.config.js
|
|
212
|
+
import { defineConfig } from 'vite'
|
|
213
|
+
import react from '@vitejs/plugin-react'
|
|
214
|
+
|
|
215
|
+
export default defineConfig({
|
|
216
|
+
plugins: [react()],
|
|
217
|
+
css: {
|
|
218
|
+
postcss: {
|
|
219
|
+
plugins: [
|
|
220
|
+
require('tailwindcss'),
|
|
221
|
+
],
|
|
254
222
|
},
|
|
255
223
|
},
|
|
256
|
-
|
|
224
|
+
})
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### CSS Variables
|
|
228
|
+
|
|
229
|
+
The package provides CSS custom properties for theming that are automatically included:
|
|
230
|
+
|
|
231
|
+
```css
|
|
232
|
+
:root {
|
|
233
|
+
--radius: 0.625rem;
|
|
234
|
+
--background: oklch(1 0 0);
|
|
235
|
+
--foreground: oklch(0.145 0 0);
|
|
236
|
+
/* ... more variables */
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.dark {
|
|
240
|
+
--background: oklch(0.145 0 0);
|
|
241
|
+
--foreground: oklch(0.985 0 0);
|
|
242
|
+
/* ... dark mode variables */
|
|
257
243
|
}
|
|
258
244
|
```
|
|
259
245
|
|
|
246
|
+
### Troubleshooting
|
|
247
|
+
|
|
248
|
+
If the styles aren't loading properly:
|
|
249
|
+
|
|
250
|
+
1. **Check your build tool configuration** - Make sure CSS imports are being processed
|
|
251
|
+
2. **Verify Tailwind CSS version** - Ensure you're using Tailwind CSS v4
|
|
252
|
+
3. **Clear cache** - Try clearing your build cache and node_modules
|
|
253
|
+
|
|
260
254
|
## Dependencies
|
|
261
255
|
|
|
262
256
|
This package has the following peer dependencies:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clidey/ux",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"require": "./dist/index.js"
|
|
14
|
-
}
|
|
15
|
-
"./styles": "./dist/styles.css"
|
|
14
|
+
}
|
|
16
15
|
},
|
|
17
16
|
"files": [
|
|
18
17
|
"dist",
|
|
@@ -36,6 +35,7 @@
|
|
|
36
35
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
37
36
|
"@radix-ui/react-label": "^2.1.7",
|
|
38
37
|
"@radix-ui/react-popover": "^1.1.14",
|
|
38
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
39
39
|
"@radix-ui/react-slot": "^1.2.3",
|
|
40
40
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
41
41
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
@@ -49,24 +49,24 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@eslint/js": "^9.30.1",
|
|
52
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
52
53
|
"@types/node": "^24.1.0",
|
|
53
54
|
"@types/react": "^19.1.8",
|
|
54
55
|
"@types/react-dom": "^19.1.6",
|
|
56
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
55
57
|
"@vitejs/plugin-react-swc": "^3.10.2",
|
|
56
58
|
"eslint": "^9.30.1",
|
|
57
59
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
58
60
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
59
61
|
"globals": "^16.3.0",
|
|
62
|
+
"react": "^19.1.0",
|
|
63
|
+
"react-dom": "^19.1.0",
|
|
64
|
+
"tailwindcss": "^4.1.11",
|
|
60
65
|
"tw-animate-css": "^1.3.6",
|
|
61
66
|
"typescript": "~5.8.3",
|
|
62
67
|
"typescript-eslint": "^8.35.1",
|
|
63
68
|
"vite": "^7.0.4",
|
|
64
|
-
"vite-plugin-dts": "^4.0.0"
|
|
65
|
-
"react": "^19.1.0",
|
|
66
|
-
"react-dom": "^19.1.0",
|
|
67
|
-
"@tailwindcss/vite": "^4.1.11",
|
|
68
|
-
"@vitejs/plugin-react": "^4.7.0",
|
|
69
|
-
"tailwindcss": "^4.1.11"
|
|
69
|
+
"vite-plugin-dts": "^4.0.0"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"react",
|