@vllnt/ui 0.1.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/LICENSE +21 -0
- package/README.md +312 -0
- package/dist/chunk-XRV5RSYH.js +568 -0
- package/dist/flow-diagram-N3EHM6VB.js +1 -0
- package/dist/index.d.ts +1835 -0
- package/dist/index.js +8551 -0
- package/dist/tailwind-preset.d.ts +5 -0
- package/dist/tailwind-preset.js +87 -0
- package/package.json +143 -0
- package/styles.css +92 -0
- package/themes/default.css +44 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { dirname, join } from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import animate from 'tailwindcss-animate';
|
|
4
|
+
|
|
5
|
+
// src/tailwind-preset.ts
|
|
6
|
+
var __dirname$1 = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
var preset = {
|
|
8
|
+
content: [join(__dirname$1, "**/*.js")],
|
|
9
|
+
darkMode: ["class"],
|
|
10
|
+
plugins: [animate],
|
|
11
|
+
theme: {
|
|
12
|
+
container: {
|
|
13
|
+
center: true,
|
|
14
|
+
padding: "2rem",
|
|
15
|
+
screens: {
|
|
16
|
+
"2xl": "1400px"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
extend: {
|
|
20
|
+
animation: {
|
|
21
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
22
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
23
|
+
shimmer: "shimmer 2s infinite"
|
|
24
|
+
},
|
|
25
|
+
borderRadius: {
|
|
26
|
+
lg: "var(--radius)",
|
|
27
|
+
md: "calc(var(--radius) - 2px)",
|
|
28
|
+
sm: "calc(var(--radius) - 4px)"
|
|
29
|
+
},
|
|
30
|
+
colors: {
|
|
31
|
+
accent: {
|
|
32
|
+
DEFAULT: "hsl(var(--accent))",
|
|
33
|
+
foreground: "hsl(var(--accent-foreground))"
|
|
34
|
+
},
|
|
35
|
+
background: "hsl(var(--background))",
|
|
36
|
+
border: "hsl(var(--border))",
|
|
37
|
+
card: {
|
|
38
|
+
DEFAULT: "hsl(var(--card))",
|
|
39
|
+
foreground: "hsl(var(--card-foreground))"
|
|
40
|
+
},
|
|
41
|
+
destructive: {
|
|
42
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
43
|
+
foreground: "hsl(var(--destructive-foreground))"
|
|
44
|
+
},
|
|
45
|
+
foreground: "hsl(var(--foreground))",
|
|
46
|
+
input: "hsl(var(--input))",
|
|
47
|
+
muted: {
|
|
48
|
+
DEFAULT: "hsl(var(--muted))",
|
|
49
|
+
foreground: "hsl(var(--muted-foreground))"
|
|
50
|
+
},
|
|
51
|
+
popover: {
|
|
52
|
+
DEFAULT: "hsl(var(--popover))",
|
|
53
|
+
foreground: "hsl(var(--popover-foreground))"
|
|
54
|
+
},
|
|
55
|
+
primary: {
|
|
56
|
+
DEFAULT: "hsl(var(--primary))",
|
|
57
|
+
foreground: "hsl(var(--primary-foreground))"
|
|
58
|
+
},
|
|
59
|
+
ring: "hsl(var(--ring))",
|
|
60
|
+
secondary: {
|
|
61
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
62
|
+
foreground: "hsl(var(--secondary-foreground))"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
fontFamily: {
|
|
66
|
+
mono: ["var(--font-mono)", "ui-monospace", "monospace"]
|
|
67
|
+
},
|
|
68
|
+
keyframes: {
|
|
69
|
+
"accordion-down": {
|
|
70
|
+
from: { height: "0" },
|
|
71
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
72
|
+
},
|
|
73
|
+
"accordion-up": {
|
|
74
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
75
|
+
to: { height: "0" }
|
|
76
|
+
},
|
|
77
|
+
shimmer: {
|
|
78
|
+
"0%": { transform: "translateX(-100%)" },
|
|
79
|
+
"100%": { transform: "translateX(100%)" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var tailwind_preset_default = preset;
|
|
86
|
+
|
|
87
|
+
export { tailwind_preset_default as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vllnt/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React component library — 93 components built on Radix UI, Tailwind CSS, and CVA",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "vllnt",
|
|
7
|
+
"homepage": "https://github.com/vllnt/ui#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/vllnt/ui.git",
|
|
11
|
+
"directory": "packages/ui"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/vllnt/ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react",
|
|
18
|
+
"components",
|
|
19
|
+
"ui",
|
|
20
|
+
"radix-ui",
|
|
21
|
+
"tailwindcss",
|
|
22
|
+
"design-system",
|
|
23
|
+
"shadcn"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"module": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./tailwind-preset": {
|
|
35
|
+
"types": "./dist/tailwind-preset.d.ts",
|
|
36
|
+
"import": "./dist/tailwind-preset.js"
|
|
37
|
+
},
|
|
38
|
+
"./styles.css": "./styles.css",
|
|
39
|
+
"./themes/default.css": "./themes/default.css"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"styles.css",
|
|
44
|
+
"themes"
|
|
45
|
+
],
|
|
46
|
+
"sideEffects": [
|
|
47
|
+
"*.css"
|
|
48
|
+
],
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"react": ">=18.0.0",
|
|
51
|
+
"react-dom": ">=18.0.0",
|
|
52
|
+
"next": ">=14.0.0",
|
|
53
|
+
"next-themes": ">=0.4.0",
|
|
54
|
+
"tailwindcss": ">=3.0.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"next": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"next-themes": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
66
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
67
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
68
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
69
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
70
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
71
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
72
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
73
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
74
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
75
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
76
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
77
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
78
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
79
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
80
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
81
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
82
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
83
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
84
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
85
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
86
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
87
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
88
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
89
|
+
"@tanstack/react-table": "^8.21.3",
|
|
90
|
+
"@xyflow/react": "^12.10.0",
|
|
91
|
+
"class-variance-authority": "^0.7.1",
|
|
92
|
+
"clsx": "^2.1.1",
|
|
93
|
+
"cmdk": "^1.0.0",
|
|
94
|
+
"embla-carousel-react": "^8.6.0",
|
|
95
|
+
"html-to-image": "^1.11.13",
|
|
96
|
+
"input-otp": "^1.4.2",
|
|
97
|
+
"lucide-react": "^0.468.0",
|
|
98
|
+
"react-day-picker": "^9.13.0",
|
|
99
|
+
"react-markdown": "^10.1.0",
|
|
100
|
+
"react-resizable-panels": "^4.3.3",
|
|
101
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
102
|
+
"sonner": "^1.7.4",
|
|
103
|
+
"tailwind-merge": "^2.5.5",
|
|
104
|
+
"vaul": "^1.1.2"
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@playwright/experimental-ct-react": "^1.57.0",
|
|
108
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
109
|
+
"@testing-library/react": "^16.3.0",
|
|
110
|
+
"@types/node": "^22",
|
|
111
|
+
"@types/react": "^19.1.6",
|
|
112
|
+
"@types/react-dom": "^19.1.6",
|
|
113
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
114
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
115
|
+
"@vllnt/eslint-config": "^1.0.0",
|
|
116
|
+
"@vllnt/typescript": "^1.0.0",
|
|
117
|
+
"autoprefixer": "^10.4.21",
|
|
118
|
+
"eslint": "^9.39.1",
|
|
119
|
+
"jsdom": "^26.1.0",
|
|
120
|
+
"playwright": "^1.57.0",
|
|
121
|
+
"postcss": "^8.5.6",
|
|
122
|
+
"tailwindcss": "^3.4.17",
|
|
123
|
+
"tailwindcss-animate": "^1.0.7",
|
|
124
|
+
"tsup": "^8.5.0",
|
|
125
|
+
"tsx": "^4.21.0",
|
|
126
|
+
"typescript": "^5.9.3",
|
|
127
|
+
"vitest": "^4.0.16"
|
|
128
|
+
},
|
|
129
|
+
"scripts": {
|
|
130
|
+
"build": "tsup",
|
|
131
|
+
"clean": "rm -rf dist node_modules coverage .snapshots playwright-report test-results",
|
|
132
|
+
"lint": "eslint .",
|
|
133
|
+
"lint:fix": "eslint . --fix",
|
|
134
|
+
"check:circular": "madge --circular --extensions ts,tsx src",
|
|
135
|
+
"test": "vitest",
|
|
136
|
+
"test:once": "vitest run",
|
|
137
|
+
"test:coverage": "vitest run --coverage",
|
|
138
|
+
"test:visual": "playwright test -c playwright-ct.config.ts",
|
|
139
|
+
"test:visual:update": "playwright test -c playwright-ct.config.ts --update-snapshots",
|
|
140
|
+
"test:all": "pnpm test:coverage && pnpm test:visual",
|
|
141
|
+
"test:generate": "tsx scripts/generate-tests.ts"
|
|
142
|
+
}
|
|
143
|
+
}
|
package/styles.css
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
/* Default theme variables */
|
|
6
|
+
@layer base {
|
|
7
|
+
:root {
|
|
8
|
+
--background: 0 0% 100%;
|
|
9
|
+
--foreground: 0 0% 3.9%;
|
|
10
|
+
--card: 0 0% 100%;
|
|
11
|
+
--card-foreground: 0 0% 3.9%;
|
|
12
|
+
--popover: 0 0% 100%;
|
|
13
|
+
--popover-foreground: 0 0% 3.9%;
|
|
14
|
+
--primary: 0 0% 9%;
|
|
15
|
+
--primary-foreground: 0 0% 98%;
|
|
16
|
+
--secondary: 0 0% 96.1%;
|
|
17
|
+
--secondary-foreground: 0 0% 9%;
|
|
18
|
+
--muted: 0 0% 96.1%;
|
|
19
|
+
--muted-foreground: 0 0% 45.1%;
|
|
20
|
+
--accent: 0 0% 96.1%;
|
|
21
|
+
--accent-foreground: 0 0% 9%;
|
|
22
|
+
--destructive: 0 84.2% 60.2%;
|
|
23
|
+
--destructive-foreground: 0 0% 98%;
|
|
24
|
+
--border: 0 0% 89.8%;
|
|
25
|
+
--input: 0 0% 89.8%;
|
|
26
|
+
--ring: 0 0% 3.9%;
|
|
27
|
+
--radius: 0.5rem;
|
|
28
|
+
}
|
|
29
|
+
.dark {
|
|
30
|
+
--background: 0 0% 3.9%;
|
|
31
|
+
--foreground: 0 0% 98%;
|
|
32
|
+
--card: 0 0% 3.9%;
|
|
33
|
+
--card-foreground: 0 0% 98%;
|
|
34
|
+
--popover: 0 0% 3.9%;
|
|
35
|
+
--popover-foreground: 0 0% 98%;
|
|
36
|
+
--primary: 0 0% 98%;
|
|
37
|
+
--primary-foreground: 0 0% 9%;
|
|
38
|
+
--secondary: 0 0% 14.9%;
|
|
39
|
+
--secondary-foreground: 0 0% 98%;
|
|
40
|
+
--muted: 0 0% 14.9%;
|
|
41
|
+
--muted-foreground: 0 0% 63.9%;
|
|
42
|
+
--accent: 0 0% 14.9%;
|
|
43
|
+
--accent-foreground: 0 0% 98%;
|
|
44
|
+
--destructive: 0 62.8% 30.6%;
|
|
45
|
+
--destructive-foreground: 0 0% 98%;
|
|
46
|
+
--border: 0 0% 14.9%;
|
|
47
|
+
--input: 0 0% 14.9%;
|
|
48
|
+
--ring: 0 0% 83.1%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@layer base {
|
|
53
|
+
* {
|
|
54
|
+
@apply border-border;
|
|
55
|
+
}
|
|
56
|
+
body {
|
|
57
|
+
@apply bg-background text-foreground font-mono;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Safe area utilities for notched/rounded devices (iPhone, etc.) */
|
|
62
|
+
@layer utilities {
|
|
63
|
+
.ml-safe {
|
|
64
|
+
margin-left: env(safe-area-inset-left, 0);
|
|
65
|
+
}
|
|
66
|
+
.mr-safe {
|
|
67
|
+
margin-right: env(safe-area-inset-right, 0);
|
|
68
|
+
}
|
|
69
|
+
.mb-safe {
|
|
70
|
+
margin-bottom: env(safe-area-inset-bottom, 0);
|
|
71
|
+
}
|
|
72
|
+
.mt-safe {
|
|
73
|
+
margin-top: env(safe-area-inset-top, 0);
|
|
74
|
+
}
|
|
75
|
+
.pl-safe {
|
|
76
|
+
padding-left: env(safe-area-inset-left, 0);
|
|
77
|
+
}
|
|
78
|
+
.pr-safe {
|
|
79
|
+
padding-right: env(safe-area-inset-right, 0);
|
|
80
|
+
}
|
|
81
|
+
.pb-safe {
|
|
82
|
+
padding-bottom: env(safe-area-inset-bottom, 0);
|
|
83
|
+
}
|
|
84
|
+
.pt-safe {
|
|
85
|
+
padding-top: env(safe-area-inset-top, 0);
|
|
86
|
+
}
|
|
87
|
+
/* Combined bottom padding for sticky CTAs */
|
|
88
|
+
.safe-bottom {
|
|
89
|
+
padding-bottom: max(1rem, env(safe-area-inset-bottom, 0));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* Default theme variables */
|
|
2
|
+
:root {
|
|
3
|
+
--background: 0 0% 100%;
|
|
4
|
+
--foreground: 0 0% 3.9%;
|
|
5
|
+
--card: 0 0% 100%;
|
|
6
|
+
--card-foreground: 0 0% 3.9%;
|
|
7
|
+
--popover: 0 0% 100%;
|
|
8
|
+
--popover-foreground: 0 0% 3.9%;
|
|
9
|
+
--primary: 0 0% 9%;
|
|
10
|
+
--primary-foreground: 0 0% 98%;
|
|
11
|
+
--secondary: 0 0% 96.1%;
|
|
12
|
+
--secondary-foreground: 0 0% 9%;
|
|
13
|
+
--muted: 0 0% 96.1%;
|
|
14
|
+
--muted-foreground: 0 0% 45.1%;
|
|
15
|
+
--accent: 0 0% 96.1%;
|
|
16
|
+
--accent-foreground: 0 0% 9%;
|
|
17
|
+
--destructive: 0 84.2% 60.2%;
|
|
18
|
+
--destructive-foreground: 0 0% 98%;
|
|
19
|
+
--border: 0 0% 89.8%;
|
|
20
|
+
--input: 0 0% 89.8%;
|
|
21
|
+
--ring: 0 0% 3.9%;
|
|
22
|
+
--radius: 0.5rem;
|
|
23
|
+
}
|
|
24
|
+
.dark {
|
|
25
|
+
--background: 0 0% 0%;
|
|
26
|
+
--foreground: 0 0% 98%;
|
|
27
|
+
--card: 0 0% 3.9%;
|
|
28
|
+
--card-foreground: 0 0% 98%;
|
|
29
|
+
--popover: 0 0% 3.9%;
|
|
30
|
+
--popover-foreground: 0 0% 98%;
|
|
31
|
+
--primary: 0 0% 98%;
|
|
32
|
+
--primary-foreground: 0 0% 9%;
|
|
33
|
+
--secondary: 0 0% 14.9%;
|
|
34
|
+
--secondary-foreground: 0 0% 98%;
|
|
35
|
+
--muted: 0 0% 14.9%;
|
|
36
|
+
--muted-foreground: 0 0% 63.9%;
|
|
37
|
+
--accent: 0 0% 14.9%;
|
|
38
|
+
--accent-foreground: 0 0% 98%;
|
|
39
|
+
--destructive: 0 62.8% 30.6%;
|
|
40
|
+
--destructive-foreground: 0 0% 98%;
|
|
41
|
+
--border: 0 0% 14.9%;
|
|
42
|
+
--input: 0 0% 14.9%;
|
|
43
|
+
--ring: 0 0% 83.1%;
|
|
44
|
+
}
|