@douglasneuroinformatics/libui 3.1.1 → 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 +5 -4
- 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/src/components/Form/NumberField/NumberFieldSelect.tsx +1 -1
- package/src/components/Form/StringField/StringFieldSelect.tsx +1 -1
- package/dist/douglasneuroinformatics-libui-3.1.1.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: [
|
|
@@ -2241,7 +2242,7 @@ var NumberFieldSelect = ({
|
|
|
2241
2242
|
),
|
|
2242
2243
|
/* @__PURE__ */ jsx107(Select.Content, { "data-cy": `${name}-select-content`, "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => {
|
|
2243
2244
|
const text = (disableAutoPrefix ? "" : `${option} - `) + options[option];
|
|
2244
|
-
return /* @__PURE__ */ jsx107(Select.Item, { "data-cy": `${name}-select-item`, value: option, children: text }, option);
|
|
2245
|
+
return /* @__PURE__ */ jsx107(Select.Item, { "data-cy": `${name}-select-item-${option}`, value: option, children: text }, option);
|
|
2245
2246
|
}) })
|
|
2246
2247
|
] }),
|
|
2247
2248
|
/* @__PURE__ */ jsx107(FieldGroup.Error, { error })
|
|
@@ -2841,7 +2842,7 @@ var StringFieldSelect = ({
|
|
|
2841
2842
|
children: /* @__PURE__ */ jsx123(Select.Value, {})
|
|
2842
2843
|
}
|
|
2843
2844
|
),
|
|
2844
|
-
/* @__PURE__ */ jsx123(Select.Content, { "data-cy": `${name}-select-content`, "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx123(Select.Item, { "data-cy": `${name}-select-item`, value: option, children: options[option] }, option)) })
|
|
2845
|
+
/* @__PURE__ */ jsx123(Select.Content, { "data-cy": `${name}-select-content`, "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx123(Select.Item, { "data-cy": `${name}-select-item-${option}`, value: option, children: options[option] }, option)) })
|
|
2845
2846
|
] }),
|
|
2846
2847
|
/* @__PURE__ */ jsx123(FieldGroup.Error, { error })
|
|
2847
2848
|
] });
|