@thecb/components 7.8.2-beta.3 → 7.8.2-beta.5

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.cjs.js CHANGED
@@ -46602,26 +46602,30 @@ var getPagesPanel = function getPagesPanel(page, pagesCount) {
46602
46602
 
46603
46603
  if (page > space + 1) {
46604
46604
  pages.push({
46605
- isDelimiter: true
46605
+ isDelimiter: true,
46606
+ id: "first-delimiter"
46606
46607
  });
46607
46608
  }
46608
46609
 
46609
46610
  for (var j = Math.max(1, page - space) + 1; j < Math.min(lastPageNumber, page + space); j++) {
46610
46611
  pages.push({
46611
46612
  index: j,
46612
- isButton: true
46613
+ isButton: true,
46614
+ id: "page-".concat(j)
46613
46615
  });
46614
46616
  }
46615
46617
 
46616
46618
  if (page < lastPageNumber - space) {
46617
46619
  pages.push({
46618
- isDelimiter: true
46620
+ isDelimiter: true,
46621
+ id: "last-delimiter"
46619
46622
  });
46620
46623
  }
46621
46624
 
46622
46625
  pages.push({
46623
46626
  index: lastPageNumber,
46624
- isButton: true
46627
+ isButton: true,
46628
+ id: "page-".concat(lastPageNumber)
46625
46629
  });
46626
46630
  var activePage = pages.find(function (p) {
46627
46631
  return p.index === page;
@@ -46656,6 +46660,7 @@ var Pagination = function Pagination(_ref3) {
46656
46660
  pageNext = _ref3.pageNext,
46657
46661
  pagePrevious = _ref3.pagePrevious,
46658
46662
  setCurrentPage = _ref3.setCurrentPage,
46663
+ ariaLabel = _ref3.ariaLabel,
46659
46664
  themeValues = _ref3.themeValues;
46660
46665
 
46661
46666
  var _useContext = React.useContext(styled.ThemeContext),
@@ -46668,7 +46673,9 @@ var Pagination = function Pagination(_ref3) {
46668
46673
  childGap: childGap,
46669
46674
  overflow: true,
46670
46675
  as: "nav",
46676
+ role: "navigation",
46671
46677
  innerWrapperAs: "ul",
46678
+ "aria-label": ariaLabel,
46672
46679
  extraStyles: "> ul { padding: 0px; > li { list-style-type: none; } };"
46673
46680
  }, currentPage > 1 ? /*#__PURE__*/React__default.createElement(PrevNextButton, {
46674
46681
  action: pagePrevious,
@@ -46695,10 +46702,10 @@ var Pagination = function Pagination(_ref3) {
46695
46702
  return item.isButton ? /*#__PURE__*/React__default.createElement(Box, {
46696
46703
  padding: "0",
46697
46704
  extraStyles: "max-height: ".concat(buttonHeight, ";"),
46698
- as: "li"
46705
+ as: "li",
46706
+ key: item.id
46699
46707
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46700
46708
  variant: "ghost",
46701
- key: item.index,
46702
46709
  text: item.index,
46703
46710
  disabled: item.active,
46704
46711
  extraDisabledStyles: extraDisabledStyles,
@@ -46713,11 +46720,12 @@ var Pagination = function Pagination(_ref3) {
46713
46720
  extraStyles: extraStyles,
46714
46721
  dataQa: index
46715
46722
  }, item.index)) : /*#__PURE__*/React__default.createElement(Box, {
46716
- padding: "0 10px"
46723
+ padding: "0 10px",
46724
+ as: "li",
46725
+ key: item.id
46717
46726
  }, /*#__PURE__*/React__default.createElement(Cluster, {
46718
46727
  justify: "flex-end"
46719
46728
  }, /*#__PURE__*/React__default.createElement(Text$1, {
46720
- key: index,
46721
46729
  variant: "pXL",
46722
46730
  weight: fontWeight,
46723
46731
  color: numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor