@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.d.ts CHANGED
@@ -259,6 +259,7 @@ interface ClusterProps {
259
259
  justifySelf?: string;
260
260
  alignSelf?: string;
261
261
  flexGrow?: string;
262
+ innerWrapperAs?: string;
262
263
  }
263
264
 
264
265
  declare const Cluster: React.FC<Expand<ClusterProps> &
package/dist/index.esm.js CHANGED
@@ -46594,26 +46594,30 @@ var getPagesPanel = function getPagesPanel(page, pagesCount) {
46594
46594
 
46595
46595
  if (page > space + 1) {
46596
46596
  pages.push({
46597
- isDelimiter: true
46597
+ isDelimiter: true,
46598
+ id: "first-delimiter"
46598
46599
  });
46599
46600
  }
46600
46601
 
46601
46602
  for (var j = Math.max(1, page - space) + 1; j < Math.min(lastPageNumber, page + space); j++) {
46602
46603
  pages.push({
46603
46604
  index: j,
46604
- isButton: true
46605
+ isButton: true,
46606
+ id: "page-".concat(j)
46605
46607
  });
46606
46608
  }
46607
46609
 
46608
46610
  if (page < lastPageNumber - space) {
46609
46611
  pages.push({
46610
- isDelimiter: true
46612
+ isDelimiter: true,
46613
+ id: "last-delimiter"
46611
46614
  });
46612
46615
  }
46613
46616
 
46614
46617
  pages.push({
46615
46618
  index: lastPageNumber,
46616
- isButton: true
46619
+ isButton: true,
46620
+ id: "page-".concat(lastPageNumber)
46617
46621
  });
46618
46622
  var activePage = pages.find(function (p) {
46619
46623
  return p.index === page;
@@ -46648,6 +46652,7 @@ var Pagination = function Pagination(_ref3) {
46648
46652
  pageNext = _ref3.pageNext,
46649
46653
  pagePrevious = _ref3.pagePrevious,
46650
46654
  setCurrentPage = _ref3.setCurrentPage,
46655
+ ariaLabel = _ref3.ariaLabel,
46651
46656
  themeValues = _ref3.themeValues;
46652
46657
 
46653
46658
  var _useContext = useContext(ThemeContext),
@@ -46660,7 +46665,9 @@ var Pagination = function Pagination(_ref3) {
46660
46665
  childGap: childGap,
46661
46666
  overflow: true,
46662
46667
  as: "nav",
46668
+ role: "navigation",
46663
46669
  innerWrapperAs: "ul",
46670
+ "aria-label": ariaLabel,
46664
46671
  extraStyles: "> ul { padding: 0px; > li { list-style-type: none; } };"
46665
46672
  }, currentPage > 1 ? /*#__PURE__*/React.createElement(PrevNextButton, {
46666
46673
  action: pagePrevious,
@@ -46687,10 +46694,10 @@ var Pagination = function Pagination(_ref3) {
46687
46694
  return item.isButton ? /*#__PURE__*/React.createElement(Box, {
46688
46695
  padding: "0",
46689
46696
  extraStyles: "max-height: ".concat(buttonHeight, ";"),
46690
- as: "li"
46697
+ as: "li",
46698
+ key: item.id
46691
46699
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
46692
46700
  variant: "ghost",
46693
- key: item.index,
46694
46701
  text: item.index,
46695
46702
  disabled: item.active,
46696
46703
  extraDisabledStyles: extraDisabledStyles,
@@ -46705,11 +46712,12 @@ var Pagination = function Pagination(_ref3) {
46705
46712
  extraStyles: extraStyles,
46706
46713
  dataQa: index
46707
46714
  }, item.index)) : /*#__PURE__*/React.createElement(Box, {
46708
- padding: "0 10px"
46715
+ padding: "0 10px",
46716
+ as: "li",
46717
+ key: item.id
46709
46718
  }, /*#__PURE__*/React.createElement(Cluster, {
46710
46719
  justify: "flex-end"
46711
46720
  }, /*#__PURE__*/React.createElement(Text$1, {
46712
- key: index,
46713
46721
  variant: "pXL",
46714
46722
  weight: fontWeight,
46715
46723
  color: numberColor !== null && numberColor !== void 0 ? numberColor : themeValues.numberColor