@douglasneuroinformatics/libui 3.1.2 → 3.1.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/dist/components.d.ts +2 -1
- package/dist/components.js +3 -2
- package/dist/components.js.map +1 -1
- package/dist/douglasneuroinformatics-libui-3.1.3.tgz +0 -0
- package/package.json +1 -1
- package/src/components/ClientTable/ClientTable.tsx +4 -2
- package/dist/douglasneuroinformatics-libui-3.1.2.tgz +0 -0
package/dist/components.d.ts
CHANGED
|
@@ -712,6 +712,7 @@ type ClientTableColumnProps<T extends ClientTableEntry> = {
|
|
|
712
712
|
dropdownOptions?: ClientTableDropdownOptions<T>;
|
|
713
713
|
};
|
|
714
714
|
type ClientTableProps<T extends ClientTableEntry> = {
|
|
715
|
+
[key: `data-${string}`]: unknown;
|
|
715
716
|
className?: string;
|
|
716
717
|
columnDropdownOptions?: ClientTableDropdownOptions<T>;
|
|
717
718
|
columns: ClientTableColumn<T>[];
|
|
@@ -721,7 +722,7 @@ type ClientTableProps<T extends ClientTableEntry> = {
|
|
|
721
722
|
noWrap?: boolean;
|
|
722
723
|
onEntryClick?: (entry: T) => void;
|
|
723
724
|
};
|
|
724
|
-
declare const ClientTable: <T extends ClientTableEntry>({ className, columnDropdownOptions, columns, data, entriesPerPage, minRows, noWrap, onEntryClick }: ClientTableProps<T>) => react_jsx_runtime.JSX.Element;
|
|
725
|
+
declare const ClientTable: <T extends ClientTableEntry>({ className, columnDropdownOptions, columns, data, entriesPerPage, minRows, noWrap, onEntryClick, ...props }: ClientTableProps<T>) => react_jsx_runtime.JSX.Element;
|
|
725
726
|
|
|
726
727
|
declare const Collapsible: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_collapsible.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>> & {
|
|
727
728
|
Content: React$1.ForwardRefExoticComponent<_radix_ui_react_collapsible.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/components.js
CHANGED
|
@@ -873,7 +873,8 @@ var ClientTable = ({
|
|
|
873
873
|
entriesPerPage = 10,
|
|
874
874
|
minRows,
|
|
875
875
|
noWrap,
|
|
876
|
-
onEntryClick
|
|
876
|
+
onEntryClick,
|
|
877
|
+
...props
|
|
877
878
|
}) => {
|
|
878
879
|
const [currentPage, setCurrentPage] = useState(1);
|
|
879
880
|
const pageCount = Math.max(Math.ceil(data.length / entriesPerPage), 1);
|
|
@@ -881,7 +882,7 @@ var ClientTable = ({
|
|
|
881
882
|
const lastEntry = Math.min(firstEntry + entriesPerPage - 1, data.length);
|
|
882
883
|
const currentEntries = data.slice(firstEntry - 1, lastEntry);
|
|
883
884
|
const nRows = Math.max(currentEntries.length, minRows ?? -1);
|
|
884
|
-
return /* @__PURE__ */ jsxs11("div", { className, children: [
|
|
885
|
+
return /* @__PURE__ */ jsxs11("div", { className, ...props, children: [
|
|
885
886
|
/* @__PURE__ */ jsx48("div", { className: "rounded-md border bg-card tracking-tight text-muted-foreground shadow-sm", children: /* @__PURE__ */ jsxs11(Table, { children: [
|
|
886
887
|
/* @__PURE__ */ jsx48(Table.Header, { children: /* @__PURE__ */ jsx48(Table.Row, { children: columns.map((column, i) => /* @__PURE__ */ jsx48(Table.Head, { className: "whitespace-nowrap text-foreground", children: columnDropdownOptions ? /* @__PURE__ */ jsxs11(DropdownMenu, { children: [
|
|
887
888
|
/* @__PURE__ */ jsxs11(DropdownMenu.Trigger, { className: "flex items-center justify-between gap-3", children: [
|