@thecb/components 7.8.2-beta.5 → 7.8.2-beta.7
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
|
@@ -130,7 +130,7 @@ const Pagination = ({
|
|
|
130
130
|
}
|
|
131
131
|
`;
|
|
132
132
|
|
|
133
|
-
const
|
|
133
|
+
const currentPageStyles = `
|
|
134
134
|
border: ${activeBorderWidth} solid ${numberColor ??
|
|
135
135
|
themeValues.numberColor};
|
|
136
136
|
color: ${numberColor ?? themeValues.activeColor};
|
|
@@ -140,6 +140,9 @@ const Pagination = ({
|
|
|
140
140
|
}
|
|
141
141
|
&:hover {
|
|
142
142
|
background-color: initial;
|
|
143
|
+
border: ${activeBorderWidth} solid ${numberColor ??
|
|
144
|
+
themeValues.numberColor};
|
|
145
|
+
background-color: ${themeValues.activeBackgroundColor};
|
|
143
146
|
}
|
|
144
147
|
`;
|
|
145
148
|
|
|
@@ -157,7 +160,7 @@ const Pagination = ({
|
|
|
157
160
|
{currentPage > 1 ? (
|
|
158
161
|
<PrevNextButton
|
|
159
162
|
action={pagePrevious}
|
|
160
|
-
ariaLabel={`Previous Page
|
|
163
|
+
ariaLabel={`Previous Page`}
|
|
161
164
|
arrowColor={arrowColor ?? themeValues.arrowColor}
|
|
162
165
|
borderRadius={borderRadius}
|
|
163
166
|
buttonHeight={buttonHeight}
|
|
@@ -199,19 +202,19 @@ const Pagination = ({
|
|
|
199
202
|
<ButtonWithAction
|
|
200
203
|
variant="ghost"
|
|
201
204
|
text={item.index}
|
|
202
|
-
disabled={item.active}
|
|
203
|
-
extraDisabledStyles={extraDisabledStyles}
|
|
204
205
|
aria-current={item.active ? "page" : undefined}
|
|
205
|
-
aria-label={`${
|
|
206
|
-
item.index
|
|
207
|
-
}
|
|
206
|
+
aria-label={`${
|
|
207
|
+
item.index == pageCount ? "Last Page, " : ""
|
|
208
|
+
}page ${item.index}`}
|
|
208
209
|
action={
|
|
209
210
|
!item.active
|
|
210
211
|
? () => setCurrentPage({ pageNumber: item.index })
|
|
211
212
|
: noop
|
|
212
213
|
}
|
|
213
214
|
textExtraStyles={`font-size: ${fontSize}; font-weight: ${fontWeight};`}
|
|
214
|
-
extraStyles={extraStyles}
|
|
215
|
+
extraStyles={`${extraStyles}${
|
|
216
|
+
item.active ? currentPageStyles : ""
|
|
217
|
+
}`}
|
|
215
218
|
dataQa={index}
|
|
216
219
|
>
|
|
217
220
|
{item.index}
|
|
@@ -224,8 +227,9 @@ const Pagination = ({
|
|
|
224
227
|
variant="pXL"
|
|
225
228
|
weight={fontWeight}
|
|
226
229
|
color={numberColor ?? themeValues.numberColor}
|
|
230
|
+
role="presentation"
|
|
227
231
|
>
|
|
228
|
-
{"
|
|
232
|
+
{"…"}
|
|
229
233
|
</Text>
|
|
230
234
|
</Cluster>
|
|
231
235
|
</Box>
|
|
@@ -234,7 +238,7 @@ const Pagination = ({
|
|
|
234
238
|
{currentPage < pageCount ? (
|
|
235
239
|
<PrevNextButton
|
|
236
240
|
action={pageNext}
|
|
237
|
-
ariaLabel={`Next Page
|
|
241
|
+
ariaLabel={`Next Page`}
|
|
238
242
|
arrowColor={arrowColor ?? themeValues.arrowColor}
|
|
239
243
|
borderRadius={borderRadius}
|
|
240
244
|
buttonHeight={buttonHeight}
|