@adapttable/mui 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/CHANGELOG.md +37 -0
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/index.cjs +1930 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +103 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.js +1884 -0
- package/dist/index.js.map +1 -0
- package/package.json +84 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @adapttable/mui
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 845ff41: Initial public release of AdaptTable — a headless, UI-agnostic React data
|
|
8
|
+
table: one API, rendered natively by your design system.
|
|
9
|
+
- `@adapttable/core`: the headless engine — declarative `columns` (bare
|
|
10
|
+
keys, dot-paths, auto headers) and `filters` (one definition drives the
|
|
11
|
+
widget, URL params, chips, and predicate, with `"auto"` and async option
|
|
12
|
+
sources), three data tiers (in-memory, server via one consolidated
|
|
13
|
+
`onQueryChange(query, { signal })`, or a full custom `TableSource`),
|
|
14
|
+
URL-synced state with an injectable adapter (`urlSync={false}` for
|
|
15
|
+
in-memory), multi-sort, summary rows, header groups, row expansion,
|
|
16
|
+
saved views, select-all-N-matching, keyboard row navigation, and opt-in
|
|
17
|
+
row/card virtualization that tracks the page or any `maxHeight` scroll
|
|
18
|
+
box — 50,000 rows stay a handful of DOM nodes.
|
|
19
|
+
- Batteries-included adapters for **Mantine**, **MUI**, **Chakra UI**,
|
|
20
|
+
**Ant Design**, and **Tailwind/shadcn** (`@adapttable/unstyled`): native
|
|
21
|
+
filter forms with operator-first number/date ranges, column management
|
|
22
|
+
(hide / reorder / pin / resize — the row-actions column included), a
|
|
23
|
+
built-in saved-views menu, mobile card layouts, and memoized rows.
|
|
24
|
+
- `@adapttable/i18n`: label presets for ten locales (en, ar, de, es, fr,
|
|
25
|
+
he, it, ja, pt, zh) with RTL helpers — headers, cells, sorting and
|
|
26
|
+
filtering can all follow per-locale data paths.
|
|
27
|
+
- `@adapttable/cli`: `npx @adapttable/cli init` detects your kit and
|
|
28
|
+
scaffolds a working table.
|
|
29
|
+
|
|
30
|
+
Highlights: shareable URL state, paging and true infinite scroll (auto by
|
|
31
|
+
device), first-class RTL, seamless dark mode, 100% test coverage, and a
|
|
32
|
+
full headless escape hatch at every layer.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [845ff41]
|
|
37
|
+
- @adapttable/core@0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Orwa Mahmoud
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @adapttable/mui
|
|
2
|
+
|
|
3
|
+
The **Material UI adapter** for [AdaptTable](https://github.com/orwa-mahmoud/adapttable) —
|
|
4
|
+
a batteries-included MUI data table with sorting, filtering, URL-synced
|
|
5
|
+
state, selection + bulk actions, RTL, and dark mode. A free, headless
|
|
6
|
+
**alternative to MUI X DataGrid** built on `@adapttable/core`.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @adapttable/mui @adapttable/core @mui/material @emotion/react @emotion/styled react react-dom
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Quickstart
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { DataTable, useFrontendData, type ColumnDef } from "@adapttable/mui";
|
|
16
|
+
|
|
17
|
+
interface Person {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
city: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const columns: ColumnDef<Person>[] = [
|
|
24
|
+
{ key: "name", header: "Name", accessor: (r) => r.name, sortable: true },
|
|
25
|
+
{ key: "city", header: "City", accessor: (r) => r.city },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
export function People({ data }: { data: Person[] }) {
|
|
29
|
+
const source = useFrontendData({ data, columns });
|
|
30
|
+
return <DataTable source={source} columns={columns} rowKey={(r) => r.id} />;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Wrap your app in MUI's `ThemeProvider` to control light/dark mode and RTL,
|
|
35
|
+
as usual. Swap `useFrontendData` for `useBackendData` to drive the table
|
|
36
|
+
from a server-paginated query — the component doesn't change.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- Client or server data through one `TableSource`.
|
|
41
|
+
- URL-synced search / sort / filters / page.
|
|
42
|
+
- `TableSortLabel` headers, `Checkbox` selection + bulk actions with confirm.
|
|
43
|
+
- Filter drawer + removable `Chip`s.
|
|
44
|
+
- `Pagination` footer, `Skeleton` loading, `Alert` error with retry.
|
|
45
|
+
- Auto desktop table ↔ mobile cards.
|
|
46
|
+
- `slots` (skeleton, empty), `className`, `size`, injectable `confirm`.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
[MIT](../../LICENSE) © Orwa Mahmoud
|