@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.js CHANGED
@@ -5498,6 +5498,7 @@ const Input = React__namespace.default.forwardRef((_a, ref) => {
5498
5498
  onChange === null || onChange === void 0 ? void 0 : onChange({ target: { value: '' } });
5499
5499
  };
5500
5500
  const inputClasses = classNames('input', {
5501
+ 'is-clearable': isClearable,
5501
5502
  error: hasErrors,
5502
5503
  'input--has-icon': iconName,
5503
5504
  }, className);
@@ -5540,7 +5541,7 @@ const Pagination = (_a) => {
5540
5541
  const isNextButtonDisabled = currentPage === totalPages;
5541
5542
  const isPreviousButtonDisabled = currentPage === 1;
5542
5543
  const hasError = Number(inputValue) > totalPages || Number(inputValue) < 1;
5543
- return (jsxRuntime.jsx("div", Object.assign({ className: classes }, rest, { children: jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs(Row, { gutterWidth: 12, align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__previous", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__current-page", children: jsxRuntime.jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
5544
+ return (jsxRuntime.jsx("div", Object.assign({ className: classes }, rest, { children: jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs(Row, { gutterWidth: 12, align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__previous", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled || totalPages === 0 }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__current-page", children: jsxRuntime.jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
5544
5545
  'has-error': hasError,
5545
5546
  }), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label: "Current Page", hasHiddenLabel: true, onKeyDown: (e) => {
5546
5547
  if (e.key === 'Enter') {
@@ -5552,7 +5553,7 @@ const Pagination = (_a) => {
5552
5553
  if (value === '' || /^\d*$/.test(value)) {
5553
5554
  setInputValue(value);
5554
5555
  }
5555
- }, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__next", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: "Next Page", variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled }) }) })] }) }) })));
5556
+ }, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__next", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: "Next Page", variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled || totalPages === 0 }) }) })] }) }) })));
5556
5557
  };
5557
5558
 
5558
5559
  const TablePagination$1 = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, }) => {
@@ -41558,7 +41559,9 @@ function TanstackTable(_a) {
41558
41559
  };
41559
41560
  return (jsxRuntime.jsxs("div", { className: "tanstack-table__outer-container", children: [jsxRuntime.jsxs("div", { className: "tanstack-table__container", children: [jsxRuntime.jsxs("table", { className: classNames('tanstack-table', className, {
41560
41561
  'is-striped': isStriped,
41561
- }), children: [jsxRuntime.jsx("thead", { className: "tanstack-table__thead", children: jsxRuntime.jsx(TableHeader, { table: table, ref: thRefs }) }), jsxRuntime.jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsxRuntime.jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsxRuntime.jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : `${totalRowsOnPage} of ${rowCount} entries` })) : null] }));
41562
+ }), children: [jsxRuntime.jsx("thead", { className: "tanstack-table__thead", children: jsxRuntime.jsx(TableHeader, { table: table, ref: thRefs }) }), jsxRuntime.jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsxRuntime.jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsxRuntime.jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: (totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : rowCount === 1)
41563
+ ? '1 entry'
41564
+ : `${totalRowsOnPage} of ${rowCount} entries` })) : null] }));
41562
41565
  }
41563
41566
 
41564
41567
  /**