@thecb/components 7.8.2-beta.3 → 7.8.2-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "7.8.2-beta.3",
3
+ "version": "7.8.2-beta.4",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -13,6 +13,7 @@ export interface ClusterProps {
13
13
  justifySelf?: string;
14
14
  alignSelf?: string;
15
15
  flexGrow?: string;
16
+ innerWrapperAs?: string;
16
17
  }
17
18
 
18
19
  export const Cluster: React.FC<Expand<ClusterProps> &
@@ -103,6 +103,7 @@ const Pagination = ({
103
103
  pageNext,
104
104
  pagePrevious,
105
105
  setCurrentPage,
106
+ ariaLabel,
106
107
  themeValues
107
108
  }) => {
108
109
  const { isMobile } = useContext(ThemeContext);
@@ -145,6 +146,7 @@ const Pagination = ({
145
146
  overflow={true}
146
147
  as="nav"
147
148
  innerWrapperAs="ul"
149
+ aria-label={ariaLabel}
148
150
  extraStyles="> ul { padding: 0px; > li { list-style-type: none; } };"
149
151
  >
150
152
  {currentPage > 1 ? (
@@ -187,10 +189,10 @@ const Pagination = ({
187
189
  padding="0"
188
190
  extraStyles={`max-height: ${buttonHeight};`}
189
191
  as="li"
192
+ key={`pagination-button-${item.index}`}
190
193
  >
191
194
  <ButtonWithAction
192
195
  variant="ghost"
193
- key={item.index}
194
196
  text={item.index}
195
197
  disabled={item.active}
196
198
  extraDisabledStyles={extraDisabledStyles}
@@ -211,10 +213,9 @@ const Pagination = ({
211
213
  </ButtonWithAction>
212
214
  </Box>
213
215
  ) : (
214
- <Box padding="0 10px">
216
+ <Box padding="0 10px" as="li" key={`pagination-elipsis-${index}`}>
215
217
  <Cluster justify="flex-end">
216
218
  <Text
217
- key={index}
218
219
  variant="pXL"
219
220
  weight={fontWeight}
220
221
  color={numberColor ?? themeValues.numberColor}
@@ -14,6 +14,7 @@ export interface PaginationProps {
14
14
  fontWeight?: string;
15
15
  numberColor?: string;
16
16
  pageCount: number;
17
+ ariaLabel?: string;
17
18
  pageNext: () => void;
18
19
  pagePrevious: () => void;
19
20
  setCurrentPage: ({ currentPage: number }) => void;