@postxl/ui-components 1.0.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/package.json ADDED
@@ -0,0 +1,131 @@
1
+ {
2
+ "name": "@postxl/ui-components",
3
+ "version": "1.0.0",
4
+ "description": "PostXL UI component library - Radix UI primitives with Tailwind CSS styling",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./theme.css": "./src/styles/theme.css",
15
+ "./data-grid.css": "./src/data-grid/styles.css",
16
+ "./package.json": "./package.json"
17
+ },
18
+ "sideEffects": [
19
+ "**/*.css"
20
+ ],
21
+ "license": "SEE LICENSE IN LICENSE",
22
+ "author": "PostXL GmbH",
23
+ "keywords": [
24
+ "postxl",
25
+ "ui",
26
+ "components",
27
+ "react",
28
+ "tailwindcss",
29
+ "radix-ui"
30
+ ],
31
+ "engines": {
32
+ "node": ">=24"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "src/styles",
40
+ "src/data-grid/styles.css"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsdown",
44
+ "build:watch": "tsdown --watch",
45
+ "lint": "eslint .",
46
+ "prettier:check": "prettier --check \"**/*.{ts,tsx}\" --config ../../prettier.config.js --ignore-path ../../.prettierignore",
47
+ "test": "vitest run",
48
+ "test:unit": "vitest run --project=unit",
49
+ "test:storybook": "vitest run --project=storybook",
50
+ "test:coverage": "vitest run --coverage",
51
+ "test:types": "tsc --noEmit",
52
+ "storybook:start": "storybook dev -p 6007",
53
+ "storybook:build": "storybook build"
54
+ },
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "https://github.com/postxl/pxl",
58
+ "directory": "packages/ui-components"
59
+ },
60
+ "dependencies": {
61
+ "@radix-ui/react-accordion": "1.2.12",
62
+ "@radix-ui/react-alert-dialog": "1.1.15",
63
+ "@radix-ui/react-avatar": "1.1.10",
64
+ "@radix-ui/react-checkbox": "1.1.2",
65
+ "@radix-ui/react-collapsible": "1.1.1",
66
+ "@radix-ui/react-context": "1.1.2",
67
+ "@radix-ui/react-context-menu": "2.2.16",
68
+ "@radix-ui/react-dialog": "1.1.15",
69
+ "@radix-ui/react-dropdown-menu": "2.1.16",
70
+ "@radix-ui/react-hover-card": "1.1.15",
71
+ "@radix-ui/react-icons": "1.3.2",
72
+ "@radix-ui/react-label": "2.1.7",
73
+ "@radix-ui/react-menubar": "1.1.16",
74
+ "@radix-ui/react-navigation-menu": "1.2.14",
75
+ "@radix-ui/react-popover": "1.1.15",
76
+ "@radix-ui/react-radio-group": "1.2.0",
77
+ "@radix-ui/react-scroll-area": "1.2.10",
78
+ "@radix-ui/react-select": "2.2.6",
79
+ "@radix-ui/react-separator": "1.1.7",
80
+ "@radix-ui/react-slider": "1.3.6",
81
+ "@radix-ui/react-slot": "1.2.3",
82
+ "@radix-ui/react-switch": "1.2.6",
83
+ "@radix-ui/react-tabs": "1.1.13",
84
+ "@radix-ui/react-toggle": "1.1.10",
85
+ "@radix-ui/react-toggle-group": "1.1.11",
86
+ "@radix-ui/react-tooltip": "1.2.8",
87
+ "@tanstack/react-table": "8.21.2",
88
+ "@tanstack/react-virtual": "3.13.2",
89
+ "class-variance-authority": "0.7.1",
90
+ "clsx": "2.1.1",
91
+ "cmdk": "1.1.1",
92
+ "date-fns": "4.1.0",
93
+ "embla-carousel-react": "8.5.1",
94
+ "lucide-react": "0.554.0",
95
+ "react-day-picker": "9.11.1",
96
+ "react-resizable-panels": "3.0.6",
97
+ "sonner": "2.0.7",
98
+ "tailwind-merge": "3.3.1",
99
+ "use-local-storage-state": "19.5.0",
100
+ "vaul": "1.1.2"
101
+ },
102
+ "peerDependencies": {
103
+ "react": ">=18.0.0",
104
+ "react-dom": ">=18.0.0",
105
+ "tailwindcss": ">=4.0.0"
106
+ },
107
+ "devDependencies": {
108
+ "@chromatic-com/storybook": "4.1.2",
109
+ "@storybook/addon-docs": "10.0.0",
110
+ "@storybook/addon-onboarding": "10.0.0",
111
+ "@storybook/react": "10.0.0",
112
+ "@storybook/react-vite": "10.0.0",
113
+ "@tailwindcss/vite": "4.1.16",
114
+ "@testing-library/jest-dom": "6.9.1",
115
+ "@testing-library/react": "16.3.0",
116
+ "@testing-library/user-event": "14.6.1",
117
+ "@types/react": "19.1.10",
118
+ "@types/react-dom": "19.1.7",
119
+ "@vitejs/plugin-react": "5.1.0",
120
+ "@vitest/coverage-v8": "3.2.4",
121
+ "jsdom": "27.3.0",
122
+ "react": "19.1.1",
123
+ "react-dom": "19.1.1",
124
+ "storybook": "10.0.0",
125
+ "tailwindcss": "4.1.16",
126
+ "tsdown": "0.11.4",
127
+ "typescript": "~5.8.3",
128
+ "vite": "7.1.12",
129
+ "vitest": "3.2.4"
130
+ }
131
+ }
@@ -0,0 +1,3 @@
1
+ @theme inline {
2
+ --data-grid-line-height: 16px;
3
+ }
@@ -0,0 +1,211 @@
1
+ /**
2
+ * PostXL UI Theme CSS
3
+ *
4
+ * This file contains the CSS variables and Tailwind v4 theme configuration
5
+ * needed for the UI components.
6
+ *
7
+ * Usage in consuming project's main CSS file (path relative to your CSS file):
8
+ *
9
+ * @import 'tailwindcss';
10
+ * @import '@postxl/ui-components/theme.css';
11
+ * @source "../../node_modules/@postxl/ui-components";
12
+ *
13
+ * The @source directive tells Tailwind to scan the library for class names.
14
+ * Note: The path must be relative to your stylesheet, not the project root.
15
+ */
16
+
17
+ :root {
18
+ font-synthesis: none;
19
+ text-rendering: optimizeLegibility;
20
+ -webkit-font-smoothing: antialiased;
21
+ -moz-osx-font-smoothing: grayscale;
22
+
23
+ color-scheme: light;
24
+ --theme-ready-flag: 'light';
25
+ --radius: 0.25rem;
26
+
27
+ /* shadcn theme colors */
28
+ --radius: 0.65rem;
29
+ --background: #ffffff;
30
+ --foreground: #09090b;
31
+ --card: #ffffff;
32
+ --card-foreground: #09090b;
33
+ --popover: #ffffff;
34
+ --popover-foreground: #09090b;
35
+ --primary: #1447e6;
36
+ --primary-foreground: #f8f8ff;
37
+ --secondary: #f4f4f5;
38
+ --secondary-foreground: #18181b;
39
+ --muted: #f4f4f5;
40
+ --muted-foreground: #71717a;
41
+ --accent: #f4f4f5;
42
+ --accent-foreground: #18181b;
43
+ --destructive: #ef4444;
44
+ --destructive-foreground: #fb2c36;
45
+ --border: #e4e4e7;
46
+ --input: #e4e4e7;
47
+ --ring: #a1a1aa;
48
+ --chart-1: #f82c2c;
49
+ --chart-2: #648558;
50
+ --chart-3: #006bb4;
51
+ --chart-4: #669ac0;
52
+ --chart-5: #ffa501;
53
+ --sidebar: #fafafa;
54
+ --sidebar-foreground: #09090b;
55
+ --sidebar-primary: #155dfc;
56
+ --sidebar-primary-foreground: #f8f8ff;
57
+ --sidebar-accent: #f4f4f5;
58
+ --sidebar-accent-foreground: #18181b;
59
+ --sidebar-border: #e4e4e7;
60
+ --sidebar-ring: #a1a1aa;
61
+
62
+ /* additional theme colors */
63
+ --discreet-border: #c0c6c9;
64
+
65
+ /* chart hover colors */
66
+ --chart-1-hover: #f59b9b;
67
+ --chart-2-hover: #a3b49d;
68
+ --chart-3-hover: #669ac0;
69
+ --chart-4-hover: #006bb4;
70
+ --chart-5-hover: #ffd27f;
71
+
72
+ /* table content and other space relevant text */
73
+ --text-sm: 11px;
74
+ --text-sm--line-height: 16px;
75
+ --text-base: 12px;
76
+ --text-base--line-height: 16px;
77
+ --text-lg: 14px;
78
+ --text-lg--line-height: 20px;
79
+ --text-xl: 16px;
80
+ --text-xl--line-height: 24px;
81
+ --text-2xl: 24px;
82
+ --text-2xl--line-height: 32px;
83
+
84
+ /* line height for text-sm (used to determine row height in data-grid) */
85
+ --line-height-sm: 16px;
86
+ }
87
+
88
+ .dark {
89
+ color-scheme: dark;
90
+
91
+ --theme-ready-flag: 'dark';
92
+
93
+ --background: #09090b;
94
+ --foreground: #fafafa;
95
+ --card: #18181b;
96
+ --card-foreground: #fafafa;
97
+ --popover: #18181b;
98
+ --popover-foreground: #fafafa;
99
+ --primary: #1447e6;
100
+ --primary-foreground: #f8f8ff;
101
+ --secondary: #27272a;
102
+ --secondary-foreground: #fafafa;
103
+ --muted: #27272a;
104
+ --muted-foreground: #a1a1aa;
105
+ --accent: #27272a;
106
+ --accent-foreground: #fafafa;
107
+ --destructive: #f87171;
108
+ --border: #ffffff1a;
109
+ --input: #ffffff26;
110
+ --ring: #71717a;
111
+ --sidebar: #18181b;
112
+ --sidebar-foreground: #fafafa;
113
+ --sidebar-primary: #2b7fff;
114
+ --sidebar-primary-foreground: #f8f8ff;
115
+ --sidebar-accent: #27272a;
116
+ --sidebar-accent-foreground: #fafafa;
117
+ --sidebar-border: #ffffff1a;
118
+ --sidebar-ring: #52525b;
119
+
120
+ /* additional theme colors */
121
+ --discreet-border: #3f4143;
122
+ }
123
+
124
+ /**
125
+ * Tailwind v4 theme configuration
126
+ * @see: https://tailwindcss.com/docs/theme#theme-variable-namespaces
127
+ */
128
+ @theme inline {
129
+ --font-sans: Helvetica, sans-serif;
130
+
131
+ --text-sm: 11px;
132
+ --text-sm--line-height: 16px;
133
+ --text-base: 12px;
134
+ --text-base--line-height: 16px;
135
+ --text-lg: 14px;
136
+ --text-lg--line-height: 20px;
137
+ --text-xl: 16px;
138
+ --text-xl--line-height: 24px;
139
+ --text-2xl: 24px;
140
+ --text-2xl--line-height: 32px;
141
+
142
+ /* Colors */
143
+ --color-background: var(--background);
144
+ --color-foreground: var(--foreground);
145
+ --color-card: var(--card);
146
+ --color-card-foreground: var(--card-foreground);
147
+ --color-popover: var(--popover);
148
+ --color-popover-foreground: var(--popover-foreground);
149
+ --color-primary: var(--primary);
150
+ --color-primary-foreground: var(--primary-foreground);
151
+ --color-secondary: var(--secondary);
152
+ --color-secondary-foreground: var(--secondary-foreground);
153
+ --color-muted: var(--muted);
154
+ --color-muted-foreground: var(--muted-foreground);
155
+ --color-accent: var(--accent);
156
+ --color-accent-foreground: var(--accent-foreground);
157
+ --color-destructive: var(--destructive);
158
+ --color-destructive-foreground: var(--destructive-foreground);
159
+ --color-border: var(--border);
160
+ --color-input: var(--input);
161
+ --color-ring: var(--ring);
162
+ --color-chart-1: var(--chart-1);
163
+ --color-chart-2: var(--chart-2);
164
+ --color-chart-3: var(--chart-3);
165
+ --color-chart-4: var(--chart-4);
166
+ --color-chart-5: var(--chart-5);
167
+ --color-sidebar: var(--sidebar);
168
+ --color-sidebar-foreground: var(--sidebar-foreground);
169
+ --color-sidebar-background: light-dark(var(--color-gray-50), var(--color-gray-500));
170
+ --color-sidebar-primary: var(--sidebar-primary);
171
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
172
+ --color-sidebar-accent: var(--sidebar-accent);
173
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
174
+ --color-sidebar-border: var(--sidebar-border);
175
+ --color-sidebar-ring: var(--sidebar-ring);
176
+ }
177
+
178
+ /* Use class-based dark mode instead of media query */
179
+ @custom-variant dark (&:where(.dark, .dark *)); /* NOSONAR - Tailwind CSS v4 at-rule */
180
+
181
+ @layer base {
182
+ html {
183
+ @apply scroll-smooth;
184
+ }
185
+ * {
186
+ @apply border-border outline-ring/50;
187
+ }
188
+ body {
189
+ @apply bg-background text-foreground text-base font-normal;
190
+ }
191
+ }
192
+
193
+ @layer components {
194
+ h1 {
195
+ font-size: var(--text-2xl);
196
+ line-height: var(--text-2xl--line-height);
197
+ font-weight: var(--font-weight-semibold);
198
+ }
199
+
200
+ h2 {
201
+ font-size: var(--text-xl);
202
+ line-height: var(--text-xl--line-height);
203
+ font-weight: var(--font-weight-semibold);
204
+ }
205
+
206
+ h3 {
207
+ font-size: var(--text-lg);
208
+ line-height: var(--text-lg--line-height);
209
+ font-weight: var(--font-weight-semibold);
210
+ }
211
+ }