@zenkigen-inc/component-ui 1.9.3 → 1.9.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/dist/index.esm.js CHANGED
@@ -31944,6 +31944,8 @@ function PaginationSelect(_ref) {
31944
31944
  label: value
31945
31945
  };
31946
31946
  });
31947
+ var minCount = totalSize ? (currentPage - 1) * sizePerPage + 1 : 0;
31948
+ var maxCount = currentPage * sizePerPage > totalSize ? totalSize : currentPage * sizePerPage;
31947
31949
  return /*#__PURE__*/jsxs("nav", {
31948
31950
  "aria-label": "pagination",
31949
31951
  className: "flex items-center gap-x-1",
@@ -31951,7 +31953,7 @@ function PaginationSelect(_ref) {
31951
31953
  className: "flex items-center gap-x-2",
31952
31954
  children: [/*#__PURE__*/jsxs("div", {
31953
31955
  className: "typography-label2regular text-text01",
31954
- children: [(currentPage - 1) * sizePerPage + 1, " -", ' ', currentPage * sizePerPage > totalSize ? totalSize : currentPage * sizePerPage, countLabel]
31956
+ children: [minCount > 0 && minCount + " - ", maxCount, countLabel]
31955
31957
  }), /*#__PURE__*/jsx(Select, {
31956
31958
  size: "medium",
31957
31959
  variant: "outline",
@@ -31962,6 +31964,7 @@ function PaginationSelect(_ref) {
31962
31964
  onChange: function onChange(option) {
31963
31965
  return option && _onChange(Number(option.value));
31964
31966
  },
31967
+ isDisabled: pageMax === 0,
31965
31968
  children: optionsList && optionsList.map(function (option) {
31966
31969
  return /*#__PURE__*/jsx(Select.Option, {
31967
31970
  option: option
@@ -31983,7 +31986,7 @@ function PaginationSelect(_ref) {
31983
31986
  variant: "text",
31984
31987
  icon: "angle-right",
31985
31988
  size: "small",
31986
- isDisabled: currentPage === pageMax,
31989
+ isDisabled: currentPage === pageMax || pageMax === 0,
31987
31990
  onClick: onClickNextButton
31988
31991
  })]
31989
31992
  })]