@swc-react/table
Version:
React and Next.js wrapper of the @spectrum-web-components/table component
79 lines (78 loc) • 2.63 kB
JavaScript
"use strict";
import * as React from "react";
import { createComponent } from "@lit/react";
import { Table as SpTable } from "@spectrum-web-components/table";
import { TableBody as SpTableBody } from "@spectrum-web-components/table";
import { TableCell as SpTableCell } from "@spectrum-web-components/table";
import { TableCheckboxCell as SpTableCheckboxCell } from "@spectrum-web-components/table";
import { TableHead as SpTableHead } from "@spectrum-web-components/table";
import { TableHeadCell as SpTableHeadCell } from "@spectrum-web-components/table";
import { TableRow as SpTableRow } from "@spectrum-web-components/table";
import "@spectrum-web-components/table/sp-table-body.js";
import "@spectrum-web-components/table/sp-table-cell.js";
import "@spectrum-web-components/table/sp-table-checkbox-cell.js";
import "@spectrum-web-components/table/sp-table-head-cell.js";
import "@spectrum-web-components/table/sp-table-head.js";
import "@spectrum-web-components/table/sp-table-row.js";
import "@spectrum-web-components/table/sp-table.js";
export const Table = createComponent({
displayName: "Table",
elementClass: SpTable,
react: React,
tagName: "sp-table",
events: {
change: "change",
// Announces a change in the `selected` property of a table row
rangeChanged: "rangeChanged"
// Announces a change in the range of visible cells on the table body
}
});
export const TableBody = createComponent({
displayName: "TableBody",
elementClass: SpTableBody,
react: React,
tagName: "sp-table-body",
events: {}
});
export const TableCell = createComponent({
displayName: "TableCell",
elementClass: SpTableCell,
react: React,
tagName: "sp-table-cell",
events: {}
});
export const TableCheckboxCell = createComponent({
displayName: "TableCheckboxCell",
elementClass: SpTableCheckboxCell,
react: React,
tagName: "sp-table-checkbox-cell",
events: {}
});
export const TableHead = createComponent({
displayName: "TableHead",
elementClass: SpTableHead,
react: React,
tagName: "sp-table-head",
events: {}
});
export const TableHeadCell = createComponent({
displayName: "TableHeadCell",
elementClass: SpTableHeadCell,
react: React,
tagName: "sp-table-head-cell",
events: {
sorted: "sorted"
// Announces that the table head has been sorted and handles the sorted event
}
});
export const TableRow = createComponent({
displayName: "TableRow",
elementClass: SpTableRow,
react: React,
tagName: "sp-table-row",
events: {
sorted: "sorted"
// Announces that `selected` of the table row has changed
}
});
//# sourceMappingURL=index.dev.js.map