luxtable 0.3.5 → 0.3.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luxtable",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "private": false,
5
5
  "description": "Enterprise-Grade Data Management. Minimalist Aesthetics.",
6
6
  "keywords": [
@@ -34,6 +34,7 @@
34
34
  "files": [
35
35
  "dist",
36
36
  "registry",
37
+ "src/styles",
37
38
  "README.md",
38
39
  "USAGE.md",
39
40
  "EXAMPLE.md"
@@ -61,7 +62,9 @@
61
62
  "@tanstack/react-table": "^8.0.0",
62
63
  "class-variance-authority": "^0.7.0",
63
64
  "clsx": "^2.0.0",
65
+ "date-fns": "^3.6.0",
64
66
  "lucide-react": "^0.562.0",
67
+ "react-day-picker": "^8.10.1",
65
68
  "tailwind-merge": "^2.0.0"
66
69
  },
67
70
  "devDependencies": {
@@ -0,0 +1,141 @@
1
+ # LuxTable CSS Variables
2
+
3
+ LuxTable uses a comprehensive CSS variable system that is **fully compatible with shadcn/ui**. It includes both shadcn base variables and LuxTable-specific variables, working seamlessly in both light and dark modes.
4
+
5
+ ## How It Works
6
+
7
+ The variable system has two layers:
8
+
9
+ ### 1. shadcn/ui Base Variables
10
+ Standard shadcn variables (`--background`, `--foreground`, `--primary`, `--accent`, `--border`, etc.) that power the shadcn UI components used internally (Button, Dropdown, Checkbox, etc.).
11
+
12
+ **If your project already has shadcn/ui configured**, your CSS variable values will take precedence, and LuxTable's internal UI components will automatically inherit your project's theme.
13
+
14
+ ### 2. LuxTable Specific Variables (`--lux-*`)
15
+ Table-specific tokens that control the appearance of table elements (headers, rows, cells, pagination, etc.). These don't conflict with your existing shadcn setup.
16
+
17
+ ## Usage
18
+
19
+ Import the variables file in your main CSS file:
20
+
21
+ ```css
22
+ @import 'luxtable/src/styles/variables.css';
23
+ ```
24
+
25
+ ## Customization
26
+
27
+ All colors use HSL format and can be easily overridden:
28
+
29
+ ```css
30
+ :root {
31
+ /* Override shadcn base variables */
32
+ --primary: 262 83% 58%;
33
+ --accent: 262 30% 96%;
34
+
35
+ /* Override LuxTable specific variables */
36
+ --lux-table-background: 0 0% 100%;
37
+ --lux-status-active-bg: 142 76% 36%;
38
+ }
39
+
40
+ .dark {
41
+ /* Override dark mode colors */
42
+ --primary: 262 83% 65%;
43
+ --lux-table-background: 222 47% 2%;
44
+ }
45
+ ```
46
+
47
+ ## Available Variables
48
+
49
+ ### shadcn Base Variables
50
+ These power the internal UI components (buttons, dropdowns, checkboxes, etc.):
51
+
52
+ | Variable | Description |
53
+ |----------|-------------|
54
+ | `--background` | Page/component background |
55
+ | `--foreground` | Default text color |
56
+ | `--primary` / `--primary-foreground` | Primary action color |
57
+ | `--secondary` / `--secondary-foreground` | Secondary color |
58
+ | `--muted` / `--muted-foreground` | Muted/subtle color |
59
+ | `--accent` / `--accent-foreground` | Accent/hover color |
60
+ | `--destructive` / `--destructive-foreground` | Destructive action color |
61
+ | `--border` | Default border color |
62
+ | `--input` | Input border color |
63
+ | `--ring` | Focus ring color |
64
+ | `--popover` / `--popover-foreground` | Popover/dropdown color |
65
+ | `--card` / `--card-foreground` | Card color |
66
+ | `--radius` | Border radius |
67
+
68
+ ### LuxTable Specific Variables
69
+
70
+ #### Table Colors
71
+ - `--lux-table-background` - Main table background
72
+ - `--lux-table-foreground` - Main text color
73
+ - `--lux-table-border` - Table borders
74
+ - `--lux-table-header-*` - Header colors (background, foreground, border)
75
+ - `--lux-table-row-*` - Row colors (background, hover, selected, border)
76
+ - `--lux-table-cell-*` - Cell colors (foreground, muted)
77
+ - `--lux-table-footer-*` - Footer colors (background, foreground, border)
78
+
79
+ #### Toolbar
80
+ - `--lux-toolbar-background` / `--lux-toolbar-border` / `--lux-toolbar-foreground`
81
+ - `--lux-toolbar-input-*` - Input field colors (background, border, foreground, placeholder)
82
+ - `--lux-toolbar-icon` - Icon color
83
+
84
+ #### Pagination
85
+ - `--lux-pagination-background` / `--lux-pagination-border` / `--lux-pagination-foreground`
86
+ - `--lux-pagination-hover` / `--lux-pagination-active-*` / `--lux-pagination-disabled`
87
+
88
+ #### Status Colors
89
+ - `--lux-status-active-*` - Active status (bg, text)
90
+ - `--lux-status-inactive-*` - Inactive status
91
+ - `--lux-status-pending-*` - Pending status
92
+ - `--lux-status-completed-*` - Completed status
93
+ - `--lux-status-cancelled-*` - Cancelled status
94
+ - `--lux-status-default-*` - Default/unknown status
95
+
96
+ #### Selection
97
+ - `--lux-selection-background` / `--lux-selection-foreground` / `--lux-selection-border`
98
+ - `--lux-selection-info-*` - Selection info bar colors
99
+
100
+ #### Sort
101
+ - `--lux-sort-active` - Active sort direction indicator color
102
+ - `--lux-sort-idle` - Idle (unsorted) indicator color
103
+ - `--lux-sort-sorted-text` - Sorted column header text color
104
+
105
+ #### Other
106
+ - `--lux-progress-bg` / `--lux-progress-bar` / `--lux-progress-text` - Progress bar
107
+ - `--lux-boolean-true` / `--lux-boolean-false` - Boolean display
108
+ - `--lux-filter-*` - Filter panel (background, border, foreground)
109
+ - `--lux-focus-ring` / `--lux-focus-ring-offset` - Focus ring
110
+
111
+ ## Format
112
+
113
+ All variables use HSL format (Hue Saturation Lightness) without the `hsl()` wrapper:
114
+
115
+ ```css
116
+ --lux-table-background: 0 0% 100%; /* hsl(0, 0%, 100%) */
117
+ ```
118
+
119
+ This allows Tailwind to use them with arbitrary values:
120
+ ```tsx
121
+ className="bg-[hsl(var(--lux-table-background))]"
122
+ ```
123
+
124
+ ## Compatibility with Existing shadcn Projects
125
+
126
+ If your project already has shadcn/ui configured with its own `globals.css`, the base variables in `variables.css` serve as **fallback defaults**. Your project's values will override them automatically since CSS specificity follows the cascade.
127
+
128
+ This means:
129
+ - ✅ LuxTable works out of the box without shadcn setup
130
+ - ✅ LuxTable inherits your existing shadcn theme automatically
131
+ - ✅ `--lux-*` variables never conflict with standard shadcn variables
132
+
133
+ ## Dark Mode
134
+
135
+ Dark mode is automatically handled. When you add the `.dark` class to your root element, all variables switch to their dark mode values. You can override them in the `.dark` selector:
136
+
137
+ ```css
138
+ .dark {
139
+ --lux-table-background: 222 47% 2%;
140
+ }
141
+ ```
@@ -0,0 +1,283 @@
1
+ /**
2
+ * LuxTable CSS Variables
3
+ *
4
+ * Comprehensive design token system compatible with shadcn/ui.
5
+ * Includes both shadcn base variables and LuxTable-specific variables.
6
+ * All colors use HSL format for easy customization and override.
7
+ *
8
+ * Usage:
9
+ * 1. Import this file in your app's CSS
10
+ * 2. Override variables in your :root or .dark selector as needed
11
+ *
12
+ * If your project already has shadcn/ui configured with its own CSS variables,
13
+ * the shadcn base variables below will be overridden by your project's values.
14
+ * The --lux-* variables are table-specific and won't conflict.
15
+ *
16
+ * @example
17
+ * ```css
18
+ * :root {
19
+ * --lux-table-border: 214 32% 91%;
20
+ * --lux-table-primary: 221 83% 53%;
21
+ * }
22
+ * ```
23
+ */
24
+ @layer base {
25
+ :root {
26
+ /* ================================================================
27
+ * shadcn/ui Base Variables - Light Mode
28
+ * These provide defaults for shadcn UI components (Button, Dropdown, etc.)
29
+ * If your project already defines these, your values will take precedence.
30
+ * ================================================================ */
31
+ --background: 0 0% 100%;
32
+ --foreground: 224 71% 4%;
33
+
34
+ --card: 0 0% 100%;
35
+ --card-foreground: 224 71% 4%;
36
+
37
+ --popover: 0 0% 100%;
38
+ --popover-foreground: 224 71% 4%;
39
+
40
+ --primary: 220.9 39.3% 11%;
41
+ --primary-foreground: 210 20% 98%;
42
+
43
+ --secondary: 220 14% 96%;
44
+ --secondary-foreground: 220.9 39.3% 11%;
45
+
46
+ --muted: 220 14% 96%;
47
+ --muted-foreground: 220 9% 46%;
48
+
49
+ --accent: 220 14% 96%;
50
+ --accent-foreground: 220.9 39.3% 11%;
51
+
52
+ --destructive: 0 84% 60%;
53
+ --destructive-foreground: 0 0% 98%;
54
+
55
+ --border: 220 13% 91%;
56
+ --input: 220 13% 91%;
57
+ --ring: 220.9 39.3% 11%;
58
+
59
+ --radius: 0.5rem;
60
+
61
+ /* ================================================================
62
+ * LuxTable Specific Variables - Light Mode
63
+ * Table component tokens that extend beyond shadcn's base palette.
64
+ * ================================================================ */
65
+
66
+ /* Table Base Colors */
67
+ --lux-table-background: 0 0% 100%;
68
+ --lux-table-foreground: 224 71% 4%;
69
+ --lux-table-border: 220 13% 91%;
70
+ --lux-table-ring: 220.9 39.3% 11%;
71
+
72
+ /* Table Header */
73
+ --lux-table-header-background: 220 14% 96%;
74
+ --lux-table-header-foreground: 220 9% 46%;
75
+ --lux-table-header-border: 220 13% 91%;
76
+
77
+ /* Table Row */
78
+ --lux-table-row-background: 0 0% 100%;
79
+ --lux-table-row-hover: 220 14% 96%;
80
+ --lux-table-row-selected: 220 100% 97%;
81
+ --lux-table-row-border: 220 13% 91%;
82
+
83
+ /* Table Cell */
84
+ --lux-table-cell-foreground: 224 71% 4%;
85
+ --lux-table-cell-muted: 220 9% 46%;
86
+
87
+ /* Table Footer */
88
+ --lux-table-footer-background: 220 14% 96%;
89
+ --lux-table-footer-foreground: 224 71% 4%;
90
+ --lux-table-footer-border: 220 13% 91%;
91
+
92
+ /* Toolbar */
93
+ --lux-toolbar-background: 220 14% 96%;
94
+ --lux-toolbar-border: 220 13% 91%;
95
+ --lux-toolbar-foreground: 224 71% 4%;
96
+ --lux-toolbar-input-background: 0 0% 100%;
97
+ --lux-toolbar-input-border: 220 13% 91%;
98
+ --lux-toolbar-input-foreground: 224 71% 4%;
99
+ --lux-toolbar-input-placeholder: 220 9% 46%;
100
+ --lux-toolbar-icon: 220 9% 46%;
101
+
102
+ /* Pagination */
103
+ --lux-pagination-background: 0 0% 100%;
104
+ --lux-pagination-border: 220 13% 91%;
105
+ --lux-pagination-foreground: 224 71% 4%;
106
+ --lux-pagination-hover: 220 14% 96%;
107
+ --lux-pagination-active-background: 220.9 39.3% 11%;
108
+ --lux-pagination-active-foreground: 210 20% 98%;
109
+ --lux-pagination-disabled: 220 9% 46%;
110
+
111
+ /* Status Colors */
112
+ --lux-status-active-bg: 142 76% 36%;
113
+ --lux-status-active-text: 0 0% 100%;
114
+ --lux-status-inactive-bg: 0 84% 60%;
115
+ --lux-status-inactive-text: 0 0% 100%;
116
+ --lux-status-pending-bg: 38 92% 50%;
117
+ --lux-status-pending-text: 0 0% 100%;
118
+ --lux-status-completed-bg: 221 83% 53%;
119
+ --lux-status-completed-text: 0 0% 100%;
120
+ --lux-status-cancelled-bg: 220 9% 46%;
121
+ --lux-status-cancelled-text: 0 0% 100%;
122
+ --lux-status-default-bg: 220 9% 46%;
123
+ --lux-status-default-text: 0 0% 100%;
124
+
125
+ /* Selection */
126
+ --lux-selection-background: 220 100% 97%;
127
+ --lux-selection-foreground: 220.9 39.3% 11%;
128
+ --lux-selection-border: 220 100% 97%;
129
+ --lux-selection-info-background: 220 100% 97%;
130
+ --lux-selection-info-foreground: 220.9 39.3% 11%;
131
+ --lux-selection-info-border: 220 13% 91%;
132
+
133
+ /* Filter */
134
+ --lux-filter-background: 220 14% 96%;
135
+ --lux-filter-border: 220 13% 91%;
136
+ --lux-filter-foreground: 224 71% 4%;
137
+
138
+ /* Focus Ring */
139
+ --lux-focus-ring: 220.9 39.3% 11%;
140
+ --lux-focus-ring-offset: 0 0% 100%;
141
+
142
+ /* Progress Bar */
143
+ --lux-progress-bg: 220 13% 91%;
144
+ --lux-progress-bar: 221 83% 53%;
145
+ --lux-progress-text: 220 9% 46%;
146
+
147
+ /* Boolean */
148
+ --lux-boolean-true: 142 76% 36%;
149
+ --lux-boolean-false: 0 84% 60%;
150
+
151
+ /* Sort Indicator */
152
+ --lux-sort-active: 221 83% 53%;
153
+ --lux-sort-idle: 220 9% 46%;
154
+ --lux-sort-sorted-text: 142 76% 36%;
155
+ }
156
+
157
+ .dark {
158
+ /* ================================================================
159
+ * shadcn/ui Base Variables - Dark Mode
160
+ * ================================================================ */
161
+ --background: 222 47% 5%;
162
+ --foreground: 210 40% 98%;
163
+
164
+ --card: 222 47% 5%;
165
+ --card-foreground: 210 40% 98%;
166
+
167
+ --popover: 222 47% 6%;
168
+ --popover-foreground: 210 40% 98%;
169
+
170
+ --primary: 210 40% 98%;
171
+ --primary-foreground: 222 47% 5%;
172
+
173
+ --secondary: 217 33% 14%;
174
+ --secondary-foreground: 210 40% 98%;
175
+
176
+ --muted: 217 33% 14%;
177
+ --muted-foreground: 215 20% 65%;
178
+
179
+ --accent: 217 33% 14%;
180
+ --accent-foreground: 210 40% 98%;
181
+
182
+ --destructive: 0 63% 31%;
183
+ --destructive-foreground: 210 40% 98%;
184
+
185
+ --border: 217 33% 18%;
186
+ --input: 217 33% 18%;
187
+ --ring: 212 100% 67%;
188
+
189
+ /* ================================================================
190
+ * LuxTable Specific Variables - Dark Mode
191
+ * ================================================================ */
192
+
193
+ /* Table Base Colors */
194
+ --lux-table-background: 222 47% 5%;
195
+ --lux-table-foreground: 210 40% 98%;
196
+ --lux-table-border: 217 33% 18%;
197
+ --lux-table-ring: 212 100% 67%;
198
+
199
+ /* Table Header */
200
+ --lux-table-header-background: 222 40% 7%;
201
+ --lux-table-header-foreground: 0 0% 100%;
202
+ --lux-table-header-border: 217 33% 18%;
203
+
204
+ /* Table Row */
205
+ --lux-table-row-background: 222 47% 5%;
206
+ --lux-table-row-hover: 217 33% 10%;
207
+ --lux-table-row-selected: 213 50% 12%;
208
+ --lux-table-row-border: 217 33% 18%;
209
+
210
+ /* Table Cell */
211
+ --lux-table-cell-foreground: 0 0% 100%;
212
+ --lux-table-cell-muted: 0 0% 75%;
213
+
214
+ /* Table Footer */
215
+ --lux-table-footer-background: 217 33% 10%;
216
+ --lux-table-footer-foreground: 210 40% 93%;
217
+ --lux-table-footer-border: 217 33% 18%;
218
+
219
+ /* Toolbar */
220
+ --lux-toolbar-background: 222 40% 7%;
221
+ --lux-toolbar-border: 217 33% 18%;
222
+ --lux-toolbar-foreground: 0 0% 100%;
223
+ --lux-toolbar-input-background: 222 47% 5%;
224
+ --lux-toolbar-input-border: 217 33% 20%;
225
+ --lux-toolbar-input-foreground: 0 0% 100%;
226
+ --lux-toolbar-input-placeholder: 0 0% 60%;
227
+ --lux-toolbar-icon: 0 0% 90%;
228
+
229
+ /* Pagination */
230
+ --lux-pagination-background: 222 47% 5%;
231
+ --lux-pagination-border: 217 33% 18%;
232
+ --lux-pagination-foreground: 0 0% 100%;
233
+ --lux-pagination-hover: 217 33% 10%;
234
+ --lux-pagination-active-background: 212 100% 67%;
235
+ --lux-pagination-active-foreground: 222 47% 5%;
236
+ --lux-pagination-disabled: 0 0% 50%;
237
+
238
+ /* Status Colors */
239
+ --lux-status-active-bg: 142 65% 18%;
240
+ --lux-status-active-text: 142 76% 72%;
241
+ --lux-status-inactive-bg: 0 55% 22%;
242
+ --lux-status-inactive-text: 0 84% 75%;
243
+ --lux-status-pending-bg: 38 55% 22%;
244
+ --lux-status-pending-text: 38 92% 72%;
245
+ --lux-status-completed-bg: 221 50% 24%;
246
+ --lux-status-completed-text: 221 83% 75%;
247
+ --lux-status-cancelled-bg: 215 15% 18%;
248
+ --lux-status-cancelled-text: 215 20% 68%;
249
+ --lux-status-default-bg: 215 15% 18%;
250
+ --lux-status-default-text: 215 20% 68%;
251
+
252
+ /* Selection */
253
+ --lux-selection-background: 213 50% 12%;
254
+ --lux-selection-foreground: 210 40% 88%;
255
+ --lux-selection-border: 217 33% 18%;
256
+ --lux-selection-info-background: 213 50% 12%;
257
+ --lux-selection-info-foreground: 210 40% 93%;
258
+ --lux-selection-info-border: 217 33% 18%;
259
+
260
+ /* Filter */
261
+ --lux-filter-background: 222 40% 7%;
262
+ --lux-filter-border: 217 33% 20%;
263
+ --lux-filter-foreground: 0 0% 100%;
264
+
265
+ /* Focus Ring */
266
+ --lux-focus-ring: 212 100% 67%;
267
+ --lux-focus-ring-offset: 222 47% 5%;
268
+
269
+ /* Progress Bar */
270
+ --lux-progress-bg: 217 33% 18%;
271
+ --lux-progress-bar: 221 83% 58%;
272
+ --lux-progress-text: 0 0% 95%;
273
+
274
+ /* Boolean */
275
+ --lux-boolean-true: 142 76% 50%;
276
+ --lux-boolean-false: 0 84% 60%;
277
+
278
+ /* Sort Indicator */
279
+ --lux-sort-active: 212 100% 70%;
280
+ --lux-sort-idle: 0 0% 70%;
281
+ --lux-sort-sorted-text: 142 76% 55%;
282
+ }
283
+ }