@pk-design/react-tailwind 1.5.2 → 1.5.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/react-tailwind.cjs.js +3 -3
- package/dist/react-tailwind.cjs.js.map +1 -1
- package/dist/react-tailwind.es.js +3 -3
- package/dist/react-tailwind.es.js.map +1 -1
- package/dist/types/components/DataTable/DataTable.d.ts +1 -1
- package/dist/types/components/DataTable/DataTable.types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -945,7 +945,7 @@ const autoSortItems = (items, column, sort) => {
|
|
|
945
945
|
return 0;
|
|
946
946
|
});
|
|
947
947
|
};
|
|
948
|
-
function DataTable({ items, columns, sorting = {}, onSort, loading, pagination, setPagination = () => { }, emptyMessage = 'No data found', containerClass = '', wrapperClass = '', tableClass = '', headClass = '', footerRow, rowKey = 'id', onRowClick, rowClass, density = 'default', striped = false, layout = 'auto', selectable = false, selectedRowKeys, defaultSelectedRowKeys, onSelectionChange, isRowSelectable, }) {
|
|
948
|
+
function DataTable({ items, columns, sorting = {}, onSort, loading, pagination, setPagination = () => { }, emptyMessage = 'No data found', containerClass = '', wrapperClass = '', tableClass = '', headClass = '', footerRow, rowKey = 'id', onRowClick, rowClass, density = 'default', striped = false, layout = 'auto', selectable = false, selectedRowKeys, defaultSelectedRowKeys, onSelectionChange, isRowSelectable, paginationContainerClass, }) {
|
|
949
949
|
const internalSorting = useRef({});
|
|
950
950
|
const [sortedItems, setSortedItems] = useState(items);
|
|
951
951
|
useEffect(() => {
|
|
@@ -1006,7 +1006,7 @@ function DataTable({ items, columns, sorting = {}, onSort, loading, pagination,
|
|
|
1006
1006
|
? column.render(item)
|
|
1007
1007
|
: ((_a = get(item, column.name)) !== null && _a !== void 0 ? _a : 'Not set') }, column.name));
|
|
1008
1008
|
})] }, key));
|
|
1009
|
-
})) }), footerRow && jsx(TableFoot, { children: footerRow })] }) }), pagination && (jsx(Pagination, { ...pagination, className:
|
|
1009
|
+
})) }), footerRow && jsx(TableFoot, { children: footerRow })] }) }), pagination && (jsx(Pagination, { ...pagination, className: buildClassName('rounded-b-lg border-t border-[var(--ui-border)]', paginationContainerClass), onChange: setPagination }))] }));
|
|
1010
1010
|
}
|
|
1011
1011
|
DataTable.displayName = 'DataTable';
|
|
1012
1012
|
|
|
@@ -1091,7 +1091,7 @@ var SvgFolderPlus = function SvgFolderPlus(props) {
|
|
|
1091
1091
|
};
|
|
1092
1092
|
|
|
1093
1093
|
const EmptyState = ({ title, description, className, action = null, }) => {
|
|
1094
|
-
return (jsx("div", { className: buildClassName('w-full flex justify-center px-4 pt-16', className), children: jsxs("div", { className: "max-w-md flex flex-col items-center gap-4", children: [jsx(SvgFolderPlus, { className: "size-8" }), jsx(HeadingText.SubTitle, { children: title }), description && (jsx(BodyText, { as: "p", className: "text-center", muted: true, small: true, children: description })), action] }) }));
|
|
1094
|
+
return (jsx("div", { className: buildClassName('w-full flex justify-center px-4 pt-16', className), children: jsxs("div", { className: "max-w-md flex flex-col items-center gap-4", children: [jsx(SvgFolderPlus, { className: "size-8 text-[var(--ui-text)]" }), jsx(HeadingText.SubTitle, { children: title }), description && (jsx(BodyText, { as: "p", className: "text-center", muted: true, small: true, children: description })), action] }) }));
|
|
1095
1095
|
};
|
|
1096
1096
|
|
|
1097
1097
|
function buildInputClass(className, { isFocusWithin = false, disabled = false } = {}) {
|