@mirror-physics/fractal-ui 0.2.0-next.64 → 0.2.0-next.65
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/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -272,6 +272,8 @@ interface SortableTablePagination {
|
|
|
272
272
|
interface SortableTableProps<T> {
|
|
273
273
|
columns: SortableTableColumn<T>[];
|
|
274
274
|
data: T[];
|
|
275
|
+
/** Accessible name applied to the underlying table element. */
|
|
276
|
+
'aria-label'?: string;
|
|
275
277
|
emptyMessage?: string;
|
|
276
278
|
header?: ReactNode;
|
|
277
279
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -303,7 +305,7 @@ interface SortableTableProps<T> {
|
|
|
303
305
|
/** Directional affordance displayed over the right edge of an interactive row. */
|
|
304
306
|
rowAction?: SortableTableRowAction<T>;
|
|
305
307
|
}
|
|
306
|
-
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, embedded, className, defaultSort, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, pagination, highlightRow, selection, isRowDisabled, onRowClick, onRowDoubleClick, rowAction, }: SortableTableProps<T>): React.JSX.Element;
|
|
308
|
+
declare function SortableTable<T>({ columns, data, 'aria-label': ariaLabel, emptyMessage, header, size, embedded, className, defaultSort, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, pagination, highlightRow, selection, isRowDisabled, onRowClick, onRowDoubleClick, rowAction, }: SortableTableProps<T>): React.JSX.Element;
|
|
307
309
|
|
|
308
310
|
interface TabItem {
|
|
309
311
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -272,6 +272,8 @@ interface SortableTablePagination {
|
|
|
272
272
|
interface SortableTableProps<T> {
|
|
273
273
|
columns: SortableTableColumn<T>[];
|
|
274
274
|
data: T[];
|
|
275
|
+
/** Accessible name applied to the underlying table element. */
|
|
276
|
+
'aria-label'?: string;
|
|
275
277
|
emptyMessage?: string;
|
|
276
278
|
header?: ReactNode;
|
|
277
279
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -303,7 +305,7 @@ interface SortableTableProps<T> {
|
|
|
303
305
|
/** Directional affordance displayed over the right edge of an interactive row. */
|
|
304
306
|
rowAction?: SortableTableRowAction<T>;
|
|
305
307
|
}
|
|
306
|
-
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, embedded, className, defaultSort, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, pagination, highlightRow, selection, isRowDisabled, onRowClick, onRowDoubleClick, rowAction, }: SortableTableProps<T>): React.JSX.Element;
|
|
308
|
+
declare function SortableTable<T>({ columns, data, 'aria-label': ariaLabel, emptyMessage, header, size, embedded, className, defaultSort, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, pagination, highlightRow, selection, isRowDisabled, onRowClick, onRowDoubleClick, rowAction, }: SortableTableProps<T>): React.JSX.Element;
|
|
307
309
|
|
|
308
310
|
interface TabItem {
|
|
309
311
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -1340,6 +1340,7 @@ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
|
1340
1340
|
function SortableTable({
|
|
1341
1341
|
columns,
|
|
1342
1342
|
data,
|
|
1343
|
+
"aria-label": ariaLabel,
|
|
1343
1344
|
emptyMessage,
|
|
1344
1345
|
header,
|
|
1345
1346
|
size = "md",
|
|
@@ -1430,7 +1431,7 @@ function SortableTable({
|
|
|
1430
1431
|
};
|
|
1431
1432
|
return /* @__PURE__ */ jsx19("div", { className: cn("fractal-sortable-table", `fractal-sortable-table--${size}`, embedded && "fractal-sortable-table--embedded", className), children: /* @__PURE__ */ jsxs16("div", { className: "fractal-sortable-table-surface", children: [
|
|
1432
1433
|
header && /* @__PURE__ */ jsx19("div", { className: "fractal-sortable-table-header", children: header }),
|
|
1433
|
-
visibleRows.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "fractal-sortable-table-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ jsxs16("table", { className: "fractal-sortable-table-table", children: [
|
|
1434
|
+
visibleRows.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "fractal-sortable-table-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ jsxs16("table", { "aria-label": ariaLabel, className: "fractal-sortable-table-table", children: [
|
|
1434
1435
|
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs16("tr", { className: "fractal-sortable-table-thead-row", children: [
|
|
1435
1436
|
selection && /* @__PURE__ */ jsx19(
|
|
1436
1437
|
"th",
|
|
@@ -1462,6 +1463,7 @@ function SortableTable({
|
|
|
1462
1463
|
"th",
|
|
1463
1464
|
{
|
|
1464
1465
|
className: "fractal-sortable-table-th",
|
|
1466
|
+
scope: "col",
|
|
1465
1467
|
style: { width: col.width },
|
|
1466
1468
|
children: col.header
|
|
1467
1469
|
},
|
|
@@ -1472,6 +1474,7 @@ function SortableTable({
|
|
|
1472
1474
|
"th",
|
|
1473
1475
|
{
|
|
1474
1476
|
className: "fractal-sortable-table-th fractal-sortable-table-th--sortable",
|
|
1477
|
+
scope: "col",
|
|
1475
1478
|
style: { width: col.width },
|
|
1476
1479
|
children: /* @__PURE__ */ jsxs16(
|
|
1477
1480
|
"button",
|