@alaarab/ogrid-vue-radix 2.5.4 → 2.5.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/README.md +9 -84
- package/dist/esm/DataGridTable/InlineCellEditor.js +7 -20
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,103 +1,28 @@
|
|
|
1
1
|
# @alaarab/ogrid-vue-radix
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OGrid data grid for Vue 3, built with Headless UI Vue.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install @alaarab/ogrid-vue-radix
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
12
|
|
|
13
13
|
```vue
|
|
14
14
|
<script setup lang="ts">
|
|
15
|
-
import { ref } from 'vue';
|
|
16
15
|
import { OGrid } from '@alaarab/ogrid-vue-radix';
|
|
17
16
|
|
|
18
|
-
const columns =
|
|
19
|
-
{ columnId: '
|
|
20
|
-
{ columnId: '
|
|
21
|
-
|
|
22
|
-
{ columnId: 'age', name: 'Age', type: 'numeric', editable: true }
|
|
23
|
-
]);
|
|
24
|
-
|
|
25
|
-
const data = ref([
|
|
26
|
-
{ id: 1, name: 'Alice', email: 'alice@example.com', age: 28 },
|
|
27
|
-
{ id: 2, name: 'Bob', email: 'bob@example.com', age: 32 },
|
|
28
|
-
{ id: 3, name: 'Charlie', email: 'charlie@example.com', age: 25 }
|
|
29
|
-
]);
|
|
17
|
+
const columns = [
|
|
18
|
+
{ columnId: 'name', name: 'Name', sortable: true, editable: true },
|
|
19
|
+
{ columnId: 'department', name: 'Department', filterable: { type: 'multiSelect' } },
|
|
20
|
+
];
|
|
30
21
|
</script>
|
|
31
22
|
|
|
32
23
|
<template>
|
|
33
|
-
<OGrid
|
|
34
|
-
:columns="columns"
|
|
35
|
-
:data="data"
|
|
36
|
-
:getRowId="(row) => row.id"
|
|
37
|
-
:editable="true"
|
|
38
|
-
:cellSelection="true"
|
|
39
|
-
/>
|
|
24
|
+
<OGrid :columns="columns" :data="rows" :getRowId="(r) => r.id" />
|
|
40
25
|
</template>
|
|
41
26
|
```
|
|
42
27
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
**Lightweight alternative** to Vuetify and PrimeVue data grids:
|
|
46
|
-
- 📦 Minimal bundle size (~80KB gzipped)
|
|
47
|
-
- 🎨 Built with Headless UI Vue - no large component library required
|
|
48
|
-
- 🚀 Same powerful features as OGrid Vue Vuetify/PrimeVue
|
|
49
|
-
- 💅 Clean, modern design with CSS variables for easy customization
|
|
50
|
-
|
|
51
|
-
## Features
|
|
52
|
-
|
|
53
|
-
- ✅ Sorting, filtering, and pagination
|
|
54
|
-
- ✅ Cell editing (inline text, select, checkbox, date)
|
|
55
|
-
- ✅ Cell and row selection
|
|
56
|
-
- ✅ Column resizing and reordering
|
|
57
|
-
- ✅ Column pinning (sticky left/right)
|
|
58
|
-
- ✅ Virtual scrolling for large datasets
|
|
59
|
-
- ✅ CSV export
|
|
60
|
-
- ✅ Keyboard navigation
|
|
61
|
-
- ✅ Context menu (copy, cut, paste)
|
|
62
|
-
- ✅ Undo/redo
|
|
63
|
-
- ✅ Server-side data sources
|
|
64
|
-
- ✅ Column groups (multi-level headers)
|
|
65
|
-
- ✅ Sidebar panels (columns, filters)
|
|
66
|
-
- ✅ TypeScript support
|
|
67
|
-
|
|
68
|
-
## Documentation
|
|
69
|
-
|
|
70
|
-
Full documentation: **[ogrid.dev](https://ogrid.dev)**
|
|
71
|
-
- [Getting Started](https://ogrid.dev/docs/quick-start)
|
|
72
|
-
- [API Reference](https://ogrid.dev/docs/api/props)
|
|
73
|
-
- [Examples](https://ogrid.dev/docs/examples)
|
|
74
|
-
|
|
75
|
-
## Customization
|
|
76
|
-
|
|
77
|
-
Customize appearance with CSS variables:
|
|
78
|
-
|
|
79
|
-
```css
|
|
80
|
-
:root {
|
|
81
|
-
--ogrid-border: #e0e0e0;
|
|
82
|
-
--ogrid-bg: #ffffff;
|
|
83
|
-
--ogrid-header-bg: #f5f5f5;
|
|
84
|
-
--ogrid-primary: #0066cc;
|
|
85
|
-
--ogrid-active-cell-border: #0066cc;
|
|
86
|
-
--ogrid-selected-cell-bg: #e3f2fd;
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Architecture
|
|
91
|
-
|
|
92
|
-
OGrid Vue Radix is part of the OGrid framework family:
|
|
93
|
-
- **@alaarab/ogrid-core** - Pure TypeScript types and utilities
|
|
94
|
-
- **@alaarab/ogrid-vue** - Vue 3 composables and headless components
|
|
95
|
-
- **@alaarab/ogrid-vue-radix** - Headless UI implementation (this package)
|
|
96
|
-
- **@alaarab/ogrid-vue-vuetify** - Vuetify 3 implementation
|
|
97
|
-
- **@alaarab/ogrid-vue-primevue** - PrimeVue 4 implementation
|
|
98
|
-
|
|
99
|
-
All Vue packages share the same headless core and expose identical APIs.
|
|
100
|
-
|
|
101
|
-
## License
|
|
102
|
-
|
|
103
|
-
MIT © Ala Arab
|
|
28
|
+
See the [OGrid docs](https://alaarab.github.io/ogrid/) for full documentation.
|
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import { createInlineCellEditor as
|
|
3
|
-
const p =
|
|
4
|
-
renderCheckbox: ({ checked:
|
|
1
|
+
import { h as c } from "vue";
|
|
2
|
+
import { createInlineCellEditor as n } from "@alaarab/ogrid-vue";
|
|
3
|
+
const p = n({
|
|
4
|
+
renderCheckbox: ({ checked: o, onChange: r, onCancel: t }) => c("input", {
|
|
5
5
|
type: "checkbox",
|
|
6
|
-
checked:
|
|
6
|
+
checked: o,
|
|
7
7
|
class: "ogrid-checkbox",
|
|
8
8
|
style: { width: "18px", height: "18px", cursor: "pointer", accentColor: "var(--ogrid-accent, #0078d4)" },
|
|
9
|
-
onChange: (e) =>
|
|
9
|
+
onChange: (e) => r(e.target.checked),
|
|
10
10
|
onKeydown: (e) => {
|
|
11
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
11
|
+
e.key === "Escape" && (e.preventDefault(), t());
|
|
12
12
|
}
|
|
13
|
-
}),
|
|
14
|
-
renderDatePicker: ({ value: r, onChange: t, onCancel: n }) => i("input", {
|
|
15
|
-
type: "text",
|
|
16
|
-
value: r,
|
|
17
|
-
style: { width: "100%", height: "100%", border: "none", outline: "none", padding: "0 4px", fontSize: "inherit" },
|
|
18
|
-
onVnodeMounted: (e) => {
|
|
19
|
-
const o = e.el;
|
|
20
|
-
o && (o.focus(), o.select());
|
|
21
|
-
},
|
|
22
|
-
onKeydown: (e) => {
|
|
23
|
-
e.key === "Enter" && (e.preventDefault(), t(e.target.value)), e.key === "Escape" && (e.preventDefault(), n()), e.key === "Tab" && (e.preventDefault(), t(e.target.value));
|
|
24
|
-
},
|
|
25
|
-
onBlur: (e) => t(e.target.value)
|
|
26
13
|
})
|
|
27
14
|
});
|
|
28
15
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-vue-radix",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "OGrid Vue Radix – Lightweight data grid with sorting, filtering, pagination, column chooser, and CSV export. Built with Headless UI Vue.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"node": ">=18"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@alaarab/ogrid-vue": "2.5.
|
|
45
|
+
"@alaarab/ogrid-vue": "2.5.5"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@headlessui/vue": "^1.7.23",
|