@moderneinc/design-system-components 7.7.0-next.34d191 → 7.7.0-next.3a81b7
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 +9 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/formatCount.d.ts +3 -0
- package/package.json +9 -9
package/dist/index.esm.js
CHANGED
|
@@ -3392,6 +3392,13 @@ const ModLoadingSpinner = ({
|
|
|
3392
3392
|
};
|
|
3393
3393
|
ModLoadingSpinner.displayName = "ModLoadingSpinner";
|
|
3394
3394
|
|
|
3395
|
+
const formatCount = (value, locales) => new Intl.NumberFormat(locales).format(value);
|
|
3396
|
+
const paginationRangeLabel = (page, pageSize, rowCount, locales) => {
|
|
3397
|
+
const start = page * pageSize + 1;
|
|
3398
|
+
const end = Math.min((page + 1) * pageSize, rowCount);
|
|
3399
|
+
return `${formatCount(start, locales)}-${formatCount(end, locales)} of ${formatCount(rowCount, locales)}`;
|
|
3400
|
+
};
|
|
3401
|
+
|
|
3395
3402
|
const StyledFooter = styled(Box, {
|
|
3396
3403
|
shouldForwardProp: (prop) => prop !== "showShadow"
|
|
3397
3404
|
})(({ theme, showShadow = false }) => ({
|
|
@@ -3515,10 +3522,7 @@ const ModFooter = ({
|
|
|
3515
3522
|
return paginationInfo;
|
|
3516
3523
|
}
|
|
3517
3524
|
if (paginationModel && rowCount > 0) {
|
|
3518
|
-
|
|
3519
|
-
const start = page * pageSize + 1;
|
|
3520
|
-
const end = Math.min((page + 1) * pageSize, rowCount);
|
|
3521
|
-
return `${start}-${end} of ${rowCount}`;
|
|
3525
|
+
return paginationRangeLabel(paginationModel.page, paginationModel.pageSize, rowCount);
|
|
3522
3526
|
}
|
|
3523
3527
|
return "0-0 of 0";
|
|
3524
3528
|
};
|
|
@@ -3598,7 +3602,7 @@ const ModFooter = ({
|
|
|
3598
3602
|
}
|
|
3599
3603
|
return /* @__PURE__ */ jsxs(StyledFooter, { showShadow, sx: { justifyContent: "space-between" }, children: [
|
|
3600
3604
|
showSelected ? /* @__PURE__ */ jsxs(SelectedText, { children: [
|
|
3601
|
-
selectedCount,
|
|
3605
|
+
formatCount(selectedCount),
|
|
3602
3606
|
" selected"
|
|
3603
3607
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
3604
3608
|
/* @__PURE__ */ jsxs(PaginationContainer, { children: [
|