munza-x-data-grid 3.0.0-beta.16 → 3.0.0-beta.3
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 +61 -272
- package/dist/README.md +77 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/data/dummyVehicles.d.ts +13 -0
- package/dist/data-grid.cjs +8 -0
- package/dist/data-grid.js +3273 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/main.d.ts +0 -1
- package/dist/package/contexts/GridContext.d.ts +16 -0
- package/dist/package/grid/index.d.ts +3 -0
- package/dist/package/index.d.ts +3 -0
- package/dist/package/lib/queryBuilder.d.ts +76 -0
- package/dist/package/table/TMain.d.ts +2 -0
- package/dist/package/types/index.d.ts +8 -0
- package/package.json +88 -49
- package/dist/button/index.d.ts +0 -7
- package/dist/index.cjs +0 -1
- package/dist/index.css +0 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -8
package/README.md
CHANGED
|
@@ -1,288 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
npm install munza-x-data-grid
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Import the stylesheet in your app entry point:
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
import 'munza-x-data-grid/style.css';
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Peer Dependencies
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install react react-dom
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Requires **React 18 or 19**.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Basic Usage
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
import { Grid, useGridState, type ColumnDef } from 'munza-x-data-grid';
|
|
33
|
-
import 'munza-x-data-grid/style.css';
|
|
34
|
-
|
|
35
|
-
type Person = {
|
|
36
|
-
firstName: string;
|
|
37
|
-
lastName: string;
|
|
38
|
-
age: number;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const columns: ColumnDef<Person>[] = [
|
|
42
|
-
{ accessorKey: 'firstName', header: 'First Name' },
|
|
43
|
-
{ accessorKey: 'lastName', header: 'Last Name' },
|
|
44
|
-
{ accessorKey: 'age', header: 'Age' },
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
const data: Person[] = [{ firstName: 'Alice', lastName: 'Smith', age: 30 }];
|
|
48
|
-
|
|
49
|
-
export default function App() {
|
|
50
|
-
const { state, handlers } = useGridState();
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<Grid
|
|
54
|
-
columns={columns}
|
|
55
|
-
payload={{ data, total: data.length }}
|
|
56
|
-
state={state}
|
|
57
|
-
{...handlers}
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## API Reference
|
|
66
|
-
|
|
67
|
-
### `<Grid />`
|
|
68
|
-
|
|
69
|
-
The top-level component that renders the full data grid.
|
|
70
|
-
|
|
71
|
-
| Prop | Type | Required | Description |
|
|
72
|
-
| ----------------------- | ------------------------------------------ | -------- | -------------------------------------------------------- |
|
|
73
|
-
| `columns` | `ColumnDef<T>[]` | ✅ | Column definitions (TanStack Table format) |
|
|
74
|
-
| `payload` | `{ data: T[], total: number }` | ✅ | Row data and total count for pagination |
|
|
75
|
-
| `state` | `Partial<TableState>` | ✅ | Controlled table state (from `useGridState`) |
|
|
76
|
-
| `onColumnFiltersChange` | `OnChangeFn<ColumnFiltersState>` | — | Callback for column filter changes |
|
|
77
|
-
| `onPaginationChange` | `OnChangeFn<PaginationState>` | — | Callback for pagination changes |
|
|
78
|
-
| `onSortingChange` | `OnChangeFn<SortingState>` | — | Callback for sort changes |
|
|
79
|
-
| `setGlobalFilter` | `Dispatch<SetStateAction<string>>` | — | Callback to update the global search filter |
|
|
80
|
-
| `isLoading` | `boolean` | — | Displays a loading state |
|
|
81
|
-
| `isError` | `boolean` | — | Displays an error state |
|
|
82
|
-
| `manualPagination` | `boolean` | — | Set `true` for server-side pagination (default: `false`) |
|
|
83
|
-
| `getRowCanExpand` | `(row: Row<T>) => boolean` | — | Controls which rows are expandable |
|
|
84
|
-
| `renderSubComponent` | `(props: { row: Row<T> }) => ReactElement` | — | Renders expanded row content |
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
### `useGridState()`
|
|
89
|
-
|
|
90
|
-
Hook that provides controlled state and event handlers to pass into `<Grid />`.
|
|
91
|
-
|
|
92
|
-
```tsx
|
|
93
|
-
const { state, handlers } = useGridState();
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Returns:**
|
|
97
|
-
|
|
98
|
-
| Key | Description |
|
|
99
|
-
| ---------- | ----------------------------------------------------------------------------------------------------- |
|
|
100
|
-
| `state` | Partial `TableState` object (sorting, pagination, filters, etc.) |
|
|
101
|
-
| `handlers` | Object containing `onSortingChange`, `onPaginationChange`, `onColumnFiltersChange`, `setGlobalFilter` |
|
|
102
|
-
|
|
103
|
-
Spread `handlers` directly onto `<Grid />`:
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
<Grid state={state} {...handlers} columns={columns} payload={payload} />
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Tailwind v4 Setup
|
|
110
|
-
|
|
111
|
-
If you're using Tailwind v4, add this to your `app.css` so Tailwind scans the grid's classes:
|
|
112
|
-
|
|
113
|
-
```css
|
|
114
|
-
@source "../node_modules/munza-x-data-grid/**/*.{js,ts,jsx,tsx}";
|
|
115
|
-
@theme inline {
|
|
116
|
-
--color-background: var(--background);
|
|
117
|
-
--color-foreground: var(--foreground);
|
|
118
|
-
--color-border: var(--border);
|
|
119
|
-
--color-muted: var(--muted);
|
|
120
|
-
--color-accent: var(--accent);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:root {
|
|
124
|
-
--background: oklch(1 0 0);
|
|
125
|
-
--foreground: oklch(0.145 0 0);
|
|
126
|
-
--border: oklch(0.922 0 0);
|
|
127
|
-
--muted: oklch(0.97 0 0);
|
|
128
|
-
--accent: oklch(0.97 0 0);
|
|
129
|
-
}
|
|
10
|
+
## React Compiler
|
|
130
11
|
|
|
131
|
-
.
|
|
132
|
-
--background: oklch(0.145 0 0);
|
|
133
|
-
--foreground: oklch(0.985 0 0);
|
|
134
|
-
--border: oklch(1 0 0 / 10%);
|
|
135
|
-
--muted: oklch(0.269 0 0);
|
|
136
|
-
--accent: oklch(0.269 0 0);
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Column Definitions
|
|
12
|
+
The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.
|
|
143
13
|
|
|
144
|
-
|
|
14
|
+
Note: This will impact Vite dev & build performances.
|
|
145
15
|
|
|
146
|
-
|
|
16
|
+
## Expanding the ESLint configuration
|
|
147
17
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
```tsx
|
|
151
|
-
{
|
|
152
|
-
accessorKey: 'status',
|
|
153
|
-
header: 'Status',
|
|
154
|
-
meta: {
|
|
155
|
-
filterVariant: 'select', // dropdown filter
|
|
156
|
-
},
|
|
157
|
-
}
|
|
18
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
158
19
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
20
|
+
```js
|
|
21
|
+
export default defineConfig([
|
|
22
|
+
globalIgnores(['dist']),
|
|
23
|
+
{
|
|
24
|
+
files: ['**/*.{ts,tsx}'],
|
|
25
|
+
extends: [
|
|
26
|
+
// Other configs...
|
|
27
|
+
|
|
28
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
29
|
+
tseslint.configs.recommendedTypeChecked,
|
|
30
|
+
// Alternatively, use this for stricter rules
|
|
31
|
+
tseslint.configs.strictTypeChecked,
|
|
32
|
+
// Optionally, add this for stylistic rules
|
|
33
|
+
tseslint.configs.stylisticTypeChecked,
|
|
34
|
+
|
|
35
|
+
// Other configs...
|
|
36
|
+
],
|
|
37
|
+
languageOptions: {
|
|
38
|
+
parserOptions: {
|
|
39
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
40
|
+
tsconfigRootDir: import.meta.dirname,
|
|
41
|
+
},
|
|
42
|
+
// other options...
|
|
43
|
+
},
|
|
164
44
|
},
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Row Number Column
|
|
45
|
+
])
|
|
169
46
|
|
|
170
|
-
```tsx
|
|
171
|
-
{
|
|
172
|
-
accessorFn: (_row, index) => index + 1,
|
|
173
|
-
cell: ({ row }) => row.index + 1,
|
|
174
|
-
id: 'rowNumber',
|
|
175
|
-
header: '',
|
|
176
|
-
size: 54,
|
|
177
|
-
maxSize: 54,
|
|
178
|
-
enableColumnFilter: false,
|
|
179
|
-
}
|
|
180
47
|
```
|
|
181
48
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
```tsx
|
|
185
|
-
{
|
|
186
|
-
id: 'select',
|
|
187
|
-
header: ({ table }) => (
|
|
188
|
-
<Checkbox
|
|
189
|
-
checked={
|
|
190
|
-
table.getIsAllPageRowsSelected() ||
|
|
191
|
-
(table.getIsSomePageRowsSelected() && 'indeterminate')
|
|
192
|
-
}
|
|
193
|
-
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
|
194
|
-
aria-label="Select all"
|
|
195
|
-
/>
|
|
196
|
-
),
|
|
197
|
-
cell: ({ row }) => (
|
|
198
|
-
<Checkbox
|
|
199
|
-
checked={row.getIsSelected()}
|
|
200
|
-
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
|
201
|
-
aria-label="Select row"
|
|
202
|
-
/>
|
|
203
|
-
),
|
|
204
|
-
size: 40,
|
|
205
|
-
maxSize: 40,
|
|
206
|
-
enableColumnFilter: false,
|
|
207
|
-
}
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## Server-Side Pagination
|
|
213
|
-
|
|
214
|
-
Set `manualPagination` to `true` and pass `payload.total` as the full server-side count.
|
|
215
|
-
|
|
216
|
-
```tsx
|
|
217
|
-
<Grid
|
|
218
|
-
columns={columns}
|
|
219
|
-
payload={{ data: serverData, total: serverTotal }}
|
|
220
|
-
state={state}
|
|
221
|
-
{...handlers}
|
|
222
|
-
manualPagination={true}
|
|
223
|
-
/>
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
The built-in pagination UI supports the following page sizes:
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
|
|
230
|
-
```
|
|
49
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
231
50
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Default Column Sizing
|
|
260
|
-
|
|
261
|
-
| Property | Default |
|
|
262
|
-
| --------- | ------- |
|
|
263
|
-
| `size` | `180px` |
|
|
264
|
-
| `minSize` | `180px` |
|
|
265
|
-
| `maxSize` | `180px` |
|
|
266
|
-
|
|
267
|
-
Override per-column:
|
|
268
|
-
|
|
269
|
-
```tsx
|
|
270
|
-
{
|
|
271
|
-
accessorKey: 'id',
|
|
272
|
-
size: 60,
|
|
273
|
-
minSize: 60,
|
|
274
|
-
maxSize: 60,
|
|
275
|
-
}
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
## TypeScript
|
|
281
|
-
|
|
282
|
-
All props and hooks are fully typed. Import types directly from the package:
|
|
51
|
+
```js
|
|
52
|
+
// eslint.config.js
|
|
53
|
+
import reactX from 'eslint-plugin-react-x'
|
|
54
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
55
|
+
|
|
56
|
+
export default defineConfig([
|
|
57
|
+
globalIgnores(['dist']),
|
|
58
|
+
{
|
|
59
|
+
files: ['**/*.{ts,tsx}'],
|
|
60
|
+
extends: [
|
|
61
|
+
// Other configs...
|
|
62
|
+
// Enable lint rules for React
|
|
63
|
+
reactX.configs['recommended-typescript'],
|
|
64
|
+
// Enable lint rules for React DOM
|
|
65
|
+
reactDom.configs.recommended,
|
|
66
|
+
],
|
|
67
|
+
languageOptions: {
|
|
68
|
+
parserOptions: {
|
|
69
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
70
|
+
tsconfigRootDir: import.meta.dirname,
|
|
71
|
+
},
|
|
72
|
+
// other options...
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
])
|
|
283
76
|
|
|
284
|
-
```ts
|
|
285
|
-
import type { ColumnDef } from 'munza-x-data-grid';
|
|
286
77
|
```
|
|
287
|
-
|
|
288
|
-
TanStack Table types (`Row`, `TableState`, `PaginationState`, etc.) are re-exported and available from `@tanstack/react-table`.
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
9
|
+
|
|
10
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.
|
|
13
|
+
|
|
14
|
+
Note: This will impact Vite dev & build performances.
|
|
15
|
+
|
|
16
|
+
## Expanding the ESLint configuration
|
|
17
|
+
|
|
18
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
export default defineConfig([
|
|
22
|
+
globalIgnores(['dist']),
|
|
23
|
+
{
|
|
24
|
+
files: ['**/*.{ts,tsx}'],
|
|
25
|
+
extends: [
|
|
26
|
+
// Other configs...
|
|
27
|
+
|
|
28
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
29
|
+
tseslint.configs.recommendedTypeChecked,
|
|
30
|
+
// Alternatively, use this for stricter rules
|
|
31
|
+
tseslint.configs.strictTypeChecked,
|
|
32
|
+
// Optionally, add this for stylistic rules
|
|
33
|
+
tseslint.configs.stylisticTypeChecked,
|
|
34
|
+
|
|
35
|
+
// Other configs...
|
|
36
|
+
],
|
|
37
|
+
languageOptions: {
|
|
38
|
+
parserOptions: {
|
|
39
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
40
|
+
tsconfigRootDir: import.meta.dirname,
|
|
41
|
+
},
|
|
42
|
+
// other options...
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
])
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
// eslint.config.js
|
|
53
|
+
import reactX from 'eslint-plugin-react-x'
|
|
54
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
55
|
+
|
|
56
|
+
export default defineConfig([
|
|
57
|
+
globalIgnores(['dist']),
|
|
58
|
+
{
|
|
59
|
+
files: ['**/*.{ts,tsx}'],
|
|
60
|
+
extends: [
|
|
61
|
+
// Other configs...
|
|
62
|
+
// Enable lint rules for React
|
|
63
|
+
reactX.configs['recommended-typescript'],
|
|
64
|
+
// Enable lint rules for React DOM
|
|
65
|
+
reactDom.configs.recommended,
|
|
66
|
+
],
|
|
67
|
+
languageOptions: {
|
|
68
|
+
parserOptions: {
|
|
69
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
70
|
+
tsconfigRootDir: import.meta.dirname,
|
|
71
|
+
},
|
|
72
|
+
// other options...
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
|
|
6
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
7
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
9
|
+
declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
10
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
|
|
3
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
|
|
4
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
|
|
5
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
|
|
6
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
|
|
7
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
|
|
8
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
|
|
9
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Vehicle {
|
|
2
|
+
driver: string;
|
|
3
|
+
vehicle: string;
|
|
4
|
+
vin: string;
|
|
5
|
+
type: 'Car' | 'Truck' | 'Van' | 'Trailer';
|
|
6
|
+
status: 'Active' | 'In Shop' | 'Out of Service' | 'Maintenance';
|
|
7
|
+
currentMeter: string;
|
|
8
|
+
fuel: string;
|
|
9
|
+
drivingTime: string;
|
|
10
|
+
license: string;
|
|
11
|
+
odometer: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const dummyVehicles: Vehicle[];
|