@indico-data/design-system 3.0.3 → 3.0.4
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/lib/index.css +3 -0
- package/lib/index.esm.css +3 -0
- package/lib/index.esm.js +6 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6 -3
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/input/Input.tsx +1 -0
- package/src/components/forms/input/styles/Input.scss +3 -0
- package/src/components/pagination/Pagination.tsx +2 -2
- package/src/components/tanstackTable/TanstackTable.tsx +5 -1
package/lib/index.css
CHANGED
package/lib/index.esm.css
CHANGED
package/lib/index.esm.js
CHANGED
|
@@ -5473,6 +5473,7 @@ const Input = React__default.forwardRef((_a, ref) => {
|
|
|
5473
5473
|
onChange === null || onChange === void 0 ? void 0 : onChange({ target: { value: '' } });
|
|
5474
5474
|
};
|
|
5475
5475
|
const inputClasses = classNames('input', {
|
|
5476
|
+
'is-clearable': isClearable,
|
|
5476
5477
|
error: hasErrors,
|
|
5477
5478
|
'input--has-icon': iconName,
|
|
5478
5479
|
}, className);
|
|
@@ -5515,7 +5516,7 @@ const Pagination = (_a) => {
|
|
|
5515
5516
|
const isNextButtonDisabled = currentPage === totalPages;
|
|
5516
5517
|
const isPreviousButtonDisabled = currentPage === 1;
|
|
5517
5518
|
const hasError = Number(inputValue) > totalPages || Number(inputValue) < 1;
|
|
5518
|
-
return (jsx("div", Object.assign({ className: classes }, rest, { children: jsx(Container, { children: jsxs(Row, { gutterWidth: 12, align: "center", children: [jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__previous", children: jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled }) }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__current-page", children: jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
|
|
5519
|
+
return (jsx("div", Object.assign({ className: classes }, rest, { children: jsx(Container, { children: jsxs(Row, { gutterWidth: 12, align: "center", children: [jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__previous", children: jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled || totalPages === 0 }) }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__current-page", children: jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
|
|
5519
5520
|
'has-error': hasError,
|
|
5520
5521
|
}), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label: "Current Page", hasHiddenLabel: true, onKeyDown: (e) => {
|
|
5521
5522
|
if (e.key === 'Enter') {
|
|
@@ -5527,7 +5528,7 @@ const Pagination = (_a) => {
|
|
|
5527
5528
|
if (value === '' || /^\d*$/.test(value)) {
|
|
5528
5529
|
setInputValue(value);
|
|
5529
5530
|
}
|
|
5530
|
-
}, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsx(Col, { xs: "content", children: jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__next", children: jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: "Next Page", variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled }) }) })] }) }) })));
|
|
5531
|
+
}, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsx(Col, { xs: "content", children: jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__next", children: jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: "Next Page", variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled || totalPages === 0 }) }) })] }) }) })));
|
|
5531
5532
|
};
|
|
5532
5533
|
|
|
5533
5534
|
const TablePagination$1 = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, }) => {
|
|
@@ -41533,7 +41534,9 @@ function TanstackTable(_a) {
|
|
|
41533
41534
|
};
|
|
41534
41535
|
return (jsxs("div", { className: "tanstack-table__outer-container", children: [jsxs("div", { className: "tanstack-table__container", children: [jsxs("table", { className: classNames('tanstack-table', className, {
|
|
41535
41536
|
'is-striped': isStriped,
|
|
41536
|
-
}), children: [jsx("thead", { className: "tanstack-table__thead", children: jsx(TableHeader, { table: table, ref: thRefs }) }), jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText :
|
|
41537
|
+
}), children: [jsx("thead", { className: "tanstack-table__thead", children: jsx(TableHeader, { table: table, ref: thRefs }) }), jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: (totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : rowCount === 1)
|
|
41538
|
+
? '1 entry'
|
|
41539
|
+
: `${totalRowsOnPage} of ${rowCount} entries` })) : null] }));
|
|
41537
41540
|
}
|
|
41538
41541
|
|
|
41539
41542
|
/**
|